Skip to main content
summaryrefslogtreecommitdiffstats
blob: ef0eefe78d33305bd6cae243999ce6bc00c712a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="sample" targetNamespace="http://www.example.org/sample354" xmlns:tns="http://www.example.org/sample354" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:import namespace="http://www.example.org/sample241" location="sample241.wsdl"/>
<wsdl:import namespace="http://www.example.org/sample612" location="./sample612.wsdl"/>
<wsdl:import namespace="http://www.example.org/sample486" location=".\sample486.wsdl"/>
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/sample354">
<xsd:element name="NewOperationResponse" type="xsd:string"/><xsd:element name="NewOperationRequest" type="xsd:string"/></xsd:schema>
</wsdl:types>
<wsdl:message name="NewOperationResponse">
<wsdl:part name="NewOperationResponse" element="tns:NewOperationResponse"/>
</wsdl:message>
<wsdl:message name="NewOperationRequest">
<wsdl:part name="NewOperationRequest" element="tns:NewOperationRequest"/>
</wsdl:message>
<wsdl:portType name="sample">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewOperationRequest"/>
<wsdl:output message="tns:NewOperationResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="sampleSOAP" type="tns:sample">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="NewOperation">
<soap:operation soapAction="http://www.example.org/sample/NewOperation"/>
<wsdl:input>
<soap:body use="literal" parts=" NewOperationRequest"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal" parts=" NewOperationResponse"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="sample">
<wsdl:port name="sampleSOAP" binding="tns:sampleSOAP">
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Back to the top

ble> -rw-r--r--bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex307
-rw-r--r--bundles/org.eclipse.jst.jsp.core/DevTimeSupport/buildParser.xml32
-rw-r--r--bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF60
-rw-r--r--bundles/org.eclipse.jst.jsp.core/about.html34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/build.properties22
-rw-r--r--bundles/org.eclipse.jst.jsp.core/component.xml27
-rw-r--r--bundles/org.eclipse.jst.jsp.core/plugin.properties32
-rw-r--r--bundles/org.eclipse.jst.jsp.core/plugin.xml328
-rw-r--r--bundles/org.eclipse.jst.jsp.core/schema/eltranslator.exsd121
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Assert.java121
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java63
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java101
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties38
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Logger.java144
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java56
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java216
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java128
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java112
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java79
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.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.java280
-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.java1072
-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.java587
-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.java1091
-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.java117
-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.java879
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/HeadParserToken.java44
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/IntStack.java99
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java2113
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizerConstants.java21
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java521
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/DocumentFactoryForJSP.java54
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapter.java59
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java97
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java703
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcher.java23
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java58
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java108
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/AttrImplForJSP.java35
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/CommentImplForJSP.java50
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java120
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMModelForJSP.java45
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/ElementImplForJSP.java69
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestDOMModelUpdater.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestedDOMModelParser.java85
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/TextImplForJSP.java28
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/IJSPHeadContentDetector.java22
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentHeadContentDetector.java33
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java312
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/EscapedTextUtil.java87
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPProblem.java23
-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.java94
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java88
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java646
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java230
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java61
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java463
-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.java2858
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/StackMap.java124
-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.java50
-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.java527
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpress.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAndExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTChoiceExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTEqualityExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTFunctionInvocation.java40
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTGTNode.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTImplicitObject.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTLiteral.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTMultiplyExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOperatorExpression.java36
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOrExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTRelationalExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTStart.java28
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTUnaryExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValue.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValuePrefix.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValueSuffix.java41
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java45
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java464
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java100
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java134
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj675
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt281
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java1158
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java121
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java855
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java50
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java33
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java68
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java208
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java412
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java116
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java92
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java149
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed18
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed27
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh9
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java162
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java727
-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.java257
-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.java554
-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.java639
-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/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.java37
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQueryCMProvider.java78
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPDirectiveStructuredDocumentRegion.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java369
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java420
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPParserRegionFactory.java37
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPStructuredRegionFactory.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java3838
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java77
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java82
-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/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.java56
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java373
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java895
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperCache.java166
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java88
-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.java409
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/CommonXML.java84
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java485
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupport.java229
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java191
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java225
-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/HTMLValidationReporter.java108
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPActionValidator.java350
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPBatchValidator.java495
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPContentValidator.java96
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPDirectiveValidator.java580
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java178
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPJavaValidator.java335
-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/jspel/ELProblem.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/IJSPELTranslator.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IJarRecord.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.java32
-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.java2192
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java947
-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.java2075
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parserz/JSPedCSSRegionContexts.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.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/.project28
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.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.MF66
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/about.html34
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/build.properties22
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/dtool16/newjsp_wiz.gifbin360 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/etool16/newjsp_wiz.gifbin598 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/class_obj.gifbin586 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/default_co.gifbin176 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_default_obj.gifbin118 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_private_obj.gifbin87 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_protected_obj.gifbin119 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_public_obj.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_default_obj.gifbin604 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_private_obj.gifbin603 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_protected_obj.gifbin600 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_public_obj.gifbin586 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_default_obj.gifbin595 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_private_obj.gifbin594 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_protected_obj.gifbin592 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_public_obj.gifbin574 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/localvariable_obj.gifbin152 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/package_obj.gifbin227 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/private_co.gifbin183 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/protected_co.gifbin182 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public.gifbin193 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public_co.gifbin194 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-generic.gifbin98 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-jsp.gifbin135 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-template.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/wizban/newjspfile_wiz.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.properties105
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/plugin.xml1011
-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.java382
-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.java174
-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.properties154
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/Logger.java144
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/AutoEditStrategyForTabs.java187
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.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/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.java220
-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.java202
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/BeanInfoProvider.java442
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/CustomTemplateProposal.java42
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IBeanInfoProvider.java20
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IJavaPropertyDescriptor.java27
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java285
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java65
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java1330
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java304
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProcessor.java10
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELContentAssistProcessor.java149
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELProposalCollector.java92
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java305
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java259
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java219
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibDirectiveContentAssistProcessor.java389
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java164
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java173
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaParameterListValidator.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/NoRegionContentAssistProcessorForJSP.java96
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java104
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/JSPFContentSettingsPropertyPage.java254
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/ProjectJSPFContentSettingsPropertyPage.java19
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/derived/SingleCharReader.java66
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/ActionContributorJSP.java94
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/IHelpContextIds.java53
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImageHelper.java179
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImages.java49
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java62
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/format/FormattingStrategyJSPJava.java110
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/handlers/JSPFindOccurrencesHandler.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileEditorInput.java160
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileHyperlink.java60
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlink.java65
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java256
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TLDFileHyperlink.java124
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java454
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarHyperlink.java112
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarUriHyperlink.java85
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileHyperlink.java173
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileRegionHyperlink.java217
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/WorkspaceFileHyperlink.java78
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java372
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java60
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java67
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java74
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java47
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementActionDelegate.java116
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java68
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java74
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java41
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementActionDelegate.java109
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java66
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java82
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java60
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java69
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java80
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java63
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/MoveElementHandler.java76
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/RenameElementHandler.java78
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/BasicJSPSearchRequestor.java141
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesActionDelegate.java40
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesProcessor.java82
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPOccurrencesSearchResult.java29
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java117
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchRequestor.java81
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSingleFileSearchRequestor.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPMatchPresentation.java45
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPQueryParticipant.java98
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceInitializer.java78
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceNames.java83
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractPropertyPreferencePage.java300
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractValidationSettingsPage.java422
-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/JSPFilesPreferencePage.java80
-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.java854
-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.java91
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPValidationPreferencePage.java280
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionAnnotationModelChanges.java54
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java205
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryJSP.java77
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterHTML.java291
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterJSP.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionViewerInformation.java196
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java423
-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.java224
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/IStyleConstantsJSPJava.java20
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaCodeScanner.java106
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaColorProvider.java82
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWhitespaceDetector.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWordDetector.java32
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/LineStyleProviderForJava.java322
-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.java69
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/EncodingTemplateVariableResolverJSP.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeIdsJSP.java52
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeJSP.java33
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JSPDocumentRegionEdgeMatcher.java28
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCodeReader.java246
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaPairMatcher.java202
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/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/wizard/NewJSPFileWizardPage.java257
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPTemplatesWizardPage.java505
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java146
-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.java505
-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.java51
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.properties60
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.xml46
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/.classpath7
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/.cvsignore1
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/.project28
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.core.resources.prefs3
-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.MF9
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/about.html23
-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.properties13
-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_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/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/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/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_web_services_1_2.xsd747
-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/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/orm_1_0.xsd1562
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/persistence_1_0.xsd307
-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-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-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/plugin.properties3
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/plugin.xml181
-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/.project28
-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.properties24
-rw-r--r--bundles/org.eclipse.wst.css.core/component.xml16
-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.xml2270
-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.properties34
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/description.txt15
-rw-r--r--bundles/org.eclipse.wst.css.core/plugin.properties19
-rw-r--r--bundles/org.eclipse.wst.css.core/plugin.xml91
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCoreMessages.java43
-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.properties26
-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.java98
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategyImpl.java190
-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.java266
-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.java1369
-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.java417
-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.java1355
-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.java368
-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.java99
-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.java1077
-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.java268
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java624
-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.java1296
-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.java561
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java293
-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.java203
-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.java422
-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.java612
-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.java123
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java1003
-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.java119
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java126
-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.java383
-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.java399
-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.java260
-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.java69
-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.java51
-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.java90
-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.java33
-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.java293
-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.java1205
-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.java72
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java143
-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.java47
-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.java360
-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.java37
-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.java24
-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/.project28
-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.MF50
-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/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.properties66
-rw-r--r--bundles/org.eclipse.wst.css.ui/plugin.xml479
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.java163
-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.java126
-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.properties115
-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.java595
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSCACandidate.java104
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistContext.java404
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistProcessor.java331
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalArranger.java171
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGenerator.java234
-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.java166
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationValue.java371
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForHTMLTag.java157
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForPseudoSelector.java156
-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/HTML40Namespace.java890
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/CSSNodeAdapter.java593
-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/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.java292
-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/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.java50
-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/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/CSSUIPreferenceInitializer.java71
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceNames.java37
-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/CSSFilesPreferencePage.java67
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java273
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSyntaxColoringPage.java881
-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/ProjectionAnnotationModelChanges.java55
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionModelNodeAdapterCSS.java303
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionModelNodeAdapterFactoryCSS.java169
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionViewerInformation.java196
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/StructuredTextFoldingProviderCSS.java260
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java355
-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.java31
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForCSS.java198
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForEmbeddedCSS.java111
-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/CSSDocumentRegionEdgeMatcher.java83
-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.java225
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSTemplatesWizardPage.java505
-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.java121
-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/.project26
-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.MF44
-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/component.xml15
-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.java775
-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.java37
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationResources.properties27
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidator.java449
-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.java376
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java72
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java118
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java165
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java430
-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.java81
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java75
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCoreMessages.java95
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java57
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePluginResources.properties127
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java682
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java330
-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.java205
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java333
-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.java109
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java29
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java112
-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.java39
-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.java42
-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/.project26
-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.properties27
-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.gifbin159 -> 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/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/validate.gifbin358 -> 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.properties62
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/plugin.xml475
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDEditor.java102
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.java117
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.properties86
-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.java139
-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.java80
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java99
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties89
-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/DTDFilesPreferencePage.java160
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDSyntaxColoringPage.java855
-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.java65
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceNames.java37
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/projection/StructuredTextFoldingProviderDTD.java563
-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.java506
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java264
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java282
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java284
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java94
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java349
-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.java55
-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/.project28
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.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.MF38
-rw-r--r--bundles/org.eclipse.wst.html.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.html.core/build.properties23
-rw-r--r--bundles/org.eclipse.wst.html.core/component.xml15
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref.xml306
-rw-r--r--bundles/org.eclipse.wst.html.core/plugin.properties16
-rw-r--r--bundles/org.eclipse.wst.html.core/plugin.xml213
-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.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/Logger.java144
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java89
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java695
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java147
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupProcessorImpl.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/JSPElementNodeCleanupHandler.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/NodeCleanupHandler.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/commentelement/handlers/CommentElementHandlerForSSI.java150
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java1285
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMContentImpl.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMGroupImpl.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamedNodeMapImpl.java114
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamespaceImpl.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeImpl.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeListImpl.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinition.java75
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinitionFactory.java183
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdAddress.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdColumnGroup.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdDl.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdEmbed.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFieldset.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFlowContainer.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFrameset.java93
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHead.java175
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHtml.java334
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdInlineContainer.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdLiContainer.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdMap.java72
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdNoframesContent.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdOptionContainer.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdParamContainer.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdSelect.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTable.java140
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTableCellContainer.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTrContainer.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/DeclCollection.java244
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ElementCollection.java881
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/EntityCollection.java837
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HCMDocImpl.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttrDeclImpl.java122
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttributeDeclaration.java24
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataType.java66
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataTypeImpl.java125
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocument.java35
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocumentFactory.java93
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMNode.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElemDeclImpl.java366
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElementDeclaration.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclImpl.java76
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclaration.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLPropertyDeclaration.java102
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedA.java99
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedADDRESS.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAPPLET.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAREA.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASE.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASEFONT.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBDO.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBGSOUND.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBLOCKQUOTE.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBODY.java96
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBR.java51
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBUTTON.java101
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCAPTION.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCENTER.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOL.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOLGROUP.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDD.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDIV.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDL.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDT.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEMBED.java94
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEmpty.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFIELDSET.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFONT.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFORM.java92
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAME.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAMESET.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFlowContainer.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFontStyle.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHEAD.java78
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHR.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHTML.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHeading.java84
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIFRAME.java76
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIMG.java88
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedINPUT.java122
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedISINDEX.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedInlineContainer.java29
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLABEL.java93
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLEGEND.java54
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLI.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLINK.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedListItemContainer.java30
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMAP.java53
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMARQUEE.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMENU.java88
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMETA.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMarkChanges.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOBR.java33
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOEMBED.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOFRAMES.java79
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOSCRIPT.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOBJECT.java86
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOL.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTGROUP.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTION.java66
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedP.java104
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPARAM.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPRE.java91
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPcdata.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPhrase.java41
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedQ.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSCRIPT.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSELECT.java79
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSPAN.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIBase.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIConfig.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIEcho.java46
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIExec.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFlastmod.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFsize.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIInclude.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIPrintenv.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSISet.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSTYLE.java79
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedScripts.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTABLE.java90
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTEXTAREA.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTITLE.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTR.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableBody.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableCell.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedUL.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedWBR.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCM20DocImpl.java26
-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.java291
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP20Namespace.java81
-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.java570
-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.java173
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.java1690
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizerConstants.java20
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLResourceEncodingDetector.java187
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HeadParserToken.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/IntStack.java99
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/NullMemento.java37
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/DOMStyleModelImpl.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/DocumentStyleImpl.java96
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/ElementStyleImpl.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLConverter.java302
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeAdapter.java257
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeAdapterFactory.java170
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeConstants.java19
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeEntry.java136
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeRegistry.java142
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeRegistryReader.java107
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLModelParserAdapter.java356
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLModelParserAdapterFactory.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/MetaData.java28
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/MetaDataAdapter.java301
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/TagScanner.java166
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/UnknownTagAdapter.java82
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/encoding/HTMLDocumentCharsetDetector.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/encoding/HTMLDocumentLoader.java165
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/encoding/HTMLModelLoader.java112
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/EmbeddedCSSFormatter.java94
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java390
-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.java749
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLFormatterFactory.java109
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLTextFormatter.java299
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/SpaceConverter.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.java398
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/HTMLStyleSelectorAdapter.java141
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/HTMLStyleSelectorAdapterFactory.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/LinkElementAdapter.java275
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleAdapterFactory.java162
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleAttrAdapter.java248
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleElementAdapter.java452
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleListener.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/URLHelper.java33
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/URLModelProvider.java451
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelhandler/EmbeddedHTML.java166
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelhandler/ModelHandlerForHTML.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMAttributeDeclarationBuddySystem.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMDocumentForBuddySystem.java119
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMElementDeclarationBuddySystem.java201
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMNamedNodeMapForBuddySystem.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.java117
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/HTMLModelQueryImpl.java156
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/ModelQueryAdapterFactoryForEmbeddedHTML.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/ModelQueryAdapterFactoryForHTML.java247
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/XHTMLAssociationProvider.java137
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceInitializer.java124
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceNames.java277
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTML40Namespace.java675
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTMLCMProperties.java116
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTMLFilesPreferenceNames.java33
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTMLFormatContraints.java35
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/PreferenceNames.java35
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/contenttype/ContentTypeFamilyForHTML.java40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/contenttype/ContentTypeIdForHTML.java40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/text/IHTMLPartitionTypes.java31
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/text/StructuredTextPartitionerForHTML.java259
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/AbstractErrorInfo.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/CMUtil.java200
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/CompositeValidator.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/DocumentPropagatingValidator.java52
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ElementPropagatingValidator.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ErrorInfoImpl.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ErrorState.java41
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/FMUtil.java78
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java272
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLDocumentContentValidator.java196
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLElementAncestorValidator.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLElementContentValidator.java180
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLSimpleDocumentValidator.java39
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLSimpleValidator.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLValidationAdapterFactory.java72
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/MessageFactory.java385
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/NamespaceValidator.java127
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/NullValidator.java34
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/PrimeValidator.java25
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SMUtil.java36
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/Segment.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SyntaxValidator.java346
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/text/IHTMLPartitions.java32
-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/.project28
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.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.MF51
-rw-r--r--bundles/org.eclipse.wst.html.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.html.ui/build.properties23
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/dtool16/newhtml_wiz.gifbin232 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/etool16/newhtml_wiz.gifbin352 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/table.gifbin573 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-anchor.gifbin197 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-body.gifbin343 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-button.gifbin344 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-font.gifbin229 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-form.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-generic.gifbin98 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-html.gifbin570 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image-map.gifbin577 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image.gifbin601 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-jsp.gifbin135 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-template.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-title.gifbin581 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/wizban/newhfile_wiz.pngbin3833 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.properties74
-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.xml613
-rw-r--r--bundles/org.eclipse.wst.html.ui/schema/deviceProfileEntryProvider.exsd109
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationReporter.java150
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationResult.java64
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationWorkbenchHelper.java47
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidator.java559
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/LocalizedMessage.java65
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListHelper.java44
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListUtility.java436
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java273
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java199
-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.properties172
-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.java176
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/CustomTemplateProposal.java40
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java508
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java130
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java164
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/NoRegionContentAssistProcessorForHTML.java38
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/ReplaceNameTemplateContext.java104
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java83
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/HTMLNodeActionManager.java129
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterFactoryForHTML.java50
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterForHTML.java73
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntry.java33
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntryProvider.java32
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ContentSettingsRegistry.java173
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntry.java27
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProvider.java28
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProviderBuilder.java59
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/HTMLContentSettingsPropertyPage.java280
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ProjectContentSettingsPropertyPage.java282
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ProjectWebContentSettingsPropertyPage.java19
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/WebContentSettingsPropertyPage.java383
-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.java318
-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.java149
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImages.java32
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/IHelpContextIds.java49
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/handlers/HTMLFindOccurrencesHandler.java133
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java117
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceNames.java92
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/AbstractValidationSettingsPage.java398
-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/HTMLFilesPreferencePage.java127
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java331
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSyntaxColoringPage.java871
-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.java105
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLValidationPreferencePage.java332
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/PropertyPreferencePage.java300
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionAnnotationModelChanges.java54
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java205
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterHTML.java291
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionViewerInformation.java196
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java350
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForHTML.java66
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/search/HTMLFindOccurrencesActionDelegate.java34
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/search/HTMLFindOccurrencesProcessor.java32
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/IStyleConstantsHTML.java22
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/LineStyleProviderForHTML.java75
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.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/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.java65
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/FacetModuleCoreSupportDelegate.java84
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLFileWizardPage.java224
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLTemplatesWizardPage.java505
-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.java44
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.properties51
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.xml46
-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/.project28
-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.MF41
-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.properties18
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/plugin.xml170
-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.properties24
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/JsCoreMessages.java47
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/JsCorePlugin.java76
-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/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.java209
-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/JsNatureInstaller.java57
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsNatureUninstaller.java62
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java282
-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/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/provisional/text/IJSPPartitionTypes.java30
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/tasks/JsFileTaskScanner.java28
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/validation/JsBatchValidator.java436
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/validation/JsValidator.java316
-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.java63
-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.java92
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java560
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslationAdapter.java165
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslationAdapterFactory.java91
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslator.java562
-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.java265
-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.java63
-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.java172
-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.java775
-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/.project28
-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.MF24
-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.properties7
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.properties3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.xml40
-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/JSDTAdapterFactoryProviderForJSP.java32
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/JSDTStructuredTextViewerConfigurationJSP.java253
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.classpath7
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.project28
-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.prefs16
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/META-INF/MANIFEST.MF49
-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/plugin.properties72
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml740
-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.java108
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/StructuredTextViewerConfigurationJSDT.java255
-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.java234
-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/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.java98
-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.java80
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTContentAssistant.java110
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTContentAssistantProcessor.java253
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTContetAssistInvocationContext.java84
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTHtmlCompletionProcessor.java106
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTProposalCollector.java226
-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.java201
-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.java73
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/JSDTHyperlink.java80
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/JSDTHyperlinkDetector.java271
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/URLFileHyperlink.java169
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/WorkspaceFileHyperlink.java89
-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.java65
-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.java86
-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.java122
-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.java74
-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.java26
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/style/java/JSDTCodeScanner.java90
-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.java339
-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.java168
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/taginfo/JSDTInformationProvider.java47
-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/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.java361
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/JsJfaceNode.java281
-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.java42
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/provisional/contentoutline/JsMenuListener.java162
-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/.options18
-rw-r--r--bundles/org.eclipse.wst.sse.core/.project28
-rw-r--r--bundles/org.eclipse.wst.sse.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.core/.settings/org.eclipse.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.jFlex286
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.java977
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizerGenJava.cmd23
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/jflexerr.txt0
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/jflexout.txt6
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.jFlex285
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.java1206
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizerGenJava.cmd23
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/jflexerr.txt0
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/jflexout.txt8
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/XML10Names.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.java1948
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/CSSTokenizer.jflex511
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/flex.cmd7
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/flex.sh15
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/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.jflex2701
-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.jflex1328
-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.txt16
-rw-r--r--bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF50
-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/component.xml20
-rw-r--r--bundles/org.eclipse.wst.sse.core/config/charset.properties96
-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.xml58
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/adaptOnCreateFactory.exsd93
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/commentElementHandler.exsd131
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/contentTypeFactoryContribution.exsd93
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/cssprofile.exsd130
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/documentTypes.exsd172
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/embeddedTypeHandler.exsd109
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/formatProcessors.exsd108
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/modelHandler.exsd130
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/taskscanner.exsd123
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/AbstractContentSettingsHandler.java83
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/AbstractSubject.java54
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettings.java689
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsChangeSubject.java62
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsCreator.java26
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsFileHandler.java147
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsSelfHandler.java93
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsSynchronizer.java174
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/IContentSettings.java83
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/IContentSettingsHandler.java25
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/IContentSettingsListener.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/INotify.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ISubject.java26
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/SimpleNodeOperator.java354
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedIO.java258
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedReaderCreator.java533
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedStreamCreator.java509
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CommonCharsetNames.java258
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CommonEncodingPreferenceNames.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.java249
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/EncodingRule.java59
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/ICodedResourcePlugin.java19
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/IContentDescriptionExtended.java42
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/IResourceCharsetDetector.java21
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/IStreamCharsetDetector.java28
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/NonContentBasedEncodingRules.java139
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/Assert.java120
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/BufferedLimitedReader.java58
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/BufferedLimitedStream.java79
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/ByteReader.java109
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/CodedResourcePlugin.java55
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/Logger.java158
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/NullInputStream.java69
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/ResourceBundleHelper.java61
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/UnicodeBOMEncodingDetector.java213
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/CharConversionErrorWithDetail.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedInputExceptionWithDetail.java103
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedOutputExceptionWithDetail.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.java183
-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.java242
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningScheduler.java135
-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.java460
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/StructuredModelManager.java72
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/FileBufferModelManager.java808
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/IExecutionDelegate.java20
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ILockable.java30
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/JSPAwareAdapterFactory.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/Logger.java185
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ModelManagerPluginRegistryReader.java198
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/NoCancelProgressMonitor.java35
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/NotImplementedException.java37
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/NullMemento.java37
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/PropagatingAdapter.java38
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/PropagatingAdapterFactory.java29
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECoreMessages.java39
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java93
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePluginResources.properties21
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/AbstractStructuredCleanupProcessor.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.java70
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/document/StructuredDocumentFactory.java66
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/document/TextUtilities.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/filebuffers/BasicStructuredDocumentFactory.java91
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/AbstractStructuredFormatProcessor.java523
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/IStructuredFormatContraints.java39
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/IStructuredFormatPreferences.java33
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/IStructuredFormatProcessor.java70
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/IStructuredFormatter.java36
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/StructuredFormatContraints.java53
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/StructuredFormatPreferences.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/modelhandler/AbstractModelHandler.java72
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/modelhandler/EmbeddedTypeHandler.java77
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/modelhandler/IDocumentTypeHandler.java42
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/modelhandler/IModelHandler.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/BlockMarker.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.java529
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/AbstractStructuredModel.java1565
-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.java2064
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/EmbeddedTypeRegistry.java35
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/EmbeddedTypeRegistryImpl.java132
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/EmbeddedTypeRegistryReader.java71
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/ModelHandlerRegistry.java295
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/ModelHandlerRegistryReader.java106
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/ModelHandlerUtility.java50
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/PluginContributedFactoryReader.java126
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/parser/ContextRegion.java197
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/parser/ForeignRegion.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.java94
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/AbstractAdapterFactory.java158
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/AbstractNotifier.java240
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/DocumentChanged.java61
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IModelLifecycleListener.java27
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IModelLoader.java87
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IModelManager.java297
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IModelStateListener.java64
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/INodeAdapter.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/INodeAdapterFactory.java76
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/INodeNotifier.java103
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IStructuredModel.java391
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IndexedRegion.java74
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/StructuredModelManager.java75
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/document/IEncodedDocument.java58
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/document/IStructuredDocumentProposed.java223
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/AboutToBeChangedEvent.java44
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/IModelAboutToBeChangedListener.java26
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/IStructuredDocumentListener.java30
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/NewDocumentContentEvent.java40
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/NewDocumentEvent.java68
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/NoChangeEvent.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/RegionChangedEvent.java80
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/RegionsReplacedEvent.java85
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/StructuredDocumentEvent.java146
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/StructuredDocumentRegionsReplacedEvent.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/exceptions/ResourceAlreadyExists.java40
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/exceptions/ResourceInUse.java40
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/IModelManagerProposed.java338
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/IModelStateListenerProposed.java36
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/INodeAdapterFactoryManager.java33
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/IStructuredModelEvent.java17
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/IStructuredModelProposed.java152
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredDocument.java218
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredDocumentRegion.java163
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredDocumentRegionList.java52
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredPartitionTypes.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.java2968
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/BasicStructuredDocumentRegion.java599
-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.java281
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/MinimalDocument.java445
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/ReadOnlyPosition.java37
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentReParser.java1651
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentRegionEnumeration.java87
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentRegionIterator.java115
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentSequentialRewriteTextStore.java132
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentTextStore.java191
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/SubSetTextStore.java127
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/TextRegionListImpl.java223
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/IStructuredRegion.java27
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/IStructuredTypedRegion.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/SimpleStructuredRegion.java91
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/SimpleStructuredTypedRegion.java88
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/StructuredTextPartitioner.java604
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/CommandCursorPosition.java66
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/IDocumentSelectionMediator.java35
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/IStructuredTextUndoManager.java155
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextCommand.java34
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextCommandImpl.java137
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextCompoundCommandImpl.java260
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextUndoManager.java658
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/UndoDocumentEvent.java45
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/Assert.java164
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/Debug.java206
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/DocumentInputStream.java108
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/JarUtilities.java280
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/PathHelper.java148
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ProjectResolver.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.java39
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/TextUtilities.java63
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/URIResolver.java81
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/Utilities.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.java72
-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.java743
-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/.options70
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.project27
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.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.prefs16
-rw-r--r--bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF64
-rw-r--r--bundles/org.eclipse.wst.sse.ui/README.txt2
-rw-r--r--bundles/org.eclipse.wst.sse.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.sse.ui/build.properties30
-rw-r--r--bundles/org.eclipse.wst.sse.ui/html/maintopic.html13
-rw-r--r--bundles/org.eclipse.wst.sse.ui/html/subtopic.html13
-rw-r--r--bundles/org.eclipse.wst.sse.ui/html/toc.html13
-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/ctool16/spellcheck.gifbin370 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/collapseall.gifbin155 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/delete.gifbin221 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/synced.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/dtool16/spellcheck.gifbin243 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/collapseall.gifbin157 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/delete.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/synced.gifbin233 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/etool16/spellcheck.gifbin370 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/obj16/occ_match.gifbin121 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/obj16/preferences.gifbin224 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/obj16/prop_ps.gifbin344 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/plugin.properties108
-rw-r--r--bundles/org.eclipse.wst.sse.ui/plugin.xml768
-rw-r--r--bundles/org.eclipse.wst.sse.ui/reexport-info.txt4
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/editorconfiguration.exsd308
-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/quickFixProcessor.exsd135
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-encoding/org/eclipse/wst/sse/ui/internal/encoding/ui/EncodingPreferencePage.java109
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ConfigurationPointCalculator.java151
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISelfValidateEditAction.java27
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISourceEditingTextTools.java50
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointConstants.java25
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointProvider.java62
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IExtendedStorageEditorInput.java37
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NodeLocation.java48
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NullSourceEditingTextTools.java63
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/ExclusionsTab.java373
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java452
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java283
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java353
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EditorExecutionContext.java85
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FoldingActionGroup.java168
-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.java3525
-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.java693
-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/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.java275
-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.java207
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FileDropAction.java47
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FormatProcessorsExtensionReader.java102
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/GotoAnnotationAction.java370
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IActionValidator.java17
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IDropAction.java37
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedContributor.java30
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedEditorAction.java38
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedMarkupEditor.java47
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedSimpleEditor.java33
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IModelProvider.java21
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IPopupMenuContributor.java22
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IReleasable.java20
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ISourceViewerActionBarContributor.java29
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ITemporaryAnnotation.java17
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java161
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/PreferenceInitializer.java85
-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.java431
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java95
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties404
-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.java691
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredDocumentToTextAdapter.java1332
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredLineChangeHover.java48
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java125
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.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.java951
-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.java392
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionDefinitionIds.java57
-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.java47
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompoundContentAssistProcessor.java531
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContentAssistUtils.java92
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java341
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceCompletionProposal.java28
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceConstants.java17
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/StructuredContentAssistant.java155
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java736
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapter.java44
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapterFactory.java26
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateAction.java80
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateActionContributionItem.java85
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboList.java287
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboListOnPropertyPage.java39
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ContentSettingsPropertyPage.java297
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/AnnotationQuery.java164
-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.java129
-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.java304
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/DebugTextEditor.java438
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java63
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java90
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java210
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointsTarget.java189
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTML2TextReader.java304
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTMLTextPresenter.java194
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/LineBreakingReader.java124
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SingleCharReader.java66
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SubstitutionTextReader.java158
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/edit/util/SharedEditorPluginImageHelper.java58
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorModelUtil.java77
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImageHelper.java155
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImages.java33
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/IHelpContextIds.java58
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/StructuredModelDocumentProvider.java263
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java378
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java405
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/DropActionProxy.java150
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxy.java149
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxyForDelayLoading.java768
-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/format/StructuredFormattingStrategy.java91
-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/FindOccurrencesHandler.java118
-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/StructuredSelectHistoryHandler.java51
-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.java148
-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.java284
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferenceTab.java266
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorEditor.java142
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.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.java456
-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/IStructuredTextFoldingProvider.java45
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/AdapterPropertySheetEntryLabelProvider.java51
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ConfigurablePropertySheetPage.java214
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/CustomPropertyDescriptor.java89
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/RemoveAction.java45
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ShowPropertiesAction.java38
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/preferences/CommonEditorPreferenceNames.java35
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryProvider.java33
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistry.java32
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryExtension.java22
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryImpl.java210
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryReader.java142
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/AbstractLineStyleProvider.java401
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/CompatibleHighlighter.java127
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java906
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/IHighlighter.java34
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProvider.java52
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProviderForNoOp.java48
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/ReconcilerHighlighter.java157
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/StructuredPresentationReconciler.java1161
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/AbstractStructuredTextReconcilingStrategy.java527
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java757
-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.java239
-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.java304
-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.java352
-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.java308
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/StructuredDocumentDamagerRepairer.java60
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchLabelProvider.java75
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchQuery.java217
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionDelegate.java147
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesProcessor.java121
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesContentProvider.java89
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java184
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchResult.java127
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchViewPage.java140
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/SelectionHistory.java117
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectAction.java110
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java56
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectActionDelegate.java124
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectHistoryActionDelegate.java83
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellcheckStrategy.java359
-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/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.java129
-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/ui/OffsetStatusLineContributionItem.java1229
-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.java65
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PlatformStatusLineUtil.java171
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/RegistryReader.java175
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Sorter.java77
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/CaretEvent.java52
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ICaretListener.java20
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/INodeSelectionListener.java22
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ITextSelectionListener.java20
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/NodeSelectionChangedEvent.java43
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/TextSelectionChangedEvent.java41
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/ContentOutlineConfiguration.java316
-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.html134
-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.properties28
-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.xml175
-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/wsdl-mime.xsd70
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/xsd/wsdl.xsd322
-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/.options4
-rw-r--r--bundles/org.eclipse.wst.xml.core/.project27
-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.jFlex256
-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.MF74
-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.properties34
-rw-r--r--bundles/org.eclipse.wst.xml.core/component.xml21
-rw-r--r--bundles/org.eclipse.wst.xml.core/plugin.properties27
-rw-r--r--bundles/org.eclipse.wst.xml.core/plugin.xml216
-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/modelQueryExtensions.exsd116
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/Catalog.java556
-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.java155
-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.java220
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogSet.java65
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java223
-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.java83
-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.java233
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogElement.java83
-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/INextCatalog.java53
-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.java78
-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.java97
-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.java1244
-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/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.java214
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java290
-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/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.java856
-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.java403
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java138
-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.java118
-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.java602
-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.java411
-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.java253
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSEAdapter.java372
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java584
-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.java50
-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.java111
-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.java217
-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/ValidatorHelper.java357
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfiguration.java107
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationInfo.java196
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationMessages.java36
-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.java756
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/AbstractNestedValidator.java482
-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.java22
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java286
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java201
-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.java99
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/XMLMessageInfoHelper.java112
-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.properties32
-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.java42
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java80
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties26
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/CleanupProcessorXML.java88
-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.java223
-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.java99
-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.java1033
-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.java144
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java774
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CDATASectionImpl.java146
-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/CharacterDataImpl.java352
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CommentImpl.java203
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DOMModelImpl.java915
-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.java1179
-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.java1474
-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.java55
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeContainer.java514
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeImpl.java1063
-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.java111
-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.java346
-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.java166
-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.java1182
-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.java2424
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelUpdater.java1700
-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.java1559
-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.java92
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/formatter/XMLFormattingPreferences.java147
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelhandler/EmbeddedXML.java98
-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.java310
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/IntStack.java97
-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.java623
-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.java1937
-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.java205
-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.java63
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceNames.java215
-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.java26
-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.java41
-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.java129
-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.xml.ui/.classpath66
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.cvsignore10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.options1
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.project27
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.ui.prefs51
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF61
-rw-r--r--bundles/org.eclipse.wst.xml.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.xml.ui/build.properties30
-rw-r--r--bundles/org.eclipse.wst.xml.ui/examples/EditingAndValidatingXML.zipbin13213 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/XMLFile.gifbin564 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse.gifbin146 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse_all.gifbin155 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainoff.gifbin216 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainon.gifbin210 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand.gifbin153 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand_all.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/new_xml.gifbin239 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/rldgrmr.gifbin245 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/validate.gifbin334 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse.gifbin146 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse_all.gifbin157 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainoff.gifbin348 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainon.gifbin333 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand.gifbin153 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand_all.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/new_xml.gifbin370 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/rldgrmr.gifbin368 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/validate.gifbin558 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/XSDFile.gifbin574 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/add_correction.gifbin318 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/att_req_obj.gifbin221 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/attribute_obj.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/cdatasection.gifbin359 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/choice.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/comment_obj.gifbin196 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/correction_change.gifbin197 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/doctype.gifbin594 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/dtdfile.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/element_obj.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity_reference.gifbin316 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/enum.gifbin80 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/error-overlay.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/localvariable_obj.gifbin152 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/notation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/occurone_obj.gifbin139 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/proinst_obj.gifbin138 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-generic.gifbin98 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-macro.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag_generic_deemphasized_obj.gifbin81 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag_generic_emphasized_obj.gifbin99 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/text.gifbin349 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/txtext.gifbin354 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/warning_obj.gifbin337 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/error_ovr.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/stale_error_ovr.gifbin77 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/warn_ovr.gifbin162 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/view16/attibute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/wizban/generatexml_wiz.pngbin4789 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wiz.gifbin596 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wizbanner.pngbin4129 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/xmldoc.gifbin564 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/plugin.properties133
-rw-r--r--bundles/org.eclipse.wst.xml.ui/plugin.xml1516
-rw-r--r--bundles/org.eclipse.wst.xml.ui/schema/catalogFileType.exsd120
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java229
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java90
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java1052
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ElementNodePage.java38
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java201
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/URIUtils.java54
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java304
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java115
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java50
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogMessages.java137
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java242
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogResources.properties115
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java260
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java107
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/catalogEntry.gifbin1736 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/nextCatalog.gifbin1701 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/entry_obj.pngbin4129 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_expand.gifbin323 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_obj.gifbin561 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/nextCatalog_obj.gifbin608 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/xmlcatalog_obj.gifbin598 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/ovr16/error-overlay.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java135
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewer.java25
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewerActionBarContributor.java21
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourceEditorActionBarContributor.java228
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourcePageActionContributor.java62
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java459
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeExtension.java557
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java66
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorActionDefinitionIds.java33
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorMessages.java51
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginHOLD_OLD.java53
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImageHelper.java157
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImages.java27
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorResources.properties30
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorActionBarContributor.java93
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java899
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java319
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java320
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeHelpContextIds.java31
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java118
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java334
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java169
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidationUIMessages.java41
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/GroupNamePropertyTester.java52
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java254
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java118
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorsHandler.java108
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java159
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties29
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationOperation.java206
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizard.java232
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizardPage.java111
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExportXMLCatalogWizard.java90
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/IXMLWizardHelpContextIds.java48
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ImportXMLCatalogPage.java71
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ImportXMLCatalogWizard.java97
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java51
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java325
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java412
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLHandler.java71
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLTemplatesWizardPage.java508
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java879
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java78
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLSchemaValidationChecker.java71
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java40
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizardsMessages.java97
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties99
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java224
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/DOMObserver.java193
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/Logger.java163
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLFormattingStrategy.java105
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java324
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java117
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties331
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractCommentActionXMLDelegate.java117
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractNodeActionManager.java684
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ActionContributorXML.java224
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AddBlockCommentActionXMLDelegate.java85
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/BaseNodeActionManager.java519
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupActionXMLDelegate.java139
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupDialogXML.java204
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditAttributeAction.java79
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditDoctypeAction.java191
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditElementAction.java117
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditProcessingInstructionAction.java95
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditSchemaInfoAction.java166
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/GoToMatchingTagAction.java299
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/MenuBuilder.java146
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/NodeAction.java26
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/RemoveBlockCommentActionXMLDelegate.java87
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ReplacePrefixAction.java79
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/SiblingNavigationAction.java110
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ToggleCommentActionXMLDelegate.java174
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/AutoEditStrategyForTabs.java200
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java180
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java2496
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentModelGenerator.java90
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java115
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationPresenter.java122
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationProvider.java231
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContentAssistRequest.java260
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContextInfoModelUtil.java66
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/CustomTemplateProposal.java40
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java274
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NonValidatingModelQueryAction.java159
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ProposalComparator.java49
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java104
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SimpleCMElementDeclaration.java170
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SourceEditorImageHelper.java48
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java166
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistUtilities.java516
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentModelGenerator.java154
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLRelevanceConstants.java52
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java172
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java261
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapterFactory.java173
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java120
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeLabelProvider.java81
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshStructureJob.java258
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/XMLNodeActionManager.java53
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionAssistantProviderXML.java51
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionProcessorXML.java47
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java180
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/ProblemIDsXML.java31
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java192
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java151
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java162
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java188
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java111
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/XMLQuickAssistProcessor.java212
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditAttributeDialog.java172
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditDoctypeDialog.java235
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditElementDialog.java141
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditEntityHelper.java73
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditNamespaceInfoDialog.java265
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditProcessingInstructionDialog.java116
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditSchemaInfoDialog.java80
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoErrorHelper.java104
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoTable.java398
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdDialog.java87
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdPanel.java184
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdDialog.java111
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdPanel.java147
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java20
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/XMLCatalogTableViewer.java201
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/DragNodeCommand.java287
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/XMLDragAndDropManager.java54
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/doubleclick/XMLDoubleClickStrategy.java327
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java115
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/IHelpContextIds.java48
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImageHelper.java160
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImages.java57
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/AbstractSiblingNavigationHandler.java92
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/AddBlockCommentHandler.java77
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CleanupdocumentHandler.java119
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CollapseAllHandler.java52
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/CommentHandler.java103
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ExpandAllHandler.java54
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ExpandCollapseAllHandler.java58
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/NextSiblingNavigationHandler.java19
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/PreviousSiblingNavigationHandler.java19
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ReloadDependenciesHandler.java80
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/RemoveBlockCommentHandler.java84
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectEnclosingXMLHandler.java59
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectNextXMLHandler.java97
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/StructuredSelectPreviousXMLHandler.java75
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ToggleCommentHandler.java193
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/ToggleEditModeHandler.java137
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/handlers/XMLFindOccurencesHandler.java137
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileEditorInput.java171
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileHyperlink.java70
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/WorkspaceFileHyperlink.java88
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java554
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesControl.java278
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesDialog.java205
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesDialog.java327
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesTargetFieldDialog.java104
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonNamespaceInfoTable.java346
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EmptyFilePreferencePage.java100
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EncodingSettings.java359
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/WorkbenchDefaultEncodingSettings.java141
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLColorPage.java288
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java259
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java387
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSyntaxColoringPage.java870
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTemplatePreferencePage.java169
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTypingPreferencePage.java106
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceInitializer.java137
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceNames.java122
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionAnnotationModelChanges.java54
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterFactoryXML.java157
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java298
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionViewerInformation.java197
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java350
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/EnumeratedStringPropertyDescriptor.java71
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/StringComboBoxCellEditor.java119
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySource.java839
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/IDOMSourceEditingTextTools.java68
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/XMLSourceEditingTextTools.java182
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/registry/AdapterFactoryProviderForXML.java90
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesActionDelegate.java34
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesProcessor.java31
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectEnclosingXMLActionDelegate.java72
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectNextXMLActionDelegate.java109
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectPreviousXMLActionDelegate.java88
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/IStyleConstantsXML.java43
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java209
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java178
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLInformationProvider.java67
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java362
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java38
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeIdsXML.java50
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeXML.java35
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/XMLDocumentRegionEdgeMatcher.java27
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/SharedXMLEditorPluginImageHelper.java72
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonResources.java95
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonUIContextIds.java51
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java602
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidatorForXML.java56
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupQuickAssistProcessor.java147
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java738
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLContentOutlineConfiguration.java575
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySheetConfiguration.java259
-rw-r--r--bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.properties26
-rw-r--r--bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.xml24
-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.prefs79
-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.MF22
-rw-r--r--bundles/org.eclipse.wst.xsd.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsd.core/build.properties22
-rw-r--r--bundles/org.eclipse.wst.xsd.core/plugin.properties22
-rw-r--r--bundles/org.eclipse.wst.xsd.core/plugin.xml98
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/CMDocumentFactoryXSD.java47
-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.java3047
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDTypeUtil.java121
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDVisitor.java190
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/util/XSDSchemaLocatorAdapterFactory.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/util/XSDSchemaLocatorImpl.java75
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidationConfiguration.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.java113
-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.java39
-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.ui.prefs4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF85
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/build.properties28
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/component.xml7
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/XSDFile.gifbin361 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/blank.gifbin832 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/browsebutton.gifbin825 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/collapse_attr.gifbin854 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/delete_obj.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/dlcl16/schemaview_co.gifbin336 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/dlcl16/showproperties_obj.gifbin577 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/dtool16/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.properties854
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/plugin.xml467
-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.java286
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/CategoryAdapter.java175
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAdapterFactory.java142
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAnyTypeDefinitionAdapter.java41
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java73
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeGroupDefinitionAdapter.java213
-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.java229
-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.java429
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDElementDeclarationAdapter.java328
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDEmptyFieldAdapter.java120
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDModelGroupAdapter.java246
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDModelGroupDefinitionAdapter.java249
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDParticleAdapter.java161
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSchemaAdapter.java504
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSchemaDirectiveAdapter.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSimpleTypeDefinitionAdapter.java178
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDTypeDefinitionAdapter.java68
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDVisitor.java219
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDVisitorForFields.java185
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDWildcardAdapter.java238
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/commands/BaseDragAndDropCommand.java430
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/commands/XSDAttributeDragAndDropCommand.java243
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/commands/XSDElementDragAndDropCommand.java295
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/AttributeGroupDefinitionEditPart.java114
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/CategoryEditPart.java237
-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.java117
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ModelGroupEditPart.java224
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ReferenceConnection.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.java428
-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.java328
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDSimpleTypeEditPart.java232
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/model/SpaceFiller.java163
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/model/TargetConnectionSpaceFiller.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.java33
-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.java171
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/CategoryFigure.java97
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/CenteredIconFigure.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.java197
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/BuiltInTypesTreeViewerProvider.java221
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/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.java209
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/SelectBuiltInTypesForFilteringDialog.java108
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/XSDGraphViewerDialog.java359
-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.java1370
-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.java121
-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.java94
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDComplexTypeBaseTypeEditManager.java125
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorCSHelpIds.java134
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorConfiguration.java192
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorContextIds.java460
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorExtensionProperties.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorPlugin.java373
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDElementReferenceEditManager.java141
-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.java104
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDHyperlinkDetector.java151
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDHyperlinkTargetLocator.java301
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDMultiPageEditorContributor.java265
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDSelectionMapper.java44
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDSubstitutionGroupEditManager.java73
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTabbedPropertySheetPage.java155
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTypeReferenceEditManager.java225
-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.properties121
-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.java248
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDTypesSearchListProvider.java110
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/navigation/DesignViewNavigationLocation.java334
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/navigation/MultiPageEditorTextSelectionNavigationLocation.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/nsedit/SchemaPrefixChangeHandler.java208
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/nsedit/TargetNamespaceChangeHandler.java152
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/nsedit/XSDVisitor.java216
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/preferences/XSDPreferencePage.java318
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelAdapter.java237
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelQueryExtension.java220
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelReconcileAdapter.java186
-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.java456
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/XSDSchemaLocationResolverAdapterFactory.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/XSDSchemaLocationResolverImpl.java39
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/utils/OpenOnSelectionHelper.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.java178
-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.java127
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/CaptureScreenAction.java234
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/DeleteAction.java107
-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.java73
-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.java427
-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.java1490
-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.java132
-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.java166
-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.java271
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BaseFieldEditPart.java518
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BaseTypeConnectingEditPart.java205
-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.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/EditPartNavigationHandlerUtil.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/FieldEditPart.java21
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/IConnectionContainer.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.java170
-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.java244
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/TopLevelFieldEditPart.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/TypeReferenceConnection.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.java19
-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.java156
-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.java336
-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.java931
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonSelectionManager.java111
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ContextMenuParticipant.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.java51
-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.properties34
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IADTObject.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IADTObjectListener.java16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IComplexType.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IField.java34
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IModel.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IStructure.java23
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IType.java24
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ADTContentOutlinePage.java238
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ADTContentOutlineProvider.java141
-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.java110
-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.java138
-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/AddXSDSchemaDirectiveAction.java75
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDSimpleTypeDefinitionAction.java53
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/DeleteXSDConcreteComponentAction.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/OpenInNewEditor.java530
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/SetMultiplicityAction.java88
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/SetTypeAction.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/XSDBaseAction.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddDocumentationCommand.java131
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddEnumerationsCommand.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddExtensibilityElementCommand.java81
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddExtensionAttributeCommand.java110
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddExtensionCommand.java48
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddExtensionElementCommand.java152
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAnyAttributeCommand.java64
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAnyElementCommand.java80
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAttributeDeclarationCommand.java182
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAttributeGroupDefinitionCommand.java159
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDComplexTypeDefinitionCommand.java122
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDElementCommand.java340
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDImportCommand.java42
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDIncludeCommand.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDModelGroupCommand.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.java196
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/ChangeToLocalSimpleTypeCommand.java80
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/DeleteCommand.java164
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/ExtensibleAddExtensionCommand.java214
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/ExtensibleRemoveExtensionNodeCommand.java94
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RemoveExtensionAttributerCommand.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RemoveExtensionElementCommand.java46
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RemoveExtensionNodeCommand.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetBaseTypeAndManagerDirectivesCommand.java47
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetBaseTypeCommand.java85
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetMultiplicityCommand.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetTypeCommand.java116
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetXSDFacetValueCommand.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateAttributeReferenceAndManagerDirectivesCommand.java58
-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.java91
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateComplexTypeDerivationBy.java51
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateComponentReferenceAndManageDirectivesCommand.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.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateElementReferenceCommand.java39
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateMaxOccursCommand.java65
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateMinOccursCommand.java92
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateNameCommand.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.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateTypeReferenceCommand.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateXSDPatternFacetCommand.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateXSDWhiteSpaceFacetCommand.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/providers/XSDSectionLabelProvider.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.java366
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractSectionDescriptor.java108
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AnnotationSection.java162
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/CommonDirectivesSection.java163
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/EnumerationsSection.java405
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/ExtensionsSection.java294
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/FacetViewer.java559
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/IDocumentChangedNotifier.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/MultiplicitySection.java216
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/RefactoringSection.java98
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/SchemaLocationSection.java222
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/SimpleContentUnionMemberTypesDialog.java312
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/SpecificConstraintsWidget.java692
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDActionManager.java148
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAnyElementContentsSection.java251
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeDeclarationSection.java849
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeGroupDefinitionSection.java284
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDComplexTypeAdvancedSection.java257
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDComplexTypeSection.java357
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationAdvancedSection.java409
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java591
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDFacetSection.java1000
-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.java432
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDModelGroupDefinitionSection.java349
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDModelGroupSection.java163
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDSchemaSection.java318
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDSimpleTypeSection.java762
-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.java385
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/CategoryProvider.java81
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionDetailsContentProvider.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.java334
-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.java212
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/SpecificationForExtensionsSchema.java219
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/XSDExtensionTreeContentProvider.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.java130
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/XSDCommonUIUtils.java553
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/messages.properties115
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java38
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java25
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java35
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/PerformUnsavedRefactoringOperation.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java62
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringMessages.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java115
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeAnonymousTypeGlobalAction.java158
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeLocalElementGlobalAction.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java118
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameComponentAction.java156
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceAction.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceActionDelegate.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameTargetNamespaceAction.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/SelectionDispatchAction.java195
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.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/messages.properties51
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java52
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java501
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java174
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java419
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameChange.java108
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameParticipant.java296
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java87
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java71
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeAnonymousTypeGlobalCommand.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeLocalElementGlobalCommand.java98
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalChange.java168
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalProcessor.java220
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java97
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorActionGroup.java215
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java146
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactoringWizardMessages.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameInputWizardPage.java257
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/messages.properties55
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java29
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/SearchMessages.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java93
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java51
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/XSDSearchQuery.java54
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/BaseGroupActionDelegate.java146
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/CompositeActionGroup.java99
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/DeclarationsSearchGroup.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/FindAction.java30
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesAction.java149
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesInProjectAction.java45
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesInWorkingSetAction.java88
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/ImplementorsSearchGroup.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/OccurrencesSearchGroup.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/ReferencesSearchGroup.java179
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/SearchGroup.java20
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchActionGroup.java35
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchDeclarationsGroupActionDelegate.java22
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchGroupSubMenu.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchReferencesGroupActionDelegate.java46
-rw-r--r--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.MF42
-rw-r--r--development/org.eclipse.wst.sse.unittests/SSE Master List Test Suite.launch39
-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.java105
-rw-r--r--development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterPerformanceTestSuite.java51
-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.properties14
-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.html43
-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.properties8
-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.properties15
-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.cfsbin14180 -> 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.xml25
-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.xml25
-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.dita39
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tvaldtd.html64
-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.properties8
-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.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.properties8
-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.properties15
-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.xml26
-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.xml26
-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.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.cfsbin54984 -> 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.xml33
-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.properties3
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/plugin.xml33
-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.dita190
-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.dita99
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddagrp.html147
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddanye.dita77
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddanye.html117
-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.dita64
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddcmxt.html101
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddelm.dita69
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddelm.html116
-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.html127
-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.html132
-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.dita72
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddrdfn.html120
-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.dita115
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddsmpt.html174
-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.dita47
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tedtschm.html74
-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.dita64
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tvdtschm.html95
-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.properties5
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.web_core.feature/feature.properties145
-rw-r--r--features/org.eclipse.wst.web_core.feature/feature.xml76
-rw-r--r--features/org.eclipse.wst.web_core.feature/license.html98
-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.properties16
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateFeature/feature.properties145
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateFeature/license.html82
-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.properties8
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.web_sdk.feature/feature.properties145
-rw-r--r--features/org.eclipse.wst.web_sdk.feature/feature.xml32
-rw-r--r--features/org.eclipse.wst.web_sdk.feature/license.html98
-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.properties5
-rw-r--r--features/org.eclipse.wst.web_ui.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_ui.feature/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.web_ui.feature/feature.properties145
-rw-r--r--features/org.eclipse.wst.web_ui.feature/feature.xml161
-rw-r--r--features/org.eclipse.wst.web_ui.feature/license.html98
-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.properties20
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateFeature/feature.properties133
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateFeature/license.html82
-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.properties5
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/feature.properties145
-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/feature.xml38
-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/license.html98
-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.properties6
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.xml_core.feature/feature.properties145
-rw-r--r--features/org.eclipse.wst.xml_core.feature/feature.xml110
-rw-r--r--features/org.eclipse.wst.xml_core.feature/license.html96
-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.properties16
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateFeature/feature.properties145
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateFeature/license.html82
-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.properties7
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/feature.properties145
-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/feature.xml32
-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/license.html96
-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.properties5
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/feature.properties145
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/feature.xml127
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/license.html96
-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.properties19
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateFeature/feature.properties145
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateFeature/license.html82
-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.properties5
-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/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/feature.properties145
-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/feature.xml52
-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/license.html96
4293 files changed, 0 insertions, 618569 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 0f10b7a1d8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.jsp.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index afa5c91352..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Apr 04 03:36:32 EDT 2006
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 7ec5750225..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.core.runtime.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Apr 17 01:48:39 EDT 2006
-eclipse.preferences.version=1
-line.separator=\r\n
diff --git a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 66ddc696d6..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=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.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 301c7adde6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Apr 17 01:48:39 EDT 2006
-eclipse.preferences.version=1
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates/>
diff --git a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index c59368c5e1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.ltk.core.refactoring.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Apr 04 03:36:32 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fc522bba76..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,16 +0,0 @@
-#Mon Apr 17 02:01:33 EDT 2006
-compilers.incompatible-environment=0
-compilers.p.build=0
-compilers.p.deprecated=1
-compilers.p.illegal-att-value=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=0
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/HowToGen.html b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/HowToGen.html
deleted file mode 100644
index ea439f1291..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/HowToGen.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-<body>
-<p>
-JSPedCSSTokenizer class is a scanner generated by <a href="http://www.jflex.de/">JFlex</a> 1.4.1
-from the JSPedCSSTokenizer.flex grammer file.
-After generating the scanner, I removed unused private field errors.
-</p>
-</body>
-<html>
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex
deleted file mode 100644
index a48194e5b1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex
+++ /dev/null
@@ -1,596 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.css.core.internal.parser;
-
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.jsp.css.core.internal.parserz.JSPedCSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.internal.parser.ICSSTokenizer;
-import org.eclipse.wst.css.core.internal.parser.regions.CSSTextRegionFactory;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-%%
-
-%public
-%class JSPedCSSTokenizer
-%implements JSPedCSSRegionContexts, ICSSTokenizer
-%function primGetNextToken
-%type String
-%char
-%line
-%unicode
-%caseless
-%pack
-
-%{
- private final static String UNDEFINED = "undefined";
- private String fBufferedContext = null;
- private int fBufferedStart;
-// private int fBufferedTextLength;
- private int fBufferedLength;
-// private StringBuffer fBufferedText = null;
- private CSSTextRegionFactory fRegionFactory = CSSTextRegionFactory.getInstance();
- private int fInitialState = YYINITIAL;
- public final static int BUFFER_SIZE_NORMAL = 16384;
- public final static int BUFFER_SIZE_SMALL = 256;
- private int fInitialBufferSize = BUFFER_SIZE_NORMAL;
-
- public void setInitialState(int state) {
- fInitialState = state;
- }
-
- public void setInitialBufferSize(int size) {
- fInitialBufferSize = size;
- }
-
- /* user method */
- public final ITextRegion getNextToken() throws IOException {
- String context;
- String nextTokenType;
- boolean spaceFollows;
-// StringBuffer text;
- int start;
- int textLength;
- int length;
- if (fBufferedContext != null) {
- context = fBufferedContext;
-// text = fBufferedText;
- start = fBufferedStart;
- textLength = length = fBufferedLength;
-
- fBufferedContext = null;
- } else {
- context = primGetNextToken();
-// text = new StringBuffer(yytext());
- start = yychar;
- textLength = length = yylength();
- }
-
- if (context != null) {
- if (context == CSS_JSP_SCRIPTLET || context == CSS_JSP_EL){
- nextTokenType = primGetNextToken();
- while (nextTokenType != CSS_JSP_END && nextTokenType != CSS_EL_END && nextTokenType != CSS_JSP_COMMENT) {
-// text.append(yytext());
- textLength += yylength();
- length = textLength;
- if (context.equals(CSS_JSP_SCRIPTLET) && (yystate() == ST_JSP_DIRECTIVE || yystate() == ST_JSP_EXP || yystate() == ST_JSP_DECLARATION)){
- context = nextTokenType;
- }
- nextTokenType = primGetNextToken();
- if (nextTokenType == null){
- break;
- }
- }
- if (context == CSS_JSP_SCRIPTLET){
- while (nextTokenType != CSS_JSP_COMMENT_END) {
-// text.append(yytext());
- textLength += yylength();
- length = textLength;
- if (context.equals(CSS_JSP_SCRIPTLET) && yystate() == ST_JSP_COMMENT){
- context = nextTokenType;
- }
-
- nextTokenType = primGetNextToken();
- if (nextTokenType == null){
- break;
- }
- }
- if (context == CSS_JSP_COMMENT){
- context = CSS_COMMENT;
- }
- }
- textLength += yylength();
- length = textLength;
-
- }
- if (context == UNDEFINED) {
- // undef -> concatenate undef's
- nextTokenType = primGetNextToken();
- while (nextTokenType == UNDEFINED) {
-// text.append(yytext());
- textLength += yylength();
- length = textLength;
- nextTokenType = primGetNextToken();
- }
- fBufferedContext = nextTokenType;
-// fBufferedText = new StringBuffer(yytext());
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- } else {
- nextTokenType = null;
- spaceFollows = false;
- if (CSSRegionUtil.isDeclarationValueType(context)) { // declaration value can contain VALUE_S
- nextTokenType = primGetNextToken();
- spaceFollows = (nextTokenType == CSS_DECLARATION_VALUE_S);
- } else if (canContainSpace(context)) {
- nextTokenType = primGetNextToken();
- spaceFollows = (nextTokenType == CSS_S);
- }
- if (nextTokenType != null) { // nextToken is retrieved
- if (spaceFollows) {
- // next is space -> append
-// text.append(yytext());
- length += yylength();
- } else {
- // next is NOT space -> push this for next time, return itself
- fBufferedContext = nextTokenType;
-// fBufferedText = new StringBuffer(yytext());
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- }
- }
- }
- }
-
- if (context != null) {
- if (context == UNDEFINED) {
- context = CSS_UNKNOWN;
- }
- return fRegionFactory.createRegion(context, start, textLength, length);
- } else {
- return null;
- }
- }
-
- /* user method */
- /* for standalone use */
- public final List parseText() throws IOException {
- List tokens = new ArrayList();
-
- CSSTextToken token;
- for (String kind = primGetNextToken(); kind != null; kind = primGetNextToken()) {
- token = new CSSTextToken();
- token.kind = kind;
- token.start = yychar;
- token.length = yylength();
- token.image = yytext();
- tokens.add(token);
- }
-
- return tokens;
- }
-
- /* user method */
- private boolean canContainSpace(String type) {
- if (type == CSS_DELIMITER || type == CSS_RBRACE || type == CSS_DECLARATION_DELIMITER) {
- return false;
- } else {
- return true;
- }
- }
-
- /* user method */
- public final int getOffset() {
- return yychar;
- }
-
- /* user method */
- public final boolean isEOF() {
- return zzAtEOF;
- }
-
- /* user method */
- public void reset(char[] charArray) {
- reset(new CharArrayReader(charArray), 0);
- }
-
- /* user method */
- public final void reset(java.io.Reader in, int newOffset) {
- /** the input device */
- zzReader = in;
-
- /** the current state of the DFA */
- zzState = 0;
-
- /** the current lexical state */
- zzLexicalState = fInitialState; //YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- if (zzBuffer.length != fInitialBufferSize) {
- zzBuffer = new char[fInitialBufferSize];
- }
- java.util.Arrays.fill(zzBuffer, (char)0);
-
- /** the textposition at the last accepting state */
- zzMarkedPos = 0;
-
- /** the textposition at the last state to be included in yytext */
- zzPushbackPos = 0;
-
- /** the current text position in the buffer */
- zzCurrentPos = 0;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- zzStartRead = 0;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- zzEndRead = 0;
-
- /** number of newlines encountered up to the start of the matched text */
- yyline = 0;
-
- /** the number of characters up to the start of the matched text */
- yychar = 0;
-
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- yycolumn = 0;
-
- /**
- * yy_atBOL == true <=> the scanner is currently at the beginning of a line
- */
- zzAtBOL = false;
-
- /** yy_atEOF == true <=> the scanner has returned a value for EOF */
- zzAtEOF = false;
-
- /* user variables */
- // fUndefined.delete(0, fUndefined.length());
- }
-
- /* user method */
- public JSPedCSSTokenizer() {
- super();
- }
-
- private int fJSPPreviousState = fInitialState;
- private void yyJspBegin(int newstate){
- fJSPPreviousState = yystate();
- yybegin(newstate);
- }
- private void yyJspEnd(){
- yybegin(fJSPPreviousState);
- }
-%}
-
-%state ST_CHARSET_NAME
-%state ST_CHARSET_DELIMITER
-%state ST_IMPORT_URI
-%state ST_IMPORT_MEDIUM
-%state ST_IMPORT_DELIMITER
-%state ST_MEDIA_MEDIUM
-%state ST_MEDIA_DELIMITER
-%state ST_PAGE_PSEUDO_PAGE
-%state ST_PAGE_DELIMITER
-%state ST_FONT_FACE_DELIMITER
-%state ST_SELECTOR
-%state ST_SELECTOR_MODIFIER
-%state ST_SELECTOR_ATTRIBUTE_NAME
-%state ST_SELECTOR_ATTRIBUTE_OPERATOR
-%state ST_SELECTOR_ATTRIBUTE_VALUE
-%state ST_SELECTOR_ATTRIBUTE_END
-%state ST_DECLARATION
-%state ST_DECLARATION_SEPARATOR
-%state ST_DECLARATION_PRE_VALUE
-%state ST_DECLARATION_VALUE
-%state ST_JSP_SCRIPTLET
-%state ST_JSP_DIRECTIVE
-%state ST_JSP_DECLARATION
-%state ST_JSP_EXP
-%state ST_JSP_EL
-%state ST_JSP_COMMENT
-
-
-h = [0-9a-f]
-nonascii = [\u0080-\uffff]
-unicode = \\{h}{1,6}[ \t\r\n\f]?
-escape = {unicode}|\\[ -~\u0080-\uffff]
-nmstart = [_a-zA-Z-]|{nonascii}|{escape}
-nmchar = [_a-zA-Z0-9-]|{nonascii}|{escape}
-string1 = \"([\t !#$%&(-~]|\\{nl}|\'|{nonascii}|{escape})*\"
-string2 = \'([\t !#$%&(-~]|\\{nl}|\"|{nonascii}|{escape})*\'
-
-ident = {nmstart}{nmchar}*
-name = {nmchar}+
-num = [+-]?([0-9]+|[0-9]*"."[0-9]+)
-string = {string1}|{string2}
-url = ([ !#$%&*-~]|{nonascii}|{escape})*
-s = [ \t\r\n\f]
-w = {s}*
-nl = \n|\r\n|\r|\f
-range = \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|{h})))))
-
-hash = "#"{name}
-uri = ("url("{w}{string}{w}")"|"url("{w}{url}{w}")")
-function = {ident}"("
-unicode_range = "U"\+[0-9a-fA-F?]{1,6}("-"[0-9a-fA-F?]{1,6})?
-
-SS = [\x20\x09\x0D\x0A]
-jspstart = "<"{SS}*"%"{SS}*
-jspend = "%"{SS}*">"
-elstart = "$"{SS}*"{"
-elend = "}"
-
-%%
-
-
-
-<YYINITIAL> {
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_JSP_SCRIPTLET> {
- "@" {yybegin(ST_JSP_DIRECTIVE); return CSS_JSP_DIRECTIVE;}
- "=" {yybegin(ST_JSP_EXP); return CSS_JSP_EXP;}
- "!" {yybegin(ST_JSP_DECLARATION); return CSS_JSP_DECL;}
- {jspend} {yyJspEnd(); return CSS_JSP_END;}
- "--" { yybegin(ST_JSP_COMMENT); return CSS_JSP_COMMENT;}
-}
-
-/* override global "}" */
-<ST_JSP_EL> {
- {elend} {yyJspEnd(); return CSS_EL_END; }
-}
-
-<ST_JSP_DIRECTIVE, ST_JSP_EXP, ST_JSP_DECLARATION> {
- {jspend} {yyJspEnd(); return CSS_JSP_END;}
-}
-
-<ST_JSP_COMMENT> {
- -+-{jspend} { yyJspEnd(); return CSS_JSP_COMMENT_END; }
- "}" { return UNDEFINED; }
-}
-
-
-/*
- * *** global ***
- */
-
-{s}+ { return CSS_S; }
-"<!--" { return CSS_CDO; }
-"-->" { return CSS_CDC; }
-"}" { yybegin(YYINITIAL); return CSS_RBRACE; }
-\/\*[^*]*\*+([^/*][^*]*\*+)*\/ { return CSS_COMMENT; }
-//\<\%--[^-}]*[}]*[^}]*-+-\%\> { return CSS_COMMENT; }
-
-
-//<YYINITIAL> {
-// "@import" { yybegin(ST_IMPORT_URI); return CSS_IMPORT; }
-//}
-
-/*
- * *** charset rule ***
- * CHARSET_SYM S* STRING S* ';'
- */
-
-"@charset" { yybegin(ST_CHARSET_NAME); return CSS_CHARSET; }
-
-<ST_CHARSET_NAME> {
- {string} { yybegin(ST_CHARSET_DELIMITER); return CSS_STRING; }
-}
-
-<ST_CHARSET_DELIMITER> {
- ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
-}
-
-/*
- * *** import rule ***
- * IMPORT_SYM S* [STRING|URI] S* [ medium [ COMMA S* medium]* ]? ';' S*
- */
-
-"@import" { yybegin(ST_IMPORT_URI); return CSS_IMPORT; }
-
-<ST_IMPORT_URI> {
- {string} { yybegin(ST_IMPORT_MEDIUM); return CSS_STRING; }
- // "url("{w}{string}{w}")" { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
- // "url("{w}{url}{w}")" { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
- {uri} { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
- ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
-}
-
-<ST_IMPORT_MEDIUM> {
- {ident} { yybegin(ST_IMPORT_DELIMITER); return CSS_MEDIUM; }
- ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
-}
-
-<ST_IMPORT_DELIMITER> {
- ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
- "," { yybegin(ST_IMPORT_MEDIUM); return CSS_MEDIA_SEPARATOR; }
-}
-
-/*
- * *** media rule ***
- * MEDIA_SYM S* medium [ COMMA S* medium ]* LBRACE S* ruleset* '}' S*
- */
-
-"@media" { yybegin(ST_MEDIA_MEDIUM); return CSS_MEDIA; }
-
-/*
- * medium
- * IDENT S*
- */
-<ST_MEDIA_MEDIUM> {
- {ident} { yybegin(ST_MEDIA_DELIMITER); return CSS_MEDIUM; }
-}
-
-<ST_MEDIA_DELIMITER> {
- "{" { yybegin(YYINITIAL); return CSS_LBRACE; }
- "," { yybegin(ST_MEDIA_MEDIUM); return CSS_MEDIA_SEPARATOR; }
-}
-
-/*
- * *** page rule **
- * PAGE_SYM S* pseudo_page? S* LBRACE S* declaration [ ';' S* declaration ]* '}' S*
- */
-
-"@page" { yybegin(ST_PAGE_PSEUDO_PAGE); return CSS_PAGE; }
-
-/*
- * pseudo_page
- * ':' IDENT
- */
-
-<ST_PAGE_PSEUDO_PAGE> {
- ":"?{ident} { yybegin(ST_PAGE_DELIMITER); return CSS_PAGE_SELECTOR; }
- "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
-}
-
-<ST_PAGE_DELIMITER> {
- "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
-}
-
-/*
- * font-face
- * FONT_FACE_SYM S* '{' S* declaration [ ';' S* declaration '* '}' S*
- */
-
-"@font-face" { yybegin(ST_FONT_FACE_DELIMITER); return CSS_FONT_FACE; }
-
-<ST_FONT_FACE_DELIMITER> {
- "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
-}
-
-/*
- * selector
- * simple_selector [ combinator simple_selector ]*
- */
-
-/*
- * simple_selector
- * element_name [ HASH | class | attrib | pseudo ]* | [ HASH | class | attrib | pseudo ]+
- */
-
-<YYINITIAL, ST_SELECTOR_MODIFIER, ST_SELECTOR> {
- "*" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_UNIVERSAL; }
- {hash} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ID; }
-// ":"{ident} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_PSEUDO; }
- ":"{ident}("("{s}*{ident}{s}*")")? { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_PSEUDO; }
- "."{name} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_CLASS; }
- "[" { yybegin(ST_SELECTOR_ATTRIBUTE_NAME); return CSS_SELECTOR_ATTRIBUTE_START; }
-}
-
-<YYINITIAL, ST_SELECTOR> {
- {ident} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ELEMENT_NAME; }
-}
-
-<ST_SELECTOR_MODIFIER> {
- "," { yybegin(ST_SELECTOR); return CSS_SELECTOR_SEPARATOR; }
- // using LOOKAHEAD
- {s}+/[^+>\{] { yybegin(ST_SELECTOR); return CSS_SELECTOR_COMBINATOR; }
- "+"|">" { yybegin(ST_SELECTOR); return CSS_SELECTOR_COMBINATOR; }
- "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
-}
-
-/*
- * attrib
- * '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* [ IDENT | STRING ] S* ]? ']'
- */
-
-<ST_SELECTOR_ATTRIBUTE_NAME> {
- {ident} { yybegin(ST_SELECTOR_ATTRIBUTE_OPERATOR); return CSS_SELECTOR_ATTRIBUTE_NAME; }
-}
-
-<ST_SELECTOR_ATTRIBUTE_OPERATOR> {
- "="|"~="|"|=" { yybegin(ST_SELECTOR_ATTRIBUTE_VALUE); return CSS_SELECTOR_ATTRIBUTE_OPERATOR; }
- "]" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ATTRIBUTE_END; }
-}
-
-<ST_SELECTOR_ATTRIBUTE_VALUE> {
- {ident}|{string} { yybegin(ST_SELECTOR_ATTRIBUTE_END); return CSS_SELECTOR_ATTRIBUTE_VALUE; }
-}
-
-<ST_SELECTOR_ATTRIBUTE_END> {
- "]" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ATTRIBUTE_END; }
-}
-
-/*
- * declaration
- * property ':' S* expr prio? | // empty //
- */
-
-<ST_DECLARATION> {
- {ident} { yybegin(ST_DECLARATION_SEPARATOR); return CSS_DECLARATION_PROPERTY; }
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_DECLARATION_SEPARATOR> {
- ":" { yybegin(ST_DECLARATION_PRE_VALUE); return CSS_DECLARATION_SEPARATOR; }
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_DECLARATION_PRE_VALUE, ST_DECLARATION_VALUE> {
- "!"{s}*"important" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_IMPORTANT; }
- {ident} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_IDENT; }
- ")" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE; }
- {num}{ident} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_DIMENSION; }
- {num}"%" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_PERCENTAGE; }
- {num} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_NUMBER; }
- {function} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_FUNCTION; }
- {string} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_STRING; }
- {uri} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_URI; }
- "#"{name} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_HASH; }
- {unicode_range} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_UNICODE_RANGE; }
- [,/] { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_OPERATOR; }
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_DECLARATION_VALUE> {
- {s}+/[^;}] { return CSS_DECLARATION_VALUE_S; }
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_DECLARATION, ST_DECLARATION_SEPARATOR, ST_DECLARATION_PRE_VALUE, ST_DECLARATION_VALUE> {
- ";" { yybegin(ST_DECLARATION); return CSS_DECLARATION_DELIMITER; }
- // "}" { yybegin(YYINITIAL); return CSS_RBRACE; }
-}
-
-
-//<YYINITIAL, ST_IMPORT_URI, ST_IMPORT_MEDIUM, ST_IMPORT_DELIMITER> {
-// \/\*[^*]*\*+([^/*][^*]*\*+)*\/ { return CSS_COMMENT; }
-// {s}+ { return CSS_S; }
-// . { return UNDEFINED; }
-//}
-
-//<YYINITIAL, ST_IMPORT_URI, ST_IMPORT_MEDIUM, ST_IMPORT_DELIMITER> {
-// [^ \t\r\n\f]+ { return CSS_UNKNOWN; }
-//}
-
-
-
-
-
-. {
- return UNDEFINED;
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex
deleted file mode 100644
index 858dd29009..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex
+++ /dev/null
@@ -1,307 +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
- *******************************************************************************/
-/*nlsXXX*/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-
-
-
-
-%%
-
-%{
-
-
-
-
- private boolean hasMore = true;
- private final static int MAX_TO_SCAN = 8000;
- StringBuffer string = new StringBuffer();
- // state stack for easier state handling
- private IntStack fStateStack = new IntStack();
- private String valueText = null;
- private boolean isXHTML;
- private boolean isWML;
-
-
- public JSPHeadTokenizer() {
- super();
- }
-
- public void reset (Reader in) {
- /* the input device */
- zzReader = in;
-
- /* the current state of the DFA */
- zzState = 0;
-
- /* the current lexical state */
- zzLexicalState = YYINITIAL;
-
- /* this buffer contains the current text to be matched and is
- the source of the yytext() string */
- java.util.Arrays.fill(zzBuffer, (char)0);
-
- /* the textposition at the last accepting state */
- zzMarkedPos = 0;
-
- /* the textposition at the last state to be included in yytext */
- zzPushbackPos = 0;
-
- /* the current text position in the buffer */
- zzCurrentPos = 0;
-
- /* startRead marks the beginning of the yytext() string in the buffer */
- zzStartRead = 0;
-
- /**
- * endRead marks the last character in the buffer, that has been read
- * from input
- */
- zzEndRead = 0;
-
- /* number of newlines encountered up to the start of the matched text */
- //yyline = 0;
-
- /* the number of characters up to the start of the matched text */
- yychar = 0;
-
- /**
- * the number of characters from the last newline up to the start
- * of the matched text
- */
- //yycolumn = 0;
-
- /**
- * yy_atBOL == true <=> the scanner is currently at the beginning
- * of a line
- */
- zzAtBOL = true;
-
- /* yy_atEOF == true <=> the scanner has returned a value for EOF */
- zzAtEOF = false;
-
- /* denotes if the user-EOF-code has already been executed */
- zzEOFDone = false;
-
-
- fStateStack.clear();
-
- hasMore = true;
- isXHTML=false;
- isWML=false;
-
-
- }
-
-
- public final HeadParserToken getNextToken() throws IOException {
- String context = null;
- context = primGetNextToken();
- HeadParserToken result = null;
- if (valueText != null) {
- result = createToken(context, yychar, valueText);
- valueText = null;
- } else {
- result = createToken(context, yychar, yytext());
- }
- return result;
- }
-
- public final boolean hasMoreTokens() {
- return hasMore && yychar < MAX_TO_SCAN;
- }
- private void pushCurrentState() {
- fStateStack.push(yystate());
-
- }
-
- private void popState() {
- yybegin(fStateStack.pop());
- }
- private HeadParserToken createToken(String context, int start, String text) {
- return new HeadParserToken(context, start, text);
- }
-
- public boolean isXHTML() {
- return isXHTML;
- }
- public boolean isWML() {
- return isWML;
- }
-
-%}
-
-%eof{
- hasMore=false;
-%eof}
-
-%public
-%class JSPHeadTokenizer
-%function primGetNextToken
-%type String
-%char
-%unicode
-%ignorecase
-//%debug
-%switch
-%buffer 8192
-
-
-UTF16BE = \xFE\xFF
-UTF16LE = \xFF\xFE
-UTF83ByteBOM = \xEF\xBB\xBF
-
-// SpaceChar = [\x20\x09]
-
-
-// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+
-S = [\x20\x09\x0D\x0A]
-
-BeginAttributeeValue = {S}* \= {S}*
-
-LineTerminator = \r|\n
-
-
-%state ST_XMLDecl
-%state ST_PAGE_DIRECTIVE
-%state QuotedAttributeValue
-%state DQ_STRING
-%state SQ_STRING
-%state UnDelimitedString
-
-%%
-
-
-<YYINITIAL>
-{
- // force to start at beginning of line (^) and at beginning of file (yychar == 0)
- ^ {UTF16BE} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;}}
- ^ {UTF16LE} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;}}
- ^ {UTF83ByteBOM} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;}}
-
- // force to be started on first line, but we do allow preceeding spaces
- ^ {S}* "<\?xml" {S}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}}
-
-
- // following are some simply rules to identify JSP content as "XHTML"
- // see http://www.rfc-editor.org/rfc/rfc3236.txt
- "<!DOCTYPE" {S}* "html" {S}* "PUBLIC" .* "//DTD XHTML" {isXHTML = true;}
- "<html" {S}* "xmlns" {S}* "=" {S}* (\" | \') "http://www.w3.org/1999/xhtml" {isXHTML = true;}
- // another case that's part of the "HTML family" is WML 1.0 (WML 2.0 is part of XHTML)
- "<!DOCTYPE" {S}* "wml" {S}* "PUBLIC" .* "//DTD WML" {isWML = true;}
-
- "<%" {S}* "@" {S}* ("page"|"tag") {S}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;}
- ("<jsp:directive.page"|"<jsp:directive.tag") {S}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;}
-
-
-}
-
-<ST_XMLDecl>
-{
- "version" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;}
- "encoding" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;}
- // note the "forced end" (via 'hasMore=false') once the end of XML Declaration found
- // This is since non-ascii chars may follow and may cause IOExceptions which would not occur once stream is
- // read with incorrect encoding (such as if platform encoding is in effect until true encoding detected).
- // BUT, the hasMore=false was removed for this JSP case (probably still ok for pure XML) because
- // in a JSP, we must parse past xmlDecl to get at JSP page directive.
- // We'll assume all chars in this area are "readable" as is.
- {S}* "\?>" {yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;}
-}
-
-<ST_PAGE_DIRECTIVE>
-{
-// removed 'language' since it really can be handled seperately from encoding, but may add it back later for simple re-use.
- "language" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage;}
- "contentType" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType;}
- "pageEncoding" {BeginAttributeeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding;}
- // note the "forced end" (via 'hasMore=false') once the end of XML Declaration found
- // This is since non-ascii chars may follow and may cause IOExceptions which would not occur once stream is
- // read in correct encoding.
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4205 demonstrates how we need to keep parsing,
- // even if come to end of one page directive, so hasMore=false was removed from these rules.
- "%>" { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;}
- "\/>" { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;}
-}
-
-
-<QuotedAttributeValue>
-{
- \" { yybegin(DQ_STRING); string.setLength(0); }
- \' { yybegin(SQ_STRING); string.setLength(0); }
- // in this state, anything other than a space character can start an undelimited string
- {S}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);}
-
-}
-
-
-<DQ_STRING>
-{
-
- \" { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; }
- {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- "\?>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- . { string.append( yytext() ); }
-
- "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
-
-
-}
-
-<SQ_STRING>
-{
-
- \' { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;}
- {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- . { string.append( yytext() ); }
- "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
-
-
-}
-
-<UnDelimitedString>
-{
-
-
- {S} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; }
- {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- "\?>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote
- \' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;}
- \" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;}
-
- . { string.append( yytext() ); }
- "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
-
-}
-
-// The "match anything" rule should always be in effect except for when looking for end of string
-// (That is, remember to update state list if/when new states added)
-<YYINITIAL, ST_XMLDecl, QuotedAttributeValue, ST_PAGE_DIRECTIVE>
-{
-// this is the fallback (match "anything") rule (for this scanner, input is ignored, and position advanced, if not recognized)
-.|\n {if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}}
-}
-
-// this rule always in effect
-<<EOF>> {hasMore = false; return EncodingParserConstants.EOF;}
-
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/buildParser.xml b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/buildParser.xml
deleted file mode 100644
index 2ebe182109..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/buildParser.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="tokenizer" default="HeadTokenizer">
-
- <!-- Note: for Eclipse env., the JFlex 1.4 jar should be added
- to the ant global entries -->
- <taskdef classname="JFlex.anttask.JFlexTask" name="jflex" />
-
- <target name="init">
- <property name="src.file" value="JSPHeadTokenizer.jFlex"/>
- <property name="src.dir" value="HeadParsers"/>
- <property name="dest.dir" value="../src"/>
- <!-- touch causes to always build, remove for real 'make' behavior -->
- <touch file="${src.dir}/${src.file}"/>
-
- </target>
-
- <target name="HeadTokenizer" depends="init">
- <antcall target="run-jflex"/>
- </target>
-
- <target name="run-jflex" depends="init">
- <jflex
- file="${src.dir}/${src.file}"
- destdir="${dest.dir}"
- verbose="true"
- nobak="true"
- time="on"
- />
- </target>
-
-
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 113bcfbfb7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,60 +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.100.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
-Require-Bundle: com.ibm.icu;bundle-version="[3.8.1,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.filebuffers;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.4.0,3.5.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.css.core;bundle-version="[1.1.200,1.2.0)",
- org.eclipse.wst.html.core;bundle-version="[1.1.200,1.2.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.0,1.3.0)",
- javax.servlet.jsp;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)";resolution:=optional,
- org.eclipse.wst.common.modulecore;bundle-version="[1.1.200,2.0.0)";resolution:=optional
-Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.jst.jsp.core.internal.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 92ef44d7ab..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/build.properties
+++ /dev/null
@@ -1,22 +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 = component.xml,\
- DevTimeSupport/,\
- schema/
-source.. = src/
diff --git a/bundles/org.eclipse.jst.jsp.core/component.xml b/bundles/org.eclipse.jst.jsp.core/component.xml
deleted file mode 100644
index ab88fac0b3..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/component.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.jst.jsp">
- <component-depends unrestricted="true" />
- <plugin id="org.eclipse.jst.jsp.core" fragment="false" />
- <package name="org.eclipse.jst.jsp.core.taglib" api="false">
- <type name="IJarRecord" implement="false" />
- <type name="ITagDirRecord" implement="false" />
- <type name="ITaglibIndexDelta" implement="false" />
- <type name="ITaglibIndexListener" implement="true" />
- <type name="ITaglibDescriptor" implement="false" />
- <type name="ITaglibRecord" implement="false" />
- <!-- <type name="ITaglibRecordEvent" implement="false" /> -->
- <type name="ITLDRecord" implement="false" />
- <type name="IURLRecord" implement="false" />
- <type name="TaglibIndex" subclass="false" instantiate="false" />
- <type name="TaglibIndexDelta" subclass="false" instantiate="false" />
- </package>
- <plugin id="org.eclipse.jst.jsp.ui" fragment="false" />
- <package name="org.eclipse.jst.jsp.ui" api="false">
- <type name="StructuredTextViewerConfigurationJSP" subclass="true" instantiate="true" />
- </package>
- <package name="org.eclipse.jst.jsp.ui.views.contentoutline" api="false">
- <type name="JSPContentOutlineConfiguration" subclass="true" instantiate="true" />
- </package>
- <plugin id="org.eclipse.jst.jsp.ui.infopop" fragment="false" />
- <description url="http://eclipse.org/webtools/jst/components/jsp/overview.html" />
-</component> \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/plugin.properties b/bundles/org.eclipse.jst.jsp.core/plugin.properties
deleted file mode 100644
index f6fdf1e85b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/plugin.properties
+++ /dev/null
@@ -1,32 +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
-###############################################################################
-providerName=Eclipse.org
-pluginName=Structured Source JSP Model
-Structured_JSP_Document_Factory_Extension.name=Structured JSP Document Factory Extension
-JSP_Content_Type_Extension_Element.name=JSP
-JSP_Tag_Content_Type_Extension_Element.name=JSP Tag Definition
-JSP_TagX_Content_Type_Extension_Element.name=JSP Tag Definition (XML)
-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
-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 f8e5cddb89..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/plugin.xml
+++ /dev/null
@@ -1,328 +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.runtime.contentTypes">
- <!-- create content type for JSP files -->
- <content-type
- file-extensions="jsp,jsv,jtpl,jspx"
- priority="high"
- name="%JSP_Content_Type_Extension_Element.name"
- id="jspsource"
- base-type="org.eclipse.core.runtime.text"
- default-charset="ISO-8859-1">
- <describer
- class="org.eclipse.jst.jsp.core.internal.contenttype.ContentDescriberForJSP" />
- </content-type>
- <!-- create content type for JSP fragment files -->
- <content-type
- file-extensions="jspf,jsf"
- priority="high"
- name="%JSP_Fragment_Content_Type_Extension_Element.name"
- id="jspfragmentsource"
- base-type="org.eclipse.jst.jsp.core.jspsource"
- default-charset="ISO-8859-1">
- <describer
- class="org.eclipse.jst.jsp.core.internal.contenttype.ContentDescriberForJSP" />
- </content-type>
- <!-- create content type for JSP 2.0 Tag file types -->
- <content-type
- file-extensions="tag,tagx,tagf"
- priority="high"
- name="%JSP_Tag_Content_Type_Extension_Element.name"
- id="tagsource"
- base-type="org.eclipse.jst.jsp.core.jspsource"
- default-charset="UTF-8"/>
- <!-- create content type for .tld files -->
- <content-type
- file-extensions="tld"
- priority="high"
- name="%JSP_TLD_Content_Type_Extension_Element.name"
- id="tldsource"
- base-type="org.eclipse.core.runtime.xml"
- default-charset="UTF-8"/>
-
- <!--======================================================================================-->
- <!-- minimal content-type css jsp support -->
- <!--======================================================================================-->
- <content-type
- file-extensions="jsp"
- priority="high"
- name="%contentTypeCSSJSPName"
- id="cssjspsource"
- base-type="org.eclipse.jst.jsp.core.jspsource">
- <describer
- class="org.eclipse.jst.jsp.css.core.internal.contenttype.ContentDescriberForJSPedCSS" />
- </content-type>
- <content-type
- file-extensions="jspf"
- priority="high"
- name="%contentTypeCSSJSPFName"
- id="cssjspfragmentsource"
- base-type="org.eclipse.jst.jsp.core.cssjspsource">
- <describer
- class="org.eclipse.jst.jsp.css.core.internal.contenttype.ContentDescriberForJSPedCSS" />
- </content-type>
- </extension>
-
- <!-- 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">
- <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">
- <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
- 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>
- -->
-</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 e6a72fc6fd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java
+++ /dev/null
@@ -1,63 +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;
-
-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 JSPActionValidator_0;
- 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;
-
- /**
- * @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 cda29d7fb2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java
+++ /dev/null
@@ -1,101 +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;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentPropertiesManager;
-import org.eclipse.jst.jsp.core.internal.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 {
- // The shared instance.
- private static JSPCorePlugin plugin;
-
- /**
- * The constructor.
- */
- public JSPCorePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- *
- * @deprecated - will be removed. Currently used to get "model
- * preferences", but there are other, better ways.
- */
- public static JSPCorePlugin getDefault() {
- return plugin;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- /*
- * JSPIndexManager depends on TaglibController, so TaglibController
- * should be started first
- */
- TaglibIndex.startup();
- TaglibController.startup();
-
- // listen for classpath changes
- JavaCore.addElementChangedListener(TaglibHelperManager.getInstance());
-
-
- JSPIndexManager.getInstance().initialize();
-
- // 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();
-
- // stop any indexing
- JSPIndexManager.getInstance().shutdown();
-
- // stop listening for classpath changes
- JavaCore.removeElementChangedListener(TaglibHelperManager.getInstance());
-
- // stop taglib controller
- TaglibController.shutdown();
- TaglibIndex.shutdown();
-
- super.stop(context);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
deleted file mode 100644
index 2ff51e7cc6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
+++ /dev/null
@@ -1,38 +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
-###############################################################################
-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=Cannot 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 be 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 build path
-JSPActionValidator_0=Tag ({0}) must be empty
-JSPBatchValidator_0=Gathering files in {0}
-TaglibHelper_0=The TagExtraInfo class for {0} ({1}) was not found on the 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 build path
-JSPTranslator_0=Invalid identifier: "{0}"
-JSPTranslator_1=Undefined type: {0}
-JSPTranslator_2=Cannot declare both "class" and "beanName" attributes
-JSPTranslator_3=Unknown type for identifier "{0}"
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 59b2b3e462..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java
+++ /dev/null
@@ -1,51 +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;
-
-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.JSP20_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)
- return getCMDocument(CMDocType.JSP20_DOC_TYPE);
- if (jspVersion >= 1.2)
- return getCMDocument(CMDocType.JSP12_DOC_TYPE);
- 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/TaglibController.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TaglibController.java
deleted file mode 100644
index e4454cc250..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, 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;
-
-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.internal.parser.JSPSourceParser;
-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;
-
-/**
- * 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((JSPSourceParser) info.document.getParser());
- synchronized (_instance.fDocumentMap) {
- _instance.fDocumentMap.put(document, info);
- }
- TaglibIndex.addTaglibIndexListener(info);
- if (document instanceof BasicStructuredDocument && document.getLength() > 0) {
- ((BasicStructuredDocument) document).reparse(this);
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#bufferDisposed(org.eclipse.core.filebuffers.IFileBuffer)
- */
- public void bufferDisposed(IFileBuffer buffer) {
- if (buffer instanceof ITextFileBuffer) {
- IDocument document = ((ITextFileBuffer) buffer).getDocument();
- synchronized (_instance.fJSPdocuments) {
- if (!_instance.fJSPdocuments.remove(document))
- return;
- }
- }
- DocumentInfo info = null;
- synchronized (fDocumentMap) {
- 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((JSPSourceParser) 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 41d7ed909b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java
+++ /dev/null
@@ -1,280 +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.Enumeration;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDAttributeDeclaration;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class CMAttributeDeclarationImpl implements TLDAttributeDeclaration {
-
- private CMDataType attrType = new CMDataTypeImpl(CMDataType.CDATA);
- private String fDescription;
-
- //
- private boolean fIsFragment = false;
-
- private CMDocument fOwnerDocument;
- // optional id
- private String id = null;
-
- // required name
- private String name = null;
- // optional "required" element present, defaults to not present
- private boolean required = false;
-
- // optional run-time (scriplet derived) value of attributes, defaults to
- // none/false
- private String rtexprvalue = null;
-
- private String type = null;
-
- /**
- * CMAttributeDeclarationImpl constructor comment.
- */
- public CMAttributeDeclarationImpl(CMDocument owner) {
- super();
- fOwnerDocument = owner;
- }
-
- /**
- * getAttrName method
- *
- * @return java.lang.String
- */
- public String getAttrName() {
- return getNodeName();
- }
-
- /**
- * getAttrType method
- *
- * @return CMDataType
- */
- public CMDataType getAttrType() {
- return attrType;
- }
-
- /**
- * @deprecated in superclass
- */
- public String getDefaultValue() {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @return Returns the description.
- */
- public String getDescription() {
- return fDescription;
- }
-
- /**
- * @deprecated in superclass
- */
- public Enumeration getEnumAttr() {
- return null;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getId() {
- return id;
- }
-
- /**
- * getNodeName method
- *
- * @return java.lang.String
- */
- public String getNodeName() {
- return name;
- }
-
- /**
- * getNodeType method
- *
- * @return int
- *
- * Returns one of :
- *
- */
- public int getNodeType() {
- return CMNode.ATTRIBUTE_DECLARATION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.jsp.core.contentmodel.tld.TLDAttributeDeclaration#getOwnerDocument()
- */
- public CMDocument getOwnerDocument() {
- return fOwnerDocument;
- }
-
- /**
- * getProperty method
- *
- * @return java.lang.Object
- *
- * Returns the object property desciped by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- if (propertyName != null && propertyName.equals(JSP12TLDNames.DESCRIPTION)) {
- return getDescription(); // return attribute description
- }
- else if (propertyName.equals(TLDDocument.CM_KIND)) {
- return TLDDocument.JSP_TLD;
- }
- else if (propertyName.equals(JSP12TLDNames.SMALL_ICON) || propertyName.equals(JSP12TLDNames.LARGE_ICON)) {
- return getOwnerDocument().getProperty(propertyName);
- }
- return null;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public java.lang.String getRtexprvalue() {
- return rtexprvalue;
- }
-
- public String getType() {
- return type;
- }
-
- /**
- * getUsage method
- *
- * @return int OPTIONAL|REQUIRED
- */
- public int getUsage() {
- return required ? REQUIRED : OPTIONAL;
- }
-
- /**
- * @return Returns the isFragment.
- */
- public boolean isFragment() {
- return fIsFragment;
- }
-
- /**
- *
- * @return boolean
- */
- public boolean isRequired() {
- return required;
- }
-
- /**
- * @param description
- * The description to set.
- */
- public void setDescription(String description) {
- fDescription = description;
- }
-
- /**
- * @param isFragment
- * The isFragment to set.
- */
- public void setFragment(boolean isFragment) {
- fIsFragment = isFragment;
- }
-
- /**
- *
- * @param newId
- * java.lang.String
- */
- public void setId(String newId) {
- id = newId;
- }
-
- public void setNodeName(String string) {
- name = string;
- }
-
- /**
- *
- * @param newRequired
- * boolean
- */
- public void setRequired(boolean newRequired) {
- required = newRequired;
- }
-
- /**
- *
- * @param newRequired
- * boolean
- */
- public void setRequiredString(String newRequired) {
- if (newRequired != 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 2b5acef59c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
+++ /dev/null
@@ -1,1072 +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.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 java.net.URLConnection;
-
-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.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 Taglib Descriptors
- *
- * Returns namespace-less CMDocuments for a taglib descriptor, loading it
- * directly from a file or extracted from a JAR archive. Content Model objects
- * will implement the TLDCMDocument, TLDElementDeclaration, and
- * TLDAttributeDeclaration interfaces for extended properties.
- */
-public class CMDocumentFactoryTLD implements CMDocumentFactory {
-
- static final boolean _debug = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tldcmdocument/factory")); //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * CMDocumentFactoryTLD constructor comment.
- */
- public CMDocumentFactoryTLD() {
- super();
- }
-
- /**
- * NOT API
- *
- * @param baselocation
- * @param input
- * @return
- */
- public CMDocument buildCMDocument(String baselocation, InputStream input) {
- DocumentProvider provider = new DocumentProvider();
- provider.setValidating(false);
- provider.setRootElementName(JSP11TLDNames.TAGLIB);
- provider.setInputStream(input);
- if (baselocation != null)
- provider.setBaseReference(baselocation);
- return loadDocument(baselocation, provider.getRootElement());
- }
-
- /**
- * @param fileName
- * @return
- */
- private 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
- */
- IPath 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()));
- }
- }
- }
-
- // 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;
- }
-
- protected CMElementDeclaration createElementDeclaration(CMDocument document, Node tagNode) {
- CMElementDeclarationImpl ed = new CMElementDeclarationImpl(document);
-
- Node child = tagNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- // tag information
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP11TLDNames.NAME) && child.hasChildNodes()) {
- ed.setNodeName(getContainedText(child));
- }
- else if ((nodeName.equals(JSP11TLDNames.TAGCLASS) || nodeName.equals(JSP12TLDNames.TAG_CLASS)) && child.hasChildNodes()) {
- ed.setTagclass(getContainedText(child));
- }
- else if ((nodeName.equals(JSP11TLDNames.TEICLASS) || nodeName.equals(JSP12TLDNames.TEI_CLASS)) && child.hasChildNodes()) {
- ed.setTeiclass(getContainedText(child));
- }
- else if ((nodeName.equals(JSP11TLDNames.BODYCONTENT) || nodeName.equals(JSP12TLDNames.BODY_CONTENT)) && child.hasChildNodes()) {
- String bodycontent = getContainedText(child);
- // Apparently, Apache Tomcat is not case sensitive about
- // these values
- if (bodycontent.equalsIgnoreCase(JSP11TLDNames.CONTENT_JSP))
- ed.setBodycontent(JSP11TLDNames.CONTENT_JSP);
- else if (bodycontent.equalsIgnoreCase(JSP11TLDNames.CONTENT_TAGDEPENDENT))
- ed.setBodycontent(JSP11TLDNames.CONTENT_TAGDEPENDENT);
- else if (bodycontent.equalsIgnoreCase(JSP11TLDNames.CONTENT_EMPTY))
- ed.setBodycontent(JSP11TLDNames.CONTENT_EMPTY);
- else if (bodycontent.equalsIgnoreCase(JSP20TLDNames.CONTENT_SCRIPTLESS))
- ed.setBodycontent(JSP20TLDNames.CONTENT_SCRIPTLESS);
- }
- // info (1.1 only) or description (1.2 only)
- else if ((nodeName.equals(JSP11TLDNames.INFO) || nodeName.equals(JSP12TLDNames.DESCRIPTION)) && child.hasChildNodes()) {
- ed.setDescription(getContainedText(child));
- }
- // attributes
- else if (nodeName.equals(JSP11TLDNames.ATTRIBUTE)) {
- CMAttributeDeclaration attr = createAttributeDeclaration(document, child);
- ed.fAttributes.setNamedItem(attr.getAttrName(), attr);
- }
- // variables
- else if (nodeName.equals(JSP12TLDNames.VARIABLE)) {
- ed.getVariables().add(createVariable(child));
- }
- else if (nodeName.equals(JSP12TLDNames.LARGE_ICON) && child.hasChildNodes()) {
- ed.setLargeIcon(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.SMALL_ICON) && child.hasChildNodes()) {
- ed.setSmallIcon(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.TAG_EXTENSION) && child.getNodeType() == Node.ELEMENT_NODE) {
- ed.getExtensions().add(child);
- }
- }
- child = child.getNextSibling();
- }
- return ed;
- }
-
- 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 (fileExtension.equals("tag")) {
- loadTagFile(ed, tagFile, true);
- }
- else if (fileExtension.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()));
- }
- return ed;
- }
-
- protected TLDFunction createFunction(CMDocument document, Node functionNode) {
- TLDFunctionImpl function = new TLDFunctionImpl(document);
- boolean hasName = false;
-
- Node child = functionNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- // tag information
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.DESCRIPTION) && child.hasChildNodes()) {
- function.setDescription(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.DISPLAY_NAME) && child.hasChildNodes()) {
- function.setName(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.EXAMPLE) && child.hasChildNodes()) {
- function.setExample(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.FUNCTION_CLASS) && child.hasChildNodes()) {
- function.setClassName(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.FUNCTION_EXTENSION) && child.hasChildNodes()) {
- function.getExtensions().add(child);
- }
- else if (nodeName.equals(JSP20TLDNames.FUNCTION_SIGNATURE) && child.hasChildNodes()) {
- function.setSignature(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.ICON) && child.hasChildNodes()) {
- function.setIcon(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.NAME) && child.hasChildNodes()) {
- function.setName(getContainedText(child));
- hasName = function.getName().trim().length() > 0;
- }
- }
- child = child.getNextSibling();
- }
- if (hasName) {
- return function;
- }
- return null;
- }
-
- protected TLDInitParam createInitParam(Node initParamNode) {
- TLDInitParamImpl initParam = new TLDInitParamImpl();
- Node child = initParamNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.VALIDATOR_PARAM_NAME) && child.hasChildNodes()) {
- initParam.setName(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VALIDATOR_PARAM_VALUE) && child.hasChildNodes()) {
- initParam.setValue(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.DESCRIPTION) && child.hasChildNodes()) {
- initParam.setDescription(getContainedText(child));
- }
- }
- child = child.getNextSibling();
- }
- return initParam;
- }
-
- protected TLDListener createListener(Node listenerNode) {
- TLDListenerImpl listener = new TLDListenerImpl();
- Node child = listenerNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.LISTENER_CLASS) && child.hasChildNodes()) {
- listener.setListenerClass(getContainedText(child));
- }
- }
- child = child.getNextSibling();
- }
- return listener;
- }
-
- protected TLDValidator createValidator(Node validatorNode) {
- TLDValidatorImpl validator = new TLDValidatorImpl();
- Node child = validatorNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.VALIDATOR_CLASS) && child.hasChildNodes()) {
- validator.setValidatorClass(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VALIDATOR_INIT_PARAM) && child.hasChildNodes()) {
- validator.getInitParams().add(createInitParam(child));
- }
- }
- child = child.getNextSibling();
- }
- return validator;
- }
-
- protected TLDVariable createVariable(Node variableNode) {
- TLDVariableImpl variable = new TLDVariableImpl();
- Node child = variableNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.VARIABLE_CLASS) && child.hasChildNodes()) {
- variable.setVariableClass(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VARIABLE_DECLARE) && child.hasChildNodes()) {
- variable.setDeclareString(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VARIABLE_NAME_FROM_ATTRIBUTE) && child.hasChildNodes()) {
- variable.setNameFromAttribute(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VARIABLE_NAME_GIVEN) && child.hasChildNodes()) {
- variable.setNameGiven(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VARIABLE_SCOPE) && child.hasChildNodes()) {
- variable.setScope(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.DESCRIPTION) && child.hasChildNodes()) {
- variable.setDescription(getContainedText(child));
- }
- }
- child = child.getNextSibling();
- }
- return variable;
- }
-
- protected String getContainedText(Node parent) {
- NodeList children = parent.getChildNodes();
- if (children.getLength() == 1) {
- return children.item(0).getNodeValue().trim();
- }
- StringBuffer s = new StringBuffer();
- Node child = parent.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
- String reference = ((EntityReference) child).getNodeValue();
- if (reference == null && child.getNodeName() != null) {
- reference = "&" + child.getNodeName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (reference != null) {
- s.append(reference.trim());
- }
- }
- else {
- s.append(child.getNodeValue().trim());
- }
- child = child.getNextSibling();
- }
- return s.toString().trim();
- }
-
- public boolean isBuilderForGrammar(String grammarFileName) {
- String fileName = grammarFileName.toLowerCase();
- return fileName.endsWith(".tld") || fileName.endsWith(".jar"); //$NON-NLS-2$//$NON-NLS-1$
- }
-
- private CMDocument loadDocument(String baseLocation, Node taglib) {
- Node root = taglib;
-
- // create the CMDocument
- CMDocumentImpl document = new CMDocumentImpl();
- document.setBaseLocation(baseLocation);
-
- if (root == null) {
- if (_debug) {
- System.out.println("null \"taglib\" element for TLD " + baseLocation); //$NON-NLS-1$
- }
- return document;
- }
-
- // populate the CMDocument
- Node child = root.getFirstChild();
- while (child != null) {
- if (child.getNodeType() != Node.ELEMENT_NODE) {
- child = child.getNextSibling();
- continue;
- }
- String nodeName = child.getNodeName();
- 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)) {
- 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;
- }
-
- private void loadTagXFile(final CMElementDeclarationImpl ed, IFile tagxFile, boolean 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 = 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());
- 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.logException(e);
- }
- catch (SAXException e) {
- Logger.logException(e);
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- ed.setLocationString(tagxFile.getFullPath().toString());
- }
-
- private void loadTagFile(CMElementDeclarationImpl ed, IFile tagFile, boolean allowIncludes) {
- try {
- IStructuredDocument document = (IStructuredDocument) new ModelHandlerForJSP().getDocumentLoader().createNewStructuredDocument(tagFile);
- IStructuredDocumentRegion documentRegion = document.getFirstStructuredDocumentRegion();
- ed.setPath(tagFile.getFullPath().toString());
- ed.setTagSource(TLDElementDeclaration.SOURCE_TAG_FILE);
- 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());
- // 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);
- }
- catch (CoreException e) {
- Logger.logException("problem parsing " + tagFile, e);
- }
- ed.setLocationString(tagFile.getFullPath().toString());
- }
-
- /**
- * @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 (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;
- InputStream urlContents = null;
- URLConnection connection = null;
- try {
- connection = record.getURL().openConnection();
- if (connection != null) {
- connection.setUseCaches(false);
- urlContents = connection.getInputStream();
- document = (CMDocumentImpl) buildCMDocument(record.getBaseLocation(), urlContents);
- document.setLocationString(record.getURL().toString());
- if (document.getSmallIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), record.getURL().toString(), "/"); //$NON-NLS-1$
- document.setProperty(JSP12TLDNames.SMALL_ICON, iconPath);
- }
- if (document.getLargeIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getLargeIcon(), record.getURL().toString(), "/"); //$NON-NLS-1$
- document.setProperty(JSP12TLDNames.LARGE_ICON, iconPath);
- }
- }
- }
- catch (IOException e) {
- // not uncommon given invalid URLs
- }
- finally {
- if (urlContents != null) {
- try {
- urlContents.close();
- }
- catch (IOException e) {
- }
- }
- }
- }
- break;
- }
- return document;
- }
-}
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 52d013631c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java
+++ /dev/null
@@ -1,587 +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.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);
- }
- 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);//$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 f9da3babc0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
+++ /dev/null
@@ -1,1091 +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.io.File;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Stack;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.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.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.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.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.regions.DOMRegionContext;
-
-public class TLDCMDocumentManager implements ITaglibIndexListener {
-
- protected class DirectiveStructuredDocumentRegionHandler implements StructuredDocumentRegionHandler, StructuredDocumentRegionHandlerExtension {
- /**
- * Adds a block tagname (fully namespace qualified) into the list of
- * block tag names for the parser. The marker
- * IStructuredDocumentRegion along with position cues during reparses
- * allow the JSPSourceParser to enable/ignore the tags as blocks.
- */
- protected void addBlockTag(String tagnameNS, 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, JSPSourceParser 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, JSPSourceParser 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);
- for (int i = 0; references != null && i < references.size(); i++) {
- TLDCMDocumentReference reference = (TLDCMDocumentReference) references.get(i);
- 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);
- 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, JSPSourceParser 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, JSPSourceParser 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 JSPSourceParser, "can only listen to document with a JSPSourceParser"); //$NON-NLS-1$
- getSourceParser().removeStructuredDocumentRegionHandler(this);
- setSourceParser((JSPSourceParser) newDocument.getParser());
- getSourceParser().addStructuredDocumentRegionHandler(this);
- }
- }
-
- protected class IncludeHelper extends DirectiveStructuredDocumentRegionHandler {
- protected IStructuredDocumentRegion fAnchor = null;
- protected JSPSourceParser fLocalParser = null;
- protected JSPSourceParser fParentParser = null;
- List taglibReferences = null;
-
- public IncludeHelper(IStructuredDocumentRegion anchor, JSPSourceParser rootParser) {
- super();
- fAnchor = anchor;
- fParentParser = rootParser;
- taglibReferences = new ArrayList(0);
- }
-
- protected void addTaglibTracker(String prefix, String uri, IStructuredDocumentRegion anchorStructuredDocumentRegion, CMDocument tldCMDocument) {
- super.addTaglibTracker(prefix, uri, anchorStructuredDocumentRegion, tldCMDocument);
- TLDCMDocumentReference reference = new TLDCMDocumentReference();
- reference.prefix = prefix;
- reference.uri = uri;
- taglibReferences.add(reference);
- }
-
- 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) {
- JSPSourceParser p = new JSPSourceParser();
- 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()));
- }
- TagMarker[] knownPrefixes = (TagMarker[]) fParentParser.getNestablePrefixes().toArray(new TagMarker[0]);
- for (int i = 0; i < knownPrefixes.length; i++) {
- 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 static class TLDCMDocumentDescriptor {
- Object cacheKey;
- CMDocument document;
-
- TLDCMDocumentDescriptor() {
- super();
- }
- }
-
- private class TLDCMDocumentReference {
- String prefix;
- String uri;
- }
-
- static final boolean _debug = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tldcmdocument/manager")); //$NON-NLS-1$ //$NON-NLS-2$
- static final boolean _debugCache = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tldcmdocument/cache")); //$NON-NLS-1$ //$NON-NLS-2$
- // will hold the prefixes banned by the specification; taglibs may not use
- // them
- protected static List bannedPrefixes = null;
-
- private static Hashtable fCache = null;
- 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 JSPSourceParser 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 WeakReference(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) {
- ITaglibRecord record = TaglibIndex.resolve(getCurrentParserPath().toString(), uri, false);
- if (record != null) {
- return getUniqueIdentifier(record);
- }
- String location = URIResolverPlugin.createResolver().resolve(getCurrentBaseLocation().toString(), null, uri);
- return location;
- }
-
- /**
- * Return the CMDocument at the uri (cached)
- */
- protected CMDocument getCMDocument(String uri) {
- if (uri == null || uri.length() == 0)
- return null;
- String reference = uri;
- Object cacheKey = getCacheKey(reference);
- long lastModified = getModificationStamp(reference);
- CMDocument doc = (CMDocument) getDocuments().get(cacheKey);
- if (doc == null) {
- /*
- * If hasn't been moved into the local table, do so and increment
- * the count. A local URI reference can be different depending on
- * the file from which it was referenced. Use a computed key to
- * keep them straight.
- */
- Object o = getSharedDocumentCache().get(cacheKey);
- if (o != null) {
- if (o instanceof TLDCacheEntry) {
- TLDCacheEntry entry = (TLDCacheEntry) o;
- if (_debugCache) {
- System.out.println("TLDCMDocument cache hit on " + cacheKey);
- }
- 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);
- }
- TLDCMDocumentDescriptor descriptor = loadTaglib(reference);
- if (descriptor != null) {
- TLDCacheEntry entry = new TLDCacheEntry();
- doc = entry.document = descriptor.document;
- entry.referenceCount = 1;
- entry.modificationStamp = getModificationStamp(reference);
- getSharedDocumentCache().put(cacheKey, entry);
- }
- }
- if (doc != null) {
- getDocuments().put(cacheKey, doc);
- }
- }
- return doc;
- }
-
- private long getModificationStamp(String reference) {
- ITaglibRecord record = TaglibIndex.resolve(getCurrentParserPath().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) : {
- 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();
- Iterator alldocs = getTaglibTrackers().iterator();
- while (alldocs.hasNext()) {
- TaglibTracker aTracker = (TaglibTracker) alldocs.next();
- if (aTracker.getStructuredDocumentRegion().getStartOffset() <= offset || offset < 0) {
- validDocs.add(aTracker);
- }
- }
- return validDocs;
- }
-
- public List getCMDocumentTrackers(String prefix, int offset) {
- List validDocs = new ArrayList();
- Iterator alldocs = getTaglibTrackers().iterator();
- while (alldocs.hasNext()) {
- TaglibTracker aTracker = (TaglibTracker) alldocs.next();
- /**
- * '<' is used to support the immediate use of a custom tag in jspx files
- */
- if ((aTracker.getStructuredDocumentRegion().getStartOffset() <= offset || offset < 0) && aTracker.getPrefix().equals(prefix)) {
- validDocs.add(aTracker);
- }
- }
- return validDocs;
- }
-
- /**
- * Return the filesystem location in the current parser. This method is
- * called while recursing through included fragments, so it much check the
- * include stack. The filesystem location is needed for common URI
- * resolution in case the Taglib Index doesn't know the URI being loaded.
- *
- * @return
- */
- IPath getCurrentBaseLocation() {
- IPath baseLocation = null;
- IPath path = getCurrentParserPath();
- baseLocation = ResourcesPlugin.getWorkspace().getRoot().getFile(path).getLocation();
- if (baseLocation == null) {
- baseLocation = path;
- }
- return baseLocation;
- }
-
- /**
- * Return the path used in the current parser. This method is called while
- * recursing through included fragments, so it much check the include
- * stack.
- *
- * @return
- */
- IPath getCurrentParserPath() {
- IPath path = null;
- if (!getIncludes().isEmpty()) {
- path = (IPath) getIncludes().peek();
- }
- else {
- path = TaglibController.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;
- }
-
- JSPSourceParser getParser() {
- return fParser;
- }
-
- public JSPSourceParser getSourceParser() {
- return fParser;
- }
-
- public StructuredDocumentRegionHandler getStructuredDocumentRegionHandler() {
- return getDirectiveStructuredDocumentRegionHandler();
- }
-
- /**
- *
- * @return java.util.List
- */
- public List getTaglibTrackers() {
- if (fTaglibTrackers == null)
- fTaglibTrackers = new ArrayList();
- return fTaglibTrackers;
- }
-
- 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);
- for (int j = 0; j < references.size(); j++) {
- TLDCMDocumentReference reference = (TLDCMDocumentReference) references.get(j);
- 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 TLDCMDocumentDescriptor loadTaglib(String uri) {
- TLDCMDocumentDescriptor entry = null;
- IPath currentPath = getCurrentParserPath();
- if (currentPath != null) {
- CMDocument document = null;
- ITaglibRecord record = TaglibIndex.resolve(currentPath.toString(), uri, false);
- if (record != null) {
- document = getCMDocumentBuilder().createCMDocument(record);
- if (document != null) {
- entry = new TLDCMDocumentDescriptor();
- entry.document = document;
- entry.cacheKey = getUniqueIdentifier(record);
- }
- }
- else {
- /* Not a very-often used code path (we hope) */
- IPath currentBaseLocation = getCurrentBaseLocation();
- if (currentBaseLocation != null) {
- String location = URIResolverPlugin.createResolver().resolve(currentBaseLocation.toString(), null, uri);
- if (location != null) {
- if (_debug) {
- System.out.println("Loading tags from " + uri + " at " + location); //$NON-NLS-2$//$NON-NLS-1$
- }
- document = getCMDocumentBuilder().createCMDocument(location);
- entry = new TLDCMDocumentDescriptor();
- entry.document = document;
- entry.cacheKey = location;
- }
- }
- }
- }
- return entry;
- }
-
- protected void resetTaglibTrackers() {
- if (_debug) {
- System.out.println("TLDCMDocumentManager cleared its taglib trackers\n"); //$NON-NLS-1$
- }
- preludesHandled = false;
- getTaglibTrackers().clear();
- }
-
- public void setSourceParser(JSPSourceParser parser) {
- if (fParser != null)
- fParser.removeStructuredDocumentRegionHandler(getStructuredDocumentRegionHandler());
- fParser = parser;
- if (fParser != null)
- fParser.addStructuredDocumentRegionHandler(getStructuredDocumentRegionHandler());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java
deleted file mode 100644
index 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 10571640a1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDElementDeclaration.java
+++ /dev/null
@@ -1,117 +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.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 {
- 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();
-
- /**
- * 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 ca1289f2e0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/DeploymentDescriptorPropertyCache.java
+++ /dev/null
@@ -1,879 +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.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.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 fo 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];
-
- private static class DeploymentDescriptor {
- PropertyGroup[] groups;
- long modificationStamp;
- 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;
- }
- }
-
- private 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) {
- 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$
- }
- 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
- */
- 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;
-
- private 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;
- }
- }
-
- private static DeploymentDescriptorPropertyCache _instance = new DeploymentDescriptorPropertyCache();
- private static final boolean _debugResolutionCache = false;
-
- private static final float defaultWebAppVersion = 2.4f;
- private static String EL_IGNORED = "el-ignored";
- private static String ID = "id";
- private static String INCLUDE_CODA = "include-coda";
- private static String INCLUDE_PRELUDE = "include-prelude";
-
- private static String IS_XML = "is-xml";
- private static String JSP_PROPERTY_GROUP = "jsp-property-group";
- private static String PAGE_ENCODING = "page-encoding";
-
- private static String SCRIPTING_INVALID = "scripting-invalid";
- private static String URL_PATTERN = "url-pattern";
- private static final String WEB_APP_ELEMENT_LOCAL_NAME = ":web-app";
- private static final String WEB_APP_ELEMENT_NAME = "web-app";
-
- private static final String WEB_APP_VERSION_NAME = "version";
- private static final String WEB_INF = "WEB-INF";
- private static final String WEB_XML = "web.xml";
- // 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();
-
- private DeploymentDescriptorPropertyCache() {
- super();
- }
-
- private void _parseDocument(IPath path, Float[] version, List groupList, 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)) {
- String versionValue = webapp.getAttribute(WEB_APP_VERSION_NAME);
- if (versionValue != null) {
- try {
- version[0] = Float.valueOf(versionValue);
- }
- catch (NumberFormatException e) {
- // doesn't matter
- }
- }
- }
- }
- NodeList propertyGroupElements = document.getElementsByTagName(JSP_PROPERTY_GROUP);
- int length = propertyGroupElements.getLength();
- subMonitor.beginTask("Reading Property Groups", length);
- 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);
- }
- }
- }
-
- /**
- * Convert the SRV spec version to the JSP spec version
- */
- private float convertSpecVersions(float version) {
- if (version > 0) {
- 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("Reading Deployment Descriptor", 3);
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-
- PropertyGroup groups[] = null;
-
- IStructuredModel model = null;
- List groupList = 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, 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, 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.version = version[0];
- monitor.done();
- fDeploymentDescriptors.put(path, new SoftReference(deploymentDescriptor));
- return deploymentDescriptor;
- }
-
- 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 */
- IPath webxmlPath = getWebXMLPath(fullPath);
- if (webxmlPath != null) {
- IFile webxmlFile = ResourcesPlugin.getWorkspace().getRoot().getFile(webxmlPath);
- if (webxmlFile.isAccessible()) {
- 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());
- }
-
- if (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);
- IPath webxmlPath = getWebXMLPath(jspFilePath);
- if (webxmlPath == null)
- return NO_PROPERTY_GROUPS;
-
- IFile webxmlFile = ResourcesPlugin.getWorkspace().getRoot().getFile(webxmlPath);
- if (!webxmlFile.isAccessible())
- return NO_PROPERTY_GROUPS;
-
- 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());
- }
-
- 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()]);
- }
-
- 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;
- 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;
- }
-
- 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 99c74777b9..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/IntStack.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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;
-
-/*
- *
- * A non-resizable class implementing the behavior of java.util.Stack, but
- * directly for the <code> integer </code> primitive.
- */
-import java.util.EmptyStackException;
-
-public class IntStack {
- private int[] list = null;
-
- private int size = 0;
-
- public IntStack() {
- this(100);
- }
-
- public IntStack(int maxdepth) {
- super();
- list = new int[maxdepth];
- initialize();
- }
-
- public void clear() {
- initialize();
- }
-
- public boolean empty() {
- return size == 0;
- }
-
- public int get(int slot) {
- return list[slot];
- }
-
- private void initialize() {
- for (int i = 0; i < list.length; i++)
- list[i] = -1;
- }
-
- /**
- * Returns the int at the top of the stack without removing it
- *
- * @return int at the top of this stack.
- * @exception EmptyStackException
- * when empty.
- */
- public int peek() {
- if (size == 0)
- throw new EmptyStackException();
- return list[size - 1];
- }
-
- /**
- * Removes and returns the int at the top of the stack
- *
- * @return int at the top of this stack.
- * @exception EmptyStackException
- * when empty.
- */
- public int pop() {
- int value = peek();
- list[size - 1] = -1;
- size--;
- return value;
- }
-
- /**
- * Pushes an item onto the top of this stack.
- *
- * @param newValue -
- * the int to be pushed onto this stack.
- * @return the <code>newValue</code> argument.
- */
- public int push(int newValue) {
- if (size == list.length) {
- throw new StackOverflowError();
- }
- list[size++] = newValue;
- return newValue;
- }
-
- public int size() {
- return list.length;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java
deleted file mode 100644
index a7f549b68e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java
+++ /dev/null
@@ -1,2113 +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
- *******************************************************************************/
-/*nlsXXX*/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-
-
-
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.1
- * on 4/17/07 12:35 AM from the specification file
- * <tt>D:/eclipse.wtp/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 =
- "\11\0\1\6\1\11\2\0\1\10\22\0\1\34\1\17\1\37\2\0"+
- "\1\51\1\0\1\40\6\0\1\43\1\33\1\0\1\47\1\0\1\44"+
- "\5\0\1\50\1\41\1\0\1\12\1\7\1\56\1\13\1\52\1\53"+
- "\1\31\1\22\1\20\1\26\1\0\1\46\1\27\1\32\1\54\1\0"+
- "\1\16\1\15\1\35\1\21\1\25\1\0\1\45\1\36\1\23\1\30"+
- "\1\55\1\42\1\14\1\24\7\0\1\53\1\31\1\22\1\20\1\26"+
- "\1\0\1\46\1\27\1\32\1\54\1\0\1\16\1\15\1\35\1\21"+
- "\1\25\1\0\1\45\1\36\1\23\1\30\1\55\1\42\1\14\1\24"+
- "\101\0\1\4\3\0\1\5\17\0\1\3\16\0\1\1\20\0\1\3"+
- "\16\0\1\1\1\2\170\0\1\2\ufe87\0";
-
- /**
- * Translates characters to character classes
- */
- private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
-
- /**
- * Translates DFA states to action switch labels.
- */
- private static final int [] ZZ_ACTION = zzUnpackAction();
-
- private static final String ZZ_ACTION_PACKED_0 =
- "\10\0\20\1\2\2\1\1\1\3\1\4\1\5\1\6"+
- "\1\5\1\7\2\5\1\7\1\10\2\11\4\0\1\12"+
- "\1\13\6\0\1\14\5\0\1\15\1\16\1\0\1\17"+
- "\1\0\1\20\4\0\1\21\41\0\1\22\7\0\1\23"+
- "\12\0\1\24\6\0\1\25\1\26\22\0\1\27\5\0"+
- "\1\30\52\0\1\31\5\0\1\32\12\0\1\32";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[214];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAction(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
-
- /* error codes */
- private static final int ZZ_UNKNOWN_ERROR = 0;
- private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
-
- /* error messages for the codes above */
- private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
- /** the input device */
- private java.io.Reader zzReader;
-
- /** the current state of the DFA */
- private int zzState;
-
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
-
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int zzPushbackPos;
-
- /** the current text position in the buffer */
- private int zzCurrentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
-
- /** 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 */
- java.util.Arrays.fill(zzBuffer, (char)0);
-
- /* the textposition at the last accepting state */
- zzMarkedPos = 0;
-
- /* the textposition at the last state to be included in yytext */
- zzPushbackPos = 0;
-
- /* the current text position in the buffer */
- zzCurrentPos = 0;
-
- /* startRead marks the beginning of the yytext() string in the buffer */
- zzStartRead = 0;
-
- /**
- * endRead marks the last character in the buffer, that has been read
- * from input
- */
- zzEndRead = 0;
-
- /* number of newlines encountered up to the start of the matched text */
- //yyline = 0;
-
- /* the number of characters up to the start of the matched text */
- yychar = 0;
-
- /**
- * the number of characters from the last newline up to the start
- * of the matched text
- */
- //yycolumn = 0;
-
- /**
- * yy_atBOL == true <=> the scanner is currently at the beginning
- * of a line
- */
- zzAtBOL = true;
-
- /* yy_atEOF == true <=> the scanner has returned a value for EOF */
- zzAtEOF = false;
-
- /* denotes if the user-EOF-code has already been executed */
- zzEOFDone = false;
-
-
- fStateStack.clear();
-
- hasMore = true;
- isXHTML=false;
- isWML=false;
-
-
- }
-
-
- public final HeadParserToken getNextToken() throws IOException {
- String context = null;
- context = primGetNextToken();
- HeadParserToken result = null;
- if (valueText != null) {
- result = createToken(context, yychar, valueText);
- valueText = null;
- } else {
- result = createToken(context, yychar, yytext());
- }
- return result;
- }
-
- public final boolean hasMoreTokens() {
- return hasMore && yychar < MAX_TO_SCAN;
- }
- private void pushCurrentState() {
- fStateStack.push(yystate());
-
- }
-
- private void popState() {
- yybegin(fStateStack.pop());
- }
- private HeadParserToken createToken(String context, int start, String text) {
- return new HeadParserToken(context, start, text);
- }
-
- public boolean isXHTML() {
- return isXHTML;
- }
- public boolean isWML() {
- return isWML;
- }
-
-
-
- /**
- * Creates a new scanner
- * There is also a java.io.InputStream version of this constructor.
- *
- * @param in the java.io.Reader to read input from.
- */
- public JSPHeadTokenizer(java.io.Reader in) {
- this.zzReader = in;
- }
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public JSPHeadTokenizer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] zzUnpackCMap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 192) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do map[j++] = value; while (--count > 0);
- }
- return map;
- }
-
-
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException if any I/O-Error occurs
- */
- private boolean zzRefill() throws java.io.IOException {
-
- /* first: make room (if you can) */
- if (zzStartRead > 0) {
- System.arraycopy(zzBuffer, zzStartRead,
- zzBuffer, 0,
- zzEndRead-zzStartRead);
-
- /* translate stored positions */
- zzEndRead-= zzStartRead;
- zzCurrentPos-= zzStartRead;
- zzMarkedPos-= zzStartRead;
- zzPushbackPos-= zzStartRead;
- zzStartRead = 0;
- }
-
- /* is the buffer big enough? */
- if (zzCurrentPos >= zzBuffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[zzCurrentPos*2];
- System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
- zzBuffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = zzReader.read(zzBuffer, zzEndRead,
- zzBuffer.length-zzEndRead);
-
- if (numRead < 0) {
- return true;
- }
- else {
- zzEndRead+= numRead;
- return false;
- }
- }
-
-
- /**
- * Closes the input stream.
- */
- public final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
- /**
- * Resets the scanner to read from a new input stream.
- * Does not close the old reader.
- *
- * All internal variables are reset, the old input stream
- * <b>cannot</b> be reused (internal buffer is discarded and lost).
- * Lexical state is set to <tt>ZZ_INITIAL</tt>.
- *
- * @param reader the new input stream
- */
- public final void yyreset(java.io.Reader reader) {
- zzReader = reader;
- zzAtBOL = true;
- zzAtEOF = false;
- zzEndRead = zzStartRead = 0;
- zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;
- 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) {
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
-
- throw new Error(message);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- public void yypushback(int number) {
- if ( number > yylength() )
- zzScanError(ZZ_PUSHBACK_2BIG);
-
- zzMarkedPos -= number;
- }
-
-
- /**
- * Contains user EOF-code, which will be executed exactly once,
- * when the end of file is reached
- */
- private void zzDoEOF() {
- if (!zzEOFDone) {
- zzEOFDone = true;
- hasMore=false;
-
- }
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception java.io.IOException if any I/O-Error occurs
- */
- public String primGetNextToken() throws java.io.IOException {
- int zzInput;
- int zzAction;
-
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- char [] zzBufferL = zzBuffer;
- char [] zzCMapL = ZZ_CMAP;
-
-
- while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- yychar+= zzMarkedPosL-zzStartRead;
-
- if (zzMarkedPosL > zzStartRead) {
- switch (zzBufferL[zzMarkedPosL-1]) {
- case '\n':
- case '\u000B':
- case '\u000C':
- case '\u0085':
- case '\u2028':
- case '\u2029':
- zzAtBOL = true;
- break;
- case '\r':
- if (zzMarkedPosL < zzEndReadL)
- zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
- else if (zzAtEOF)
- zzAtBOL = false;
- else {
- boolean eof = zzRefill();
- zzMarkedPosL = zzMarkedPos;
- 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 10: zzIsFinal = true; zzState = 9; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 1:
- switch (zzInput) {
- case 1: zzIsFinal = true; zzState = 10; break zzForNext;
- case 2: zzIsFinal = true; zzState = 11; break zzForNext;
- case 3: zzIsFinal = true; zzState = 12; break zzForNext;
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 13; break zzForNext;
- case 10: zzIsFinal = true; zzState = 14; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 2:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 15; break zzForNext;
- case 11: zzIsFinal = true; zzState = 16; break zzForNext;
- case 22: zzIsFinal = true; zzState = 17; break zzForNext;
- case 45: zzIsFinal = true; zzState = 18; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 3:
- switch (zzInput) {
- case 14: zzIsFinal = true; zzState = 19; break zzForNext;
- case 18: zzIsFinal = true; zzState = 20; break zzForNext;
- case 21: zzIsFinal = true; zzState = 21; break zzForNext;
- case 27: zzIsFinal = true; zzState = 22; break zzForNext;
- case 41: zzIsFinal = true; zzState = 23; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 4:
- switch (zzInput) {
- case 6:
- case 8:
- case 28: zzIsFinal = true; zzState = 25; break zzForNext;
- case 9: zzIsFinal = true; zzState = 26; break zzForNext;
- case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 27; break zzForNext;
- case 32: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext;
- }
-
- case 5:
- switch (zzInput) {
- case 8:
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- case 11: zzIsFinal = true; zzState = 31; break zzForNext;
- case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 32; break zzForNext;
- case 32: zzIsFinal = true; zzState = 33; break zzForNext;
- case 41: zzIsFinal = true; zzState = 34; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext;
- }
-
- case 6:
- switch (zzInput) {
- case 8:
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- case 41: zzIsFinal = true; zzState = 34; break zzForNext;
- case 32: zzIsFinal = true; zzState = 35; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext;
- }
-
- case 7:
- switch (zzInput) {
- case 11:
- case 41: zzIsFinal = true; zzState = 34; break zzForNext;
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzNoLookAhead = true; zzState = 36; break zzForNext;
- case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 37; break zzForNext;
- case 32: zzIsFinal = true; zzState = 38; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext;
- }
-
- case 9:
- switch (zzInput) {
- case 15: zzState = 39; break zzForNext;
- case 23: zzState = 40; break zzForNext;
- case 41: zzState = 41; break zzForNext;
- case 44: zzState = 42; break zzForNext;
- default: break zzForAction;
- }
-
- case 10:
- switch (zzInput) {
- case 2: zzIsFinal = true; zzNoLookAhead = true; zzState = 43; break zzForNext;
- default: break zzForAction;
- }
-
- case 11:
- switch (zzInput) {
- case 1: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- default: break zzForAction;
- }
-
- case 12:
- switch (zzInput) {
- case 4: zzState = 45; break zzForNext;
- default: break zzForAction;
- }
-
- case 13:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 46; break zzForNext;
- case 10: zzState = 47; break zzForNext;
- default: break zzForAction;
- }
-
- case 14:
- switch (zzInput) {
- case 15: zzState = 39; break zzForNext;
- case 23: zzState = 40; break zzForNext;
- case 41: zzState = 41; break zzForNext;
- case 44: zzState = 42; break zzForNext;
- case 11: zzState = 48; break zzForNext;
- default: break zzForAction;
- }
-
- case 15:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 49; break zzForNext;
- case 11: zzState = 50; break zzForNext;
- default: break zzForAction;
- }
-
- case 16:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 51; break zzForNext;
- default: break zzForAction;
- }
-
- case 17:
- switch (zzInput) {
- case 29: zzState = 52; break zzForNext;
- default: break zzForAction;
- }
-
- case 18:
- switch (zzInput) {
- case 22: zzState = 53; break zzForNext;
- default: break zzForAction;
- }
-
- case 19:
- switch (zzInput) {
- case 43: zzState = 54; break zzForNext;
- default: break zzForAction;
- }
-
- case 20:
- switch (zzInput) {
- case 17: zzState = 55; break zzForNext;
- default: break zzForAction;
- }
-
- case 21:
- switch (zzInput) {
- case 43: zzState = 56; break zzForNext;
- default: break zzForAction;
- }
-
- case 22:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 57; break zzForNext;
- default: break zzForAction;
- }
-
- case 23:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 58; break zzForNext;
- default: break zzForAction;
- }
-
- case 25:
- switch (zzInput) {
- case 6:
- case 8:
- case 28: zzIsFinal = true; break zzForNext;
- case 9: zzState = 59; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext;
- }
-
- case 26:
- switch (zzInput) {
- case 6:
- case 8:
- case 28: zzIsFinal = true; zzState = 25; break zzForNext;
- case 9: zzState = 59; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext;
- }
-
- case 31:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 60; break zzForNext;
- default: break zzForAction;
- }
-
- case 33:
- switch (zzInput) {
- case 10: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 34:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 62; break zzForNext;
- default: break zzForAction;
- }
-
- case 35:
- switch (zzInput) {
- case 10: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 38:
- switch (zzInput) {
- case 10: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 39:
- switch (zzInput) {
- case 16: zzState = 63; break zzForNext;
- default: break zzForAction;
- }
-
- case 40:
- switch (zzInput) {
- case 19: zzState = 64; break zzForNext;
- default: break zzForAction;
- }
-
- case 41:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 42: zzState = 65; break zzForNext;
- default: break zzForAction;
- }
-
- case 42:
- switch (zzInput) {
- case 30: zzState = 66; break zzForNext;
- default: break zzForAction;
- }
-
- case 45:
- switch (zzInput) {
- case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 67; break zzForNext;
- default: break zzForAction;
- }
-
- case 46:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 10: zzState = 47; break zzForNext;
- default: break zzForAction;
- }
-
- case 47:
- switch (zzInput) {
- case 11: zzState = 48; break zzForNext;
- default: break zzForAction;
- }
-
- case 48:
- switch (zzInput) {
- case 12: zzState = 68; break zzForNext;
- default: break zzForAction;
- }
-
- case 49:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 11: zzState = 50; break zzForNext;
- default: break zzForAction;
- }
-
- case 50:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 51; break zzForNext;
- default: break zzForAction;
- }
-
- case 52:
- switch (zzInput) {
- case 18: zzState = 69; break zzForNext;
- default: break zzForAction;
- }
-
- case 53:
- switch (zzInput) {
- case 37: zzState = 70; break zzForNext;
- default: break zzForAction;
- }
-
- case 54:
- switch (zzInput) {
- case 29: zzState = 71; break zzForNext;
- default: break zzForAction;
- }
-
- case 55:
- switch (zzInput) {
- case 29: zzState = 72; break zzForNext;
- default: break zzForAction;
- }
-
- case 56:
- switch (zzInput) {
- case 38: zzState = 73; break zzForNext;
- default: break zzForAction;
- }
-
- case 59:
- switch (zzInput) {
- case 6:
- case 8:
- case 28: zzIsFinal = true; zzState = 25; break zzForNext;
- case 9: break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext;
- }
-
- case 61:
- switch (zzInput) {
- case 32: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- default: break zzForAction;
- }
-
- case 63:
- switch (zzInput) {
- case 17: zzState = 74; break zzForNext;
- default: break zzForAction;
- }
-
- case 64:
- switch (zzInput) {
- case 13: zzState = 75; break zzForNext;
- default: break zzForAction;
- }
-
- case 65:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 19: zzState = 76; break zzForNext;
- case 21: zzState = 77; break zzForNext;
- default: break zzForAction;
- }
-
- case 66:
- switch (zzInput) {
- case 21: zzState = 78; break zzForNext;
- default: break zzForAction;
- }
-
- case 68:
- switch (zzInput) {
- case 13: zzState = 79; break zzForNext;
- default: break zzForAction;
- }
-
- case 69:
- switch (zzInput) {
- case 17: zzState = 80; break zzForNext;
- default: break zzForAction;
- }
-
- case 70:
- switch (zzInput) {
- case 30: zzState = 81; break zzForNext;
- default: break zzForAction;
- }
-
- case 71:
- switch (zzInput) {
- case 38: zzState = 82; break zzForNext;
- default: break zzForAction;
- }
-
- case 72:
- switch (zzInput) {
- case 19: zzState = 83; break zzForNext;
- default: break zzForAction;
- }
-
- case 73:
- switch (zzInput) {
- case 22: zzState = 84; break zzForNext;
- default: break zzForAction;
- }
-
- case 74:
- switch (zzInput) {
- case 18: zzState = 85; break zzForNext;
- default: break zzForAction;
- }
-
- case 75:
- switch (zzInput) {
- case 14: zzState = 86; break zzForNext;
- default: break zzForAction;
- }
-
- case 76:
- switch (zzInput) {
- case 43: zzState = 87; break zzForNext;
- default: break zzForAction;
- }
-
- case 77:
- switch (zzInput) {
- case 43: zzState = 88; break zzForNext;
- default: break zzForAction;
- }
-
- case 78:
- switch (zzInput) {
- case 33: zzState = 89; break zzForNext;
- default: break zzForAction;
- }
-
- case 79:
- switch (zzInput) {
- case 14: zzState = 90; break zzForNext;
- default: break zzForAction;
- }
-
- case 80:
- switch (zzInput) {
- case 16: zzState = 91; break zzForNext;
- default: break zzForAction;
- }
-
- case 81:
- switch (zzInput) {
- case 26: zzState = 92; break zzForNext;
- default: break zzForAction;
- }
-
- case 82:
- switch (zzInput) {
- case 24: zzState = 93; break zzForNext;
- default: break zzForAction;
- }
-
- case 83:
- switch (zzInput) {
- case 22: zzState = 94; break zzForNext;
- default: break zzForAction;
- }
-
- case 84:
- switch (zzInput) {
- case 22: zzState = 95; break zzForNext;
- default: break zzForAction;
- }
-
- case 85:
- switch (zzInput) {
- case 19: zzState = 96; break zzForNext;
- default: break zzForAction;
- }
-
- case 86:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 12: zzState = 97; break zzForNext;
- default: break zzForAction;
- }
-
- case 87:
- switch (zzInput) {
- case 38: zzState = 98; break zzForNext;
- default: break zzForAction;
- }
-
- case 88:
- switch (zzInput) {
- case 38: zzState = 99; break zzForNext;
- default: break zzForAction;
- }
-
- case 89:
- switch (zzInput) {
- case 16: zzState = 100; break zzForNext;
- default: break zzForAction;
- }
-
- case 90:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 101; break zzForNext;
- default: break zzForAction;
- }
-
- case 91:
- switch (zzInput) {
- case 26: zzState = 102; break zzForNext;
- default: break zzForAction;
- }
-
- case 92:
- switch (zzInput) {
- case 17: zzState = 103; break zzForNext;
- default: break zzForAction;
- }
-
- case 93:
- switch (zzInput) {
- case 43: zzState = 104; break zzForNext;
- default: break zzForAction;
- }
-
- case 94:
- switch (zzInput) {
- case 29: zzState = 105; break zzForNext;
- default: break zzForAction;
- }
-
- case 95:
- switch (zzInput) {
- case 29: zzState = 106; break zzForNext;
- default: break zzForAction;
- }
-
- case 96:
- switch (zzInput) {
- case 20: zzState = 107; break zzForNext;
- default: break zzForAction;
- }
-
- case 97:
- switch (zzInput) {
- case 13: zzState = 108; break zzForNext;
- default: break zzForAction;
- }
-
- case 98:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 109; break zzForNext;
- default: break zzForAction;
- }
-
- case 99:
- switch (zzInput) {
- case 22: zzState = 98; break zzForNext;
- default: break zzForAction;
- }
-
- case 100:
- switch (zzInput) {
- case 26: zzState = 110; break zzForNext;
- default: break zzForAction;
- }
-
- case 101:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 102:
- switch (zzInput) {
- case 29: zzState = 111; break zzForNext;
- default: break zzForAction;
- }
-
- case 103:
- switch (zzInput) {
- case 29: zzState = 112; break zzForNext;
- default: break zzForAction;
- }
-
- case 104:
- switch (zzInput) {
- case 38: zzState = 113; break zzForNext;
- default: break zzForAction;
- }
-
- case 105:
- switch (zzInput) {
- case 19: zzState = 114; break zzForNext;
- default: break zzForAction;
- }
-
- case 106:
- switch (zzInput) {
- case 18: zzState = 115; break zzForNext;
- default: break zzForAction;
- }
-
- case 107:
- switch (zzInput) {
- case 21: zzState = 116; break zzForNext;
- default: break zzForAction;
- }
-
- case 108:
- switch (zzInput) {
- case 14: zzState = 117; break zzForNext;
- default: break zzForAction;
- }
-
- case 109:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 110:
- switch (zzInput) {
- case 37: zzState = 118; break zzForNext;
- default: break zzForAction;
- }
-
- case 111:
- switch (zzInput) {
- case 38: zzState = 119; break zzForNext;
- default: break zzForAction;
- }
-
- case 112:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 7: zzIsFinal = true; zzState = 120; break zzForNext;
- default: break zzForAction;
- }
-
- case 113:
- switch (zzInput) {
- case 22: zzState = 121; break zzForNext;
- default: break zzForAction;
- }
-
- case 114:
- switch (zzInput) {
- case 19: zzState = 122; break zzForNext;
- default: break zzForAction;
- }
-
- case 115:
- switch (zzInput) {
- case 17: zzState = 123; break zzForNext;
- default: break zzForAction;
- }
-
- case 116:
- switch (zzInput) {
- case 22: zzState = 124; break zzForNext;
- default: break zzForAction;
- }
-
- case 117:
- switch (zzInput) {
- case 29: zzState = 125; break zzForNext;
- default: break zzForAction;
- }
-
- case 118:
- switch (zzInput) {
- case 22: zzState = 126; break zzForNext;
- default: break zzForAction;
- }
-
- case 119:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 7: zzIsFinal = true; zzState = 127; break zzForNext;
- default: break zzForAction;
- }
-
- case 120:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 121:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 7: zzIsFinal = true; zzState = 128; break zzForNext;
- default: break zzForAction;
- }
-
- case 122:
- switch (zzInput) {
- case 20: zzState = 129; break zzForNext;
- default: break zzForAction;
- }
-
- case 123:
- switch (zzInput) {
- case 16: zzState = 130; break zzForNext;
- default: break zzForAction;
- }
-
- case 124:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 23: zzState = 131; break zzForNext;
- case 34: zzState = 132; break zzForNext;
- default: break zzForAction;
- }
-
- case 125:
- switch (zzInput) {
- case 30: zzState = 133; break zzForNext;
- default: break zzForAction;
- }
-
- case 126:
- switch (zzInput) {
- case 18: zzState = 134; break zzForNext;
- default: break zzForAction;
- }
-
- case 127:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 128:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 129:
- switch (zzInput) {
- case 21: zzState = 135; break zzForNext;
- default: break zzForAction;
- }
-
- case 130:
- switch (zzInput) {
- case 26: zzState = 136; break zzForNext;
- default: break zzForAction;
- }
-
- case 131:
- switch (zzInput) {
- case 19: zzState = 137; break zzForNext;
- default: break zzForAction;
- }
-
- case 132:
- switch (zzInput) {
- case 13: zzState = 138; break zzForNext;
- default: break zzForAction;
- }
-
- case 133:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 7: zzState = 139; break zzForNext;
- default: break zzForAction;
- }
-
- case 134:
- switch (zzInput) {
- case 19: zzState = 140; break zzForNext;
- default: break zzForAction;
- }
-
- case 135:
- switch (zzInput) {
- case 22: zzState = 141; break zzForNext;
- default: break zzForAction;
- }
-
- case 136:
- switch (zzInput) {
- case 29: zzState = 142; break zzForNext;
- default: break zzForAction;
- }
-
- case 137:
- switch (zzInput) {
- case 13: zzState = 143; break zzForNext;
- default: break zzForAction;
- }
-
- case 138:
- switch (zzInput) {
- case 14: zzState = 144; break zzForNext;
- default: break zzForAction;
- }
-
- case 139:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 31:
- case 32: zzState = 145; break zzForNext;
- default: break zzForAction;
- }
-
- case 140:
- switch (zzInput) {
- case 26: zzState = 146; break zzForNext;
- default: break zzForAction;
- }
-
- case 141:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 7: zzIsFinal = true; zzState = 147; break zzForNext;
- default: break zzForAction;
- }
-
- case 142:
- switch (zzInput) {
- case 38: zzState = 148; break zzForNext;
- default: break zzForAction;
- }
-
- case 143:
- switch (zzInput) {
- case 14: zzState = 149; break zzForNext;
- default: break zzForAction;
- }
-
- case 144:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 21: zzState = 150; break zzForNext;
- default: break zzForAction;
- }
-
- case 145:
- switch (zzInput) {
- case 23: zzState = 151; break zzForNext;
- default: break zzForAction;
- }
-
- case 146:
- switch (zzInput) {
- case 45: zzState = 152; break zzForNext;
- default: break zzForAction;
- }
-
- case 147:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 148:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 7: zzIsFinal = true; zzState = 153; break zzForNext;
- default: break zzForAction;
- }
-
- case 149:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: break zzForNext;
- case 21: zzState = 154; break zzForNext;
- default: break zzForAction;
- }
-
- case 150:
- switch (zzInput) {
- case 24: zzState = 155; break zzForNext;
- default: break zzForAction;
- }
-
- case 151:
- switch (zzInput) {
- case 19: zzState = 156; break zzForNext;
- default: break zzForAction;
- }
-
- case 152:
- switch (zzInput) {
- case 22: zzState = 157; break zzForNext;
- default: break zzForAction;
- }
-
- case 153:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 154:
- switch (zzInput) {
- case 24: zzState = 158; break zzForNext;
- default: break zzForAction;
- }
-
- case 155:
- switch (zzInput) {
- case 25: zzState = 159; break zzForNext;
- default: break zzForAction;
- }
-
- case 156:
- switch (zzInput) {
- case 19: zzState = 160; break zzForNext;
- default: break zzForAction;
- }
-
- case 157:
- switch (zzInput) {
- case 35: zzState = 161; break zzForNext;
- default: break zzForAction;
- }
-
- case 158:
- switch (zzInput) {
- case 25: zzState = 162; break zzForNext;
- default: break zzForAction;
- }
-
- case 159:
- switch (zzInput) {
- case 14: zzState = 163; break zzForNext;
- default: break zzForAction;
- }
-
- case 160:
- switch (zzInput) {
- case 21: zzState = 164; break zzForNext;
- default: break zzForAction;
- }
-
- case 161:
- switch (zzInput) {
- case 19: zzState = 76; break zzForNext;
- case 21: zzState = 77; break zzForNext;
- default: break zzForAction;
- }
-
- case 162:
- switch (zzInput) {
- case 14: zzState = 165; break zzForNext;
- default: break zzForAction;
- }
-
- case 163:
- switch (zzInput) {
- case 26: zzState = 166; break zzForNext;
- default: break zzForAction;
- }
-
- case 164:
- switch (zzInput) {
- case 33: zzState = 167; break zzForNext;
- default: break zzForAction;
- }
-
- case 165:
- switch (zzInput) {
- case 26: zzState = 168; break zzForNext;
- default: break zzForAction;
- }
-
- case 166:
- switch (zzInput) {
- case 18: zzState = 169; break zzForNext;
- default: break zzForAction;
- }
-
- case 167:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- default: break zzForAction;
- }
-
- case 168:
- switch (zzInput) {
- case 18: zzState = 171; break zzForNext;
- default: break zzForAction;
- }
-
- case 169:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 9: break zzForAction;
- default: break zzForNext;
- }
-
- case 170:
- switch (zzInput) {
- case 27: zzState = 173; break zzForNext;
- default: break zzForAction;
- }
-
- case 171:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 9: break zzForAction;
- default: break zzForNext;
- }
-
- case 172:
- switch (zzInput) {
- case 27: zzState = 175; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 173:
- switch (zzInput) {
- case 34: zzState = 176; break zzForNext;
- default: break zzForAction;
- }
-
- case 174:
- switch (zzInput) {
- case 27: zzState = 177; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 175:
- switch (zzInput) {
- case 27: break zzForNext;
- case 16: zzState = 178; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 176:
- switch (zzInput) {
- case 34: zzState = 179; break zzForNext;
- default: break zzForAction;
- }
-
- case 177:
- switch (zzInput) {
- case 27: break zzForNext;
- case 16: zzState = 180; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 178:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 19: zzState = 181; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 179:
- switch (zzInput) {
- case 34: zzState = 182; break zzForNext;
- default: break zzForAction;
- }
-
- case 180:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 19: zzState = 183; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 181:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 16: zzState = 184; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 182:
- switch (zzInput) {
- case 35: zzState = 185; break zzForNext;
- default: break zzForAction;
- }
-
- case 183:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 16: zzState = 186; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 184:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 28: zzState = 187; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 185:
- switch (zzInput) {
- case 34: zzState = 188; break zzForNext;
- default: break zzForAction;
- }
-
- case 186:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 28: zzState = 189; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 187:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 34: zzState = 190; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 188:
- switch (zzInput) {
- case 36: zzState = 191; break zzForNext;
- default: break zzForAction;
- }
-
- case 189:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 12: zzState = 192; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 190:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 13: zzState = 193; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 191:
- switch (zzInput) {
- case 35: zzState = 194; break zzForNext;
- default: break zzForAction;
- }
-
- case 192:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 23: zzState = 195; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 193:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 14: zzIsFinal = true; zzState = 196; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 194:
- switch (zzInput) {
- case 17: zzState = 197; break zzForNext;
- default: break zzForAction;
- }
-
- case 195:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 19: zzState = 198; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 196:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 197:
- switch (zzInput) {
- case 37: zzState = 199; break zzForNext;
- default: break zzForAction;
- }
-
- case 198:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 13: zzState = 200; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 199:
- switch (zzInput) {
- case 38: zzState = 201; break zzForNext;
- default: break zzForAction;
- }
-
- case 200:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 14: zzIsFinal = true; zzState = 202; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 201:
- switch (zzInput) {
- case 27: zzState = 203; break zzForNext;
- default: break zzForAction;
- }
-
- case 202:
- switch (zzInput) {
- case 27: zzState = 174; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 171; break zzForNext;
- }
-
- case 203:
- switch (zzInput) {
- case 39: zzState = 204; break zzForNext;
- default: break zzForAction;
- }
-
- case 204:
- switch (zzInput) {
- case 40: zzState = 205; break zzForNext;
- default: break zzForAction;
- }
-
- case 205:
- switch (zzInput) {
- case 40: zzState = 206; break zzForNext;
- default: break zzForAction;
- }
-
- case 206:
- switch (zzInput) {
- case 40: zzState = 207; break zzForNext;
- default: break zzForAction;
- }
-
- case 207:
- switch (zzInput) {
- case 27: zzState = 208; break zzForNext;
- default: break zzForAction;
- }
-
- case 208:
- switch (zzInput) {
- case 12: zzState = 209; break zzForNext;
- default: break zzForAction;
- }
-
- case 209:
- switch (zzInput) {
- case 23: zzState = 210; break zzForNext;
- default: break zzForAction;
- }
-
- case 210:
- switch (zzInput) {
- case 19: zzState = 211; break zzForNext;
- default: break zzForAction;
- }
-
- case 211:
- switch (zzInput) {
- case 13: zzState = 212; break zzForNext;
- default: break zzForAction;
- }
-
- case 212:
- switch (zzInput) {
- case 14: zzIsFinal = true; zzNoLookAhead = true; zzState = 213; break zzForNext;
- default: break zzForAction;
- }
-
- default:
- // if this is ever reached, there is a serious bug in JFlex
- zzScanError(ZZ_UNKNOWN_ERROR);
- break;
- } }
-
- if ( zzIsFinal ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( zzNoLookAhead ) break zzForAction;
- }
-
- }
- }
-
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
-
- switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 10:
- { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;}
- }
- case 27: break;
- case 17:
- { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;}
- }
- case 28: break;
- case 4:
- { yybegin(SQ_STRING); string.setLength(0);
- }
- case 29: break;
- case 5:
- { string.append( yytext() );
- }
- case 30: break;
- case 22:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage;
- }
- case 31: break;
- case 26:
- { isXHTML = true;
- }
- case 32: break;
- case 24:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding;
- }
- case 33: break;
- case 1:
- { if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}
- }
- case 34: break;
- case 11:
- { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;}
- }
- case 35: break;
- case 6:
- { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 36: break;
- case 8:
- { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue;
- }
- case 37: break;
- case 9:
- { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;
- }
- case 38: break;
- case 7:
- { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;
- }
- case 39: break;
- case 14:
- { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;
- }
- case 40: break;
- case 23:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType;
- }
- case 41: break;
- case 18:
- { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}
- }
- case 42: break;
- case 15:
- { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 43: break;
- case 2:
- { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);
- }
- case 44: break;
- case 12:
- { yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;
- }
- case 45: break;
- case 13:
- { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;
- }
- case 46: break;
- case 25:
- { isWML = true;
- }
- case 47: break;
- case 19:
- { yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;
- }
- case 48: break;
- case 21:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;
- }
- case 49: break;
- case 20:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;
- }
- case 50: break;
- case 16:
- { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 51: break;
- case 3:
- { yybegin(DQ_STRING); string.setLength(0);
- }
- case 52: break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- zzDoEOF();
- {
- hasMore = false; return EncodingParserConstants.EOF;
- }
- }
- else {
- zzScanError(ZZ_NO_MATCH);
- }
- }
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizerConstants.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizerConstants.java
deleted file mode 100644
index 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 5323479364..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java
+++ /dev/null
@@ -1,521 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-import java.nio.charset.UnsupportedCharsetException;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.sse.core.internal.encoding.CodedIO;
-import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
-import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector;
-import org.eclipse.wst.sse.core.internal.encoding.NonContentBasedEncodingRules;
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-public class JSPResourceEncodingDetector implements IResourceCharsetDetector {
-
- private String fCharset;
-
- private String fContentType;
-
- private String fContentTypeValue;
-
- private String fLanguage;
-
- private String fPageEncodingValue;
-
- private JSPHeadTokenizer fTokenizer;
-
- private String fXMLDecEncodingName;
-
- private boolean unicodeCase;
-
- private EncodingMemento fEncodingMemento;
-
- private boolean fHeaderParsed;
-
- private Reader fReader;
-
- private boolean fXHTML;
-
- private boolean fWML;
-
-
- /**
- * No Arg constructor.
- */
- public JSPResourceEncodingDetector() {
- super();
- }
-
- class NullMemento extends EncodingMemento {
- /**
- *
- */
- public NullMemento() {
- super();
- String defaultCharset = NonContentBasedEncodingRules.useDefaultNameRules(null);
- setJavaCharsetName(defaultCharset);
- setAppropriateDefault(defaultCharset);
- setDetectedCharsetName(null);
- }
-
- }
-
- /**
- * @return Returns the contentType.
- */
- public String getContentType() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- // we keep track of if header's already been parse, so can make
- // multiple 'get' calls, without causing reparsing.
- fHeaderParsed = true;
- // Note: there is a "hidden assumption" here that an empty
- // string in content should be treated same as not present.
- }
- return fContentType;
- }
-
- public String getEncoding() throws IOException {
- return getEncodingMemento().getDetectedCharsetName();
- }
-
- // to ensure consist overall rules used, we'll mark as
- // final,
- // and require subclasses to provide certain pieces of
- // the
- // implementation
- public EncodingMemento getEncodingMemento() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- // we keep track of if header's already been
- // parse, so can make
- // multiple 'get' calls, without causing
- // reparsing.
- fHeaderParsed = true;
- // Note: there is a "hidden assumption" here
- // that an empty
- // string in content should be treated same as
- // not present.
- }
- if (fEncodingMemento == null) {
- handleSpecDefault();
- }
- if (fEncodingMemento == null) {
- // safty net
- fEncodingMemento = new NullMemento();
- }
- return fEncodingMemento;
- }
-
- public String getLanguage() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- fHeaderParsed = true;
- }
- return fLanguage;
- }
-
- public String getSpecDefaultEncoding() {
- // by JSP Spec
- final String enc = "ISO-8859-1"; //$NON-NLS-1$
- return enc;
- }
-
- public EncodingMemento getSpecDefaultEncodingMemento() {
- resetAll();
- EncodingMemento result = null;
- String enc = getSpecDefaultEncoding();
- if (enc != null) {
- createEncodingMemento(enc, EncodingMemento.DEFAULTS_ASSUMED_FOR_EMPTY_INPUT);
- fEncodingMemento.setAppropriateDefault(enc);
- result = fEncodingMemento;
- }
- return result;
- }
-
- /**
- *
- */
- public void set(InputStream inputStream) {
- resetAll();
- fReader = new ByteReader(inputStream);
- try {
- fReader.mark(CodedIO.MAX_MARK_SIZE);
- }
- catch (IOException e) {
- // impossible, since we know ByteReader
- // supports marking
- throw new Error(e);
- }
- }
-
- /**
- *
- */
- public void set(IStorage iStorage) throws CoreException {
- resetAll();
- InputStream inputStream = iStorage.getContents();
- InputStream resettableStream = new BufferedInputStream(inputStream, CodedIO.MAX_BUF_SIZE);
- resettableStream.mark(CodedIO.MAX_MARK_SIZE);
- set(resettableStream);
- // TODO we'll need to "remember" IFile, or
- // get its (or its project's) settings, in case
- // those are needed to handle cases when the
- // encoding is not in the file stream.
- }
-
- /**
- * Note: this is not part of interface to help avoid confusion ... it
- * expected this Reader is a well formed character reader ... that is, its
- * all ready been determined to not be a unicode marked input stream. And,
- * its assumed to be in the correct position, at position zero, ready to
- * read first character.
- */
- public void set(Reader reader) {
- resetAll();
- fReader = reader;
- if (!fReader.markSupported()) {
- fReader = new BufferedReader(fReader);
- }
- try {
- fReader.mark(CodedIO.MAX_MARK_SIZE);
- }
- catch (IOException e) {
- // impossble, since we just checked if markable
- throw new Error(e);
- }
- }
-
- private boolean canHandleAsUnicodeStream(String tokenType) {
- boolean canHandleAsUnicode = false;
- if (tokenType == EncodingParserConstants.UTF83ByteBOM) {
- canHandleAsUnicode = true;
- String enc = "UTF-8"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- fEncodingMemento.setUTF83ByteBOMUsed(true);
- }
- else if (tokenType == EncodingParserConstants.UTF16BE) {
- canHandleAsUnicode = true;
- String enc = "UTF-16BE"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- }
- else if (tokenType == EncodingParserConstants.UTF16LE) {
- canHandleAsUnicode = true;
- String enc = "UTF-16"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- }
- return canHandleAsUnicode;
- }
-
- /**
- * Note: once this instance is created, trace info still needs to be
- * appended by caller, depending on the context its created.
- */
- private void createEncodingMemento(String detectedCharsetName) {
- fEncodingMemento = new EncodingMemento();
- fEncodingMemento.setJavaCharsetName(getAppropriateJavaCharset(detectedCharsetName));
- fEncodingMemento.setDetectedCharsetName(detectedCharsetName);
- // TODO: if detectedCharset and spec default is
- // null, need to use "work
- // bench based" defaults.
- fEncodingMemento.setAppropriateDefault(getSpecDefaultEncoding());
- }
-
- /**
- * There can sometimes be mulitple 'encodings' specified in a file. This
- * is an attempt to centralize the rules for deciding between them.
- * Returns encoding according to priority: 1. XML Declaration 2. page
- * directive pageEncoding name 3. page directive contentType charset name
- */
- private String getAppropriateEncoding() {
- String result = null;
- if (fXMLDecEncodingName != null)
- result = fXMLDecEncodingName;
- else if (fPageEncodingValue != null)
- result = fPageEncodingValue;
- else if (fCharset != null)
- result = fCharset;
- return result;
- }
-
- /**
- * This method can return null, if invalid charset name (in which case
- * "appropriateDefault" should be used, if a name is really need for some
- * "save anyway" cases).
- *
- * @param detectedCharsetName
- * @return
- */
- private String getAppropriateJavaCharset(String detectedCharsetName) {
- String result = null;
- // 1. Check explicit mapping overrides from
- // property file -- its here we pick up "rules" for cases
- // that are not even in Java
- result = CodedIO.checkMappingOverrides(detectedCharsetName);
- // 2. Use the "canonical" name from JRE mappings
- // Note: see Charset JavaDoc, the name you get one
- // with can be alias,
- // the name you get back is "standard" name.
- Charset javaCharset = null;
- try {
- javaCharset = Charset.forName(detectedCharsetName);
- }
- catch (UnsupportedCharsetException e) {
- // only set invalid, if result is same as detected -- they won't
- // be equal if
- // overridden
- if (result != null && result.equals(detectedCharsetName)) {
- fEncodingMemento.setInvalidEncoding(detectedCharsetName);
- }
- }
- catch (IllegalCharsetNameException e) {
- // only set invalid, if result is same as detected -- they won't
- // be equal if
- // overridden
- if (result != null && result.equals(detectedCharsetName)) {
- fEncodingMemento.setInvalidEncoding(detectedCharsetName);
- }
- }
- // give priority to java cononical name, if present
- if (javaCharset != null) {
- result = javaCharset.name();
- // but still allow overrides
- result = CodedIO.checkMappingOverrides(result);
- }
- return result;
- }
-
- private JSPHeadTokenizer getTokinizer() {
- if (fTokenizer == null) {
- fTokenizer = new JSPHeadTokenizer();
- }
- return fTokenizer;
- }
-
- private void handleSpecDefault() {
- String encodingName;
- encodingName = getSpecDefaultEncoding();
- if (encodingName != null) {
- // createEncodingMemento(encodingName,
- // EncodingMemento.USED_CONTENT_TYPE_DEFAULT);
- fEncodingMemento = new EncodingMemento();
- fEncodingMemento.setJavaCharsetName(encodingName);
- fEncodingMemento.setAppropriateDefault(encodingName);
- }
- }
-
- private boolean isLegalString(String valueTokenType) {
- boolean result = false;
- if (valueTokenType != null) {
- result = valueTokenType.equals(EncodingParserConstants.StringValue) || valueTokenType.equals(EncodingParserConstants.UnDelimitedStringValue) || valueTokenType.equals(EncodingParserConstants.InvalidTerminatedStringValue) || valueTokenType.equals(EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue);
- }
- return result;
- }
-
-
- /**
- * This method should be exactly the same as what is in
- * JSPHeadTokenizerTester
- * @param contentType
- */
- private void parseContentTypeValue(String contentType) {
- Pattern pattern = Pattern.compile(";\\s*charset\\s*=\\s*"); //$NON-NLS-1$
- String[] parts = pattern.split(contentType);
- if (parts.length > 0) {
- // if only one item, it can still be charset instead of
- // contentType
- if (parts.length == 1) {
- if (parts[0].length() > 6) {
- String checkForCharset = parts[0].substring(0, 7);
- if (checkForCharset.equalsIgnoreCase("charset")) { //$NON-NLS-1$
- int eqpos = parts[0].indexOf('=');
- eqpos = eqpos + 1;
- if (eqpos < parts[0].length()) {
- fCharset = parts[0].substring(eqpos);
- fCharset = fCharset.trim();
- }
- }
- else {
- fContentType = parts[0];
- }
- }
- }
- else {
- fContentType = parts[0];
- }
- }
- if (parts.length > 1) {
- fCharset = parts[1];
- }
- }
-
-
- /**
- * Looks for what ever encoding properties the tokenizer returns. Its the
- * responsibility of the tokenizer to stop when appropriate and not go too
- * far.
- */
- private void parseHeader(JSPHeadTokenizer tokenizer) throws IOException {
- fPageEncodingValue = null;
- fCharset = null;
-
- HeadParserToken token = null;
- do {
- // don't use 'get' here (at least until reset issue fixed)
- token = tokenizer.getNextToken();
- String tokenType = token.getType();
- if (canHandleAsUnicodeStream(tokenType))
- unicodeCase = true;
- else {
-
- if (tokenType == XMLHeadTokenizerConstants.XMLDelEncoding) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- fXMLDecEncodingName = valueToken.getText();
- }
- }
- }
- else if (tokenType == JSPHeadTokenizerConstants.PageEncoding) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- fPageEncodingValue = valueToken.getText();
- }
- }
- }
- else if (tokenType == JSPHeadTokenizerConstants.PageContentType) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- fContentTypeValue = valueToken.getText();
- }
- }
- }
- else if (tokenType == JSPHeadTokenizerConstants.PageLanguage) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- fLanguage = valueToken.getText();
- }
- }
- }
- }
- }
- while (tokenizer.hasMoreTokens());
- if (fContentTypeValue != null) {
- parseContentTypeValue(fContentTypeValue);
- }
- if (tokenizer.isXHTML()) {
- fXHTML = true;
- }
- if (tokenizer.isWML() ) {
- fWML = true;
- }
-
-
- }
-
- private void parseInput() throws IOException {
- JSPHeadTokenizer tokenizer = getTokinizer();
- fReader.reset();
- tokenizer.reset(fReader);
- parseHeader(tokenizer);
- // unicode stream cases are created directly in parseHeader
- if (!unicodeCase) {
- String enc = getAppropriateEncoding();
- if (enc != null && enc.length() > 0) {
- createEncodingMemento(enc, EncodingMemento.FOUND_ENCODING_IN_CONTENT);
- }
- }
- }
-
- /**
- *
- */
- private void resetAll() {
- fReader = null;
- fHeaderParsed = false;
- fEncodingMemento = null;
- fCharset = null;
- fContentTypeValue = null;
- fPageEncodingValue = null;
- fXMLDecEncodingName = null;
- unicodeCase = false;
- fXHTML=false;
- fWML=false;
- }
-
-
-
- /**
- * convience method all subclasses can use (but not override)
- *
- * @param detectedCharsetName
- * @param reason
- */
- private void createEncodingMemento(String detectedCharsetName, String reason) {
- createEncodingMemento(detectedCharsetName);
- }
-
- /**
- * convience method all subclasses can use (but not override)
- */
- private void ensureInputSet() {
- if (fReader == null) {
- throw new IllegalStateException("input must be set before use"); //$NON-NLS-1$
- }
- }
-
- public boolean isWML() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- // we keep track of if header's already been parse, so can make
- // multiple 'get' calls, without causing reparsing.
- fHeaderParsed = true;
- // Note: there is a "hidden assumption" here that an empty
- // string in content should be treated same as not present.
- }
- return fWML;
- }
-
- public boolean isXHTML() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- // we keep track of if header's already been parse, so can make
- // multiple 'get' calls, without causing reparsing.
- fHeaderParsed = true;
- // Note: there is a "hidden assumption" here that an empty
- // string in content should be treated same as not present.
- }
- return fXHTML;
- }
-}
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 d2b321ffcc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.document;
-
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-
-/**
- * Classes which implement this interface have two responsibilities.
- * One is to provide
- * and embedded factory registry for JSP Aware INodeAdapter Factories
- * to use. The other is to monitor page directives and if
- * a change in embedded type is is made, it will signal
- * the structuredModel that it needs to reinitialize itself.
- */
-public interface PageDirectiveAdapter extends INodeAdapter {
-
- public String getContentType();
-
- public String getLanguage();
-
- /**
- * This setter method should be called once, shortly after
- * initialization.
- */
- void setEmbeddedType(EmbeddedTypeHandler handler);
-
- EmbeddedTypeHandler getEmbeddedType();
-
- /**
- * This method is to give this adapter a chance to use
- * the 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 026c3a789f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java
+++ /dev/null
@@ -1,703 +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.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 int firstLanguagePosition = -1;
- private int firstContentTypePosition = -1;
-
- /*
- * @see INodeAdapter#isAdapterForType(Object)
- */
- public boolean isAdapterForType(Object type) {
- return (type == adapterType);
- }
-
- /*
- * @see INodeAdapter#notifyChanged(INodeNotifier, int, Object, Object,
- * Object, int)
- */
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- }
-
- public void setEmbeddedType(EmbeddedTypeHandler handler) {
- // if really the same handler, no need for further processing
- if (embeddedTypeHandler == handler) {
- return;
- }
- // then one exists, and the new one is truely different, so we need to
- // release and remove current factories
- if (embeddedTypeHandler != null) {
- Iterator list = embeddedFactoryRegistry.iterator();
- while (list.hasNext()) {
- INodeAdapterFactory factory = (INodeAdapterFactory) list.next();
- factory.release();
- }
-
- embeddedFactoryRegistry.clear();
- }
-
- embeddedTypeHandler = handler;
- // when the handler is set, "transfer" its factories to our own list.
- // note: our own list may also be added to else where, such as on
- // "editor side".
- if (embeddedTypeHandler != null) {
- Iterator iterator = embeddedTypeHandler.getAdapterFactories().iterator();
- while (iterator.hasNext()) {
- INodeAdapterFactory factory = (INodeAdapterFactory) iterator.next();
- embeddedFactoryRegistry.add(factory);
- }
- }
- }
-
- /**
- * @see PageDirectiveAdapter#adapt(INodeNotifier, Object)
- */
- public INodeAdapter adapt(INodeNotifier notifier, Object type) {
- INodeAdapter result = null;
- // if embeddedContentType hasn't been set,
- // then we can not adapt it.
- if (embeddedTypeHandler != null) {
- if (embeddedFactoryRegistry != null) {
- Iterator iterator = embeddedFactoryRegistry.iterator();
- INodeAdapterFactory factory = null;
- while (iterator.hasNext()) {
- factory = (INodeAdapterFactory) iterator.next();
- if (factory.isFactoryForType(type)) {
- result = factory.adapt(notifier);
- break;
- }
- }
- }
- }
- return result;
-
- }
-
- /**
- * @see PageDirectiveAdapter#getEmbeddedType()
- */
- public EmbeddedTypeHandler getEmbeddedType() {
- if (embeddedTypeHandler == null) {
- embeddedTypeHandler = getDefaultEmbeddedType();
- }
- return embeddedTypeHandler;
- }
-
- public void addEmbeddedFactory(INodeAdapterFactory factory) {
- // should we check if already exists in list?
- embeddedFactoryRegistry.add(factory);
- }
-
- // /**
- // * Used by PageDirectiveWatchers to signal that some important attribute
- // has changed, and
- // * any cached values should be re-calcuated
- // */
- // void changed() {
- // // we won't actually check if change is needed, if the model state is
- // already changing.
- // if (!model.isReinitializationNeeded()) {
- // // go through our list of page watcher adapters, and updates the
- // attributes
- // // we're interested in, if and only if they are the earliest occurance
- // in the resource
- // String potentialContentType = null;
- // String potentialLanguage = null;
- // int contentTypePosition = -1;
- // int languagePosition = -1;
- // Iterator iterator = pageDirectiveWatchers.iterator();
- // while (iterator.hasNext()) {
- // PageDirectiveWatcher pdWatcher = (PageDirectiveWatcher)
- // iterator.next();
- // String contentType = pdWatcher.getContentType();
- // String language = pdWatcher.getLanguage();
- // int offset = pdWatcher.getOffset();
- // if (potentialContentType == null || (hasValue(contentType) && (offset <
- // contentTypePosition))) {
- // potentialContentType = contentType;
- // contentTypePosition = offset;
- // }
- // }
- // // now we have the best candiates for cached values, let's see if
- // they've really changed from
- // // what we had. If so, note we go through the setters so side effects
- // can take place there.
- // potentialContentType =
- // getMimeTypeFromContentTypeValue(potentialContentType);
- // if (potentialContentType == null || potentialContentType.length() == 0)
- // {
- // //potentialContentType = getDefaultContentType();
- // } else {
- // setCachedContentType(potentialContentType);
- // }
- //
- // if (potentialLanguage != null && hasValue(potentialLanguage)) {
- // setCachedLanguage(potentialLanguage);
- // }
- // }
- // }
- void changedContentType(int elementOffset, String newValue) {
- // only need to process if this new value is
- // earlier in the file than our current value
- if (firstContentTypePosition == -1 || elementOffset <= firstContentTypePosition) {
- // dw_TODO: update embedded partitioner in JSP document
- // partitioner
- // nsd_TODO: update embedded partitioner in JSP document
- // partitioner
-
- // no need to change current value, if we're told some
- // earlier value is null or blank (sounds like an error, anyway)
- if (hasValue(newValue)) {
- firstContentTypePosition = elementOffset;
- String potentialContentType = getMimeTypeFromContentTypeValue(newValue);
- // only do the set processing if different
- // from what it already is
- // if (!potentialContentType.equalsIgnoreCase(cachedLanguage))
- // {
- setCachedContentType(potentialContentType);
- // }
- }
- }
- }
-
- /**
- * Used by PageDirectiveWatchers to signal that some important attribute
- * has changed, and any cached values should be re-calcuated
- */
- void changedLanguage(int elementOffset, String newValue) {
- // only need to process if this new value is
- // earlier in the file than our current value
- // has to be less than or equal to, in case our previous earliest one,
- // is itself changing!
- if (firstLanguagePosition == -1 || elementOffset <= firstLanguagePosition) {
-
- // no need to change current value, if we're told some
- // earlier value is null or blank (sounds like an error, anyway)
- if (hasValue(newValue)) {
- firstLanguagePosition = elementOffset;
- // only do the set processing if different
- // from what it already is
- if (!newValue.equalsIgnoreCase(cachedLanguage)) {
- setCachedLanguage(newValue);
- }
- }
-
- // dw_TODO: set language in document partitioner
- // nsd_TODO: set language in document partitioner
- }
- }
-
- /**
- * Used by PageDirectiveWatchers to signal that some important attribute
- * has changed, and any cached values should be re-calcuated
- */
- void changedPageEncoding(int elementOffset, String newValue) {
-
- // we don't currently track active value, since
- // just need during read and write (where its
- // calculated. We will need in future, to
- // acurately clone a model and to display
- // "current encoding" to user in status bar.
- }
-
- /**
- * Method hasValue.
- *
- * @param contentType
- * @return boolean
- */
- private boolean hasValue(String value) {
- if (value != null && value.length() > 0)
- return true;
- else
- return false;
- }
-
- /**
- * Returns the cachedContentType.
- *
- * @return String
- */
- public String getContentType() {
- if (cachedContentType == null) {
- cachedContentType = getDefaultContentType();
- }
- return cachedContentType;
- }
-
- /**
- * Method getDefaultContentType.
- *
- * @return String
- */
- private String getDefaultContentType() {
- String type = null;
- IFile file = getFile(model);
- if (file != null) {
- type = JSPFContentProperties.getProperty(JSPFContentProperties.JSPCONTENTTYPE, file, true);
- }
- // BUG136468
- if (type == null)
- type = "text/html"; //$NON-NLS-1$
- return type;
- }
-
- /**
- * Returns the cachedLanguage.
- *
- * @return String
- */
- public String getLanguage() {
- if (cachedLanguage == null)
- cachedLanguage = getDefaultLanguage();
- return cachedLanguage;
- }
-
- /**
- * Method getDefaultLanguage.
- *
- * @return String
- */
- private String getDefaultLanguage() {
- String language = null;
- IFile file = getFile(model);
- if (file != null) {
- language = JSPFContentProperties.getProperty(JSPFContentProperties.JSPLANGUAGE, file, true);
- }
- // BUG136468
- if (language == null)
- language = "java"; //$NON-NLS-1$
- return language;
- }
-
- /**
- * Sets the cachedContentType.
- *
- * @param cachedContentType
- * The cachedContentType to set
- */
- public void setCachedContentType(String newContentType) {
- /*
- * if the passed in value is the same as existing, there's nothing to
- * do. if its different, then we need to change the contentHandler as
- * well and, more to the point, signal a re-initializtation is needed.
- *
- * Note: if the value we're getting set to does not have a handler in
- * the registry, we'll actually not set it to null or anything, we'll
- * just continue on with the one we have. This is pretty important to
- * avoid re-initializing on every key stroke if someone is typing in a
- * new content type, but haven't yet finished the whole "word".
- * However, if an contentType is not recognized, the registry returns
- * the one for XML.
- */
-
- /* set the actual value first, the rest is "side effect" */
- this.cachedContentType = newContentType;
-
- /* see if we need to update embedded handler */
-
- /*
- * If the document is a type of XHTML, we do not use the page
- * directive's contentType to determine the embedded type ... its
- * XHTML! ... and, eventually, the DOCTYPE adapter should determine
- * if/when it needs to change.
- */
-
- /* just safety check, can be removed later, early in release cycle */
- if (model == null) {
- // throw IllegalStateException("model should never be null in
- // PageDirective Adapter");
- Logger.log(Logger.ERROR, "model should never be null in PageDirective Adapter");
- return;
- }
-
- EmbeddedTypeHandler potentialNewandler = null;
- IContentDescription contentDescription = getContentDescription(model.getStructuredDocument());
- Object prop = contentDescription.getProperty(IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE);
- if (prop != null) {
- if (ContentTypeFamilyForHTML.HTML_FAMILY.equals(prop)) {
- potentialNewandler = EmbeddedTypeRegistryImpl.getInstance().getTypeFor("text/html");
- }
- }
-
- if (potentialNewandler == null) {
- /*
- * getHandler should always return something (never null), based
- * on the rules in the factory.
- */
- potentialNewandler = getHandlerFor(this.cachedContentType);
- }
- /*
- * we do this check for re-init here, instead of in setEmbeddedType,
- * since setEmbeddedType is called during the normal initializtion
- * process, when re-init is not needed (since there is no content)
- */
- if (embeddedTypeHandler == null) {
- setEmbeddedType(potentialNewandler);
- }
- else if (potentialNewandler != null && embeddedTypeHandler != potentialNewandler) {
- /*
- * changing this embedded handler here may be in the middle of a
- * notify loop. That's why we set that "it's needed". Then the
- * model decides when its "safe" to actually do the re-init.
- *
- * be sure to hold oldHandler in temp var or else setEmbeddedType
- * will "reset" it before modelReinitNeeded(oldHandler, handler)
- * is called
- *
- */
- EmbeddedTypeHandler oldHandler = embeddedTypeHandler;
- setEmbeddedType(potentialNewandler);
- modelReinitNeeded(oldHandler, potentialNewandler);
- }
-
- }
-
- /**
- * This method is used to re-init based on embeddedTypeHandler changing.
- * It is given priority over the language change, since there its more
- * important to have old and new handlers's in the stateData field.
- */
- private void modelReinitNeeded(EmbeddedTypeHandler oldHandler, EmbeddedTypeHandler newHandler) {
- if (model.isReinitializationNeeded()) {
- System.out.println("already being initialized"); //$NON-NLS-1$
- }
-
- try {
- model.aboutToChangeModel();
- model.setReinitializeStateData(new EmbeddedTypeStateData(oldHandler, newHandler));
- model.setReinitializeNeeded(true);
- }
- finally {
- model.changedModel();
- }
- }
-
- /**
- * Method modelReinitNeeded.
- */
- private void modelReinitNeeded(String oldlanguage, String newLanguage) {
- // bit of a short cut for now .... we dont' need language at the
- // moment,
- // but should set the state data
- if (model.isReinitializationNeeded()) {
- if (Debug.displayWarnings) {
- System.out.println("already being initialized"); //$NON-NLS-1$
- }
- }
- else {
- try {
- // if already being re-initialized, we don't want to
- // reset the data in the stateData field.
- model.aboutToChangeModel();
- model.setReinitializeStateData(newLanguage);
- model.setReinitializeNeeded(true);
- }
- finally {
- model.changedModel();
- }
- }
- }
-
- public void setCachedLanguage(String newLanguage) {
- if (cachedLanguage != null && languageStateChanged(cachedLanguage, newLanguage)) {
- /*
- * a complete re-init overkill in current system, since really
- * just need for the line style providers, BUT, a change in
- * language could effect other things, and we don't expect to
- * happen often so a little overkill isn't too bad. The deep
- * problem is that there is no way to get at the "edit side"
- * adpapters specifically here in model class. we have to do the
- * model changed sequence to get the screen to update. do not
- * signal again, if signaled once (the reinit state data will be
- * wrong. (this needs to be improved in future)
- */
- if (!model.isReinitializationNeeded()) {
- modelReinitNeeded(cachedLanguage, newLanguage);
- }
- }
- setLanguage(newLanguage);
- }
-
- /**
- * This is public access method, used especially from loader, for JSP
- * Fragment support.
- */
- public void setLanguage(String newLanguage) {
- this.cachedLanguage = newLanguage;
- IDocumentPartitioner partitioner = ((IDocumentExtension3) model.getStructuredDocument()).getDocumentPartitioner(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING);
- if (partitioner instanceof StructuredTextPartitionerForJSP) {
- ((StructuredTextPartitionerForJSP) partitioner).setLanguage(newLanguage);
- }
- }
-
- /**
- * Method languageStateChange.
- *
- * @param cachedLanguage
- * @param newLanguage
- * @return boolean
- */
- private boolean languageStateChanged(String cachedLanguage, String newLanguage) {
- boolean result = false; // languages are equal, then no change in
- // state
- if (!cachedLanguage.equalsIgnoreCase(newLanguage)) {
- boolean oldLanguageKnown = languageKnown(cachedLanguage);
- boolean newLanguageKnown = languageKnown(newLanguage);
- result = newLanguageKnown || (!newLanguageKnown && oldLanguageKnown);
- }
- return result;
- }
-
- /**
- * Method languageKnown.
- *
- * @param cachedLanguage
- * @return boolean
- */
- private boolean languageKnown(String language) {
- return (StringUtils.contains(JAVA_LANGUAGE_KEYS, language, false) || StringUtils.contains(JAVASCRIPT_LANGUAGE_KEYS, language, false));
- }
-
- private IFile getFile(IStructuredModel model) {
- String location = model.getBaseLocation();
- if (location != null) {
- IPath path = new Path(location);
- if (path.segmentCount() > 1) {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- }
- return null;
- }
-
- private EmbeddedTypeHandler getHandlerFor(String contentType) {
- EmbeddedTypeRegistry reg = getEmbeddedContentTypeRegistry();
- EmbeddedTypeHandler handler = null;
- if (reg != null)
- handler = reg.getTypeFor(contentType);
- return handler;
- }
-
- /**
- * Gets the embeddedContentTypeRegistry.
- *
- * @return Returns a EmbeddedContentTypeRegistry
- */
- private EmbeddedTypeRegistry getEmbeddedContentTypeRegistry() {
- return EmbeddedTypeRegistryImpl.getInstance();
- }
-
- /**
- * For JSP files, text/html is the default content type. This may want
- * this different for types like jsv (jsp for voice xml) For now, hard
- * code to new instance. In future, should get instance from registry.
- *
- * Specification cites HTML as the default contentType.
- */
- protected EmbeddedTypeHandler getDefaultEmbeddedType() {
- return getHandlerFor(getDefaultContentType());
- }
-
- public INodeNotifier getTarget() {
- return notifierAtCreation;
- }
-
- public void release() {
- if (embeddedTypeHandler != null) {
- if (embeddedFactoryRegistry != null) {
- Iterator iterator = embeddedFactoryRegistry.iterator();
- INodeAdapterFactory factory = null;
- while (iterator.hasNext()) {
- factory = (INodeAdapterFactory) iterator.next();
- factory.release();
- }
- }
- // pa_TODO: possibly need to release here...
- // or "uninitializeFactoryRegistry"
- // initializeFactoryRegistry was called from JSPModelLoader
- embeddedTypeHandler = null;
- }
- }
-
- private IContentDescription getContentDescription(IDocument doc) {
- if (doc == null)
- return null;
- 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;
- }
-} \ 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 5058785459..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.xml.core.internal.document.AttrImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-
-
-/**
- * The responsibility of this class is to monitor page directives and if
- * a change in embedded type is is made, it will signal
- * the structuredModel that it needs to reinitialize itself.
- */
-class PageDirectiveWatcherImpl implements PageDirectiveWatcher {
-
- private static Object adapterType = PageDirectiveWatcher.class;
- IDOMElement targetElement;
-
- /**
- * Constructor for PageDirectiveWatcherImpl.
- */
- public PageDirectiveWatcherImpl(IDOMElement target) {
- super();
- targetElement = target;
- String contentTypeValue = target.getAttribute("contentType"); //$NON-NLS-1$
- if (contentTypeValue != null) {
- // using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.changedContentType(((IndexedRegion) targetElement).getStartOffset(), contentTypeValue);
- }
- String languageValue = target.getAttribute("language"); //$NON-NLS-1$
- if (languageValue != null) {
- // using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.changedLanguage(((IndexedRegion) targetElement).getStartOffset(), languageValue);
- }
-
-
- }
-
- public boolean isAdapterForType(Object type) {
- return (type == adapterType);
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- // we should only be added to page directives, so if we see a page directive
- // change, we need to check its attributes, and notify the PageDirectiveAdapter when
- // certain ones chane, so it can make its "centralized" decisions.
- if (notifier instanceof IDOMNode) {
-
- switch (eventType) {
- case INodeNotifier.CHANGE :
- if (changedFeature instanceof AttrImpl) {
- AttrImpl attribute = (AttrImpl) changedFeature;
- String name = attribute.getName();
- if (name.equals("contentType")) { //$NON-NLS-1$
- // using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.changedContentType(((IndexedRegion) targetElement).getStartOffset(), (String) newValue);
- }
- if (name.equals("language")) { //$NON-NLS-1$ //$NON-NLS-2$
- // using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.changedLanguage(((IndexedRegion) targetElement).getStartOffset(), (String) newValue);
- }
- }
-
- break;
- case INodeNotifier.REMOVE :
- //System.out.println("removed"+new Date().toString());
- break;
-
-
- default :
- break;
- }
- }
-
- }
-
- public String getContentType() {
- String contentTypeValue = targetElement.getAttribute("contentType"); //$NON-NLS-1$
- return contentTypeValue;
- }
-
- public String getLanguage() {
- String languageValue = targetElement.getAttribute("language"); //$NON-NLS-1$
- return languageValue;
- }
-
- public int getOffset() {
- return targetElement.getStartOffset();
- }
-
-}
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 ff30c55ed8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/AttrImplForJSP.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.AttrImpl;
-import org.w3c.dom.Document;
-
-public class AttrImplForJSP extends AttrImpl {
-
- protected boolean isNestedLanguageOpening(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || regionType == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || regionType == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN;
- return result;
- }
- protected void setOwnerDocument(Document ownerDocument) {
- super.setOwnerDocument(ownerDocument);
- }
- protected void setName(String name) {
- super.setName(name);
- }
- protected void setNamespaceURI(String namespaceURI) {
- super.setNamespaceURI(namespaceURI);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/CommentImplForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/CommentImplForJSP.java
deleted file mode 100644
index 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 2969129714..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/ElementImplForJSP.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.html.core.internal.document.ElementStyleImpl;
-import org.eclipse.wst.xml.core.internal.document.ElementImpl;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-public class ElementImplForJSP extends ElementStyleImpl {
- /**
- *
- */
- public ElementImplForJSP() {
- super();
- }
-
- /**
- * @param that
- */
- public ElementImplForJSP(ElementImpl that) {
- super(that);
- }
-
- protected boolean isNestedEndTag(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME;
- return result;
- }
-
- protected boolean isNestedClosed(String regionType) {
- boolean result = (regionType == DOMJSPRegionContexts.JSP_CLOSE || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE);
- return result;
- }
-
- protected boolean isNestedClosedComment(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_COMMENT_CLOSE;
- return result;
- }
-
- protected boolean isClosedNestedDirective(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE;
- return result;
- }
-
- protected void setOwnerDocument(Document ownerDocument) {
- super.setOwnerDocument(ownerDocument);
- }
-
- protected void setTagName(String tagName) {
- super.setTagName(tagName);
- }
- public Node cloneNode(boolean deep) {
- ElementImpl cloned = new ElementImplForJSP(this);
- if (deep)
- cloneChildNodes(cloned, deep);
- return cloned;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestDOMModelUpdater.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestDOMModelUpdater.java
deleted file mode 100644
index 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 1f67f5355c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/TextImplForJSP.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.TextImpl;
-import org.w3c.dom.Document;
-
-public class TextImplForJSP extends TextImpl {
- protected boolean isNotNestedContent(String regionType) {
- boolean result = regionType != DOMJSPRegionContexts.JSP_CONTENT;
- return result;
- }
- protected void setOwnerDocument(Document ownerDocument) {
- super.setOwnerDocument(ownerDocument);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/IJSPHeadContentDetector.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/IJSPHeadContentDetector.java
deleted file mode 100644
index 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 8e1d3cb653..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.JSPCapableParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistry;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistryImpl;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.document.IEncodedDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.w3c.dom.Document;
-
-public class JSPDocumentLoader extends AbstractDocumentLoader {
- private final static String DEFAULT_MIME_TYPE = "text/html"; //$NON-NLS-1$
- private final static String SPEC_DEFAULT_ENCODING = "ISO-8859-1"; //$NON-NLS-1$
-
- protected static IFile getFileFor(IStructuredModel model) {
- if (model == null)
- return null;
- String path = model.getBaseLocation();
- if (path == null || path.length() == 0) {
- Object id = model.getId();
- if (id == null)
- return null;
- path = id.toString();
- }
- // TODO needs rework for linked resources
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IFile file = root.getFileForLocation(new Path(path));
- return file;
- }
-
- private EmbeddedTypeRegistry fEmbeddedContentTypeRegistry;
-
- public JSPDocumentLoader() {
- super();
- }
-
- protected void addNestablePrefix(JSPSourceParser parser, String tagName) {
- TagMarker bm = new TagMarker(tagName);
- parser.addNestablePrefix(bm);
- }
-
- synchronized public IEncodedDocument createNewStructuredDocument(IFile iFile) throws IOException, CoreException {
- IStructuredDocument structuredDocument = null;
- try {
- structuredDocument = createCodedDocument(iFile);
-
- EmbeddedTypeHandler embeddedType = getEmbeddedType(iFile);
- if (embeddedType != null)
- embeddedType.initializeParser((JSPCapableParser) structuredDocument.getParser());
-
- fFullPreparedReader.reset();
- setDocumentContentsFromReader(structuredDocument, fFullPreparedReader);
-
- }
- finally {
- if (fFullPreparedReader != null) {
- fFullPreparedReader.close();
- }
- }
- return structuredDocument;
- }
-
- private IStructuredDocument createCodedDocument(IFile iFile) throws CoreException, UnsupportedEncodingException, IOException {
- IStructuredDocument structuredDocument = (IStructuredDocument) createNewStructuredDocument();
-
- getCodedReaderCreator().set(iFile);
-
- fFullPreparedReader = getCodedReaderCreator().getCodedReader();
- fEncodingMemento = getCodedReaderCreator().getEncodingMemento();
-
- structuredDocument.setEncodingMemento(getCodedReaderCreator().getEncodingMemento());
-
- return structuredDocument;
- }
-
- public IEncodedDocument createNewStructuredDocument(String filename, InputStream inputStream) throws UnsupportedEncodingException, IOException {
- if (filename == null && inputStream == null) {
- throw new IllegalArgumentException("can not have both null filename and inputstream"); //$NON-NLS-1$
- }
- IEncodedDocument structuredDocument = createNewStructuredDocument();
- CodedReaderCreator codedReaderCreator = new CodedReaderCreator();
- try {
- codedReaderCreator.set(filename, inputStream);
- fFullPreparedReader = codedReaderCreator.getCodedReader();
- fEncodingMemento = codedReaderCreator.getEncodingMemento();
- structuredDocument.setEncodingMemento(fEncodingMemento);
- // the fact that file is null means this method/code path is no
- // good for JSP fragments
- EmbeddedTypeHandler embeddedType = getEmbeddedType((IFile) null);
- fFullPreparedReader.reset();
- if (embeddedType != null)
- embeddedType.initializeParser((JSPCapableParser) ((IStructuredDocument) structuredDocument).getParser());
- setDocumentContentsFromReader(structuredDocument, fFullPreparedReader);
- }
- catch (CoreException e) {
- // impossible in this context
- throw new Error(e);
- }
- finally {
- if (fFullPreparedReader != null) {
- fFullPreparedReader.close();
- }
- }
- return structuredDocument;
-
- }
-
- /**
- * Method getDefaultDocumentPartitioner.
- *
- * @return IDocumentPartitioner
- */
- public IDocumentPartitioner getDefaultDocumentPartitioner() {
- return new StructuredTextPartitionerForJSP();
- }
-
- /**
- * Method getDefaultMimeType.
- *
- * @return String
- */
- private String getDefaultMimeType() {
- return DEFAULT_MIME_TYPE;
- }
-
-
- public IDocumentCharsetDetector getDocumentEncodingDetector() {
- if (fDocumentEncodingDetector == null) {
- fDocumentEncodingDetector = new JSPDocumentHeadContentDetector();
- }
- return fDocumentEncodingDetector;
- }
-
- /**
- * Gets the embeddedContentTypeRegistry.
- *
- * @return Returns a EmbeddedContentTypeRegistry
- */
- private EmbeddedTypeRegistry getEmbeddedContentTypeRegistry() {
- if (fEmbeddedContentTypeRegistry == null) {
- fEmbeddedContentTypeRegistry = EmbeddedTypeRegistryImpl.getInstance();
- }
- return fEmbeddedContentTypeRegistry;
- }
-
- /**
- * Determine the MIME content type specified in a page directive. This
- * should appear "as early as possible in the JSP page" according to the
- * JSP v1.2 specification.
- */
- private EmbeddedTypeHandler getEmbeddedType(IFile file) throws UnsupportedEncodingException, CoreException, IOException {
- EmbeddedTypeHandler handler = null;
- if (fFullPreparedReader == null) {
- handler = getJSPDefaultEmbeddedType();
- }
- else {
- String mimeType = null;
-
- IDocumentCharsetDetector jspProvider = getDocumentEncodingDetector();
- Reader fullPreparedReader = getFullPreparedReader();
- BufferedLimitedReader limitedReader = new BufferedLimitedReader(fullPreparedReader, CodedIO.MAX_BUF_SIZE);
- jspProvider.set(limitedReader);
- if (jspProvider instanceof IJSPHeadContentDetector) {
- mimeType = ((IJSPHeadContentDetector) jspProvider).getContentType();
- fullPreparedReader.reset();
- }
-
- EmbeddedTypeRegistry reg = getEmbeddedContentTypeRegistry();
- if (mimeType == null || mimeType.length() == 0) {
- handler = getJSPDefaultEmbeddedType();
- }
- else {
- handler = reg.getTypeFor(mimeType);
- }
- }
- return handler;
- }
-
- /**
- * For JSP files, text/html is the default content type. This may want
- * this different for types like jsv (jsp for voice xml) For now, hard
- * code to new instance. In future, should get instance from registry.
- * Specification cites HTML as the default contentType.
- */
- private EmbeddedTypeHandler getJSPDefaultEmbeddedType() {
- EmbeddedTypeRegistry reg = getEmbeddedContentTypeRegistry();
- return reg.getTypeFor(getDefaultMimeType());
- }
-
- public RegionParser getParser() {
- // remember, the Loader
- // will need to finish initialization of parser
- // based on "embedded content"
- JSPSourceParser parser = new JSPSourceParser();
- // add default nestable tag list
- addNestablePrefix(parser, JSP11Namespace.JSP_TAG_PREFIX);
- return parser;
- }
-
- protected String getPreferredNewLineDelimiter(IFile file) {
- String delimiter = ContentTypeEncodingPreferences.getPreferredNewLineDelimiter(ContentTypeIdForJSP.ContentTypeID_JSP);
- if (delimiter == null)
- delimiter = super.getPreferredNewLineDelimiter(file);
- return delimiter;
- }
-
- /**
- * Specification cites ISO-8859-1/Latin-1 as the default charset.
- */
- protected String getSpecDefaultEncoding() {
- return SPEC_DEFAULT_ENCODING;
- }
-
- /**
- * This method must return a new instance of IStructuredDocument, that has
- * been initialized with appropriate parser. For many loaders, the
- * (default) parser used is known for any input. For others, the correct
- * parser (and its initialization) is normall dependent on the content of
- * the file. This no-argument method should assume "empty input" and would
- * therefore return the default parser for the default contentType. If the
- * parser is to handle tag libraries, it must have a TaglibSupport object
- * with a valid URIResolver and this IStructuredDocument attached to it
- * before the contents are set on the IStructuredDocument.
- */
- protected IEncodedDocument newEncodedDocument() {
- IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- ((BasicStructuredDocument) structuredDocument).setReParser(new JSPReParser());
- // structuredDocument.setDocumentPartitioner(new
- // JSPJavaDocumentPartioner());
- // even though this is an "empty model" ... we want it to have at
- // least
- // the
- // default embeddeded content type handler
- EmbeddedTypeHandler embeddedType = getJSPDefaultEmbeddedType();
- embeddedType.initializeParser((JSPCapableParser) structuredDocument.getParser());
- return structuredDocument;
- }
-
- public IDocumentLoader newInstance() {
- return new JSPDocumentLoader();
- }
-
- protected void preLoadAdapt(IStructuredModel structuredModel) {
- IDOMModel domModel = (IDOMModel) structuredModel;
- //
- // document must have already been set for this to
- // work.
- Document document = domModel.getDocument();
- Assert.isNotNull(document, JSPCoreMessages.JSPDocumentLoader_1);
- // if there is a model in the adapter, this will adapt it to
- // first node. After that the PropagatingAdater spreads over the
- // children being
- // created. Each time that happends, a side effect is to
- // also "spread" sprecific registered adapters,
- // they two can propigate is needed.
- // This 'get' causes first to be be attached.
- PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
- // may make this easier to use in futue
- propagatingAdapter.addAdaptOnCreateFactory(new PageDirectiveWatcherFactory());
- // For JSPs, the ModelQueryAdapter must be "attached" to the document
- // before content is set in the model, so taglib initization can
- // take place.
- ((INodeNotifier) document).getAdapterFor(ModelQueryAdapter.class);
-
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java
deleted file mode 100644
index 8df55241a1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.jdt.core.WorkingCopyOwner;
-
-/**
- * To ensure there is only one instance of ProblemRequestor and WorkingCopyOwner
- * for JSP plugins. These were removed from JSPTranslation to ensure that the
- * JSPTranslation was not held in memory by any type of JDT lists (caching
- * search results, etc...)
- *
- * @author pavery
- */
-public class CompilationUnitHelper {
-
- private JSPProblemRequestor fProblemRequestor = null;
- private WorkingCopyOwner fWorkingCopyOwner = null;
- private static CompilationUnitHelper instance;
-
- private CompilationUnitHelper() {
- // force use of instance
- }
-
- public synchronized static final CompilationUnitHelper getInstance() {
-
- if (instance == null)
- instance = new CompilationUnitHelper();
- return instance;
- }
-
- public JSPProblemRequestor getProblemRequestor() {
-
- if (fProblemRequestor == null)
- fProblemRequestor = new JSPProblemRequestor();
- return fProblemRequestor;
- }
-
- public WorkingCopyOwner getWorkingCopyOwner() {
-
- if (fWorkingCopyOwner == null) {
- fWorkingCopyOwner = new WorkingCopyOwner() {
- public String toString() {
- return "JSP Working copy owner"; //$NON-NLS-1$
- }
- };
- }
- return fWorkingCopyOwner;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/EscapedTextUtil.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/EscapedTextUtil.java
deleted file mode 100644
index 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 ff986cddd2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPProblem.java
+++ /dev/null
@@ -1,23 +0,0 @@
-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;
-
- /**
- * @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 bd6e94ac59..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, 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;
-
-import java.io.File;
-
-/**
- * @author pavery
- */
-public class JSP2ServletNameUtil {
-
- /**
- * WAS mangles Tom&Jerry as: _Tom_26_Jerry; this takes in the mangled name
- * and returns the original name.
- *
- * Unmangles the qualified type name. If an underscore is found
- * it is assumed to be a mangled representation of a non-alpha,
- * non-digit character of the form _NN_, where NN are hex digits
- * representing the encoded character. This routine converts it
- * back to the original character.
- */
- public final static String unmangle(String qualifiedTypeName) {
- if(qualifiedTypeName.charAt(0) != '_')
- return qualifiedTypeName;
-
- StringBuffer buf = new StringBuffer();
- String possible = ""; //$NON-NLS-1$
-
- // remove the .java extension if there is one
- if(qualifiedTypeName.endsWith(".java"))//$NON-NLS-1$
- qualifiedTypeName = qualifiedTypeName.substring(0, qualifiedTypeName.length() - 5);
-
- for(int i = 1; i < qualifiedTypeName.length(); i++) { // start at index 1 b/c 1st char is always '_'
- char c = qualifiedTypeName.charAt(i);
- if(c == '_') {
- int endIndex = qualifiedTypeName.indexOf('_', i+1);
- if(endIndex == -1)
- buf.append(c);
- else {
- char unmangled;
- try {
- possible = qualifiedTypeName.substring(i+1, endIndex);
- if(isValid(possible)) {
- unmangled = (char)Integer.decode("0x" + possible).intValue();//$NON-NLS-1$
- i = endIndex;
- }
- else {
- unmangled = c;
- }
-
- } catch(NumberFormatException e) {
- unmangled = c;
- }
- buf.append(unmangled);
- }
- } else {
- buf.append(c);
- }
- }
- return buf.toString();
- }
-
- /**
- * Determine if given string is a valid Hex representation of an ASCII character (eg. 2F -> /)
- * @param possible
- * @return
- */
- private static boolean isValid(String possible) {
- boolean result = false;
- if(possible.length() == 2){
- char c1 = possible.charAt(0);
- char c2 = possible.charAt(1);
- // 1st character must be a digit
- if(Character.isDigit(c1)) {
- // 2nd character must be digit or upper case letter A-F
- if(Character.isDigit(c2)) {
- result = true;
- }
- else if(Character.isUpperCase(c2) && (c2 == 'A' || c2 == 'B' || c2 == 'C'|| c2 == 'D'|| c2 == 'E'|| c2 == 'F')) {
- result = true;
- }
- }
- }
- return result;
- }
-
- /**
- * Mangle string to WAS-like specifications
- *
- */
- public final static String mangle(String name) {
- StringBuffer modifiedName = new StringBuffer();
-
- // extension (.jsp, .jspf, .jspx, etc...) should already be encoded in name
-
- int length = name.length();
- // in case name is forbidden (a number, class, for, etc...)
- modifiedName.append('_');
-
- // ensure rest of characters are valid
- for (int i=0; i< length; i++) {
- char currentChar = name.charAt(i);
- if (Character.isJavaIdentifierPart(currentChar) == true ) {
- modifiedName.append(currentChar);
- } else {
- modifiedName.append(mangleChar(currentChar));
- }
- }
- return modifiedName.toString();
-
- }
-
- /**
- * take a character and return its hex equivalent
- */
- private final static String mangleChar(char ch) {
- if ( ch == File.separatorChar ) {
- ch = '/';
- }
-
- if ( Character.isLetterOrDigit(ch) == true ) {
- return "" + ch; //$NON-NLS-1$
- }
- return "_" + Integer.toHexString(ch).toUpperCase() + "_"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java
deleted file mode 100644
index 2f09f1e47e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-/**
- * Extension of XMLJSPRegionHelper inteded to parse entire included JSP files.
- * Basically it expands the rules for what tags are parsed as JSP.
- *
- * @author pavery
- */
-class JSPIncludeRegionHelper extends XMLJSPRegionHelper {
- /**
- * @param JSPTranslator
- */
- public JSPIncludeRegionHelper(JSPTranslator translator) {
- super(translator);
- }
-
- // these methods determine what content gets added to the local scriplet, expression, declaration buffers
- /*
- * return true for elements whose contents we might want to add to the java file we are building
- */
- protected boolean isJSPStartRegion(IStructuredDocumentRegion sdRegion) {
- String type = sdRegion.getFirstRegion().getType();
- return type == DOMRegionContext.XML_TAG_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME;
- }
-
- protected boolean isDeclaration(String tagName) {
- return tagName.equalsIgnoreCase("jsp:declaration") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("<%!"); //$NON-NLS-1$
- }
-
- protected boolean isExpression(String tagName) {
- return tagName.equalsIgnoreCase("jsp:expression") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("<%="); //$NON-NLS-1$
- }
-
- protected boolean isScriptlet(String tagName) {
- return tagName.equalsIgnoreCase("jsp:scriptlet") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("<%"); //$NON-NLS-1$
- }
-
- protected boolean isIncludeDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.include") || //$NON-NLS-1$
- tagName.equalsIgnoreCase("include"); //$NON-NLS-1$
- }
-
- protected boolean isTaglibDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.taglib") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("taglib"); //$NON-NLS-1$
- }
-
- protected boolean isPageDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.page") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("page"); //$NON-NLS-1$
- }
-
- // different btwn XML-JSP and JSP tags
- protected String getRegionName(IStructuredDocumentRegion sdRegion) {
- ITextRegion nameRegion = null;
- String nameStr = ""; //$NON-NLS-1$
- int size = sdRegion.getRegions().size();
- if (size > 1) {
- // presumably XML-JSP <jsp:scriptlet> | <jsp:expression> | <jsp:declaration>
- nameRegion = sdRegion.getRegions().get(1);
- }
- else if (size == 1) {
- // presumably JSP open <% | <%= | <%!
- nameRegion = sdRegion.getRegions().get(0);
- }
- if (nameRegion != null)
- nameStr = fTextToParse.substring(sdRegion.getStartOffset(nameRegion), sdRegion.getTextEndOffset(nameRegion));
- return nameStr.trim();
- }
-
- protected void processOtherRegions(IStructuredDocumentRegion sdRegion) {
- processIncludeDirective(sdRegion);
- processPageDirective(sdRegion);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java
deleted file mode 100644
index cf47682465..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.java;
-
-/**
- * @author pavery
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jdt.core.IProblemRequestor;
-import org.eclipse.jdt.core.compiler.IProblem;
-
-class JSPProblemRequestor implements IProblemRequestor {
-
- private boolean fIsActive = false;
-
- private boolean fIsRunning = false;
-
- private List fCollectedProblems;
-
- public void beginReporting() {
-
- fIsRunning = true;
- fCollectedProblems = new ArrayList();
- }
-
- public void acceptProblem(IProblem problem) {
-
- if (isActive())
- fCollectedProblems.add(problem);
- }
-
- public void endReporting() {
-
- fIsRunning = false;
- }
-
- public boolean isActive() {
-
- return fIsActive && fCollectedProblems != null;
- }
-
- /**
- * Sets the active state of this problem requestor.
- *
- * @param isActive
- * the state of this problem requestor
- */
- public void setIsActive(boolean isActive) {
-
- if (fIsActive != isActive) {
- fIsActive = isActive;
- if (fIsActive)
- startCollectingProblems();
- else
- stopCollectingProblems();
- }
- }
-
- /**
- * Tells this annotation model to collect temporary problems from now on.
- */
- private void startCollectingProblems() {
-
- fCollectedProblems = new ArrayList();
- }
-
- /**
- * Tells this annotation model to no longer collect temporary problems.
- */
- private void stopCollectingProblems() {
-
- // do nothing
- }
-
- /**
- * @return the list of collected problems
- */
- public List getCollectedProblems() {
-
- return fCollectedProblems;
- }
-
- public boolean isRunning() {
-
- return fIsRunning;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java
deleted file mode 100644
index d030946617..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java
+++ /dev/null
@@ -1,646 +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.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.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IBuffer;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.WorkingCopyOwner;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.Logger;
-
-
-/**
- * <p>
- * An implementation of IJSPTranslation.
- * <br>
- * This object that holds the java translation of
- * a JSP file as well as a mapping of ranges from the translated Java to the JSP source,
- * and mapping from JSP source back to the translated Java.
- * </p>
- *
- * <p>
- * You may also use JSPTranslation to do CompilationUnit-esque things such as:
- * <ul>
- * <li>code select (get java elements for jsp selection)</li>
- * <li>reconcile</li>
- * <li>get java regions for jsp selection</li>
- * <li>get a JSP text edit based on a Java text edit</li>
- * <li>determine if a java offset falls within a jsp:useBean range</li>
- * <li>determine if a java offset falls within a jsp import statment</li>
- * </ul>
- * </p>
- *
- * @author pavery
- */
-public class JSPTranslation implements IJSPTranslation {
-
- // for debugging
- private static final boolean DEBUG;
- static {
- String value= Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslation"); //$NON-NLS-1$
- DEBUG= value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- /** the name of the class (w/out extension) **/
- private String fClassname = ""; //$NON-NLS-1$
- private IJavaProject fJavaProject = null;
- private HashMap fJava2JspMap = null;
- private HashMap fJsp2JavaMap = null;
- private HashMap fJava2JspImportsMap = null;
- private HashMap fJava2JspUseBeanMap = null;
- private HashMap fJava2JspIndirectMap = null;
- private List fELProblems = null;
-
- // don't want to hold onto model (via translator)
- // all relevant info is extracted in the constructor.
- //private JSPTranslator fTranslator = null;
- private String fJavaText = ""; //$NON-NLS-1$
- private String fJspText = ""; //$NON-NLS-1$
-
- private ICompilationUnit fCompilationUnit = null;
- private IProgressMonitor fProgressMonitor = null;
- /** lock to synchronize access to the compilation unit **/
- private byte[] fLock = null;
- private String fMangledName;
- private String fJspName;
- private List fTranslationProblems;
- private Collection fIncludedPaths;
-
- public JSPTranslation(IJavaProject javaProj, JSPTranslator translator) {
-
- fLock = new byte[0];
- fJavaProject = javaProj;
- //fTranslator = translator;
-
- // can be null if it's an empty document (w/ NullJSPTranslation)
- if(translator != null) {
- fJavaText = translator.getTranslation().toString();
- fJspText = translator.getJspText();
- fClassname = translator.getClassname();
- fJava2JspMap = translator.getJava2JspRanges();
- fJsp2JavaMap = translator.getJsp2JavaRanges();
- fJava2JspImportsMap = translator.getJava2JspImportRanges();
- fJava2JspUseBeanMap = translator.getJava2JspUseBeanRanges();
- fJava2JspIndirectMap = translator.getJava2JspIndirectRanges();
- fELProblems = translator.getELProblems();
- fTranslationProblems = translator.getTranslationProblems();
- fIncludedPaths = translator.getIncludedPaths();
- }
- }
-
- 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 {
-
- IPackageFragment packageFragment = null;
- IJavaElement je = getJavaProject();
-
- if (je == null || !je.exists())
- return null;
-
- switch (je.getElementType()) {
- case IJavaElement.PACKAGE_FRAGMENT :
- je = je.getParent();
- // fall through
-
- case IJavaElement.PACKAGE_FRAGMENT_ROOT :
- IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) je;
- packageFragment = packageFragmentRoot.getPackageFragment(IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH);
- break;
-
- case IJavaElement.JAVA_PROJECT :
- IJavaProject jProject = (IJavaProject) je;
-
- if (!jProject.exists()) {
- if(DEBUG) {
- System.out.println("** Abort create working copy: cannot create working copy: JSP is not in a Java project"); //$NON-NLS-1$
- }
- return null;
- }
-
- packageFragmentRoot = null;
- IPackageFragmentRoot[] packageFragmentRoots = jProject.getPackageFragmentRoots();
- int i = 0;
- while (i < packageFragmentRoots.length) {
- if (!packageFragmentRoots[i].isArchive() && !packageFragmentRoots[i].isExternal()) {
- packageFragmentRoot = packageFragmentRoots[i];
- break;
- }
- i++;
- }
- if (packageFragmentRoot == null) {
- if(DEBUG) {
- System.out.println("** Abort create working copy: cannot create working copy: JSP is not in a Java project with source package fragment root"); //$NON-NLS-1$
- }
- return null;
- }
- packageFragment = packageFragmentRoot.getPackageFragment(IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH);
- break;
-
- default :
- return null;
- }
-
- ICompilationUnit cu = packageFragment.getCompilationUnit(getClassname() + ".java").getWorkingCopy(getWorkingCopyOwner(), getProblemRequestor(), getProgressMonitor()); //$NON-NLS-1$
- setContents(cu);
-
- if(DEBUG) {
- System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); //$NON-NLS-1$
- System.out.println("(+) JSPTranslation ["+ this + "] finished creating CompilationUnit: " + cu); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); //$NON-NLS-1$
- }
-
- return cu;
- }
-
- /**
- *
- * @return the problem requestor for the CompilationUnit in this JSPTranslation
- */
- private JSPProblemRequestor getProblemRequestor() {
- return CompilationUnitHelper.getInstance().getProblemRequestor();
- }
-
- /**
- *
- * @return the IWorkingCopyOwner for this CompilationUnit in this JSPTranslation
- */
- public WorkingCopyOwner getWorkingCopyOwner() {
- return CompilationUnitHelper.getInstance().getWorkingCopyOwner();
- }
-
- /**
- *
- * @return the progress monitor used in long operations (reconcile, creating the CompilationUnit...) in this JSPTranslation
- */
- private IProgressMonitor getProgressMonitor() {
- if (fProgressMonitor == null)
- fProgressMonitor = new NullProgressMonitor();
- return fProgressMonitor;
- }
-
- /**
- *
- * @return the List of problems collected during reconcile of the compilation unit
- */
- public List getProblems() {
- List problems = getProblemRequestor().getCollectedProblems();
- if (problems != null) {
- if (fTranslationProblems.isEmpty()) {
- return problems;
- }
- List combinedProblems = new ArrayList(problems);
- combinedProblems.addAll(fTranslationProblems);
- return combinedProblems;
- }
- return fTranslationProblems;
- }
-
- /**
- *
- * @return the List of problems collected during reconcile of the compilation unit
- */
- public List getELProblems() {
- return fELProblems != null ? fELProblems : new ArrayList();
- }
-
-
- /**
- * Must be set true in order for problems to be collected during reconcile.
- * If set false, problems will be ignored during reconcile.
- * @param collect
- */
- public void setProblemCollectingActive(boolean collect) {
- ICompilationUnit cu = getCompilationUnit();
- if(cu != null) {
- getProblemRequestor().setIsActive(collect);
- }
- }
-
- /**
- * Reconciles the compilation unit for this JSPTranslation
- */
- public void reconcileCompilationUnit() {
- ICompilationUnit cu = getCompilationUnit();
- if (cu != null) {
- try {
- synchronized(cu) {
- cu.makeConsistent(getProgressMonitor());
- cu.reconcile(ICompilationUnit.NO_AST, true, getWorkingCopyOwner(), getProgressMonitor());
- }
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- }
-
- /**
- * Set contents of the compilation unit to the translated jsp text.
- * @param the ICompilationUnit on which to set the buffer contents
- */
- private void setContents(ICompilationUnit cu) {
- if (cu == null)
- return;
-
- synchronized (cu) {
- IBuffer buffer;
- try {
-
- buffer = cu.getBuffer();
- }
- catch (JavaModelException e) {
- e.printStackTrace();
- buffer = null;
- }
-
- if (buffer != null)
- buffer.setContents(getJavaText());
- }
- }
-
- /**
- * Returns the IJavaElements corresponding to the JSP range in the JSP StructuredDocument
- *
- * @param jspStart staring offset in the JSP document
- * @param jspEnd ending offset in the JSP document
- * @return IJavaElements corresponding to the JSP selection
- */
- public IJavaElement[] getElementsFromJspRange(int jspStart, int jspEnd) {
-
- int javaPositionStart = getJavaOffset(jspStart);
- int javaPositionEnd = getJavaOffset(jspEnd);
-
- IJavaElement[] EMTPY_RESULT_SET = new IJavaElement[0];
- IJavaElement[] result = EMTPY_RESULT_SET;
- try {
- ICompilationUnit cu = getCompilationUnit();
- if (cu != null) {
- synchronized (cu) {
- int cuDocLength = cu.getBuffer().getLength();
- int javaLength = javaPositionEnd - javaPositionStart;
- if (cuDocLength > 0 && javaPositionStart >= 0 && javaLength >= 0 && javaPositionEnd < cuDocLength) {
- result = cu.codeSelect(javaPositionStart, javaLength);
- }
- }
- }
-
- if (result == null || result.length == 0)
- return EMTPY_RESULT_SET;
- }
- catch (JavaModelException x) {
- Logger.logException(x);
- }
-
- return result;
- }
-
- public String getClassname() {
- return fClassname;
- }
-
- /**
- * Must discard compilation unit, or else they can leak in the JavaModelManager
- */
- public void release() {
-
- synchronized(fLock) {
- if(fCompilationUnit != null) {
- try {
- if(DEBUG) {
- System.out.println("------------------------------------------------------------------"); //$NON-NLS-1$
- System.out.println("(-) JSPTranslation [" + this +"] discarding CompilationUnit: " + fCompilationUnit); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("------------------------------------------------------------------"); //$NON-NLS-1$
- }
- fCompilationUnit.discardWorkingCopy();
- }
- catch (JavaModelException e) {
- // we're done w/ it anyway
- }
- }
- }
- }
-}
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 5db6c87c68..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java
+++ /dev/null
@@ -1,230 +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 org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * An adapter for getting a JSPTranslation of the document.
- *
- * @author pavery
- */
-public class JSPTranslationAdapter implements INodeAdapter, IDocumentListener {
-
- // for debugging
- private static final boolean DEBUG = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslation")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private IDocument fJspDocument = null;
- private IDocument fJavaDocument = null;
- private JSPTranslationExtension fJSPTranslation = null;
- private boolean fDocumentIsDirty = true;
- private IDOMModel fXMLModel;
- private JSPTranslator fTranslator = null;
- private NullProgressMonitor fTranslationMonitor = null;
-
- public JSPTranslationAdapter(IDOMModel xmlModel) {
- setXMLModel(xmlModel);
- initializeJavaPlugins();
- }
-
- /**
- * Initialize the required Java Plugins
- */
- protected void initializeJavaPlugins() {
- JavaCore.getPlugin();
- }
-
- public boolean isAdapterForType(Object type) {
- return type.equals(IJSPTranslation.class);
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- // nothing to do
- }
-
- /**
- * Automatically set through the setXMLModel(XMLModel)
- *
- * @param doc
- */
- private void setDocument(IDocument doc) {
- if (fJspDocument != null)
- fJspDocument.removeDocumentListener(this);
- if (doc != null) {
- doc.addDocumentListener(this);
- fJspDocument = doc;
- }
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
- */
- public void documentAboutToBeChanged(DocumentEvent event) {
- // do nothing
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
- */
- public void documentChanged(DocumentEvent event) {
- // mark translation for rebuilding
- fDocumentIsDirty = true;
- }
-
- public void release() {
-
- if (fJspDocument != null)
- fJspDocument.removeDocumentListener(this);
-
- if (fTranslationMonitor != null)
- fTranslationMonitor.setCanceled(true);
-
- if (fJSPTranslation != null) {
-
- if (DEBUG)
- System.out.println("JSPTranslationAdapter releasing:" + fJSPTranslation); //$NON-NLS-1$
-
- fJSPTranslation.release();
- }
- }
-
- /**
- * Returns the JSPTranslation for this adapter.
- *
- * @return a JSPTranslationExtension
- */
- public synchronized JSPTranslationExtension getJSPTranslation() {
-
- if (fJSPTranslation == null || fDocumentIsDirty) {
- JSPTranslator translator = null;
- if (getXMLModel() != null && getXMLModel().getIndexedRegion(0) != null) {
- translator = getTranslator((IDOMNode) getXMLModel().getIndexedRegion(0));
- translator.translate();
- StringBuffer javaContents = translator.getTranslation();
- fJavaDocument = new Document(javaContents.toString());
- }
- else {
- // empty document case
- translator = createTranslator();
- StringBuffer emptyContents = translator.getEmptyTranslation();
- fJavaDocument = new Document(emptyContents.toString());
- }
- // it's going to be rebuilt, so we release it here
- if (fJSPTranslation != null) {
- if (DEBUG)
- System.out.println("JSPTranslationAdapter releasing:" + fJSPTranslation); //$NON-NLS-1$
- fJSPTranslation.release();
- }
- fJSPTranslation = new JSPTranslationExtension(getXMLModel().getStructuredDocument(), fJavaDocument, getJavaProject(), translator);
- fDocumentIsDirty = false;
- }
- return fJSPTranslation;
- }
-
- 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 dbe0b4eba0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java
+++ /dev/null
@@ -1,61 +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;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * Factory for JSPTranslationAdapters.
- *
- * @author pavery
- *
- */
-public class JSPTranslationAdapterFactory extends AbstractAdapterFactory {
-
- private JSPTranslationAdapter fAdapter = null;
-
- // for debugging
- 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);
- }
-
- public INodeAdapterFactory copy() {
- return new JSPTranslationAdapterFactory();
- }
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- if (target instanceof IDOMNode && fAdapter == null) {
- fAdapter = new JSPTranslationAdapter(((IDOMNode) target).getModel());
- if(DEBUG) {
- System.out.println("(+) JSPTranslationAdapterFactory [" + this + "] created adapter: " + fAdapter); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return fAdapter;
- }
-
-
- public void release() {
- if (fAdapter != null) {
- if(DEBUG) {
- System.out.println("(-) JSPTranslationAdapterFactory [" + this + "] releasing adapter: " + fAdapter); //$NON-NLS-1$ //$NON-NLS-2$
- }
- fAdapter.release();
- }
- super.release();
- }
-}
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 72ed408932..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java
+++ /dev/null
@@ -1,463 +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.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.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 IDocument getJspDocument() {
- return fJspDocument;
- }
-
- public IDocument getJavaDocument() {
- return fJavaDocument;
- }
-
- public String getJavaText() {
- return getJavaDocument() != null ? getJavaDocument().get() : ""; //$NON-NLS-1$
- }
-
- /**
- * Returns a corresponding TextEdit for the JSP file given a TextEdit for
- * a Java file.
- *
- * @param javaEdit
- * @return the corresponding JSP edits (not applied to the document yet)
- */
- public TextEdit getJspEdit(TextEdit javaEdit) {
-
- if (javaEdit == null)
- return null;
-
- List jspEdits = new ArrayList();
-
- int offset = javaEdit.getOffset();
- int length = javaEdit.getLength();
-
- if (javaEdit instanceof MultiTextEdit && javaEdit.getChildren().length > 0) {
-
- IRegion r = TextEdit.getCoverage(getAllEdits(javaEdit));
- offset = r.getOffset();
- length = r.getLength();
- }
-
- // get java ranges that will be affected by the edit
- Position[] javaPositions = getJavaRanges(offset, length);
-
- // record position data before the change
- Position[] jspPositions = new Position[javaPositions.length];
- PositionDelta[] deltas = new PositionDelta[javaPositions.length];
- for (int i = 0; i < javaPositions.length; i++) {
- deltas[i] = new PositionDelta(javaPositions[i].offset, javaPositions[i].length);
- // isIndirect means the position doesn't actually exist as exact
- // text
- // mapping from java <-> jsp (eg. an import statement)
- if (!isIndirect(javaPositions[i].offset))
- jspPositions[i] = (Position) getJava2JspMap().get(javaPositions[i]);
- }
-
- if (DEBUG) {
- System.out.println("================================================"); //$NON-NLS-1$
- System.out.println("deltas:"); //$NON-NLS-1$
- String javaText = getJavaText();
- for (int i = 0; i < deltas.length; i++)
- System.out.println("pos[" + deltas[i].preOffset + ":" + deltas[i].preLength + "]" + javaText.substring(deltas[i].preOffset, deltas[i].preOffset + deltas[i].preLength)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- System.out.println("==============================================="); //$NON-NLS-1$
- }
- UndoEdit undo = null;
- // apply the edit to the java document
- try {
- undo = javaEdit.apply(getJavaDocument());
- }
- catch (MalformedTreeException e) {
- Logger.logException(e);
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- }
- // now at this point Java positions are unreliable since they were
- // updated after applying java edit.
-
- String newJavaText = getJavaDocument().get();
- if (DEBUG)
- System.out.println("java post format text:\n" + newJavaText); //$NON-NLS-1$
-
- // record post edit data
- for (int i = 0; i < javaPositions.length; i++)
- deltas[i].setPostEditData(javaPositions[i].offset, javaPositions[i].length, javaPositions[i].isDeleted);
-
- // create appropriate text edits for deltas
- Position jspPos = null;
- String replaceText = ""; //$NON-NLS-1$
- for (int i = 0; i < deltas.length; i++) {
- jspPos = jspPositions[i];
- // can be null if it's an indirect mapping position
- // or if something was added into java that was not originally in
- // JSP (like a new import...)
-
- if (jspPos != null) {
- if (deltas[i].isDeleted) {
- jspEdits.add(new DeleteEdit(jspPos.offset, jspPos.length));
- }
- else {
- replaceText = newJavaText.substring(deltas[i].postOffset, deltas[i].postOffset + deltas[i].postLength);
-
- // get rid of pre and post white space or fine tuned
- // adjustment later.
- // fix text here...
- replaceText = fixJspReplaceText(replaceText, jspPos.offset);
-
- jspEdits.add(new ReplaceEdit(jspPos.offset, jspPos.length, replaceText));
- }
- if (DEBUG)
- debugReplace(deltas, jspPos, replaceText, i);
- }
- else {
- // the new Java text has no corresponding JSP position
- // possible new import?
- if (isImport(javaPositions[i].getOffset()) && replaceText.lastIndexOf("import ") != -1) { //$NON-NLS-1$
- replaceText = newJavaText.substring(deltas[i].postOffset, deltas[i].postOffset + deltas[i].postLength);
- String importText = replaceText.substring(replaceText.lastIndexOf("import "), replaceText.indexOf(";")); //$NON-NLS-1$ //$NON-NLS-2$
- // evenutally need to check if it's XML-JSP
- importText = "<%@page import=\"" + importText + "\" %>\n"; //$NON-NLS-1$ //$NON-NLS-2$
- jspEdits.add(new InsertEdit(0, importText));
- }
- }
- }
- TextEdit allJspEdits = createMultiTextEdit((TextEdit[]) jspEdits.toArray(new TextEdit[jspEdits.size()]));
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=105632
- // undo the java edit
- // (so the underlying Java document still represents what's in the
- // editor)
- if (undo != null) {
- try {
- undo.apply(getJavaDocument());
- }
- catch (MalformedTreeException e) {
- Logger.logException(e);
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- }
- }
-
- return allJspEdits;
- }
-
- private String fixJspReplaceText(String replaceText, int jspOffset) {
-
- // result is the text inbetween the delimiters
- // eg.
- //
- // <% result
- // %>
- String result = replaceText.trim();
- String preDelimiterWhitespace = ""; //$NON-NLS-1$
-
- IDocument jspDoc = getJspDocument();
- if (jspDoc instanceof IStructuredDocument) {
- IStructuredDocument sDoc = (IStructuredDocument) jspDoc;
- IStructuredDocumentRegion[] regions = sDoc.getStructuredDocumentRegions(0, jspOffset);
- IStructuredDocumentRegion lastRegion = regions[regions.length - 1];
-
- // only specifically modify scriptlets
- if (lastRegion != null && lastRegion.getType() == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) {
- for (int i = regions.length - 1; i >= 0; i--) {
- IStructuredDocumentRegion region = regions[i];
-
- // is there a better way to check whitespace?
- if (region.getType() == DOMRegionContext.XML_CONTENT && region.getFullText().trim().equals("")) { //$NON-NLS-1$
-
- preDelimiterWhitespace = region.getFullText();
- preDelimiterWhitespace = preDelimiterWhitespace.replaceAll("\r", ""); //$NON-NLS-1$ //$NON-NLS-2$
- preDelimiterWhitespace = preDelimiterWhitespace.replaceAll("\n", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- // need to determine indent for that first line...
- String initialIndent = getInitialIndent(result);
-
- // fix the first line of java code
- result = TextUtilities.getDefaultLineDelimiter(sDoc) + initialIndent + result;
-
- result = adjustIndent(result, preDelimiterWhitespace, TextUtilities.getDefaultLineDelimiter(sDoc));
-
- // add whitespace before last delimiter to match
- // it w/ the opening delimiter
- result = result + TextUtilities.getDefaultLineDelimiter(sDoc) + preDelimiterWhitespace;
- break;
- }
- }
- }
- }
- return result;
- }
-
- private String adjustIndent(String textBefore, String indent, String delim) {
-
- // first replace multiple indent with single indent
- // the triple indent occurs because the scriptlet code
- // actually occurs under:
- //
- // class
- // method
- // code
- //
- // in the translated java document
- // 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();
-
- IRegion region = TextEdit.getCoverage(edits);
- MultiTextEdit multiEdit = new MultiTextEdit(region.getOffset(), region.getLength());
- for (int i = 0; i < edits.length; i++) {
- addToMultiEdit(edits[i], multiEdit);
- }
- return multiEdit;
- }
-
-
- private void addToMultiEdit(TextEdit edit, MultiTextEdit multiEdit) {
-
- // check for overlap here
- // discard overlapping edits..
- // possible exponential performance hit... need a better way...
- TextEdit[] children = multiEdit.getChildren();
- for (int i = 0; i < children.length; i++) {
- if (children[i].covers(edit))
- // don't add
- return;
- }
- multiEdit.addChild(edit);
- }
-
-
- /**
- * @param translation
- */
- private void addPositionsToDocuments() {
-
- // can be null if it's a NullJSPTranslation
- if (getJavaDocument() != null && getJspDocument() != null) {
-
- HashMap java2jsp = getJava2JspMap();
- Iterator it = java2jsp.keySet().iterator();
- Position javaPos = null;
- while (it.hasNext()) {
- javaPos = (Position) it.next();
- try {
-
- fJavaDocument.addPosition(javaPos);
-
- }
- catch (BadLocationException e) {
- if (DEBUG) {
- System.out.println("tyring to add Java Position:[" + javaPos.offset + ":" + javaPos.length + "] to " + getJavaPath()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- // System.out.println("substring :[" +
- // fJavaDocument.get().substring(javaPos.offset) +
- // "]"); //$NON-NLS-1$ //$NON-NLS-2$
- Logger.logException(e);
- }
- }
-
- try {
-
- fJspDocument.addPosition((Position) java2jsp.get(javaPos));
-
- }
- catch (BadLocationException e) {
- if (DEBUG) {
- System.out.println("tyring to add JSP Position:[" + ((Position) java2jsp.get(javaPos)).offset + ":" + ((Position) java2jsp.get(javaPos)).length + "] to " + getJavaPath()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Logger.logException(e);
- }
- }
- }
- }
- }
-
- /**
- * Recursively gets all child edits
- *
- * @param javaEdit
- * @return all child edits
- */
- private TextEdit[] getAllEdits(TextEdit javaEdit) {
-
- List result = new ArrayList();
- if (javaEdit instanceof MultiTextEdit) {
- TextEdit[] children = javaEdit.getChildren();
- for (int i = 0; i < children.length; i++)
- result.addAll(Arrays.asList(getAllEdits(children[i])));
- }
- else
- result.add(javaEdit);
- return (TextEdit[]) result.toArray(new TextEdit[result.size()]);
- }
-
- /**
- * @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 790cfa6059..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
+++ /dev/null
@@ -1,2858 +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.core.internal.java;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.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.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.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.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.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.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-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. Keeps two way mapping from
- * Java translation to the original JSP source, which can be obtained through
- * getJava2JspRanges() and getJsp2JavaRanges().
- */
-public class JSPTranslator {
-
- // the name of the element in the extension point
- private static final String EL_TRANSLATOR_EXTENSION_NAME = "elTranslator"; //$NON-NLS-1$
-
- private static final String ELTRANSLATOR_PROP_NAME = "ELTranslator"; //$NON-NLS-1$
-
- // Default EL Translator
- private static final String DEFAULT_JSP_EL_TRANSLATOR_ID = "org.eclipse.jst.jsp.defaultJSP20"; //$NON-NLS-1$
-
- // handy plugin ID constant
- private static final String JSP_CORE_PLUGIN_ID = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$
-
- // for debugging
- private static final boolean DEBUG = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspjavamapping")); //$NON-NLS-1$ //$NON-NLS-2$
- private static final boolean DEBUG_SAVE_OUTPUT = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslationstodisk")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private IJSPELTranslator fELTranslator = null;
-
- public static final String ENDL = "\n"; //$NON-NLS-1$
-
- String fClassHeader = null;
- String fClassname = null;
-
- String fImplicitImports = null;
-
- String fServiceHeader = null;
-
- private String fSessionVariableDeclaration = "javax.servlet.http.HttpSession session = null;" + ENDL; //$NON-NLS-1$
- private String fFooter = "}}"; //$NON-NLS-1$
- private String fException = "Throwable exception = null;"; //$NON-NLS-1$
- public static final String EXPRESSION_PREFIX = "out.print(\"\"+"; //$NON-NLS-1$
- public static final String EXPRESSION_SUFFIX = ");"; //$NON-NLS-1$
- String fSuperclass = null;
-
- private String fTryCatchStart = ENDL + "try {" + ENDL; //$NON-NLS-1$
- private List fTranslationProblems = new ArrayList();
- private String fTryCatchEnd = " } catch (java.lang.Exception e) {} " + ENDL; //$NON-NLS-1$
-
- /** fSourcePosition = position in JSP source */
- private int fSourcePosition = -1;
- /** fRelativeOffest = offset in the buffer there the cursor is */
- private int fRelativeOffset = -1;
- /** fCursorPosition = offset in the translated java document */
- private int fCursorPosition = -1;
-
- /** some page directive attributes */
- private boolean fIsErrorPage, fCursorInExpression = false;
- private boolean fIsInASession = true;
-
- /** user java code in body of the service method */
- private StringBuffer fUserCode = new StringBuffer();
- /** user EL Expression */
- private StringBuffer fUserELExpressions = new StringBuffer();
- /** user defined vars declared in the beginning of the class */
- private StringBuffer fUserDeclarations = new StringBuffer();
-
- /** user defined imports */
- private StringBuffer fUserImports = new StringBuffer();
-
- /**
- * A map of tag names to tag library variable information; used to store
- * the ones needed for AT_END variable support.
- */
- private StackMap fTagToVariableMap = null;
-
- private StringBuffer fResult; // the final traslated java document
- // string buffer
- private StringBuffer fCursorOwner = null; // the buffer where the cursor
- // is
-
- private IDOMModel fStructuredModel = null;
- private IStructuredDocument fStructuredDocument = null;
- private IStructuredDocumentRegion fCurrentNode;
- private boolean fInCodeRegion = false; // flag for if cursor is in the
- // current region being translated
-
- /**
- * these constants are to keep track of whether the code in question is
- * embedded (JSP as an attribute or within comment tags) or is just
- * standard JSP code, or identifies if it's an expression
- */
- protected final static int STANDARD_JSP = 0;
- protected final static int EMBEDDED_JSP = 1;
- protected final static int DECLARATION = 2;
- protected final static int EXPRESSION = 4;
- protected final static int SCRIPTLET = 8;
-
- /** used to avoid infinite looping include files */
- private Stack fIncludes = null;
- 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();
-
-
- /**
- * List of EL problems to be translated
- */
- private ArrayList fELProblems = new ArrayList();
-
- /**
- * EL Translator ID
- */
- private String fELTranslatorID;
-
- public JSPTranslator() {
- super();
- 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
- */
- 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
- */
- private void reset() {
-
- // reset progress monitor
- if (fProgressMonitor != null)
- fProgressMonitor.setCanceled(false);
-
- // reinit fields
- fSourcePosition = -1;
- fRelativeOffset = -1;
- fCursorPosition = -1;
-
- fIsErrorPage = fCursorInExpression = false;
-
- 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();
-
- fELProblems = new ArrayList();
-
- }
-
- /**
- * @return just the "shell" of a servlet, nothing contributed from the JSP
- * doc
- */
- public final StringBuffer getEmptyTranslation() {
- reset();
- buildResult();
- return getTranslation();
- }
-
- /**
- * put the final java document together
- */
- private final void buildResult() {
- // to build the java document this is the order:
- //
- // + default imports
- // + user imports
- // + class header
- // [+ error page]
- // + user declarations
- // + service method header
- // + try/catch start
- // + user code
- // + try/catch end
- // + service method footer
- fResult = new StringBuffer(fImplicitImports.length() + fUserImports.length() + fClassHeader.length() + fUserDeclarations.length() + fServiceHeader.length() + fTryCatchStart.length() // try/catch
- // start
- + fUserCode.length() + fTryCatchEnd.length() // try/catch
- // end
- + fFooter.length());
-
- int javaOffset = 0;
-
- fResult.append(fImplicitImports);
- javaOffset += fImplicitImports.length();
-
- // updateRanges(fIndirectImports, javaOffset);
- updateRanges(fImportRanges, javaOffset);
- // user imports
- append(fUserImports);
- javaOffset += fUserImports.length();
-
- // class header
- fResult.append(fClassHeader); //$NON-NLS-1$
- javaOffset += fClassHeader.length();
- fResult.append(fSuperclass + "{" + ENDL); //$NON-NLS-1$
- javaOffset += fSuperclass.length() + 2;
-
- updateRanges(fDeclarationRanges, javaOffset);
- // user declarations
- append(fUserDeclarations);
- javaOffset += fUserDeclarations.length();
-
- updateRanges(fUserELRanges, javaOffset);
- append(fUserELExpressions);
- javaOffset += fUserELExpressions.length();
-
- fResult.append(fServiceHeader);
- javaOffset += fServiceHeader.length();
- // session participant
- if (fIsInASession) {
- fResult.append(fSessionVariableDeclaration);
- javaOffset += fSessionVariableDeclaration.length();
- }
- // error page
- if (fIsErrorPage) {
- fResult.append(fException);
- javaOffset += fException.length();
- }
-
-
- fResult.append(fTryCatchStart);
- javaOffset += fTryCatchStart.length();
-
- updateRanges(fCodeRanges, javaOffset);
-
- // user code
- append(fUserCode);
- javaOffset += fUserCode.length();
-
-
- fResult.append(fTryCatchEnd);
- javaOffset += fTryCatchEnd.length();
-
- // footer
- fResult.append(fFooter);
- javaOffset += fFooter.length();
-
- fJava2JspRanges.putAll(fImportRanges);
- fJava2JspRanges.putAll(fDeclarationRanges);
- fJava2JspRanges.putAll(fCodeRanges);
- fJava2JspRanges.putAll(fUserELRanges);
-
- }
-
- /**
- * @param javaRanges
- * @param offsetInJava
- */
- private void updateRanges(HashMap rangeMap, int offsetInJava) {
- // just need to update java ranges w/ the offset we now know
- Iterator it = rangeMap.keySet().iterator();
- while (it.hasNext())
- ((Position) it.next()).offset += offsetInJava;
- }
-
- /**
- * map of ranges (positions) in java document to ranges in jsp document
- *
- * @return a map of java positions to jsp positions.
- */
- public HashMap getJava2JspRanges() {
- return fJava2JspRanges;
- }
-
- /**
- * map of ranges in jsp document to ranges in java document.
- *
- * @return a map of jsp positions to java positions, or null if no
- * translation has occured yet (the map hasn't been built).
- */
- public HashMap getJsp2JavaRanges() {
- if (fJava2JspRanges == null)
- return null;
- HashMap flipFlopped = new HashMap();
- Iterator keys = fJava2JspRanges.keySet().iterator();
- Object range = null;
- while (keys.hasNext()) {
- range = keys.next();
- flipFlopped.put(fJava2JspRanges.get(range), range);
- }
- return flipFlopped;
- }
-
- public HashMap getJava2JspImportRanges() {
- return fImportRanges;
- }
-
- public HashMap getJava2JspUseBeanRanges() {
- return fUseBeanRanges;
- }
-
- public HashMap getJava2JspIndirectRanges() {
- return fIndirectRanges;
- }
-
- /**
- * Adds to the jsp<->java map by default
- *
- * @param value
- * a comma delimited list of imports
- */
- protected void addImports(String value) {
- addImports(value, true);
- }
-
- /**
- * Pass in a comma delimited list of import values, appends each to the
- * final result buffer
- *
- * @param value
- * a comma delimited list of imports
- */
- protected void addImports(String value, boolean addToMap) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=81687
- // added the "addToMap" parameter to exclude imports originating
- // from included JSP files to be added to the jsp<->java mapping
- StringTokenizer st = new StringTokenizer(value, ",", false); //$NON-NLS-1$
- String tok = ""; //$NON-NLS-1$
- // String appendage = ""; //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- tok = st.nextToken();
- appendImportToBuffer(tok, fCurrentNode, addToMap);
- }
- }
-
- /**
- * /* keep track of cursor position inside the buffer /* appends buffer to
- * the final result buffer
- */
- protected void append(StringBuffer buf) {
- if (getCursorOwner() == buf) {
- fCursorPosition = fResult.length() + getRelativeOffset();
- }
- fResult.append(buf.toString());
- }
-
- /**
- * Only valid after a configure(...), translate(...) or
- * translateFromFile(...) call
- *
- * @return the current result (java translation) buffer
- */
- public final StringBuffer getTranslation() {
-
- if (DEBUG) {
- StringBuffer debugString = new StringBuffer();
- try {
- Iterator it = fJava2JspRanges.keySet().iterator();
- while (it.hasNext()) {
- debugString.append("--------------------------------------------------------------\n"); //$NON-NLS-1$
- Position java = (Position) it.next();
- debugString.append("Java range:[" + java.offset + ":" + java.length + "]\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- debugString.append("[" + fResult.toString().substring(java.offset, java.offset + java.length) + "]\n"); //$NON-NLS-1$ //$NON-NLS-2$
- debugString.append("--------------------------------------------------------------\n"); //$NON-NLS-1$
- debugString.append("|maps to...|\n"); //$NON-NLS-1$
- debugString.append("==============================================================\n"); //$NON-NLS-1$
- Position jsp = (Position) fJava2JspRanges.get(java);
- debugString.append("JSP range:[" + jsp.offset + ":" + jsp.length + "]\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- debugString.append("[" + fJspTextBuffer.toString().substring(jsp.offset, jsp.offset + jsp.length) + "]\n"); //$NON-NLS-1$ //$NON-NLS-2$
- debugString.append("==============================================================\n"); //$NON-NLS-1$
- debugString.append("\n"); //$NON-NLS-1$
- debugString.append("\n"); //$NON-NLS-1$
- }
- }
- catch (Exception e) {
- Logger.logException("JSPTranslation error", e); //$NON-NLS-1$
- }
- Logger.log(Logger.INFO_DEBUG, debugString.toString());
- }
-
- if (DEBUG_SAVE_OUTPUT) {
- IProject project = getFile().getProject();
- String shortenedClassname = StringUtils.replace(getFile().getName(), ".", "_");
- String filename = shortenedClassname + ".java";
- IPath path = project.getFullPath().append("src/" + filename);
- try {
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (!file.exists()) {
- file.create(new ByteArrayInputStream(new byte[0]), true, new NullProgressMonitor());
- }
- ITextFileBufferManager textFileBufferManager = FileBuffers.getTextFileBufferManager();
- textFileBufferManager.connect(path, new NullProgressMonitor());
- ITextFileBuffer javaOutputBuffer = textFileBufferManager.getTextFileBuffer(path);
- javaOutputBuffer.getDocument().set(StringUtils.replace(fResult.toString(), getClassname(), shortenedClassname));
- javaOutputBuffer.commit(new NullProgressMonitor(), true);
- textFileBufferManager.disconnect(path, new NullProgressMonitor());
- }
- catch (Exception e) {
- // this is just for debugging, ignore
- }
- System.out.println("Updated translation: " + path);
- }
-
- return fResult;
- }
-
- 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();
- }
-
- /**
- * @deprecated
- * @param tagToAdd
- */
- protected void addTaglibVariables(String tagToAdd) {
- addTaglibVariables(tagToAdd, getCurrentNode());
- }
-
- protected void addTaglibVariables(String tagToAdd, ITextRegionCollection customTag) {
- IFile f = getFile();
-
- if (f == null || !f.exists())
- return;
-
- TaglibHelper helper = TaglibHelperManager.getInstance().getTaglibHelper(f);
- /*
- * Variables can declare as available when NESTED, AT_BEGIN, or
- * AT_END. For AT_END variables, store the entire list of variables in
- * the map field so it can be used on the end tag.
- */
- String decl = ""; //$NON-NLS-1$
- if (customTag.getFirstRegion().getType().equals(DOMRegionContext.XML_TAG_OPEN)) {
- TaglibVariable[] taglibVars = helper.getTaglibVariables(tagToAdd, getStructuredDocument(), customTag);
- fTranslationProblems.addAll(helper.getProblems(f.getFullPath()));
- /*
- * These loops are duplicated intentionally to keep the nesting
- * scoped variables from interfering with the others
- */
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.AT_BEGIN) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, fCurrentNode);
- }
- if (taglibVars[i].getScope() == VariableInfo.AT_END) {
- decl = taglibVars[i].getDeclarationString();
- fTagToVariableMap.push(tagToAdd, taglibVars);
- }
- }
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.NESTED) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer("{", fUserCode, false, fCurrentNode);
- appendToBuffer(decl, fUserCode, false, fCurrentNode);
- fTagToVariableMap.push(tagToAdd, taglibVars);
- }
- }
- if (customTag.getLastRegion().getType().equals(DOMRegionContext.XML_EMPTY_TAG_CLOSE)) {
- /*
- * Process NESTED variables backwards so the scopes "unroll"
- * correctly.
- */
- for (int i = taglibVars.length; i > 0; i--) {
- if (taglibVars[i - 1].getScope() == VariableInfo.NESTED) {
- appendToBuffer("}", fUserCode, false, fCurrentNode);
- }
- }
- /* Treat this as the end for empty tags */
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.AT_END) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, fCurrentNode);
- }
- }
- }
- }
- /*
- * Process NESTED variables for an end tag backwards so the scopes
- * "unroll" correctly.
- */
- else if (customTag.getFirstRegion().getType().equals(DOMRegionContext.XML_END_TAG_OPEN)) {
- TaglibVariable[] taglibVars = (TaglibVariable[]) fTagToVariableMap.pop(tagToAdd);
- if (taglibVars != null) {
- for (int i = taglibVars.length; i > 0; i--) {
- if (taglibVars[i - 1].getScope() == VariableInfo.NESTED) {
- appendToBuffer("}", fUserCode, false, fCurrentNode);
- }
- }
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.AT_END) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, fCurrentNode);
- }
- }
- }
- }
- }
-
- private IFile getFile() {
- IFile f = null;
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(getStructuredDocument());
- try {
- if (sModel != null) {
- Path path = new Path(sModel.getBaseLocation());
- if (path.segmentCount() > 1) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- if (f != null && f.isAccessible()) {
- return f;
- }
- }
- return null;
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
-
- /*
- * 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()) {
-
- // intercept HTML comment flat node
- // also handles UNDEFINED (which is what CDATA comes in as)
- // basically this part will handle any "embedded" JSP containers
- if (getCurrentNode().getType() == DOMRegionContext.XML_COMMENT_TEXT || getCurrentNode().getType() == DOMRegionContext.XML_CDATA_TEXT || getCurrentNode().getType() == DOMRegionContext.UNDEFINED) {
- translateXMLCommentNode(getCurrentNode());
- }
- else {
- // iterate through each region in the flat node
- translateRegionContainer(getCurrentNode(), STANDARD_JSP);
- }
- if (getCurrentNode() != null)
- advanceNextNode();
- }
-
- setCurrentNode(new ZeroStructuredDocumentRegion(fStructuredDocument, fStructuredDocument.getLength()));
- translateCodas();
-
- buildResult();
-
- fTagToVariableMap.clear();
- }
-
- protected void setDocumentContent(IDocument document, InputStream contentStream, String charset) {
- Reader in = null;
- try {
- in = new BufferedReader(new InputStreamReader(contentStream, charset), 2048);
- StringBuffer buffer = new StringBuffer(2048);
- char[] readBuffer = new char[2048];
- int n = in.read(readBuffer);
- while (n > 0) {
- buffer.append(readBuffer, 0, n);
- n = in.read(readBuffer);
- }
- document.set(buffer.toString());
- }
- catch (IOException x) {
- // ignore
- }
- finally {
- if (in != null) {
- try {
- in.close();
- }
- catch (IOException x) {
- // ignore
- }
- }
- }
- }
-
- protected void init() {
- fClassHeader = "public class _JSPServlet extends "; //$NON-NLS-1$
- fClassname = "_JSPServlet"; //$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 _jspService(javax.servlet.http.HttpServletRequest request," + //$NON-NLS-1$
- " javax.servlet.http.HttpServletResponse response)" + ENDL + //$NON-NLS-1$
- "\t\tthrows java.io.IOException, javax.servlet.ServletException {" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.PageContext pageContext = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.ServletContext application = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.ServletConfig config = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.JspWriter out = null;" + ENDL + //$NON-NLS-1$
- "Object page = null;" + ENDL; //$NON-NLS-1$
- 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)
- */
- protected void translateRegionContainer(ITextRegionCollection container, int JSPType) {
-
- ITextRegionCollection containerRegion = container;
-
- // custom tags need their own scope {}
- handleScopingIfNecessary(containerRegion);
-
- Iterator regions = containerRegion.getRegions().iterator();
- ITextRegion region = null;
- while (regions.hasNext()) {
-
- region = (ITextRegion) regions.next();
-
- String type = region.getType();
-
- // content assist was not showing up in JSP inside a javascript
- // region
- if (type == DOMRegionContext.BLOCK_TEXT) {
- // check if it's nested jsp in a script tag...
- if (region instanceof ITextRegionContainer) {
- // pass in block text's container & iterator
- Iterator regionIterator = ((ITextRegionCollection) region).getRegions().iterator();
- translateJSPNode(region, regionIterator, type, EMBEDDED_JSP);
- }
- else {
- /**
- * 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(containerRegion.getFullText(region), 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);
- }
- }
- // }
- }
-
- private void handleScopingIfNecessary(ITextRegionCollection containerRegion) {
- /*
- * 199047 - Braces missing from translation of custom tags not
- * defining variables
- */
-
- // code within a custom tag gets its own scope
- // so if we encounter a start of a custom tag, we add '{'
- // and for the end of a custom tag we add '}'
- if (containerRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN) {
- // don't add '{' if it's a self closing tag
- if (!isSelfClosingTag(containerRegion)) {
- if (isCustomTag(containerRegion)) {
- startScope();
- }
- }
- }
- else if (containerRegion.getFirstRegion().getType() == DOMRegionContext.XML_END_TAG_OPEN) {
- if (isCustomTag(containerRegion)) {
- endScope();
- }
- }
- }
-
- private void startScope() {
- // fScopeDepth++;
- StringBuffer text = new StringBuffer();
- // for(int i=0; i<fScopeDepth; i++) text.append(" "); //$NON-NLS-1$
- text.append("{ // <"); //$NON-NLS-1$
- text.append(getRegionName(fCurrentNode));
- text.append(">\n"); //$NON-NLS-1$
- appendToBuffer(text.toString(), fUserCode, false, fCurrentNode); //$NON-NLS-1$
- }
-
- private void endScope() {
- StringBuffer text = new StringBuffer();
- text.append("} // </"); //$NON-NLS-1$
- text.append(getRegionName(fCurrentNode));
- text.append(">\n"); //$NON-NLS-1$
- appendToBuffer(text.toString(), fUserCode, false, fCurrentNode); //$NON-NLS-1$
- }
-
- private boolean isSelfClosingTag(ITextRegionCollection containerRegion) {
-
- if (containerRegion == null)
- return false;
-
- ITextRegionList regions = containerRegion.getRegions();
- ITextRegion r = regions.get(regions.size() - 1);
- return r.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE;
- }
-
- private boolean isCustomTag(ITextRegionCollection containerRegion) {
- String tagName = getRegionName(containerRegion);
-
- if (tagName == null)
- return false;
-
- JSPSourceParser parser = (JSPSourceParser) fStructuredDocument.getParser();
- int colonIndex = tagName.indexOf(":");
- if (colonIndex > 0) {
- String prefix = tagName.substring(0, colonIndex);
- if (prefix.equals("jsp")) { //$NON-NLS-1$
- return false;
- }
- TagMarker[] prefixes = (TagMarker[]) parser.getNestablePrefixes().toArray(new TagMarker[0]);
- for (int i = 0; i < prefixes.length; i++) {
- if (prefix.equals(prefixes[i].getTagName())) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- private String getRegionName(ITextRegionCollection containerRegion) {
- ITextRegionList regions = containerRegion.getRegions();
- ITextRegion nameRegion = null;
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_NAME) {
- nameRegion = r;
- break;
- }
- }
- return nameRegion != null ? containerRegion.getText(nameRegion).trim() : null;
- }
-
- /*
- * ////////////////////////////////////////////////////////////////////////////////// **
- * TEMP WORKAROUND FOR CMVC 241882 Takes a String and blocks out
- * jsp:scriptlet, jsp:expression, and jsp:declaration @param blockText
- * @return
- */
- private void decodeScriptBlock(String blockText, int startOfBlock) {
- XMLJSPRegionHelper helper = new XMLJSPRegionHelper(this);
- helper.addBlockMarker(new BlockMarker("jsp:scriptlet", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.addBlockMarker(new BlockMarker("jsp:expression", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.addBlockMarker(new BlockMarker("jsp:declaration", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.addBlockMarker(new BlockMarker("jsp:directive.include", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.addBlockMarker(new BlockMarker("jsp:directive.taglib", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.reset(blockText, startOfBlock);
- // force parse
- helper.forceParse();
- }
-
- /*
- * returns string minus CDATA open and close text
- */
- final public String stripCDATA(String text) {
- String resultText = ""; //$NON-NLS-1$
- String CDATA_OPEN = "<![CDATA["; //$NON-NLS-1$
- String CDATA_CLOSE = "]]>"; //$NON-NLS-1$
- int start = 0;
- int end = text.length();
- while (start < text.length()) {
- if (text.indexOf(CDATA_OPEN, start) > -1) {
- end = text.indexOf(CDATA_OPEN, start);
- resultText += text.substring(start, end);
- start = end + CDATA_OPEN.length();
- }
- else if (text.indexOf(CDATA_CLOSE, start) > -1) {
- end = text.indexOf(CDATA_CLOSE, start);
- resultText += text.substring(start, end);
- start = end + CDATA_CLOSE.length();
- }
- else {
- end = text.length();
- resultText += text.substring(start, end);
- break;
- }
- }
- return resultText;
- }
-
- // END OF WORKAROUND CODE...
- // /////////////////////////////////////////////////////////////////////////////////////
- /**
- * determines if the type is a pure JSP type (not XML)
- */
- protected boolean isJSP(String type) {
- return ((type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_CONTENT || type == DOMJSPRegionContexts.JSP_EL_OPEN) && type != DOMRegionContext.XML_TAG_OPEN);
- // checking XML_TAG_OPEN so <jsp:directive.xxx/> gets treated like
- // other XML jsp tags
- }
-
- /**
- * translates the various XMLJSP type nodes
- *
- * @param regions
- * the regions of the XMLNode
- */
- protected void translateXMLNode(ITextRegionCollection container, Iterator regions) {
- // contents must be valid XHTML, translate escaped CDATA into what it
- // really is...
- ITextRegion r = null;
- if (regions.hasNext()) {
- r = (ITextRegion) regions.next();
- // <jsp:directive.xxx > comes in as this
- if (r.getType() == DOMRegionContext.XML_TAG_NAME || r.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)
-
- {
- String fullTagName = container.getText(r);
- if (fullTagName.indexOf(':') > -1) {
- addTaglibVariables(fullTagName, getCurrentNode()); // 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(regions);
- }
- }
- }
- }
-
- /**
- * translates embedded containers for ALL attribute values
- *
- * @param regions
- */
- private void checkAllAttributeValueContainers(Iterator regions) {
- // tag name is not jsp
- // handle embedded jsp attributes...
- ITextRegion embedded = null;
- // Iterator attrRegions = null;
- // ITextRegion attrChunk = null;
- while (regions.hasNext()) {
- embedded = (ITextRegion) regions.next();
- if (embedded instanceof ITextRegionContainer) {
- // parse out container
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=130606
- // fix exponential iteration problem w/ embedded expressions
- translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded);
- // attrRegions = ((ITextRegionContainer)
- // embedded).getRegions().iterator();
- // while (attrRegions.hasNext()) {
- // attrChunk = (ITextRegion) attrRegions.next();
- // String type = attrChunk.getType();
- // // embedded JSP in attribute support only want to
- // // translate one time per
- // // embedded region so we only translate on the JSP open
- // // tags (not content)
- // if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN ||
- // type ==
- // DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type ==
- // DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type ==
- // DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type ==
- // DOMJSPRegionContexts.JSP_EL_OPEN) {
- // // now call jsptranslate
- // translateEmbeddedJSPInAttribute((ITextRegionContainer)
- // embedded);
- // break;
- // }
- // }
- }
- }
- }
-
- /**
- * translates embedded container for specified attribute
- *
- * @param regions
- * @param attrName
- */
- private void checkAttributeValueContainer(Iterator regions, String attrName) {
- ITextRegion r = null;
- while (regions.hasNext()) {
- r = (ITextRegion) regions.next();
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME && getCurrentNode().getText(r).equals(attrName)) { //$NON-NLS-1$
- // skip to attribute value
- while (regions.hasNext() && (r = (ITextRegion) regions.next()) != null) {
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)
- break;
- }
- // forces embedded region to be translated
- if (r instanceof ContextRegionContainer) {
- translateEmbeddedJSPInAttribute((ContextRegionContainer) r);
- }
- break;
- }
- }
- }
-
- /*
- * example:
- *
- * <jsp:scriptlet>scriptlet jsp-java content <![CDATA[ more jsp java ]]>
- * jsp-java content... <![CDATA[ more jsp java ]]> </jsp:scriptlet>
- *
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=93366
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=88590 translate
- * everything inbetween <scriptlet> tags, which may be more than one
- * region (esp. CDATA)
- *
- */
- private void translateXMLJSPContent(int type) {
-
- IStructuredDocumentRegion sdr = getCurrentNode().getNext();
- int start = sdr.getStartOffset();
- int end = sdr.getEndOffset();
- String sdrText = ""; //$NON-NLS-1$
-
- // read structured document regions until
- // </jsp:scriptlet> or EOF
- while (sdr != null && sdr.getType() != DOMRegionContext.XML_TAG_NAME) {
-
- // setup for next region
- start = sdr.getStartOffset();
- sdrText = sdr.getText();
-
- if (sdr.getType() == DOMRegionContext.XML_CDATA_TEXT) {
-
- // just to be safe, make sure CDATA start & end are there
- if (sdrText.startsWith("<![CDATA[") && sdrText.endsWith("]]>")) { //$NON-NLS-1$ //$NON-NLS-2$
-
- start = sdr.getStartOffset() + 9; // <![CDATA[
- end = sdr.getEndOffset() - 3; // ]]>
- sdrText = sdrText.substring(9, sdrText.length() - 3);
- writeToBuffer(type, sdrText, start, end);
- }
- }
- else {
-
- // handle entity references
- sdrText = EscapedTextUtil.getUnescapedText(sdrText);
- end = sdr.getEndOffset();
- writeToBuffer(type, sdrText, start, end);
- }
- sdr = sdr.getNext();
- }
- setCurrentNode(sdr);
- setSourceReferencePoint();
- }
-
- private void writeToBuffer(int type, String content, int jspStart, int jspEnd) {
- switch (type) {
- case SCRIPTLET :
- translateScriptletString(content, getCurrentNode(), jspStart, jspEnd - jspStart);
- break;
- case EXPRESSION :
- translateExpressionString(content, getCurrentNode(), jspStart, jspEnd - jspStart);
- break;
- case DECLARATION :
- translateDeclarationString(content, getCurrentNode(), jspStart, jspEnd - jspStart);
- break;
- }
- }
-
- /**
- * goes through comment regions, checks if any are an embedded JSP
- * container if it finds one, it's sends the container into the
- * translation routine
- */
- protected void translateXMLCommentNode(IStructuredDocumentRegion node) {
- Iterator it = node.getRegions().iterator();
- ITextRegion commentRegion = null;
- while (it != null && it.hasNext()) {
- commentRegion = (ITextRegion) it.next();
- if (commentRegion instanceof ITextRegionContainer) {
- translateRegionContainer((ITextRegionContainer) commentRegion, EMBEDDED_JSP); // it's
- // embedded
- // jsp...iterate
- // regions...
- }
- }
- }
-
- /**
- * determines which type of JSP node to translate
- */
- protected void translateJSPNode(ITextRegion region, Iterator regions, String type, int JSPType) {
- if (type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN && regions != null) {
- translateDirective(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
- }
- if (contentRegion != null) {
- if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) {
- translateExpression(contentRegion);
- }
- else if (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) {
- translateDeclaration(contentRegion);
- }
- else if (type == DOMJSPRegionContexts.JSP_CONTENT || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) {
- translateScriptlet(contentRegion);
- }
- }
- else {
- // this is the case of an attribute w/ no region <p
- // align="<%%>">
- setCursorOwner(getJSPTypeForRegion(region));
- }
- }
- }
-
-
- private void translateEL(String elText, String delim, IStructuredDocumentRegion currentNode, int contentStart, int contentLength) {
- IJSPELTranslator translator = getELTranslator();
- if (null != translator) {
- translator.translateEL(elText, delim, currentNode, contentStart, contentLength, fUserELExpressions, fUserELRanges, fStructuredDocument);
- }
- }
-
- /**
- * Discover and instantiate an EL translator.
- */
- public IJSPELTranslator getELTranslator() {
- if (fELTranslator == null) {
-
- /*
- * 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;
- for (int i = 0; i < embeddedRegions.size(); i++) {
-
- // possible delimiter, check later
- delim = embeddedRegions.get(i);
- type = delim.getType();
-
- // check next region to see if it's content
- if (i + 1 < embeddedRegions.size()) {
- String regionType = embeddedRegions.get(i + 1).getType();
- if (regionType == DOMJSPRegionContexts.JSP_CONTENT || regionType == DOMJSPRegionContexts.JSP_EL_CONTENT)
- content = embeddedRegions.get(i + 1);
-
- }
-
- if (content != null) {
- int contentStart = embeddedContainer.getStartOffset(content);
- int rStart = fCurrentNode.getStartOffset() + contentStart;
- int rEnd = fCurrentNode.getStartOffset() + embeddedContainer.getEndOffset(content);
-
- boolean inThisRegion = rStart <= fSourcePosition && rEnd >= fSourcePosition;
- // int jspPositionStart = fCurrentNode.getStartOffset() +
- // contentStart;
-
- if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) {
- fLastJSPType = EXPRESSION;
- // translateExpressionString(embeddedContainer.getText(content),
- // fCurrentNode, contentStart, content.getLength());
- translateExpressionString(embeddedContainer.getText(content), embeddedContainer, contentStart, content.getLength());
- }
- else if (type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) {
- fLastJSPType = SCRIPTLET;
- // translateScriptletString(embeddedContainer.getText(content),
- // fCurrentNode, contentStart, content.getLength());
- translateScriptletString(embeddedContainer.getText(content), embeddedContainer, contentStart, content.getLength());
- }
- else if (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) {
- fLastJSPType = DECLARATION;
- // translateDeclarationString(embeddedContainer.getText(content),
- // fCurrentNode, contentStart, content.getLength());
- translateDeclarationString(embeddedContainer.getText(content), embeddedContainer, contentStart, content.getLength());
- }
- else if (type == DOMJSPRegionContexts.JSP_EL_OPEN) {
- fLastJSPType = EXPRESSION;
- translateEL(embeddedContainer.getText(content), embeddedContainer.getText(delim), fCurrentNode, contentStart, content.getLength());
- }
-
- // calculate relative offset in buffer
- if (inThisRegion) {
- setCursorOwner(fLastJSPType);
- int currentBufferLength = getCursorOwner().length();
- setRelativeOffset((fSourcePosition - contentStart) + currentBufferLength);
- if (fLastJSPType == EXPRESSION) {
- // if an expression, add then length of the enclosing
- // paren..
- setCursorInExpression(true);
- setRelativeOffset(getRelativeOffset() + EXPRESSION_PREFIX.length());
- }
- }
- }
- else {
- type = null;
- }
- }
- }
-
- 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";
- }
- String declaration = new TaglibVariable(varType, varName, "", description).getDeclarationString(true, TaglibVariable.M_PRIVATE);
- 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());
- }
- }
- }
-
- /*
- * 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 = "true".equalsIgnoreCase(attrValue);
- }
- else if (attrName.equals("buffer")) //$NON-NLS-1$
- {
- // ignore for now
- }
- else if (attrName.equals("autoFlush")) //$NON-NLS-1$
- {
- // ignore for now
- }
- else if (attrName.equals("isThreadSafe")) //$NON-NLS-1$
- {
- // fThreadSafe = "true".equalsIgnoreCase(attrValue); //$NON-NLS-1$
- }
- else if (attrName.equals("isErrorPage")) //$NON-NLS-1$
- {
- fIsErrorPage = "true".equalsIgnoreCase(attrValue);
- }
- }
-
- 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);
- // 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) {
- appendToBuffer(EXPRESSION_PREFIX, fUserCode, false, embeddedContainer);
- appendToBuffer(newText, fUserCode, true, embeddedContainer, jspPositionStart, jspPositionLength);
- appendToBuffer(EXPRESSION_SUFFIX, fUserCode, false, embeddedContainer);
- }
-
- protected void translateDeclarationString(String newText, ITextRegionCollection embeddedContainer, int jspPositionStart, int jspPositionLength) {
- appendToBuffer(newText, fUserDeclarations, true, embeddedContainer, jspPositionStart, jspPositionLength);
- appendToBuffer(ENDL, fUserDeclarations, false, embeddedContainer);
- }
-
- /**
- * used by XMLJSPRegionHelper for included JSP files
- *
- * @param newText
- * @param embeddedContainer
- * @param jspPositionStart
- * @param jspPositionLength
- */
- protected void translateScriptletString(String newText, ITextRegionCollection embeddedContainer, int jspPositionStart, int jspPositionLength) {
- appendToBuffer(newText, fUserCode, true, embeddedContainer, jspPositionStart, jspPositionLength);
- }
-
- // the following 3 methods determine the cursor position
- // <%= %>
- protected void translateExpression(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, EXPRESSION);
- appendToBuffer(EXPRESSION_PREFIX, fUserCode, false, fCurrentNode);
- appendToBuffer(newText, fUserCode, true, fCurrentNode);
- appendToBuffer(EXPRESSION_SUFFIX, fUserCode, false, fCurrentNode);
- }
-
- //
- // <%! %>
- protected void translateDeclaration(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, DECLARATION);
- appendToBuffer(newText, fUserDeclarations, true, fCurrentNode);
- appendToBuffer(ENDL, fUserDeclarations, false, fCurrentNode);
- }
-
- //
- // <% %>
- protected void translateScriptlet(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, SCRIPTLET);
- appendToBuffer(newText, fUserCode, true, fCurrentNode);
- }
-
- /**
- * Append using a region, probably indirect mapping (eg. <%@page
- * include=""%>)
- *
- * @param newText
- * @param buffer
- * @param addToMap
- * @param jspReferenceRegion
- */
- private void appendToBuffer(String newText, StringBuffer buffer, boolean addToMap, ITextRegionCollection jspReferenceRegion) {
- int start = 0, length = 0;
- if (jspReferenceRegion != null) {
- start = jspReferenceRegion.getStartOffset();
- length = jspReferenceRegion.getLength();
- }
- appendToBuffer(newText, buffer, addToMap, jspReferenceRegion, start, length, false);
- }
-
- private void appendToBuffer(String newText, StringBuffer buffer, boolean addToMap, ITextRegionCollection jspReferenceRegion, int jspPositionStart, int jspPositionLength) {
- appendToBuffer(newText, buffer, addToMap, jspReferenceRegion, jspPositionStart, jspPositionLength, true);
- }
-
- /**
- * Adds newText to the buffer passed in, and adds to translation mapping
- * as specified by the addToMap flag. some special cases to consider (that
- * may be affected by changes to this method): included files scriplets in
- * an attribute value refactoring
- *
- * @param newText
- * @param buffer
- * @param addToMap
- */
- private void appendToBuffer(String newText, StringBuffer buffer, boolean addToMap, ITextRegionCollection jspReferenceRegion, int jspPositionStart, int jspPositionLength, boolean isIndirect) {
-
- int origNewTextLength = newText.length();
-
- // nothing to append
- if (jspReferenceRegion == null)
- return;
-
- // add a newline so translation looks cleaner
- if (!newText.endsWith(ENDL))
- newText += ENDL;
-
- if (buffer == fUserCode) {
- buffer.append(newText);
- if (addToMap) {
- if (isUsebeanTag(jspReferenceRegion)) {
- try {
- // requires special mapping
- appendUseBeanToBuffer(newText, jspReferenceRegion, isIndirect);
- }
- catch (Exception e) {
- // still working out kinks
- Logger.logException(e);
- }
- }
- else {
- // all other cases
- Position javaRange = new Position(fOffsetInUserCode, origNewTextLength);
- Position jspRange = new Position(jspPositionStart, jspPositionLength);
-
- fCodeRanges.put(javaRange, jspRange);
- if (isIndirect)
- fIndirectRanges.put(javaRange, jspRange);
- }
- }
- fOffsetInUserCode += newText.length();
- }
- else if (buffer == fUserDeclarations) {
- buffer.append(newText);
- if (addToMap) {
- Position javaRange = new Position(fOffsetInUserDeclarations, newText.length());
- Position jspRange = new Position(jspPositionStart, jspPositionLength);
-
- fDeclarationRanges.put(javaRange, jspRange);
- if (isIndirect)
- fIndirectRanges.put(javaRange, jspRange);
- }
- fOffsetInUserDeclarations += newText.length();
- }
- }
-
- /**
- *
- * @param jspReferenceRegion
- * @return
- */
- private boolean isUsebeanTag(ITextRegionCollection jspReferenceRegion) {
- ITextRegionList regions = jspReferenceRegion.getRegions();
- ITextRegion r = null;
- boolean isUseBean = false;
- for (int i = 0; i < regions.size(); i++) {
- r = regions.get(i);
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=128490
- // length of 11 is the length of jsp:useBean
- // and saves the expensive getText.equals call
- if (r.getType() == DOMRegionContext.XML_TAG_NAME) {
- if (r.getTextLength() == 11 && jspReferenceRegion.getText(r).equals("jsp:useBean")) { //$NON-NLS-1$
- isUseBean = true;
- }
- // break no matter what if you hit tagname
- break;
- }
- }
- return isUseBean;
- }
-
- /**
- * @param importName
- * should be just the package plus the type eg. java.util.List
- * or java.util.*
- * @param jspReferenceRegion
- * should be the <%@ page import = "java.util.List"%> region
- * @param addToMap
- */
- private void appendImportToBuffer(String importName, ITextRegionCollection jspReferenceRegion, boolean addToMap) {
- String javaImportString = "import " + importName + ";" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$
- fUserImports.append(javaImportString);
- if (addToMap) {
- addImportToMap(importName, jspReferenceRegion);
- }
- fOffsetInUserImports += javaImportString.length();
- }
-
- /**
- * new text can be something like: "import java.lang.Object;\n"
- *
- * but the reference region could have been something like: <%@page
- * import="java.lang.Object, java.io.*, java.util.List"%>
- *
- * so the exact mapping has to be calculated carefully.
- *
- * isIndirect means that the import came from an included file (if true)
- *
- * @param importName
- * @param jspReferenceRegion
- */
- private void addImportToMap(String importName, ITextRegionCollection jspReferenceRegion) {
-
- // massage text
- // String jspText = importName.substring(importName.indexOf("import ")
- // + 7, importName.indexOf(';'));
- // String jspText = importName.trim();
-
- // these positions will be updated below
- Position javaRange = new Position(fOffsetInUserImports + 7, 1);
- Position jspRange = new Position(jspReferenceRegion.getStart(), jspReferenceRegion.getLength());
-
- // calculate JSP range by finding "import" attribute
- ITextRegionList regions = jspReferenceRegion.getRegions();
- int size = regions.size();
-
- int start = -1;
- int length = -1;
-
- ITextRegion r = null;
- for (int i = 0; i < size; i++) {
- r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)
- if (jspReferenceRegion.getText(r).trim().equals("import")) { //$NON-NLS-1$
- // get the attr value region
- if (size > i + 2) {
- r = regions.get(i + 2);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-
- String jspImportText = jspReferenceRegion.getText(r);
-
- // the position in question (in the JSP) is what
- // is bracketed below
- // includes whitespace
- // <%@page import="java.lang.Object,[ java.io.* ],
- // java.util.List"%>
-
- // in the java file
- // import [ java.io.* ];
-
- start = jspImportText.indexOf(importName);
- length = importName.length();
-
- // safety, don't add to map if bad positioning
- if (start == -1 || length < 1)
- break;
-
- // update jsp range
- jspRange.setOffset(jspReferenceRegion.getStartOffset(r) + start);
- jspRange.setLength(length);
-
- // update java range
- javaRange.setLength(length);
-
- break;
- }
- }
- }
- }
-
- // safety for bad ranges
- if (start != -1 && length > 1) {
- // put ranges in java -> jsp range map
- fImportRanges.put(javaRange, jspRange);
- }
- }
-
- /**
- * temp fix for 282295 until better mapping is in place
- *
- * @param newText
- * @param jspReferenceRegion
- */
- private void appendUseBeanToBuffer(String newText, ITextRegionCollection jspReferenceRegion, boolean isIndirect) throws Exception {
- // java string looks like this (tokenized)
- // Type id = new Classname();\n
- // 0 1 2 3 4
- // or
- // Type id = null;\n // if there is no classname
- // 0 1 2 3
-
- // ----------------------
- // calculate java ranges
- // ----------------------
- StringTokenizer st = new StringTokenizer(newText, " ", false); //$NON-NLS-1$
- int i = 0;
- String[] parsedJava = new String[st.countTokens()];
- while (st.hasMoreTokens())
- parsedJava[i++] = st.nextToken();
-
- String type = parsedJava[0] != null ? parsedJava[0] : ""; //$NON-NLS-1$
- String id = parsedJava[1] != null ? parsedJava[1] : ""; //$NON-NLS-1$
- String className = parsedJava.length > 4 ? parsedJava[4] : ""; //$NON-NLS-1$
-
- Position javaTypeRange = new Position(fOffsetInUserCode, type.length());
- Position javaIdRange = new Position(fOffsetInUserCode + type.length() + 1, id.length());
- Position javaClassRange = new Position(fOffsetInUserCode + type.length() + 1 + id.length() + 7, 0);
- /*
- * 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) // 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;
-
- 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 (type == null) {
- type = className;
- typeRegion = classnameRegion;
- }
-
- if (!isTypeFound(type)) {
- Object problem = createJSPProblem(IJSPProblem.F_PROBLEM_ID_LITERAL, IProblem.UndefinedType, MessageFormat.format(JSPCoreMessages.JSPTranslator_1, new String[]{type}), 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);
- }
- }
- }
- }
-
- /**
- * @param type
- * @return
- */
- private boolean isTypeFound(String typeName) {
- IType type = null;
- IProject project = getFile().getProject();
- try {
- IJavaProject p = JavaCore.create(project);
- if (p.exists()) {
- if (typeName.indexOf('<') > 0 && typeName.indexOf('>') > 0) {
- StringTokenizer toker = new StringTokenizer(typeName);
- String generic = toker.nextToken("<");
- String element = toker.nextToken(">");
- IType genericType = p.findType(generic);
- IType elementType = p.findType(element);
- return genericType!= null && genericType.exists() && elementType!= null && elementType.exists();
- }
- type = p.findType(typeName);
- return type != null && type.exists();
- }
- }
- catch (JavaModelException e) {
- // Not a Java Project
- }
- catch(NoSuchElementException e) {
- // StringTokenizer failure with unsupported syntax
- }
- return true;
- }
-
- 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 ArrayList getELProblems() {
- return fELProblems;
- }
-
- public IStructuredDocument getStructuredDocument() {
- return fStructuredDocument;
- }
-
- private IPath getModelPath() {
- IPath path = null;
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(getStructuredDocument());
- try {
- if (sModel != null)
- path = new Path(sModel.getBaseLocation());
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- 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);
- 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);
- helper.parse(preludes[i].toString());
- getIncludes().pop();
- }
- }
- }
- }
- fProcessIncludes = true;
- }
-}
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 ecd42a0f3d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/StackMap.java
+++ /dev/null
@@ -1,124 +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.HashMap;
-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;
- }
-}
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 a43e906a2f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapterFactory.java
+++ /dev/null
@@ -1,50 +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.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 JSPTranslationAdapterFactory {
-
- private TagTranslationAdapter fAdapter = null;
-
- public TagTranslationAdapterFactory() {
- super();
- }
-
- 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 c57d86f872..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
+++ /dev/null
@@ -1,527 +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.Iterator;
-import java.util.List;
-
-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.contentmodel.tld.TaglibTracker;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.internal.util.FileContentCache;
-import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandler;
-import org.eclipse.wst.sse.core.internal.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.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-/**
- * Parser/helper class for JSPTranslator. Used for parsing XML-JSP regions (in
- * a script block) A lot of logic borrowed from TLDCMDocumentManager. There
- * should be only one XMLJSPRegionHelper per text file
- *
- * @author pavery
- */
-class XMLJSPRegionHelper implements StructuredDocumentRegionHandler {
- private final JSPTranslator fTranslator;
- protected JSPSourceParser fLocalParser = null;
- protected String fTextToParse = null;
- // need this if not at the start of the document (eg. parsing just a
- // script block)
- protected int fStartOfTextToParse = 0;
- // name of the open tag that was last handled (if we are interested in it)
- protected String fTagname = null;
- protected String fTextBefore = ""; //$NON-NLS-1$
- protected String fUnescapedText = ""; //$NON-NLS-1$
- protected String fStrippedText = ""; //$NON-NLS-1$
- // for reconciling cursor position later
- int fPossibleOwner = JSPTranslator.SCRIPTLET;
-
- public XMLJSPRegionHelper(JSPTranslator translator) {
- getLocalParser().addStructuredDocumentRegionHandler(this);
- this.fTranslator = translator;
- }
-
- protected JSPSourceParser getLocalParser() {
- if (fLocalParser == null)
- fLocalParser = new JSPSourceParser();
- return fLocalParser;
- }
-
- public void addBlockMarker(BlockMarker marker) {
- fLocalParser.addBlockMarker(marker);
- }
-
- public void reset(String textToParse) {
- reset(textToParse, 0);
- }
-
- public void reset(String textToParse, int start) {
- fStartOfTextToParse = start;
- getLocalParser().reset(textToParse);
- fTextToParse = textToParse;
- }
-
- public void forceParse() {
- getLocalParser().getDocumentRegions();
- fLocalParser = null;
- }
-
- /*
- * parse an entire file
- *
- * @param filename @return
- */
- public boolean parse(String filePath) {
- getLocalParser().removeStructuredDocumentRegionHandler(this);
- // from outer class
- List blockMarkers = this.fTranslator.getBlockMarkers();
- IStructuredDocument document = StructuredDocumentFactory.getNewStructuredDocumentInstance(getLocalParser());
- String contents = getContents(filePath);
- if (contents == null)
- return false;
- // this adds the current markers from the outer class list
- // to this parser so parsing works correctly
- for (int i = 0; i < blockMarkers.size(); i++) {
- addBlockMarker((BlockMarker) blockMarkers.get(i));
- }
- // RATLC01139770
-// getLocalParser().getNestablePrefixes().addAll(((JSPSourceParser)fTranslator.getStructuredDocument().getParser()).getNestablePrefixes());
- TLDCMDocumentManager documentManager = this.fTranslator.getTLDCMDocumentManager();
- if (documentManager != null) {
- List trackers = documentManager.getTaglibTrackers();
- for (Iterator it = trackers.iterator(); it.hasNext();) {
- TaglibTracker tracker = (TaglibTracker) it.next();
- String prefix = tracker.getPrefix();
- getLocalParser().getNestablePrefixes().add(new TagMarker(prefix));
- }
- }
-
- reset(contents);
- // forceParse();
- document.set(contents);
- IStructuredDocumentRegion cursor = document.getFirstStructuredDocumentRegion();
- while (cursor != null) {
- nodeParsed(cursor);
- cursor = cursor.getNext();
- }
- getLocalParser().addStructuredDocumentRegionHandler(this);
- return true;
- }
-
-
- /*
- * listens to parser node parsed events adds to local scriplet,
- * expression, declaration buffers determines which type of region the
- * cursor is in, and adjusts cursor offset accordingly
- */
- public void nodeParsed(IStructuredDocumentRegion sdRegion) {
-
- try {
-
- handleScopingIfNecessary(sdRegion);
- if (isJSPEndRegion(sdRegion)) {
- String nameStr = getRegionName(sdRegion);
- if (isPossibleCustomTag(nameStr)) {
- // this custom tag may define variables
- this.fTranslator.addTaglibVariables(nameStr, sdRegion);
- }
- fTagname = null;
- }
- else if (isJSPStartRegion(sdRegion)) {
- String nameStr = getRegionName(sdRegion);
- if (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN) {
- if (isPossibleCustomTag(nameStr)) {
- // this custom tag may define variables
- this.fTranslator.addTaglibVariables(nameStr, sdRegion);
- }
- }
- if (isJSPRegion(nameStr))
- fTagname = nameStr;
- else
- fTagname = null;
-
-
- // this section assumes important content (to translate)
- // IS the opening tag
-
- // handle include and directive
- if (fTagname != null && sdRegion.getFirstRegion().getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) {
- processOtherRegions(sdRegion);
- }
-
-
- // handle jsp:useBean
- if (fTagname != null && fTagname.equals(JSP11Namespace.ElementName.USEBEAN)) {
- processUseBean(sdRegion);
- }
- }
- else if (sdRegion.getFirstRegion().getType() == DOMJSPRegionContexts.JSP_CONTENT || sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_CONTENT) {
- // this section assumes important content (to translate)
- // is AFTER the opening tag
- if (fTagname != null) {
- // assign contents to one of the tables
- if (isScriptlet(fTagname)) {
- processScriptlet(sdRegion);
- }
- else if (isExpression(fTagname)) {
- processExpression(sdRegion);
- }
- else if (isDeclaration(fTagname)) {
- processDeclaration(sdRegion);
- }
- }
- }
- else {
- fTagname = null;
- }
- // this updates cursor position
- checkCursorInRegion(sdRegion);
- }
- catch (NullPointerException e) {
- // logging this exception that I've seen a couple of times...
- // seems to happen during shutdown of unit tests, at which
- // point Logger has already been unloaded
- try {
- Logger.logException("XMLJSPRegionHelper: exception in node parsing", e); //$NON-NLS-1$
- }
- catch (NoClassDefFoundError ex) {
- // do nothing, since we're just ending
- }
- }
- }
-
-
- private void handleScopingIfNecessary(IStructuredDocumentRegion sdRegion) {
- /* 199047 - Braces missing from translation of custom tags not defining variables */
- // fix to make sure custom tag block have their own scope
- // we add '{' for custom tag open and '}' for custom tag close
- // in the translation
- if (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN) {
- if (!isSelfClosingTag(sdRegion)) {
- String nameStr = getRegionName(sdRegion);
- if (isPossibleCustomTag(nameStr)) {
- startScope(nameStr);
- }
- }
- }
- else if (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_END_TAG_OPEN) {
- String nameStr = getRegionName(sdRegion);
- if (isPossibleCustomTag(nameStr)) {
- endScope(nameStr);
- }
- }
- }
-
- private boolean isSelfClosingTag(ITextRegionCollection containerRegion) {
-
- if (containerRegion == null)
- return false;
-
- ITextRegionList regions = containerRegion.getRegions();
- ITextRegion r = regions.get(regions.size() - 1);
- return r.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE;
- }
-
- private void startScope(String tagName) {
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- StringBuffer text = new StringBuffer();
- text.append("{ // <"); //$NON-NLS-1$
- text.append(tagName);
- text.append(">\n"); //$NON-NLS-1$
- this.fTranslator.translateScriptletString(text.toString(), currentNode, currentNode.getStartOffset(), currentNode.getLength()); //$NON-NLS-1$
-
- }
-
- private void endScope(String tagName) {
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- StringBuffer text = new StringBuffer();
- text.append("} // </"); //$NON-NLS-1$
- text.append(tagName);
- text.append(">\n"); //$NON-NLS-1$
- this.fTranslator.translateScriptletString(text.toString(), currentNode, currentNode.getStartOffset(), currentNode.getLength()); //$NON-NLS-1$
-
- }
-
- public void resetNodes() {
- // do nothing
- }
-
- private void checkCursorInRegion(IStructuredDocumentRegion sdRegion) {
- // if cursor is in this region...
- if (this.fTranslator.getSourcePosition() >= fStartOfTextToParse + sdRegion.getStartOffset() && this.fTranslator.getSourcePosition() <= fStartOfTextToParse + sdRegion.getEndOffset()) {
- int endOfNameTag = sdRegion.getStartOffset();
- int offset = fTextBefore.length() - fStrippedText.length();
- // offset in addtion to what's already in the buffer
- this.fTranslator.setRelativeOffset(this.fTranslator.getSourcePosition() - (fStartOfTextToParse + endOfNameTag) - offset);
- // outer class method
- this.fTranslator.setCursorOwner(fPossibleOwner);
- // add length of what's already in the buffer
- this.fTranslator.setRelativeOffset(this.fTranslator.getRelativeOffset() + this.fTranslator.getCursorOwner().length());
- if (fPossibleOwner == JSPTranslator.EXPRESSION) {
- // add length of expression prefix if necessary...
- this.fTranslator.setRelativeOffset(this.fTranslator.getRelativeOffset() + JSPTranslator.EXPRESSION_PREFIX.length());
- }
- }
- }
-
- protected void processDeclaration(IStructuredDocumentRegion sdRegion) {
- prepareText(sdRegion);
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateDeclarationString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
- fPossibleOwner = JSPTranslator.DECLARATION;
- }
-
- protected void processExpression(IStructuredDocumentRegion sdRegion) {
- prepareText(sdRegion);
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateExpressionString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
- fPossibleOwner = JSPTranslator.EXPRESSION;
- }
-
- protected void processScriptlet(IStructuredDocumentRegion sdRegion) {
- prepareText(sdRegion);
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateScriptletString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
- fPossibleOwner = JSPTranslator.SCRIPTLET;
- }
-
- /*
- * Substitutes values for entity references, strips CDATA tags, and keeps
- * track of string length(s) for cursor position calculation later. @param
- * sdRegion
- */
- protected void prepareText(IStructuredDocumentRegion sdRegion) {
- fTextBefore = fTextToParse.substring(sdRegion.getStartOffset(), sdRegion.getEndOffset());
- fUnescapedText = EscapedTextUtil.getUnescapedText(fTextBefore);
- fStrippedText = this.fTranslator.stripCDATA(fUnescapedText);
- }
-
- protected void processUseBean(IStructuredDocumentRegion sdRegion) {
- if (fTagname != null && isUseBean(fTagname)) {
-
- String beanClass, beanType, beanId, beanDecl = ""; //$NON-NLS-1$
- beanClass = getAttributeValue("class", sdRegion); //$NON-NLS-1$
- beanType = getAttributeValue("type", sdRegion); //$NON-NLS-1$
- beanId = getAttributeValue("id", sdRegion); //$NON-NLS-1$
-
- if (beanId != null && (beanType != null || beanClass != null)) {
- 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());
- fPossibleOwner = JSPTranslator.SCRIPTLET;
- }
- }
-
- protected void processOtherRegions(IStructuredDocumentRegion sdRegion) {
- processIncludeDirective(sdRegion);
- processPageDirective(sdRegion);
- }
-
- protected void processIncludeDirective(IStructuredDocumentRegion sdRegion) {
- if (isIncludeDirective(fTagname)) {
- // the directive name region itself contains the attrs...
- if (sdRegion.getRegions().get(0).getType() == DOMRegionContext.XML_CONTENT)
- sdRegion = sdRegion.getPrevious();
- String fileLocation = getAttributeValue("file", sdRegion); //$NON-NLS-1$
- this.fTranslator.handleIncludeFile(fileLocation);
- }
- else if (isPossibleCustomTag(fTagname)) {
- // this custom tag may define variables
- this.fTranslator.addTaglibVariables(fTagname);
- }
- else if (isTaglibDirective(fTagname)) {
- // also add the ones created here to the parent document
- String prefix = getAttributeValue("prefix", sdRegion); //$NON-NLS-1$
- 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;
- }
-
- 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 ef40a9eeff..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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.internal.java.jspel;
-
-import java.util.Map;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-
-/**
- * The code checker for the jsf/jsp EL.
- */
-public final class ELGenerator {
- /**
- * Constructor.
- *
- * @param locator A valid ELLocator instance, may not be null.
- */
- public ELGenerator() {
- } // constructor
-
-
- /**
- * Check the netuiel AST and set diagnostics as necessary.
- * @param translator TODO
- * @param jspReferenceRegion TODO
- * @param contentStart
- * @param contentLength
- */
- public void generate(ASTExpression root, IStructuredDocumentRegion currentNode, StringBuffer result, Map codeMap, IStructuredDocument document, ITextRegionCollection jspReferenceRegion, int contentStart, int contentLength) {
- ELGeneratorVisitor visitor = new ELGeneratorVisitor(result, currentNode, codeMap, document, jspReferenceRegion, contentStart);
- root.jjtAccept(visitor, null);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
deleted file mode 100644
index d8cb3a2588..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
+++ /dev/null
@@ -1,464 +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
- *
- * 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.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentImpl;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDFunction;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-
-public class ELGeneratorVisitor implements JSPELParserVisitor {
-
- private static final String ENDL = "\n"; //$NON-NLS-1$
-
- private static final String fExpressionHeader1 = "public String _elExpression"; //$NON-NLS-1$
- private static final String fExpressionHeader2 = "()" + ENDL + //$NON-NLS-1$
- "\t\tthrows java.io.IOException, javax.servlet.ServletException {" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.PageContext pageContext = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map param = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map paramValues = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map header = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map headerValues = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map cookie = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map initParam = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map pageScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map requestScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map sessionScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map applicationScope = null;" + ENDL + //$NON-NLS-1$
- "return \"\"+"; //$NON-NLS-1$
-
- private static final String fJspImplicitObjects[] = { "pageContext" }; //$NON-NLS-1$
-
- private static final String fJspImplicitMaps[] = { "param", "paramValues", "header", "headerValues", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "cookie", "initParam", "pageScope", "requestScope", "sessionScope", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- "applicationScope" }; //$NON-NLS-1$
-
- private static final HashMap fJSPImplicitObjectMap = new HashMap(fJspImplicitObjects.length);
- static {
- for(int i = 0; i < fJspImplicitObjects.length; i++) {
- fJSPImplicitObjectMap.put(fJspImplicitObjects[i], new Boolean(true));
- }
-
- for(int i = 0; i < fJspImplicitMaps.length; i++) {
- fJSPImplicitObjectMap.put(fJspImplicitMaps[i], new Boolean(false));
- }
- }
-
- private static final String fFooter = " ;" + ENDL + "}" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$
-
- private StringBuffer fResult;
- private Map fCodeMap;
- private int fOffsetInUserCode;
- private static int methodCounter = 0;
- private IStructuredDocument fDocument = null;
- private int fContentStart;
- private static Map fOperatorMap;
-
- // this flag lets us know if we were unable to generate for some reason. One possible reason is that the expression
- // contains a reference to a variable for which information is only available at runtime.
- private boolean fCanGenerate = true;
-
- private IStructuredDocumentRegion fCurrentNode;
-
- /**
- * Tranlsation of XML-style operators to java
- */
- static {
- fOperatorMap = new HashMap();
- fOperatorMap.put("gt", ">"); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("lt", "<"); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("ge", ">="); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("le", "<="); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("mod", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("eq", "=="); //$NON-NLS-1$ //$NON-NLS-2$
- 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;
- }
-
- /**
- * Append a token to the output stream. Automatically calculating mapping.
- *
- * @param token
- */
- private void append(Token token)
- {
- append(token.image, token.beginColumn - 1, token.endColumn);
- }
-
- /**
- * Append a translation for the corresponding input token.
- *
- * @param translated
- * @param token
- */
- private void append(String translated, Token token)
- {
- append(translated, token.beginColumn - 1, token.endColumn);
- }
-
- /**
- * Append a string explicitly giving the input mapping.
- *
- * @param newText
- * @param jspPositionStart
- * @param jspPositionEnd
- */
- private void append(String newText, int jspPositionStart, int jspPositionEnd)
- {
- fResult.append(newText);
- Position javaRange = new Position(fOffsetInUserCode, newText.length());
- Position jspRange = new Position(fContentStart + jspPositionStart, jspPositionEnd - jspPositionStart);
-
- fCodeMap.put(javaRange, jspRange);
- fOffsetInUserCode += newText.length();
- }
-
- /**
- * Append text that will be unmapped and therefore will not be available for completion.
- *
- * @param newText
- */
- private void append(String newText)
- {
- fResult.append(newText);
- fOffsetInUserCode += newText.length();
- }
-
- /**
- * Generate a function invocation.
- *
- * @param fullFunctionName
- * @return
- */
- protected String genFunction(String fullFunctionName) {
- TLDCMDocumentManager docMgr = TaglibController.getTLDCMDocumentManager(fDocument);
- int colonIndex = fullFunctionName.indexOf(':');
- String prefix = fullFunctionName.substring(0, colonIndex);
- String functionName = fullFunctionName.substring(colonIndex + 1);
- if (docMgr == null)
- return null;
-
- Iterator taglibs = docMgr.getCMDocumentTrackers(fCurrentNode.getStartOffset()).iterator();
- while (taglibs.hasNext()) {
- TaglibTracker tracker = (TaglibTracker)taglibs.next();
- if(tracker.getPrefix().equals(prefix)) {
- CMDocumentImpl doc = (CMDocumentImpl)tracker.getDocument();
-
- List functions = doc.getFunctions();
- for(Iterator it = functions.iterator(); it.hasNext(); ) {
- TLDFunction function = (TLDFunction)it.next();
- if(function.getName().equals(functionName)) {
- return function.getClassName() + "." + function.getName(); //$NON-NLS-1$
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Handle a simple node -- fallback
- */
- public Object visit(SimpleNode node, Object data) {
- return(node.childrenAccept(this, data));
- }
-
- static synchronized int getMethodCounter() {
- return methodCounter++;
- }
-
- /**
- * Handle top-level expression
- */
- public Object visit(ASTExpression node, Object data) {
- int start = node.getFirstToken().beginColumn - 1;
- int end = node.lastToken.endColumn - 1;
- append(fExpressionHeader1, start, start);
- append(Integer.toString(getMethodCounter()), start, start);
- append(fExpressionHeader2, start, start);
-
- Object retval = node.childrenAccept(this, data);
-
- append(fFooter, end, end);
-
- // something is preventing good code generation so empty out the result and the map.
- if(!fCanGenerate) {
- fResult.delete(0, fResult.length());
- fCodeMap.clear();
- }
- return retval;
- }
-
- /**
- * Generically generate an operator node.
- *
- * @param node
- * @param data
- */
- private void generateOperatorNode(ASTOperatorExpression node, Object data) {
- for(int i = 0; i < node.children.length; i++) {
- node.children[i].jjtAccept(this, data);
- if( node.children.length - i > 1) {
- appendOperator((Token)node.getOperatorTokens().get(i));
- }
- }
- }
-
- /**
- * Append an operator to the output stream after translation (if any)
- *
- * @param token
- * @return
- */
- private String appendOperator(Token token) {
- String tokenImage = token.image.trim();
- String translated = (String)fOperatorMap.get(tokenImage);
- if(null != translated) {
- append(translated, token);
- } else {
- append(token);
- }
- return(translated);
- }
-
- /**
- * Handle or Expression
- */
- public Object visit(ASTOrExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle and expression
- */
- public Object visit(ASTAndExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle equality
- */
- public Object visit(ASTEqualityExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle Relational
- */
- public Object visit(ASTRelationalExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle addition
- */
- public Object visit(ASTAddExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle multiply
- */
- public Object visit(ASTMultiplyExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Choice Expression (ternary operator)
- */
- public Object visit(ASTChoiceExpression node, Object data) {
- node.children[0].jjtAccept(this, data);
- append("?"); //$NON-NLS-1$
- node.children[1].jjtAccept(this, data);
- append(":"); //$NON-NLS-1$
- node.children[2].jjtAccept(this,data);
- return null;
- }
-
-
- /**
- * Handle unary
- */
- public Object visit(ASTUnaryExpression node, Object data) {
- if(JSPELParserConstants.EMPTY == node.firstToken.kind) {
- append("((null == "); //$NON-NLS-1$
- node.childrenAccept(this, data);
- append(") || ("); //$NON-NLS-1$
- node.childrenAccept(this, data);
- append(").isEmpty())"); //$NON-NLS-1$
- } else if(JSPELParserConstants.NOT1 == node.firstToken.kind || JSPELParserConstants.NOT2 == node.firstToken.kind) {
- append("(!"); //$NON-NLS-1$
- node.childrenAccept(this, data);
- append(")"); //$NON-NLS-1$
- } else if(JSPELParserConstants.MINUS == node.firstToken.kind) {
- append("(-"); //$NON-NLS-1$
- node.childrenAccept(this, data);
- append(")"); //$NON-NLS-1$
- } else {
- node.childrenAccept(this, data);
- }
- return null;
- }
-
-
- /**
- * Value node
- */
- public Object visit(ASTValue node, Object data) {
- if(node.jjtGetNumChildren() >= 2) {
- if(node.jjtGetChild(0) instanceof ASTValuePrefix && node.jjtGetChild(1) instanceof ASTValueSuffix) {
- ASTValuePrefix prefix = (ASTValuePrefix) node.jjtGetChild(0);
- ASTValueSuffix suffix = (ASTValueSuffix) node.jjtGetChild(1);
- if(prefix.firstToken.image.equals("pageContext") && suffix.getPropertyNameToken().image.equals("request")) {
- append("((HTTPServletRequest)");
- }
- }
- }
- return node.childrenAccept(this, data);
- }
-
-
- /**
- * Value Prefix
- */
- public Object visit(ASTValuePrefix node, Object data) {
- // this is a raw identifier. May sure it's an implicit object.
- // This is the primary plae where modification is needed to
- // support JSF backing beans.
- if(null == node.children) {
- if(isCompletingObject(node.firstToken.image)) {
- append(node.firstToken);
- } else {
- fCanGenerate = false;
- }
- return(null);
- }
- return node.childrenAccept(this, data);
- }
-
-
- /**
- * Function for testing implicit objects.
- *
- * @param image
- * @return
- */
- private boolean isCompletingObject(String image) {
- Boolean value = (Boolean)fJSPImplicitObjectMap.get(image);
- return null == value ? false : value.booleanValue();
- }
-
- /**
- * Value suffix
- */
- public Object visit(ASTValueSuffix node, Object data) {
- if(JSPELParserConstants.LBRACKET == node.firstToken.kind) {
- fCanGenerate = false;
- } else if(null != node.getPropertyNameToken()) {
- Token suffix = node.getPropertyNameToken();
- String ucaseName = suffix.image.substring(0, 1).toUpperCase() + suffix.image.substring(1, suffix.image.length());
-
- // This is a special case. Note that the type system, no matter how much type information
- // we would have wouldn't give us the correct result. We're looking for "pageContext.request"
- // here and will add a downcast to (HTTPServletRequest)
-
- append(node.firstToken);
- append("get" + ucaseName + "()", suffix); //$NON-NLS-1$ //$NON-NLS-2$
-
- SimpleNode parent = (SimpleNode) node.jjtGetParent();
- if(suffix.image.equals("request") && parent instanceof ASTValue && //$NON-NLS-1$
- parent.jjtGetParent() instanceof ASTUnaryExpression && parent.firstToken.image.equals("pageContext")) { //$NON-NLS-1$
- append(")");
- }
-
-
- } else {
- append(node.firstToken);
- }
- return null;
- }
-
-
- /**
- * Function invocation
- */
- public Object visit(ASTFunctionInvocation node, Object data) {
- String functionTranslation = genFunction(node.getFullFunctionName());
- if(null != functionTranslation)
- {
- append(functionTranslation + "(", node.getFirstToken()); //$NON-NLS-1$
- for(int i = 0; i < node.children.length; i++) {
- node.children[i].jjtAccept(this, data);
- if( node.children.length - i > 1){
- append(","); //$NON-NLS-1$
- }
- }
- append(")"); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Literal
- */
- public Object visit(ASTLiteral node, Object data) {
- // TODO any further translation needed?
- append(node.firstToken);
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java
deleted file mode 100644
index e05c5622de..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class FindFunctionInvocationVisitor implements JSPELParserVisitor {
- protected int fCursorPosition;
-
- public FindFunctionInvocationVisitor(int cursorPosition)
- {
- fCursorPosition = cursorPosition;
- }
-
- protected boolean isEnclosing(SimpleNode node) {
- return(node.firstToken.beginColumn < fCursorPosition && node.lastToken.endColumn >= fCursorPosition);
- }
-
-
- protected Object visitEnclosingChild(SimpleNode node, Object data) {
- if(null == node.children)
- return null;
-
- for(int i = 0; i < node.children.length; i++) {
- if(isEnclosing(node))
- return node.children[i].jjtAccept(this, data);
- }
- return null;
- }
-
- public Object visit(SimpleNode node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTOrExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTAndExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTEqualityExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTRelationalExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTAddExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTMultiplyExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTChoiceExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTUnaryExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTValue node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTValuePrefix node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTValueSuffix node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTFunctionInvocation node, Object data) {
- Object nestedInvocation = visitEnclosingChild(node, data);
- if(null != nestedInvocation)
- return nestedInvocation;
- return node;
- }
-
- public Object visit(ASTLiteral node, Object data) {
- return visitEnclosingChild(node, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java
deleted file mode 100644
index 6e7436c2c9..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. JJTJSPELParserState.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-class JJTJSPELParserState {
- private java.util.Stack nodes;
- private java.util.Stack marks;
-
- private int sp; // number of nodes on stack
- private int mk; // current mark
- private boolean node_created;
-
- JJTJSPELParserState() {
- nodes = new java.util.Stack();
- marks = new java.util.Stack();
- sp = 0;
- mk = 0;
- }
-
- /* Determines whether the current node was actually closed and
- pushed. This should only be called in the final user action of a
- node scope. */
- boolean nodeCreated() {
- return node_created;
- }
-
- /* Call this to reinitialize the node stack. It is called
- automatically by the parser's ReInit() method. */
- void reset() {
- nodes.removeAllElements();
- marks.removeAllElements();
- sp = 0;
- mk = 0;
- }
-
- /* Returns the root node of the AST. It only makes sense to call
- this after a successful parse. */
- Node rootNode() {
- return (Node)nodes.elementAt(0);
- }
-
- /* Pushes a node on to the stack. */
- void pushNode(Node n) {
- nodes.push(n);
- ++sp;
- }
-
- /* Returns the node on the top of the stack, and remove it from the
- stack. */
- Node popNode() {
- if (--sp < mk) {
- mk = ((Integer)marks.pop()).intValue();
- }
- return (Node)nodes.pop();
- }
-
- /* Returns the node currently on the top of the stack. */
- Node peekNode() {
- return (Node)nodes.peek();
- }
-
- /* Returns the number of children on the stack in the current node
- scope. */
- int nodeArity() {
- return sp - mk;
- }
-
-
- void clearNodeScope(Node n) {
- while (sp > mk) {
- popNode();
- }
- mk = ((Integer)marks.pop()).intValue();
- }
-
-
- void openNodeScope(Node n) {
- marks.push(new Integer(mk));
- mk = sp;
- n.jjtOpen();
- }
-
-
- /* A definite node is constructed from a specified number of
- children. That number of nodes are popped from the stack and
- made the children of the definite node. Then the definite node
- is pushed on to the stack. */
- void closeNodeScope(Node n, int num) {
- mk = ((Integer)marks.pop()).intValue();
- while (num-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, num);
- }
- n.jjtClose();
- pushNode(n);
- node_created = true;
- }
-
-
- /* A conditional node is constructed if its condition is true. All
- the nodes that have been pushed since the node was opened are
- made children of the the conditional node, which is then pushed
- on to the stack. If the condition is false the node is not
- constructed and they are left on the stack. */
- void closeNodeScope(Node n, boolean condition) {
- if (condition) {
- int a = nodeArity();
- mk = ((Integer)marks.pop()).intValue();
- while (a-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, a);
- }
- n.jjtClose();
- pushNode(n);
- node_created = true;
- } else {
- mk = ((Integer)marks.pop()).intValue();
- node_created = false;
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj
deleted file mode 100644
index 0e383b4047..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj
+++ /dev/null
@@ -1,675 +0,0 @@
-*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. JSPEL.jj */
-/*@egen*//* I know that haing some of these options on one line is rude but
- * if we don't do that the line number reported from javacc are off
- * which, trust me, is far more annoying. --tcarroll@bea.com
- */
-options {
- JAVA_UNICODE_ESCAPE = false;
- UNICODE_INPUT = true;
- STATIC = false;
- OPTIMIZE_TOKEN_MANAGER = true;
-}
-
-PARSER_BEGIN(JSPELParser)
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParser/*@bgen(jjtree)*/implements JSPELParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
- protected JJTJSPELParserState jjtree = new JJTJSPELParserState();
-
-/*@egen*/
-
- void jjtreeOpenNodeScope(Node n)
- {
- ((SimpleNode)n).setFirstToken(getToken(1));
- }
-
- void jjtreeCloseNodeScope(Node n)
- {
- ((SimpleNode)n).setLastToken(getToken(0));
- }
-
- public static JSPELParser createParser(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- return new JSPELParser(reader);
- }
-
- public void ReInit(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- ReInit(reader);
- }
-
-}
-
-PARSER_END(JSPELParser)
-
-SKIP :
-{
- " "
-| "\t"
-| "\n"
-| "\r"
-}
-
-TOKEN :
-{
-/* Literals */
- < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* >
-|
- < FLOATING_POINT_LITERAL:
- (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)?
- | "." (["0"-"9"])+ (<EXPONENT>)?
- | (["0"-"9"])+ <EXPONENT>
- >
-|
- < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
-|
- < STRING_LITERAL:
- ("\"" ((~["\"","\\"]) | ("\\" ( ["\\","\""] )))* "\"") |
- ("\'" ((~["\'","\\"]) | ("\\" ( ["\\","\'"] )))* "\'")
- >
-|
- < BADLY_ESCAPED_STRING_LITERAL:
- ("\"" (~["\"","\\"])* ("\\" ( ~["\\","\""] ))) |
- ("\'" (~["\'","\\"])* ("\\" ( ~["\\","\'"] )))
- >
-
-/* Reserved Words and Symbols */
-| < TRUE: "true" >
-| < FALSE: "false" >
-| < NULL: "null" >
-| < DOT: "." >
-| < GT1: ">" >
-| < GT2: "gt" >
-| < LT1: "<" >
-| < LT2: "lt" >
-| < EQ1: "==" >
-| < EQ2: "eq" >
-| < LE1: "<=" >
-| < LE2: "le" >
-| < GE1: ">=" >
-| < GE2: "ge" >
-| < NEQ1: "!=" >
-| < NEQ2: "ne" >
-| < LPAREN: "(" >
-| < RPAREN: ")" >
-| < COMMA: "," >
-| < COLON: ":" >
-| < LBRACKET: "[" >
-| < RBRACKET: "]" >
-| < PLUS: "+" >
-| < MINUS: "-" >
-| < MULTIPLY: "*" >
-| < DIVIDE1: "/" >
-| < DIVIDE2: "div" >
-| < MODULUS1: "%" >
-| < MODULUS2: "mod" >
-| < NOT1: "not" >
-| < NOT2: "!" >
-| < AND1: "and" >
-| < AND2: "&&" >
-| < OR1: "or" >
-| < OR2: "||" >
-| < EMPTY: "empty" >
-| < COND: "?" >
-
-/* Identifiers */
-
-| < IDENTIFIER: (<LETTER>|<IMPL_OBJ_START>) (<LETTER>|<DIGIT>)* >
-| < #IMPL_OBJ_START: "#" >
-|
- < #LETTER:
- [
- "$",
- "A"-"Z",
- "_",
- "a"-"z",
- "\u00c0"-"\u00d6",
- "\u00d8"-"\u00f6",
- "\u00f8"-"\u00ff",
- "\u0100"-"\u1fff",
- "\u3040"-"\u318f",
- "\u3300"-"\u337f",
- "\u3400"-"\u3d2d",
- "\u4e00"-"\u9fff",
- "\uf900"-"\ufaff"
- ]
- >
-|
- < #DIGIT:
- [
- "0"-"9",
- "\u0660"-"\u0669",
- "\u06f0"-"\u06f9",
- "\u0966"-"\u096f",
- "\u09e6"-"\u09ef",
- "\u0a66"-"\u0a6f",
- "\u0ae6"-"\u0aef",
- "\u0b66"-"\u0b6f",
- "\u0be7"-"\u0bef",
- "\u0c66"-"\u0c6f",
- "\u0ce6"-"\u0cef",
- "\u0d66"-"\u0d6f",
- "\u0e50"-"\u0e59",
- "\u0ed0"-"\u0ed9",
- "\u1040"-"\u1049"
- ]
- >
-}
-
-ASTExpression Expression() : {/*@bgen(jjtree) Expression */
- ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Expression */
- try {
-/*@egen*/
- (LOOKAHEAD("?") ChoiceExpression() | OrExpression())/*@bgen(jjtree)*/
- {
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- }
-/*@egen*/ { return jjtn000; }/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void OrExpression() :
-{/*@bgen(jjtree) #OrExpression(> 1) */
- ASTOrExpression jjtn000 = new ASTOrExpression(JJTOREXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #OrExpression(> 1) */
- try {
-/*@egen*/
- AndExpression() ((t = <OR1> | t = <OR2>) { jjtn000.addOperatorToken(t); }
- AndExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void AndExpression() :
-{/*@bgen(jjtree) #AndExpression(> 1) */
- ASTAndExpression jjtn000 = new ASTAndExpression(JJTANDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #AndExpression(> 1) */
- try {
-/*@egen*/
- EqualityExpression() ((t = <AND1> | t = <AND2>) { jjtn000.addOperatorToken(t); }
- EqualityExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void EqualityExpression() :
-{/*@bgen(jjtree) #EqualityExpression(> 1) */
- ASTEqualityExpression jjtn000 = new ASTEqualityExpression(JJTEQUALITYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #EqualityExpression(> 1) */
- try {
-/*@egen*/
- RelationalExpression()
- ((t = <EQ1> | t = <EQ2> | t = <NEQ1> | t = <NEQ2>) { jjtn000.addOperatorToken(t); }
- RelationalExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void RelationalExpression() :
-{/*@bgen(jjtree) #RelationalExpression(> 1) */
- ASTRelationalExpression jjtn000 = new ASTRelationalExpression(JJTRELATIONALEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #RelationalExpression(> 1) */
- try {
-/*@egen*/
- AddExpression()
- (
- (t = <LT1> | t = <LT2> | t = <GT1> | t = <GT2> | t = <GE1> | t = <GE2> | t = <LE1> | t = <LE2>) { jjtn000.addOperatorToken(t); }
- AddExpression()
- )*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void AddExpression() :
-{/*@bgen(jjtree) #AddExpression(> 1) */
- ASTAddExpression jjtn000 = new ASTAddExpression(JJTADDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #AddExpression(> 1) */
- try {
-/*@egen*/
- MultiplyExpression() ((t = <PLUS> | t = <MINUS>) { jjtn000.addOperatorToken(t); }
- MultiplyExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void MultiplyExpression() :
-{/*@bgen(jjtree) #MultiplyExpression(> 1) */
- ASTMultiplyExpression jjtn000 = new ASTMultiplyExpression(JJTMULTIPLYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #MultiplyExpression(> 1) */
- try {
-/*@egen*/
- UnaryExpression() (
- ( t = <MULTIPLY> | t = <DIVIDE1> | t = <DIVIDE2> | t = <MODULUS1> | t = <MODULUS2>) { jjtn000.addOperatorToken(t); }
- UnaryExpression()
- )*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ChoiceExpression() : {/*@bgen(jjtree) ChoiceExpression */
- ASTChoiceExpression jjtn000 = new ASTChoiceExpression(JJTCHOICEEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ChoiceExpression */
- try {
-/*@egen*/
- OrExpression() <COND> OrExpression() <COLON> OrExpression()/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void UnaryExpression() : {/*@bgen(jjtree) UnaryExpression */
- ASTUnaryExpression jjtn000 = new ASTUnaryExpression(JJTUNARYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) UnaryExpression */
- try {
-/*@egen*/
- ((<NOT1> | <NOT2> | <MINUS> | <EMPTY>) UnaryExpression())
- | Value()/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-
-}
-
-void Value() : {/*@bgen(jjtree) Value */
- ASTValue jjtn000 = new ASTValue(JJTVALUE);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Value */
- try {
-/*@egen*/
- ValuePrefix() (ValueSuffix())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ValuePrefix() : {/*@bgen(jjtree) ValuePrefix */
- ASTValuePrefix jjtn000 = new ASTValuePrefix(JJTVALUEPREFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ValuePrefix */
- try {
-/*@egen*/
- Literal() | (<LPAREN> Expression() <RPAREN>) | LOOKAHEAD(3) FunctionInvocation() | <IDENTIFIER>/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ValueSuffix() :
-{/*@bgen(jjtree) ValueSuffix */
- ASTValueSuffix jjtn000 = new ASTValueSuffix(JJTVALUESUFFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t = null;
-}
-{/*@bgen(jjtree) ValueSuffix */
- try {
-/*@egen*/
- (<DOT> (t = <IDENTIFIER>)?)/*@bgen(jjtree)*/
- {
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- }
-/*@egen*/ { jjtn000.setPropertyNameToken(t); }
- | (<LBRACKET> Expression() <RBRACKET>)/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void FunctionInvocation() :
-{/*@bgen(jjtree) FunctionInvocation */
- ASTFunctionInvocation jjtn000 = new ASTFunctionInvocation(JJTFUNCTIONINVOCATION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token prefix = null, name = null;
-}
-{/*@bgen(jjtree) FunctionInvocation */
- try {
-/*@egen*/
- (prefix = <IDENTIFIER> <COLON>) { jjtn000.setFullFunctionName(prefix.image + ":"); }
- (name = <IDENTIFIER>)? {
- if(null != prefix && null != name)
- jjtn000.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtn000.setFullFunctionName(name.image);
- }
- (<LPAREN> Expression() (<COMMA> Expression())* try { (<RPAREN>) } catch (Exception e) {} )?/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void Literal() : {/*@bgen(jjtree) Literal */
- ASTLiteral jjtn000 = new ASTLiteral(JJTLITERAL);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Literal */
- try {
-/*@egen*/
- <TRUE> | <FALSE> | <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> | <STRING_LITERAL> | <NULL>/*@bgen(jjtree)*/
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt
deleted file mode 100644
index 9fd40d9242..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt
+++ /dev/null
@@ -1,281 +0,0 @@
-*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* I know that having some of these options on one line is rude but
- * if we don't do that the line number reported from javacc are off
- * which, trust me, is far more annoying. --tcarroll@bea.com
- */
-options {
- JAVA_UNICODE_ESCAPE = false;
- UNICODE_INPUT = true;
- STATIC = false;
- OPTIMIZE_TOKEN_MANAGER = true; MULTI = true; VISITOR = true; NODE_PACKAGE = "org.eclipse.jst.jsp.core.internal.java.jspel"; NODE_SCOPE_HOOK = true;
-}
-
-PARSER_BEGIN(JSPELParser)
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParser {
-
- void jjtreeOpenNodeScope(Node n)
- {
- ((SimpleNode)n).setFirstToken(getToken(1));
- }
-
- void jjtreeCloseNodeScope(Node n)
- {
- ((SimpleNode)n).setLastToken(getToken(0));
- }
-
- public static JSPELParser createParser(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- return new JSPELParser(reader);
- }
-
- public void ReInit(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- ReInit(reader);
- }
-
-}
-
-PARSER_END(JSPELParser)
-
-SKIP :
-{
- " "
-| "\t"
-| "\n"
-| "\r"
-}
-
-TOKEN :
-{
-/* Literals */
- < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* >
-|
- < FLOATING_POINT_LITERAL:
- (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)?
- | "." (["0"-"9"])+ (<EXPONENT>)?
- | (["0"-"9"])+ <EXPONENT>
- >
-|
- < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
-|
- < STRING_LITERAL:
- ("\"" ((~["\"","\\"]) | ("\\" ( ["\\","\""] )))* "\"") |
- ("\'" ((~["\'","\\"]) | ("\\" ( ["\\","\'"] )))* "\'")
- >
-|
- < BADLY_ESCAPED_STRING_LITERAL:
- ("\"" (~["\"","\\"])* ("\\" ( ~["\\","\""] ))) |
- ("\'" (~["\'","\\"])* ("\\" ( ~["\\","\'"] )))
- >
-
-/* Reserved Words and Symbols */
-| < TRUE: "true" >
-| < FALSE: "false" >
-| < NULL: "null" >
-| < DOT: "." >
-| < GT1: ">" >
-| < GT2: "gt" >
-| < LT1: "<" >
-| < LT2: "lt" >
-| < EQ1: "==" >
-| < EQ2: "eq" >
-| < LE1: "<=" >
-| < LE2: "le" >
-| < GE1: ">=" >
-| < GE2: "ge" >
-| < NEQ1: "!=" >
-| < NEQ2: "ne" >
-| < LPAREN: "(" >
-| < RPAREN: ")" >
-| < COMMA: "," >
-| < COLON: ":" >
-| < LBRACKET: "[" >
-| < RBRACKET: "]" >
-| < PLUS: "+" >
-| < MINUS: "-" >
-| < MULTIPLY: "*" >
-| < DIVIDE1: "/" >
-| < DIVIDE2: "div" >
-| < MODULUS1: "%" >
-| < MODULUS2: "mod" >
-| < NOT1: "not" >
-| < NOT2: "!" >
-| < AND1: "and" >
-| < AND2: "&&" >
-| < OR1: "or" >
-| < OR2: "||" >
-| < EMPTY: "empty" >
-| < COND: "?" >
-
-/* Identifiers */
-
-| < IDENTIFIER: (<LETTER>|<IMPL_OBJ_START>) (<LETTER>|<DIGIT>)* >
-| < #IMPL_OBJ_START: "#" >
-|
- < #LETTER:
- [
- "\u0024",
- "\u0041"-"\u005a",
- "\u005f",
- "\u0061"-"\u007a",
- "\u00c0"-"\u00d6",
- "\u00d8"-"\u00f6",
- "\u00f8"-"\u00ff",
- "\u0100"-"\u1fff",
- "\u3040"-"\u318f",
- "\u3300"-"\u337f",
- "\u3400"-"\u3d2d",
- "\u4e00"-"\u9fff",
- "\uf900"-"\ufaff"
- ]
- >
-|
- < #DIGIT:
- [
- "\u0030"-"\u0039",
- "\u0660"-"\u0669",
- "\u06f0"-"\u06f9",
- "\u0966"-"\u096f",
- "\u09e6"-"\u09ef",
- "\u0a66"-"\u0a6f",
- "\u0ae6"-"\u0aef",
- "\u0b66"-"\u0b6f",
- "\u0be7"-"\u0bef",
- "\u0c66"-"\u0c6f",
- "\u0ce6"-"\u0cef",
- "\u0d66"-"\u0d6f",
- "\u0e50"-"\u0e59",
- "\u0ed0"-"\u0ed9",
- "\u1040"-"\u1049"
- ]
- >
-}
-
-ASTExpression Expression() : {}
-{
- (LOOKAHEAD("?") ChoiceExpression() | OrExpression()) { return jjtThis; }
-}
-
-void OrExpression() #OrExpression(>1) :
-{
- Token t;
-}
-{
- AndExpression() ((t = <OR1> | t = <OR2>) { jjtThis.addOperatorToken(t); }
- AndExpression())*
-}
-
-void AndExpression() #AndExpression(>1) :
-{
- Token t;
-}
-{
- EqualityExpression() ((t = <AND1> | t = <AND2>) { jjtThis.addOperatorToken(t); }
- EqualityExpression())*
-}
-
-void EqualityExpression() #EqualityExpression(>1) :
-{
- Token t;
-}
-{
- RelationalExpression()
- ((t = <EQ1> | t = <EQ2> | t = <NEQ1> | t = <NEQ2>) { jjtThis.addOperatorToken(t); }
- RelationalExpression())*
-}
-
-void RelationalExpression() #RelationalExpression(>1) :
-{
- Token t;
-}
-{
- AddExpression()
- (
- (t = <LT1> | t = <LT2> | t = <GT1> | t = <GT2> | t = <GE1> | t = <GE2> | t = <LE1> | t = <LE2>) { jjtThis.addOperatorToken(t); }
- AddExpression()
- )*
-}
-
-void AddExpression() #AddExpression(>1) :
-{
- Token t;
-}
-{
- MultiplyExpression() ((t = <PLUS> | t = <MINUS>) { jjtThis.addOperatorToken(t); }
- MultiplyExpression())*
-}
-
-void MultiplyExpression() #MultiplyExpression(>1) :
-{
- Token t;
-}
-{
- UnaryExpression() (
- ( t = <MULTIPLY> | t = <DIVIDE1> | t = <DIVIDE2> | t = <MODULUS1> | t = <MODULUS2>) { jjtThis.addOperatorToken(t); }
- UnaryExpression()
- )*
-}
-
-void ChoiceExpression() : {}
-{
- OrExpression() <COND> OrExpression() <COLON> OrExpression()
-}
-
-void UnaryExpression() : {}
-{
- ((<NOT1> | <NOT2> | <MINUS> | <EMPTY>) UnaryExpression())
- | Value()
-
-}
-
-void Value() : {}
-{
- ValuePrefix() (ValueSuffix())*
-}
-
-void ValuePrefix() : {}
-{
- Literal() | (<LPAREN> Expression() <RPAREN>) | LOOKAHEAD(3) FunctionInvocation() | <IDENTIFIER>
-}
-
-void ValueSuffix() :
-{
- Token t = null;
-}
-{
- (<DOT> (t = <IDENTIFIER>)?) { jjtThis.setPropertyNameToken(t); }
- | (<LBRACKET> Expression() <RBRACKET>)
-}
-
-void FunctionInvocation() :
-{
- Token prefix = null, name = null;
-}
-{
- (prefix = <IDENTIFIER> <COLON>) { jjtThis.setFullFunctionName(prefix.image + ":"); }
- (name = <IDENTIFIER>)? {
- if(null != prefix && null != name)
- jjtThis.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtThis.setFullFunctionName(name.image);
- }
- (<LPAREN> Expression() (<COMMA> Expression())* try { (<RPAREN>) } catch (Exception e) {} )?
-}
-
-void Literal() : {}
-{
- <TRUE> | <FALSE> | <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> | <STRING_LITERAL> | <NULL>
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java
deleted file mode 100644
index 5c01bae7fd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java
+++ /dev/null
@@ -1,1158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParser.java */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParser/*@bgen(jjtree)*/implements JSPELParserTreeConstants, JSPELParserConstants {/*@bgen(jjtree)*/
- protected JJTJSPELParserState jjtree = new JJTJSPELParserState();
- void jjtreeOpenNodeScope(Node n)
- {
- ((SimpleNode)n).setFirstToken(getToken(1));
- }
-
- void jjtreeCloseNodeScope(Node n)
- {
- ((SimpleNode)n).setLastToken(getToken(0));
- }
-
- public static JSPELParser createParser(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- return new JSPELParser(reader);
- }
-
- public void ReInit(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- ReInit(reader);
- }
-
- final public ASTExpression Expression() throws ParseException {
- /*@bgen(jjtree) Expression */
- ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- if (jj_2_1(2147483647)) {
- ChoiceExpression();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case MINUS:
- case NOT1:
- case NOT2:
- case EMPTY:
- case IDENTIFIER:
- OrExpression();
- break;
- default:
- jj_la1[0] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- {if (true) return jjtn000;}
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- throw new Error("Missing return statement in function");
- }
-
- final public void OrExpression() throws ParseException {
- /*@bgen(jjtree) #OrExpression(> 1) */
- ASTOrExpression jjtn000 = new ASTOrExpression(JJTOREXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- AndExpression();
- label_1:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case OR1:
- case OR2:
-
- break;
- default:
- jj_la1[1] = jj_gen;
- break label_1;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case OR1:
- t = jj_consume_token(OR1);
- break;
- case OR2:
- t = jj_consume_token(OR2);
- break;
- default:
- jj_la1[2] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- AndExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void AndExpression() throws ParseException {
- /*@bgen(jjtree) #AndExpression(> 1) */
- ASTAndExpression jjtn000 = new ASTAndExpression(JJTANDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- EqualityExpression();
- label_2:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case AND1:
- case AND2:
-
- break;
- default:
- jj_la1[3] = jj_gen;
- break label_2;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case AND1:
- t = jj_consume_token(AND1);
- break;
- case AND2:
- t = jj_consume_token(AND2);
- break;
- default:
- jj_la1[4] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- EqualityExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void EqualityExpression() throws ParseException {
- /*@bgen(jjtree) #EqualityExpression(> 1) */
- ASTEqualityExpression jjtn000 = new ASTEqualityExpression(JJTEQUALITYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- RelationalExpression();
- label_3:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EQ1:
- case EQ2:
- case NEQ1:
- case NEQ2:
-
- break;
- default:
- jj_la1[5] = jj_gen;
- break label_3;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EQ1:
- t = jj_consume_token(EQ1);
- break;
- case EQ2:
- t = jj_consume_token(EQ2);
- break;
- case NEQ1:
- t = jj_consume_token(NEQ1);
- break;
- case NEQ2:
- t = jj_consume_token(NEQ2);
- break;
- default:
- jj_la1[6] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- RelationalExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void RelationalExpression() throws ParseException {
- /*@bgen(jjtree) #RelationalExpression(> 1) */
- ASTRelationalExpression jjtn000 = new ASTRelationalExpression(JJTRELATIONALEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- AddExpression();
- label_4:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case GT1:
- case GT2:
- case LT1:
- case LT2:
- case LE1:
- case LE2:
- case GE1:
- case GE2:
-
- break;
- default:
- jj_la1[7] = jj_gen;
- break label_4;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LT1:
- t = jj_consume_token(LT1);
- break;
- case LT2:
- t = jj_consume_token(LT2);
- break;
- case GT1:
- t = jj_consume_token(GT1);
- break;
- case GT2:
- t = jj_consume_token(GT2);
- break;
- case GE1:
- t = jj_consume_token(GE1);
- break;
- case GE2:
- t = jj_consume_token(GE2);
- break;
- case LE1:
- t = jj_consume_token(LE1);
- break;
- case LE2:
- t = jj_consume_token(LE2);
- break;
- default:
- jj_la1[8] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- AddExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void AddExpression() throws ParseException {
- /*@bgen(jjtree) #AddExpression(> 1) */
- ASTAddExpression jjtn000 = new ASTAddExpression(JJTADDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- MultiplyExpression();
- label_5:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PLUS:
- case MINUS:
-
- break;
- default:
- jj_la1[9] = jj_gen;
- break label_5;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PLUS:
- t = jj_consume_token(PLUS);
- break;
- case MINUS:
- t = jj_consume_token(MINUS);
- break;
- default:
- jj_la1[10] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- MultiplyExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void MultiplyExpression() throws ParseException {
- /*@bgen(jjtree) #MultiplyExpression(> 1) */
- ASTMultiplyExpression jjtn000 = new ASTMultiplyExpression(JJTMULTIPLYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- UnaryExpression();
- label_6:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case MULTIPLY:
- case DIVIDE1:
- case DIVIDE2:
- case MODULUS1:
- case MODULUS2:
-
- break;
- default:
- jj_la1[11] = jj_gen;
- break label_6;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case MULTIPLY:
- t = jj_consume_token(MULTIPLY);
- break;
- case DIVIDE1:
- t = jj_consume_token(DIVIDE1);
- break;
- case DIVIDE2:
- t = jj_consume_token(DIVIDE2);
- break;
- case MODULUS1:
- t = jj_consume_token(MODULUS1);
- break;
- case MODULUS2:
- t = jj_consume_token(MODULUS2);
- break;
- default:
- jj_la1[12] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- UnaryExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void ChoiceExpression() throws ParseException {
- /*@bgen(jjtree) ChoiceExpression */
- ASTChoiceExpression jjtn000 = new ASTChoiceExpression(JJTCHOICEEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- OrExpression();
- jj_consume_token(COND);
- OrExpression();
- jj_consume_token(COLON);
- OrExpression();
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void UnaryExpression() throws ParseException {
- /*@bgen(jjtree) UnaryExpression */
- ASTUnaryExpression jjtn000 = new ASTUnaryExpression(JJTUNARYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case MINUS:
- case NOT1:
- case NOT2:
- case EMPTY:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NOT1:
- jj_consume_token(NOT1);
- break;
- case NOT2:
- jj_consume_token(NOT2);
- break;
- case MINUS:
- jj_consume_token(MINUS);
- break;
- case EMPTY:
- jj_consume_token(EMPTY);
- break;
- default:
- jj_la1[13] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- UnaryExpression();
- break;
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case IDENTIFIER:
- Value();
- break;
- default:
- jj_la1[14] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void Value() throws ParseException {
- /*@bgen(jjtree) Value */
- ASTValue jjtn000 = new ASTValue(JJTVALUE);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- ValuePrefix();
- label_7:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOT:
- case LBRACKET:
-
- break;
- default:
- jj_la1[15] = jj_gen;
- break label_7;
- }
- ValueSuffix();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void ValuePrefix() throws ParseException {
- /*@bgen(jjtree) ValuePrefix */
- ASTValuePrefix jjtn000 = new ASTValuePrefix(JJTVALUEPREFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- Literal();
- break;
- case LPAREN:
- jj_consume_token(LPAREN);
- Expression();
- jj_consume_token(RPAREN);
- break;
- default:
- jj_la1[16] = jj_gen;
- if (jj_2_2(3)) {
- FunctionInvocation();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- jj_consume_token(IDENTIFIER);
- break;
- default:
- jj_la1[17] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void ValueSuffix() throws ParseException {
- /*@bgen(jjtree) ValueSuffix */
- ASTValueSuffix jjtn000 = new ASTValueSuffix(JJTVALUESUFFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t = null;
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOT:
- jj_consume_token(DOT);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- t = jj_consume_token(IDENTIFIER);
- break;
- default:
- jj_la1[18] = jj_gen;
-
- }
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- jjtn000.setPropertyNameToken(t);
- break;
- case LBRACKET:
- jj_consume_token(LBRACKET);
- Expression();
- jj_consume_token(RBRACKET);
- break;
- default:
- jj_la1[19] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void FunctionInvocation() throws ParseException {
- /*@bgen(jjtree) FunctionInvocation */
- ASTFunctionInvocation jjtn000 = new ASTFunctionInvocation(JJTFUNCTIONINVOCATION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token prefix = null, name = null;
- try {
- prefix = jj_consume_token(IDENTIFIER);
- jj_consume_token(COLON);
- jjtn000.setFullFunctionName(prefix.image + ":");
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- name = jj_consume_token(IDENTIFIER);
- break;
- default:
- jj_la1[20] = jj_gen;
-
- }
- if(null != prefix && null != name)
- jjtn000.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtn000.setFullFunctionName(name.image);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LPAREN:
- jj_consume_token(LPAREN);
- Expression();
- label_8:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
-
- break;
- default:
- jj_la1[21] = jj_gen;
- break label_8;
- }
- jj_consume_token(COMMA);
- Expression();
- }
- try {
- jj_consume_token(RPAREN);
- } catch (Exception e) {
-
- }
- break;
- default:
- jj_la1[22] = jj_gen;
-
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void Literal() throws ParseException {
- /*@bgen(jjtree) Literal */
- ASTLiteral jjtn000 = new ASTLiteral(JJTLITERAL);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- jj_consume_token(TRUE);
- break;
- case FALSE:
- jj_consume_token(FALSE);
- break;
- case INTEGER_LITERAL:
- jj_consume_token(INTEGER_LITERAL);
- break;
- case FLOATING_POINT_LITERAL:
- jj_consume_token(FLOATING_POINT_LITERAL);
- break;
- case STRING_LITERAL:
- jj_consume_token(STRING_LITERAL);
- break;
- case NULL:
- jj_consume_token(NULL);
- break;
- default:
- jj_la1[23] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final private boolean jj_2_1(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_1(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(0, xla); }
- }
-
- final private boolean jj_2_2(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_2(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(1, xla); }
- }
-
- final private boolean jj_3R_10() {
- if (jj_scan_token(LPAREN)) return true;
- return false;
- }
-
- final private boolean jj_3R_9() {
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_scan_token(COLON)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(47)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_10()) jj_scanpos = xsp;
- return false;
- }
-
- final private boolean jj_3_2() {
- if (jj_3R_9()) return true;
- return false;
- }
-
- final private boolean jj_3_1() {
- if (jj_scan_token(COND)) return true;
- return false;
- }
-
- public JSPELParserTokenManager token_source;
- SimpleCharStream jj_input_stream;
- public Token token, jj_nt;
- private int jj_ntk;
- private Token jj_scanpos, jj_lastpos;
- private int jj_la;
- public boolean lookingAhead = false;
-// private boolean jj_semLA;
- private int jj_gen;
- final private int[] jj_la1 = new int[24];
- static private int[] jj_la1_0;
- static private int[] jj_la1_1;
- static {
- jj_la1_0();
- jj_la1_1();
- }
- private static void jj_la1_0() {
- jj_la1_0 = new int[] {0x4001d60,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0xf3c000,0xf3c000,0x0,0x0,0x0,0x0,0x0,0x4001d60,0x40002000,0x4001d60,0x0,0x0,0x40002000,0x0,0x10000000,0x4000000,0x1d60,};
- }
- private static void jj_la1_1() {
- jj_la1_1 = new int[] {0xa182,0x1800,0x1800,0x600,0x600,0x0,0x0,0x0,0x0,0x3,0x3,0x7c,0x7c,0x2182,0xa182,0x0,0x0,0x8000,0x8000,0x0,0x8000,0x0,0x0,0x0,};
- }
- final private JJCalls[] jj_2_rtns = new JJCalls[2];
- private boolean jj_rescan = false;
- private int jj_gc = 0;
-
- public JSPELParser(java.io.InputStream stream) {
- jj_input_stream = new SimpleCharStream(stream, 1, 1);
- token_source = new JSPELParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public void ReInit(java.io.InputStream stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public JSPELParser(java.io.Reader stream) {
- jj_input_stream = new SimpleCharStream(stream, 1, 1);
- token_source = new JSPELParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public void ReInit(java.io.Reader stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public JSPELParser(JSPELParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public void ReInit(JSPELParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- final private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- if (++jj_gc > 100) {
- jj_gc = 0;
- for (int i = 0; i < jj_2_rtns.length; i++) {
- JJCalls c = jj_2_rtns[i];
- while (c != null) {
- if (c.gen < jj_gen) c.first = null;
- c = c.next;
- }
- }
- }
- return token;
- }
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
- }
-
- static private final class LookaheadSuccess extends java.lang.Error {
- private static final long serialVersionUID = 1L;
- }
- final private LookaheadSuccess jj_ls = new LookaheadSuccess();
- final private boolean jj_scan_token(int kind) {
- if (jj_scanpos == jj_lastpos) {
- jj_la--;
- if (jj_scanpos.next == null) {
- jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
- } else {
- jj_lastpos = jj_scanpos = jj_scanpos.next;
- }
- } else {
- jj_scanpos = jj_scanpos.next;
- }
- if (jj_rescan) {
- int i = 0; Token tok = token;
- while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
- if (tok != null) jj_add_error_token(kind, i);
- }
- if (jj_scanpos.kind != kind) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
- return false;
- }
-
- final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
- }
-
- final public Token getToken(int index) {
- Token t = lookingAhead ? jj_scanpos : token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
- }
-
- final private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
- }
-
- private java.util.Vector jj_expentries = new java.util.Vector();
- private int[] jj_expentry;
- private int jj_kind = -1;
- private int[] jj_lasttokens = new int[100];
- private int jj_endpos;
-
- private void jj_add_error_token(int kind, int pos) {
- if (pos >= 100) return;
- if (pos == jj_endpos + 1) {
- jj_lasttokens[jj_endpos++] = kind;
- } else if (jj_endpos != 0) {
- jj_expentry = new int[jj_endpos];
- for (int i = 0; i < jj_endpos; i++) {
- jj_expentry[i] = jj_lasttokens[i];
- }
- boolean exists = false;
- for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
- int[] oldentry = (int[])(e.nextElement());
- if (oldentry.length == jj_expentry.length) {
- exists = true;
- for (int i = 0; i < jj_expentry.length; i++) {
- if (oldentry[i] != jj_expentry[i]) {
- exists = false;
- break;
- }
- }
- if (exists) break;
- }
- }
- if (!exists) jj_expentries.addElement(jj_expentry);
- if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
- }
- }
-
- public ParseException generateParseException() {
- jj_expentries.removeAllElements();
- boolean[] la1tokens = new boolean[51];
- for (int i = 0; i < 51; i++) {
- la1tokens[i] = false;
- }
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 24; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1<<j)) != 0) {
- la1tokens[j] = true;
- }
- if ((jj_la1_1[i] & (1<<j)) != 0) {
- la1tokens[32+j] = true;
- }
- }
- }
- }
- for (int i = 0; i < 51; i++) {
- if (la1tokens[i]) {
- jj_expentry = new int[1];
- jj_expentry[0] = i;
- jj_expentries.addElement(jj_expentry);
- }
- }
- jj_endpos = 0;
- jj_rescan_token();
- jj_add_error_token(0, 0);
- int[][] exptokseq = new int[jj_expentries.size()][];
- for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = (int[])jj_expentries.elementAt(i);
- }
- return new ParseException(token, exptokseq, tokenImage);
- }
-
- final public void enable_tracing() {
- }
-
- final public void disable_tracing() {
- }
-
- final private void jj_rescan_token() {
- jj_rescan = true;
- for (int i = 0; i < 2; i++) {
- JJCalls p = jj_2_rtns[i];
- do {
- if (p.gen > jj_gen) {
- jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
- switch (i) {
- case 0: jj_3_1(); break;
- case 1: jj_3_2(); break;
- }
- }
- p = p.next;
- } while (p != null);
- }
- jj_rescan = false;
- }
-
- final private void jj_save(int index, int xla) {
- JJCalls p = jj_2_rtns[index];
- while (p.gen > jj_gen) {
- if (p.next == null) { p = p.next = new JJCalls(); break; }
- p = p.next;
- }
- p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
- }
-
- static final class JJCalls {
- int gen;
- Token first;
- int arg;
- JJCalls next;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java
deleted file mode 100644
index 1f4e3ad908..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParserConstants.java */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public interface JSPELParserConstants {
-
- int EOF = 0;
- int INTEGER_LITERAL = 5;
- int FLOATING_POINT_LITERAL = 6;
- int EXPONENT = 7;
- int STRING_LITERAL = 8;
- int BADLY_ESCAPED_STRING_LITERAL = 9;
- int TRUE = 10;
- int FALSE = 11;
- int NULL = 12;
- int DOT = 13;
- int GT1 = 14;
- int GT2 = 15;
- int LT1 = 16;
- int LT2 = 17;
- int EQ1 = 18;
- int EQ2 = 19;
- int LE1 = 20;
- int LE2 = 21;
- int GE1 = 22;
- int GE2 = 23;
- int NEQ1 = 24;
- int NEQ2 = 25;
- int LPAREN = 26;
- int RPAREN = 27;
- int COMMA = 28;
- int COLON = 29;
- int LBRACKET = 30;
- int RBRACKET = 31;
- int PLUS = 32;
- int MINUS = 33;
- int MULTIPLY = 34;
- int DIVIDE1 = 35;
- int DIVIDE2 = 36;
- int MODULUS1 = 37;
- int MODULUS2 = 38;
- int NOT1 = 39;
- int NOT2 = 40;
- int AND1 = 41;
- int AND2 = 42;
- int OR1 = 43;
- int OR2 = 44;
- int EMPTY = 45;
- int COND = 46;
- int IDENTIFIER = 47;
- int IMPL_OBJ_START = 48;
- int LETTER = 49;
- int DIGIT = 50;
-
- int DEFAULT = 0;
-
- String[] tokenImage = {
- "<EOF>",
- "\" \"",
- "\"\\t\"",
- "\"\\n\"",
- "\"\\r\"",
- "<INTEGER_LITERAL>",
- "<FLOATING_POINT_LITERAL>",
- "<EXPONENT>",
- "<STRING_LITERAL>",
- "<BADLY_ESCAPED_STRING_LITERAL>",
- "\"true\"",
- "\"false\"",
- "\"null\"",
- "\".\"",
- "\">\"",
- "\"gt\"",
- "\"<\"",
- "\"lt\"",
- "\"==\"",
- "\"eq\"",
- "\"<=\"",
- "\"le\"",
- "\">=\"",
- "\"ge\"",
- "\"!=\"",
- "\"ne\"",
- "\"(\"",
- "\")\"",
- "\",\"",
- "\":\"",
- "\"[\"",
- "\"]\"",
- "\"+\"",
- "\"-\"",
- "\"*\"",
- "\"/\"",
- "\"div\"",
- "\"%\"",
- "\"mod\"",
- "\"not\"",
- "\"!\"",
- "\"and\"",
- "\"&&\"",
- "\"or\"",
- "\"||\"",
- "\"empty\"",
- "\"?\"",
- "<IDENTIFIER>",
- "\"#\"",
- "<LETTER>",
- "<DIGIT>",
- };
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
deleted file mode 100644
index 50b04d0823..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
+++ /dev/null
@@ -1,855 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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
- *
- *******************************************************************************/
-/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParserTokenManager.java */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParserTokenManager implements JSPELParserConstants
-{
- public java.io.PrintStream debugStream = System.out;
- public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
- switch (pos)
- {
- case 0:
- if ((active0 & 0x2ad002aa9c00L) != 0L)
- {
- jjmatchedKind = 47;
- return 6;
- }
- if ((active0 & 0x2000L) != 0L)
- return 1;
- return -1;
- case 1:
- if ((active0 & 0x22d000001c00L) != 0L)
- {
- jjmatchedKind = 47;
- jjmatchedPos = 1;
- return 6;
- }
- if ((active0 & 0x80002aa8000L) != 0L)
- return 6;
- return -1;
- case 2:
- if ((active0 & 0x200000001c00L) != 0L)
- {
- jjmatchedKind = 47;
- jjmatchedPos = 2;
- return 6;
- }
- if ((active0 & 0x2d000000000L) != 0L)
- return 6;
- return -1;
- case 3:
- if ((active0 & 0x200000000800L) != 0L)
- {
- jjmatchedKind = 47;
- jjmatchedPos = 3;
- return 6;
- }
- if ((active0 & 0x1400L) != 0L)
- return 6;
- return -1;
- default :
- return -1;
- }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
- return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private final int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return pos + 1; }
- return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
-{
- switch(curChar)
- {
- case 33:
- jjmatchedKind = 40;
- return jjMoveStringLiteralDfa1_0(0x1000000L);
- case 37:
- return jjStopAtPos(0, 37);
- case 38:
- return jjMoveStringLiteralDfa1_0(0x40000000000L);
- case 40:
- return jjStopAtPos(0, 26);
- case 41:
- return jjStopAtPos(0, 27);
- case 42:
- return jjStopAtPos(0, 34);
- case 43:
- return jjStopAtPos(0, 32);
- case 44:
- return jjStopAtPos(0, 28);
- case 45:
- return jjStopAtPos(0, 33);
- case 46:
- return jjStartNfaWithStates_0(0, 13, 1);
- case 47:
- return jjStopAtPos(0, 35);
- case 58:
- return jjStopAtPos(0, 29);
- case 60:
- jjmatchedKind = 16;
- return jjMoveStringLiteralDfa1_0(0x100000L);
- case 61:
- return jjMoveStringLiteralDfa1_0(0x40000L);
- case 62:
- jjmatchedKind = 14;
- return jjMoveStringLiteralDfa1_0(0x400000L);
- case 63:
- return jjStopAtPos(0, 46);
- case 91:
- return jjStopAtPos(0, 30);
- case 93:
- return jjStopAtPos(0, 31);
- case 97:
- return jjMoveStringLiteralDfa1_0(0x20000000000L);
- case 100:
- return jjMoveStringLiteralDfa1_0(0x1000000000L);
- case 101:
- return jjMoveStringLiteralDfa1_0(0x200000080000L);
- case 102:
- return jjMoveStringLiteralDfa1_0(0x800L);
- case 103:
- return jjMoveStringLiteralDfa1_0(0x808000L);
- case 108:
- return jjMoveStringLiteralDfa1_0(0x220000L);
- case 109:
- return jjMoveStringLiteralDfa1_0(0x4000000000L);
- case 110:
- return jjMoveStringLiteralDfa1_0(0x8002001000L);
- case 111:
- return jjMoveStringLiteralDfa1_0(0x80000000000L);
- case 116:
- return jjMoveStringLiteralDfa1_0(0x400L);
- case 124:
- return jjMoveStringLiteralDfa1_0(0x100000000000L);
- default :
- return jjMoveNfa_0(0, 0);
- }
-}
-private final int jjMoveStringLiteralDfa1_0(long active0)
-{
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(0, active0);
- return 1;
- }
- switch(curChar)
- {
- case 38:
- if ((active0 & 0x40000000000L) != 0L)
- return jjStopAtPos(1, 42);
- break;
- case 61:
- if ((active0 & 0x40000L) != 0L)
- return jjStopAtPos(1, 18);
- else if ((active0 & 0x100000L) != 0L)
- return jjStopAtPos(1, 20);
- else if ((active0 & 0x400000L) != 0L)
- return jjStopAtPos(1, 22);
- else if ((active0 & 0x1000000L) != 0L)
- return jjStopAtPos(1, 24);
- break;
- case 97:
- return jjMoveStringLiteralDfa2_0(active0, 0x800L);
- case 101:
- if ((active0 & 0x200000L) != 0L)
- return jjStartNfaWithStates_0(1, 21, 6);
- else if ((active0 & 0x800000L) != 0L)
- return jjStartNfaWithStates_0(1, 23, 6);
- else if ((active0 & 0x2000000L) != 0L)
- return jjStartNfaWithStates_0(1, 25, 6);
- break;
- case 105:
- return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L);
- case 109:
- return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L);
- case 110:
- return jjMoveStringLiteralDfa2_0(active0, 0x20000000000L);
- case 111:
- return jjMoveStringLiteralDfa2_0(active0, 0xc000000000L);
- case 113:
- if ((active0 & 0x80000L) != 0L)
- return jjStartNfaWithStates_0(1, 19, 6);
- break;
- case 114:
- if ((active0 & 0x80000000000L) != 0L)
- return jjStartNfaWithStates_0(1, 43, 6);
- return jjMoveStringLiteralDfa2_0(active0, 0x400L);
- case 116:
- if ((active0 & 0x8000L) != 0L)
- return jjStartNfaWithStates_0(1, 15, 6);
- else if ((active0 & 0x20000L) != 0L)
- return jjStartNfaWithStates_0(1, 17, 6);
- break;
- case 117:
- return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
- case 124:
- if ((active0 & 0x100000000000L) != 0L)
- return jjStopAtPos(1, 44);
- break;
- default :
- break;
- }
- return jjStartNfa_0(0, active0);
-}
-private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(0, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(1, active0);
- return 2;
- }
- switch(curChar)
- {
- case 100:
- if ((active0 & 0x4000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 38, 6);
- else if ((active0 & 0x20000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 41, 6);
- break;
- case 108:
- return jjMoveStringLiteralDfa3_0(active0, 0x1800L);
- case 112:
- return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L);
- case 116:
- if ((active0 & 0x8000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 39, 6);
- break;
- case 117:
- return jjMoveStringLiteralDfa3_0(active0, 0x400L);
- case 118:
- if ((active0 & 0x1000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 36, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_0(1, active0);
-}
-private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(1, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(2, active0);
- return 3;
- }
- switch(curChar)
- {
- case 101:
- if ((active0 & 0x400L) != 0L)
- return jjStartNfaWithStates_0(3, 10, 6);
- break;
- case 108:
- if ((active0 & 0x1000L) != 0L)
- return jjStartNfaWithStates_0(3, 12, 6);
- break;
- case 115:
- return jjMoveStringLiteralDfa4_0(active0, 0x800L);
- case 116:
- return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L);
- default :
- break;
- }
- return jjStartNfa_0(2, active0);
-}
-private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(2, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(3, active0);
- return 4;
- }
- switch(curChar)
- {
- case 101:
- if ((active0 & 0x800L) != 0L)
- return jjStartNfaWithStates_0(4, 11, 6);
- break;
- case 121:
- if ((active0 & 0x200000000000L) != 0L)
- return jjStartNfaWithStates_0(4, 45, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_0(3, active0);
-}
-private final void jjCheckNAdd(int state)
-{
- if (jjrounds[state] != jjround)
- {
- jjstateSet[jjnewStateCnt++] = state;
- jjrounds[state] = jjround;
- }
-}
-private final void jjAddStates(int start, int end)
-{
- do {
- jjstateSet[jjnewStateCnt++] = jjnextStates[start];
- } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
- jjCheckNAdd(state1);
- jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
- do {
- jjCheckNAdd(jjnextStates[start]);
- } while (start++ != end);
-}
-//private final void jjCheckNAddStates(int start)
-//{
-// jjCheckNAdd(jjnextStates[start]);
-// jjCheckNAdd(jjnextStates[start + 1]);
-//}
-static final long[] jjbitVec0 = {
- 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L
-};
-static final long[] jjbitVec2 = {
- 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
-};
-static final long[] jjbitVec3 = {
- 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-static final long[] jjbitVec4 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L
-};
-static final long[] jjbitVec5 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L
-};
-static final long[] jjbitVec6 = {
- 0x3fffffffffffL, 0x0L, 0x0L, 0x0L
-};
-static final long[] jjbitVec7 = {
- 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-static final long[] jjbitVec8 = {
- 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-private final int jjMoveNfa_0(int startState, int curPos)
-{
- int startsAt = 0;
- jjnewStateCnt = 35;
- int i = 1;
- jjstateSet[0] = startState;
- int kind = 0x7fffffff;
- for (;;)
- {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64)
- {
- long l = 1L << curChar;
- // MatchLoop:
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- if ((0x3ff000000000000L & l) != 0L)
- {
- if (kind > 5)
- kind = 5;
- jjCheckNAddStates(0, 4);
- }
- else if ((0x1800000000L & l) != 0L)
- {
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- }
- else if (curChar == 39)
- jjCheckNAddStates(5, 9);
- else if (curChar == 34)
- jjCheckNAddStates(10, 14);
- else if (curChar == 46)
- jjCheckNAdd(1);
- break;
- case 1:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAddTwoStates(1, 2);
- break;
- case 3:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(4);
- break;
- case 4:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAdd(4);
- break;
- case 5:
- if ((0x1800000000L & l) == 0L)
- break;
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- break;
- case 6:
- if ((0x3ff001000000000L & l) == 0L)
- break;
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- break;
- case 7:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 5)
- kind = 5;
- jjCheckNAddStates(0, 4);
- break;
- case 8:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 5)
- kind = 5;
- jjCheckNAdd(8);
- break;
- case 9:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(9, 10);
- break;
- case 10:
- if (curChar != 46)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAddTwoStates(11, 12);
- break;
- case 11:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAddTwoStates(11, 12);
- break;
- case 13:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(14);
- break;
- case 14:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAdd(14);
- break;
- case 15:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(15, 16);
- break;
- case 17:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(18);
- break;
- case 18:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAdd(18);
- break;
- case 19:
- if (curChar == 34)
- jjCheckNAddStates(10, 14);
- break;
- case 20:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddStates(15, 17);
- break;
- case 22:
- if (curChar == 34)
- jjCheckNAddStates(15, 17);
- break;
- case 23:
- if (curChar == 34 && kind > 8)
- kind = 8;
- break;
- case 24:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddTwoStates(24, 25);
- break;
- case 26:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 9)
- kind = 9;
- break;
- case 27:
- if (curChar == 39)
- jjCheckNAddStates(5, 9);
- break;
- case 28:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(18, 20);
- break;
- case 30:
- if (curChar == 39)
- jjCheckNAddStates(18, 20);
- break;
- case 31:
- if (curChar == 39 && kind > 8)
- kind = 8;
- break;
- case 32:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddTwoStates(32, 33);
- break;
- case 34:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 9)
- kind = 9;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- //MatchLoop:
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- case 6:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- break;
- case 2:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(21, 22);
- break;
- case 12:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(23, 24);
- break;
- case 16:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(25, 26);
- break;
- case 20:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(15, 17);
- break;
- case 21:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 22;
- break;
- case 22:
- if (curChar == 92)
- jjCheckNAddStates(15, 17);
- break;
- case 24:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(27, 28);
- break;
- case 25:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 26;
- break;
- case 26:
- case 34:
- if ((0xffffffffefffffffL & l) != 0L && kind > 9)
- kind = 9;
- break;
- case 28:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(18, 20);
- break;
- case 29:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 30;
- break;
- case 30:
- if (curChar == 92)
- jjCheckNAddStates(18, 20);
- break;
- case 32:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(29, 30);
- break;
- case 33:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 34;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int hiByte = curChar >> 8;
- int i1 = hiByte >> 6;
- long l1 = 1L << (hiByte & 077);
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- //MatchLoop:
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- case 6:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- break;
- case 20:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjAddStates(15, 17);
- break;
- case 24:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjAddStates(27, 28);
- break;
- case 26:
- case 34:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 9)
- kind = 9;
- break;
- case 28:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjAddStates(18, 20);
- break;
- case 32:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjAddStates(29, 30);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
-static final int[] jjnextStates = {
- 8, 9, 10, 15, 16, 28, 29, 31, 32, 33, 20, 21, 23, 24, 25, 20,
- 21, 23, 28, 29, 31, 3, 4, 13, 14, 17, 18, 24, 25, 32, 33,
-};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec2[i2] & l2) != 0L);
- case 48:
- return ((jjbitVec3[i2] & l2) != 0L);
- case 49:
- return ((jjbitVec4[i2] & l2) != 0L);
- case 51:
- return ((jjbitVec5[i2] & l2) != 0L);
- case 61:
- return ((jjbitVec6[i2] & l2) != 0L);
- default :
- if ((jjbitVec0[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec8[i2] & l2) != 0L);
- default :
- if ((jjbitVec7[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-public static final String[] jjstrLiteralImages = {
-"", null, null, null, null, null, null, null, null, null, "\164\162\165\145",
-"\146\141\154\163\145", "\156\165\154\154", "\56", "\76", "\147\164", "\74", "\154\164", "\75\75",
-"\145\161", "\74\75", "\154\145", "\76\75", "\147\145", "\41\75", "\156\145", "\50",
-"\51", "\54", "\72", "\133", "\135", "\53", "\55", "\52", "\57", "\144\151\166",
-"\45", "\155\157\144", "\156\157\164", "\41", "\141\156\144", "\46\46", "\157\162",
-"\174\174", "\145\155\160\164\171", "\77", null, null, null, null, };
-public static final String[] lexStateNames = {
- "DEFAULT",
-};
-static final long[] jjtoToken = {
- 0xffffffffff61L,
-};
-static final long[] jjtoSkip = {
- 0x1eL,
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[35];
-private final int[] jjstateSet = new int[70];
-protected char curChar;
-public JSPELParserTokenManager(SimpleCharStream stream)
-{
- if (SimpleCharStream.staticFlag)
- throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
- input_stream = stream;
-}
-public JSPELParserTokenManager(SimpleCharStream stream, int lexState)
-{
- this(stream);
- SwitchTo(lexState);
-}
-public void ReInit(SimpleCharStream stream)
-{
- jjmatchedPos = jjnewStateCnt = 0;
- curLexState = defaultLexState;
- input_stream = stream;
- ReInitRounds();
-}
-private final void ReInitRounds()
-{
- int i;
- jjround = 0x80000001;
- for (i = 35; i-- > 0;)
- jjrounds[i] = 0x80000000;
-}
-public void ReInit(SimpleCharStream stream, int lexState)
-{
- ReInit(stream);
- SwitchTo(lexState);
-}
-public void SwitchTo(int lexState)
-{
- if (lexState >= 1 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
- Token t = Token.newToken(jjmatchedKind);
- t.kind = jjmatchedKind;
- String im = jjstrLiteralImages[jjmatchedKind];
- t.image = (im == null) ? input_stream.GetImage() : im;
- t.beginLine = input_stream.getBeginLine();
- t.beginColumn = input_stream.getBeginColumn();
- t.endLine = input_stream.getEndLine();
- t.endColumn = input_stream.getEndColumn();
- return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-public Token getNextToken()
-{
- Token matchedToken;
- int curPos = 0;
-
- EOFLoop :
- for (;;)
- {
- try
- {
- curChar = input_stream.BeginToken();
- }
- catch(java.io.IOException e)
- {
- jjmatchedKind = 0;
- matchedToken = jjFillToken();
- return matchedToken;
- }
-
- try { input_stream.backup(0);
- while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
- curChar = input_stream.BeginToken();
- }
- catch (java.io.IOException e1) { continue EOFLoop; }
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_0();
- if (jjmatchedKind != 0x7fffffff)
- {
- if (jjmatchedPos + 1 < curPos)
- input_stream.backup(curPos - jjmatchedPos - 1);
- if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
- {
- matchedToken = jjFillToken();
- return matchedToken;
- }
- else
- {
- continue EOFLoop;
- }
- }
- int error_line = input_stream.getEndLine();
- int error_column = input_stream.getEndColumn();
- String error_after = null;
- boolean EOFSeen = false;
- try { input_stream.readChar(); input_stream.backup(1); }
- catch (java.io.IOException e1) {
- EOFSeen = true;
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- if (curChar == '\n' || curChar == '\r') {
- error_line++;
- error_column = 0;
- }
- else
- error_column++;
- }
- if (!EOFSeen) {
- input_stream.backup(1);
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- }
- throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
- }
-}
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java
deleted file mode 100644
index 55a6e47482..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. JSPELParserTreeConstants.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public interface JSPELParserTreeConstants
-{
- public int JJTEXPRESSION = 0;
- public int JJTOREXPRESSION = 1;
- public int JJTANDEXPRESSION = 2;
- public int JJTEQUALITYEXPRESSION = 3;
- public int JJTRELATIONALEXPRESSION = 4;
- public int JJTADDEXPRESSION = 5;
- public int JJTMULTIPLYEXPRESSION = 6;
- public int JJTCHOICEEXPRESSION = 7;
- public int JJTUNARYEXPRESSION = 8;
- public int JJTVALUE = 9;
- public int JJTVALUEPREFIX = 10;
- public int JJTVALUESUFFIX = 11;
- public int JJTFUNCTIONINVOCATION = 12;
- public int JJTLITERAL = 13;
-
-
- public String[] jjtNodeName = {
- "Expression",
- "OrExpression",
- "AndExpression",
- "EqualityExpression",
- "RelationalExpression",
- "AddExpression",
- "MultiplyExpression",
- "ChoiceExpression",
- "UnaryExpression",
- "Value",
- "ValuePrefix",
- "ValueSuffix",
- "FunctionInvocation",
- "Literal",
- };
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java
deleted file mode 100644
index ffcf4941b8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. JSPELParserVisitor.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public interface JSPELParserVisitor
-{
- public Object visit(SimpleNode node, Object data);
- public Object visit(ASTExpression node, Object data);
- public Object visit(ASTOrExpression node, Object data);
- public Object visit(ASTAndExpression node, Object data);
- public Object visit(ASTEqualityExpression node, Object data);
- public Object visit(ASTRelationalExpression node, Object data);
- public Object visit(ASTAddExpression node, Object data);
- public Object visit(ASTMultiplyExpression node, Object data);
- public Object visit(ASTChoiceExpression node, Object data);
- public Object visit(ASTUnaryExpression node, Object data);
- public Object visit(ASTValue node, Object data);
- public Object visit(ASTValuePrefix node, Object data);
- public Object visit(ASTValueSuffix node, Object data);
- public Object visit(ASTFunctionInvocation node, Object data);
- public Object visit(ASTLiteral node, Object data);
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java
deleted file mode 100644
index 745f9e6fd5..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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.internal.java.jspel;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.jspel.ELProblem;
-import org.eclipse.jst.jsp.core.jspel.IJSPELTranslator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-
-public class JSPELTranslator implements IJSPELTranslator {
- /**
- * JSP Expression Language Parser.
- */
- private JSPELParser elParser = null;
-
- public List translateEL(String elText, String delim,
- IStructuredDocumentRegion currentNode, int contentStart,
- int contentLength, StringBuffer fUserELExpressions,
- HashMap fUserELRanges, IStructuredDocument document) {
-
- ArrayList elProblems = new ArrayList();
-
- try {
- synchronized(this) {
- if(null == elParser) {
- elParser = JSPELParser.createParser(elText);
- } else {
- elParser.ReInit(elText);
- }
-
- ASTExpression expression = elParser.Expression();
- ELGenerator gen = new ELGenerator();
- gen.generate(expression, currentNode, fUserELExpressions, fUserELRanges, document, currentNode, contentStart, contentLength);
- }
- } catch (ParseException e) {
- Token curTok = e.currentToken;
- int problemStartOffset;
- int problemEndOffset;
- Position pos = null;
- problemStartOffset = contentStart + curTok.beginColumn;
- problemEndOffset = contentStart + curTok.endColumn;
-
- pos = new Position(problemStartOffset, problemEndOffset - problemStartOffset + 1);
- elProblems.add(new ELProblem(pos, e.getLocalizedMessage()));
- } catch (TokenMgrError te) {
- Position pos = new Position(contentStart, contentLength);
- elProblems.add(new ELProblem(pos, JSPCoreMessages.JSPEL_Token));
- }
- return elProblems;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java
deleted file mode 100644
index b8a186e4c4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. Node.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/* All AST nodes must implement this interface. It provides basic
- machinery for constructing the parent and child relationships
- between nodes. */
-
-public interface Node {
-
- /** This method is called after the node has been made the current
- node. It indicates that child nodes can now be added to it. */
- public void jjtOpen();
-
- /** This method is called after all the child nodes have been
- added. */
- public void jjtClose();
-
- /** This pair of methods are used to inform the node of its
- parent. */
- public void jjtSetParent(Node n);
- public Node jjtGetParent();
-
- /** This method tells the node to add its argument to the node's
- list of children. */
- public void jjtAddChild(Node n, int i);
-
- /** This method returns a child node. The children are numbered
- from zero, left to right. */
- public Node jjtGetChild(int i);
-
- /** Return the number of children the node has. */
- public int jjtGetNumChildren();
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data);
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java
deleted file mode 100644
index ecd5087075..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
- /**
- * Default <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
-
-/**
- * This constructor is used by the method "generateParseException"
- * in the generated parser. Calling this constructor generates
- * a new object of this type with the fields "currentToken",
- * "expectedTokenSequences", and "tokenImage" set. The boolean
- * flag "specialConstructor" is also set to true to indicate that
- * this constructor was used to create this object.
- * This constructor calls its super class with the empty string
- * to force the "toString" method of parent class "Throwable" to
- * print the error message in the form:
- * ParseException: <result of getMessage>
- */
- public ParseException(Token currentTokenVal,
- int[][] expectedTokenSequencesVal,
- String[] tokenImageVal
- )
- {
- super("");
- specialConstructor = true;
- currentToken = currentTokenVal;
- expectedTokenSequences = expectedTokenSequencesVal;
- tokenImage = tokenImageVal;
- }
-
- /**
- * The following constructors are for use by you for whatever
- * purpose you can think of. Constructing the exception in this
- * manner makes the exception behave in the normal way - i.e., as
- * documented in the class "Throwable". The fields "errorToken",
- * "expectedTokenSequences", and "tokenImage" do not contain
- * relevant information. The JavaCC generated code does not use
- * these constructors.
- */
-
- public ParseException() {
- super();
- specialConstructor = false;
- }
-
- public ParseException(String message) {
- super(message);
- specialConstructor = false;
- }
-
- /**
- * This variable determines which constructor was used to create
- * this object and thereby affects the semantics of the
- * "getMessage" method (see below).
- */
- protected boolean specialConstructor;
-
- /**
- * This is the last token that has been consumed successfully. If
- * this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
- */
- public Token currentToken;
-
- /**
- * Each entry in this array is an array of integers. Each array
- * of integers represents a sequence of tokens (by their ordinal
- * values) that is expected at this point of the parse.
- */
- public int[][] expectedTokenSequences;
-
- /**
- * This is a reference to the "tokenImage" array of the generated
- * parser within which the parse error occurred. This array is
- * defined in the generated ...Constants interface.
- */
- public String[] tokenImage;
-
- /**
- * This method has the standard behavior when this object has been
- * created using the standard constructors. Otherwise, it uses
- * "currentToken" and "expectedTokenSequences" to generate a parse
- * error message and returns it. If this object has been created
- * due to a parse error, and you do not catch it (it gets thrown
- * from the parser), then this method is called during the printing
- * of the final stack trace, and hence the correct error message
- * gets displayed.
- */
- public String getMessage() {
- if (!specialConstructor) {
- return super.getMessage();
- }
- String expected = "";
- int maxSize = 0;
- for (int i = 0; i < expectedTokenSequences.length; i++) {
- if (maxSize < expectedTokenSequences[i].length) {
- maxSize = expectedTokenSequences[i].length;
- }
- for (int j = 0; j < expectedTokenSequences[i].length; j++) {
- expected += tokenImage[expectedTokenSequences[i][j]] + " ";
- }
- if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected += "...";
- }
- expected += eol + " ";
- }
- String retval = "Encountered \"";
- Token tok = currentToken.next;
- for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += " ";
- if (tok.kind == 0) {
- retval += tokenImage[0];
- break;
- }
- retval += add_escapes(tok.image);
- tok = tok.next;
- }
- retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
- retval += "." + eol;
- if (expectedTokenSequences.length == 1) {
- retval += "Was expecting:" + eol + " ";
- } else {
- retval += "Was expecting one of:" + eol + " ";
- }
- retval += expected;
- return retval;
- }
-
- /**
- * The end of line string for this machine.
- */
- protected String eol = System.getProperty("line.separator", "\n");
-
- /**
- * Used to convert raw characters to their escaped version
- * when these raw version cannot be used as part of an ASCII
- * string literal.
- */
- protected String add_escapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
- }
- return retval.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java
deleted file mode 100644
index 8021b4b992..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 3.0 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
- */
-
-public class SimpleCharStream
-{
- public static final boolean staticFlag = false;
- int bufsize;
- int available;
- int tokenBegin;
- public int bufpos = -1;
- protected int bufline[];
- protected int bufcolumn[];
-
- protected int column = 0;
- protected int line = 1;
-
- protected boolean prevCharIsCR = false;
- protected boolean prevCharIsLF = false;
-
- protected java.io.Reader inputStream;
-
- protected char[] buffer;
- protected int maxNextCharInd = 0;
- protected int inBuf = 0;
-
- protected void ExpandBuff(boolean wrapAround)
- {
- char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
-
- try
- {
- if (wrapAround)
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- System.arraycopy(buffer, 0, newbuffer,
- bufsize - tokenBegin, bufpos);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
- bufcolumn = newbufcolumn;
-
- maxNextCharInd = (bufpos += (bufsize - tokenBegin));
- }
- else
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- bufcolumn = newbufcolumn;
-
- maxNextCharInd = (bufpos -= tokenBegin);
- }
- }
- catch (Throwable t)
- {
- throw new Error(t.getMessage());
- }
-
-
- bufsize += 2048;
- available = bufsize;
- tokenBegin = 0;
- }
-
- protected void FillBuff() throws java.io.IOException
- {
- if (maxNextCharInd == available)
- {
- if (available == bufsize)
- {
- if (tokenBegin > 2048)
- {
- bufpos = maxNextCharInd = 0;
- available = tokenBegin;
- }
- else if (tokenBegin < 0)
- bufpos = maxNextCharInd = 0;
- else
- ExpandBuff(false);
- }
- else if (available > tokenBegin)
- available = bufsize;
- else if ((tokenBegin - available) < 2048)
- ExpandBuff(true);
- else
- available = tokenBegin;
- }
-
- int i;
- try {
- if ((i = inputStream.read(buffer, maxNextCharInd,
- available - maxNextCharInd)) == -1)
- {
- inputStream.close();
- throw new java.io.IOException();
- }
- else
- maxNextCharInd += i;
- return;
- }
- catch(java.io.IOException e) {
- --bufpos;
- backup(0);
- if (tokenBegin == -1)
- tokenBegin = bufpos;
- throw e;
- }
- }
-
- public char BeginToken() throws java.io.IOException
- {
- tokenBegin = -1;
- char c = readChar();
- tokenBegin = bufpos;
-
- return c;
- }
-
- protected void UpdateLineColumn(char c)
- {
- column++;
-
- if (prevCharIsLF)
- {
- prevCharIsLF = false;
- line += (column = 1);
- }
- else if (prevCharIsCR)
- {
- prevCharIsCR = false;
- if (c == '\n')
- {
- prevCharIsLF = true;
- }
- else
- line += (column = 1);
- }
-
- switch (c)
- {
- case '\r' :
- prevCharIsCR = true;
- break;
- case '\n' :
- prevCharIsLF = true;
- break;
- case '\t' :
- column--;
- column += (8 - (column & 07));
- break;
- default :
- break;
- }
-
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
-
- public char readChar() throws java.io.IOException
- {
- if (inBuf > 0)
- {
- --inBuf;
-
- if (++bufpos == bufsize)
- bufpos = 0;
-
- return buffer[bufpos];
- }
-
- if (++bufpos >= maxNextCharInd)
- FillBuff();
-
- char c = buffer[bufpos];
-
- UpdateLineColumn(c);
- return (c);
- }
-
- /**
- * @deprecated
- * @see #getEndColumn
- */
-
- public int getColumn() {
- return bufcolumn[bufpos];
- }
-
- /**
- * @deprecated
- * @see #getEndLine
- */
-
- public int getLine() {
- return bufline[bufpos];
- }
-
- public int getEndColumn() {
- return bufcolumn[bufpos];
- }
-
- public int getEndLine() {
- return bufline[bufpos];
- }
-
- public int getBeginColumn() {
- return bufcolumn[tokenBegin];
- }
-
- public int getBeginLine() {
- return bufline[tokenBegin];
- }
-
- public void backup(int amount) {
-
- inBuf += amount;
- if ((bufpos -= amount) < 0)
- bufpos += bufsize;
- }
-
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- }
-
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.Reader dstream)
- {
- this(dstream, 1, 1, 4096);
- }
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- if (buffer == null || buffersize != buffer.length)
- {
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- }
- prevCharIsLF = prevCharIsCR = false;
- tokenBegin = inBuf = maxNextCharInd = 0;
- bufpos = -1;
- }
-
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
-
- public void ReInit(java.io.Reader dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.InputStream dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
- }
-
- public void ReInit(java.io.InputStream dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
- public String GetImage()
- {
- if (bufpos >= tokenBegin)
- return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- else
- return new String(buffer, tokenBegin, bufsize - tokenBegin) +
- new String(buffer, 0, bufpos + 1);
- }
-
- public char[] GetSuffix(int len)
- {
- char[] ret = new char[len];
-
- if ((bufpos + 1) >= len)
- System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- else
- {
- System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
- len - bufpos - 1);
- System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
- }
-
- return ret;
- }
-
- public void Done()
- {
- buffer = null;
- bufline = null;
- bufcolumn = null;
- }
-
- /**
- * Method to adjust line and column numbers for the start of a token.
- */
- public void adjustBeginLineColumn(int newLine, int newCol)
- {
- int start = tokenBegin;
- int len;
-
- if (bufpos >= tokenBegin)
- {
- len = bufpos - tokenBegin + inBuf + 1;
- }
- else
- {
- len = bufsize - tokenBegin + bufpos + 1 + inBuf;
- }
-
- int i = 0, j = 0, k = 0;
- int nextColDiff = 0, columnDiff = 0;
-
- while (i < len &&
- bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
- {
- bufline[j] = newLine;
- nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
- bufcolumn[j] = newCol + columnDiff;
- columnDiff = nextColDiff;
- i++;
- }
-
- if (i < len)
- {
- bufline[j] = newLine++;
- bufcolumn[j] = newCol + columnDiff;
-
- while (i++ < len)
- {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize])
- bufline[j] = newLine++;
- else
- bufline[j] = newLine;
- }
- }
-
- line = bufline[j];
- column = bufcolumn[j];
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java
deleted file mode 100644
index aac473f95a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class SimpleNode implements Node {
- protected Node parent;
- protected Node[] children;
- protected int id;
- protected JSPELParser parser;
- protected Token firstToken;
- protected Token lastToken;
-
- public SimpleNode(int i) {
- id = i;
- }
-
- public SimpleNode(JSPELParser p, int i) {
- this(i);
- parser = p;
- }
-
- public void jjtOpen() {
- }
-
- public void jjtClose() {
- }
-
- public void jjtSetParent(Node n) { parent = n; }
- public Node jjtGetParent() { return parent; }
-
- public void jjtAddChild(Node n, int i) {
- if (children == null) {
- children = new Node[i + 1];
- } else if (i >= children.length) {
- Node c[] = new Node[i + 1];
- System.arraycopy(children, 0, c, 0, children.length);
- children = c;
- }
- children[i] = n;
- }
-
- public Node jjtGetChild(int i) {
- return children[i];
- }
-
- public int jjtGetNumChildren() {
- return (children == null) ? 0 : children.length;
- }
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-
- /** Accept the visitor. **/
- public Object childrenAccept(JSPELParserVisitor visitor, Object data) {
- if (children != null) {
- for (int i = 0; i < children.length; ++i) {
- children[i].jjtAccept(visitor, data);
- }
- }
- return data;
- }
-
- /* You can override these two methods in subclasses of SimpleNode to
- customize the way the node appears when the tree is dumped. If
- your output uses more than one line you should override
- toString(String), otherwise overriding toString() is probably all
- you need to do. */
-
- public String toString() { return JSPELParserTreeConstants.jjtNodeName[id]; }
- public String toString(String prefix) { return prefix + toString(); }
-
- /* Override this method if you want to customize how the node dumps
- out its children. */
-
- public void dump(String prefix) {
- System.out.println(toString(prefix));
- if (children != null) {
- for (int i = 0; i < children.length; ++i) {
- SimpleNode n = (SimpleNode)children[i];
- if (n != null) {
- n.dump(prefix + " ");
- }
- }
- }
- }
-
- public Token getFirstToken() {
- return firstToken;
- }
-
- public void setFirstToken(Token firstToken) {
- this.firstToken = firstToken;
- }
-
- public Token getLastToken() {
- return lastToken;
- }
-
- public void setLastToken(Token lastToken) {
- this.lastToken = lastToken;
- }
-}
-
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java
deleted file mode 100644
index 7159820f62..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token {
-
- /**
- * An integer that describes the kind of this token. This numbering
- * system is determined by JavaCCParser, and a table of these numbers is
- * stored in the file ...Constants.java.
- */
- public int kind;
-
- /**
- * beginLine and beginColumn describe the position of the first character
- * of this token; endLine and endColumn describe the position of the
- * last character of this token.
- */
- public int beginLine, beginColumn, endLine, endColumn;
-
- /**
- * The string image of the token.
- */
- public String image;
-
- /**
- * A reference to the next regular (non-special) token from the input
- * stream. If this is the last token from the input stream, or if the
- * token manager has not read tokens beyond this one, this field is
- * set to null. This is true only if this token is also a regular
- * token. Otherwise, see below for a description of the contents of
- * this field.
- */
- public Token next;
-
- /**
- * This field is used to access special tokens that occur prior to this
- * token, but after the immediately preceding regular (non-special) token.
- * If there are no such special tokens, this field is set to null.
- * When there are more than one such special token, this field refers
- * to the last of these special tokens, which in turn refers to the next
- * previous special token through its specialToken field, and so on
- * until the first special token (whose specialToken field is null).
- * The next fields of special tokens refer to other special tokens that
- * immediately follow it (without an intervening regular token). If there
- * is no such token, this field is null.
- */
- public Token specialToken;
-
- /**
- * Returns the image.
- */
- public String toString()
- {
- return image;
- }
-
- /**
- * Returns a new Token object, by default. However, if you want, you
- * can create and return subclass objects based on the value of ofKind.
- * Simply add the cases to the switch for all those special cases.
- * For example, if you have a subclass of Token called IDToken that
- * you want to create if ofKind is ID, simlpy add something like :
- *
- * case MyParserConstants.ID : return new IDToken();
- *
- * to the following switch statement. Then you can cast matchedToken
- * variable to the appropriate type and use it in your lexical actions.
- */
- public static final Token newToken(int ofKind)
- {
- switch(ofKind)
- {
- default : return new Token();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java
deleted file mode 100644
index 1a53dc2638..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class TokenMgrError extends Error
-{
- /*
- * Ordinals for various reasons why an Error of this type can be thrown.
- */
-
- /**
- * Default <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
-
-/**
- * Lexical error occured.
- */
- static final int LEXICAL_ERROR = 0;
-
- /**
- * An attempt wass made to create a second instance of a static token manager.
- */
- static final int STATIC_LEXER_ERROR = 1;
-
- /**
- * Tried to change to an invalid lexical state.
- */
- static final int INVALID_LEXICAL_STATE = 2;
-
- /**
- * Detected (and bailed out of) an infinite loop in the token manager.
- */
- static final int LOOP_DETECTED = 3;
-
- /**
- * Indicates the reason why the exception is thrown. It will have
- * one of the above 4 values.
- */
- int errorCode;
-
- /**
- * Replaces unprintable characters by their espaced (or unicode escaped)
- * equivalents in the given string
- */
- protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
- }
- return retval.toString();
- }
-
- /**
- * Returns a detailed message for the Error when it is thrown by the
- * token manager to indicate a lexical error.
- * Parameters :
- * EOFSeen : indicates if EOF caused the lexicl error
- * curLexState : lexical state in which this error occured
- * errorLine : line number when the error occured
- * errorColumn : column number when the error occured
- * errorAfter : prefix that was seen before this error occured
- * curchar : the offending character
- * Note: You can customize the lexical error message by modifying this method.
- */
- protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
- return("Lexical error at line " +
- errorLine + ", column " +
- errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
- "after : \"" + addEscapes(errorAfter) + "\"");
- }
-
- /**
- * You can also modify the body of this method to customize your error messages.
- * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
- * of end-users concern, so you can return something like :
- *
- * "Internal Error : Please file a bug report .... "
- *
- * from this method for such cases in the release version of your parser.
- */
- public String getMessage() {
- return super.getMessage();
- }
-
- /*
- * Constructors of various flavors follow.
- */
-
- public TokenMgrError() {
- }
-
- public TokenMgrError(String message, int reason) {
- super(message);
- errorCode = reason;
- }
-
- public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
- this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed
deleted file mode 100644
index 1aa5e62fec..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/sed
-
-#
-# The SSE generally uses compiler setting to turn most warnings into errors.
-# This is a little problematic for JavaCC generated files. We don't want
-# to distribute a customized version of JavaCC nor is there any "template"
-# mechanism. So, this simple sed script goes through the generated token
-# manager and fixes a few things. If JavaCC changes the generated code,
-# it's likely that this script will no longer do the right thing. Ditto with
-# any version of JavaCC besides 3.2. Also, there's no guarantee that this
-# script will even work with an arbitrary JavaCC grammar. It's only been tested
-# with the current JSP EL grammar.
-#
-# Author: Ted A. Carroll (tcarroll@bea.com)
-#
-
-s/static private final class LookaheadSuccess extends java.lang.Error { }/static private final class LookaheadSuccess extends java.lang.Error { \n private static final long serialVersionUID = 1L; \n }/g
-
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed
deleted file mode 100644
index 5c1dea401e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/sed
-
-#
-# The SSE generally uses compiler setting to turn most warnings into errors.
-# This is a little problematic for JavaCC generated files. We don't want
-# to distribute a customized version of JavaCC nor is there any "template"
-# mechanism. So, this simple sed script goes through the generated token
-# manager and fixes a few things. If JavaCC changes the generated code,
-# it's likely that this script will no longer do the right thing. Ditto with
-# any version of JavaCC besides 3.2. Also, there's no guarantee that this
-# script will even work with an arbitrary JavaCC grammar. It's only been tested
-# with the current JSP EL grammar.
-#
-# Author: Ted A. Carroll (tcarroll@bea.com)
-#
-
-s/(int)(curChar >> 8)/curChar >> 8/g
-
-/^public Token getNextToken()/, /EOFLoop/{
- /int kind;/ {d}
- /Token specialToken = null;/{d}
-}
-
-/^private final int jjMoveNfa_0(int startState, int curPos)/, /for(;;)/{
- s/int j, kind = 0x7fffffff;/int kind = 0x7fffffff;/g
- /int\[\] nextStates;/{d}
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh
deleted file mode 100644
index b3d5aaa43c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/sh
-
-# Set JAVACC_HOME to the installation directory of javacc 3.2
-$JAVACC_HOME/bin/jjtree.bat JSPEL.jjt
-$JAVACC_HOME/bin/javacc.bat JSPEL.jj
-sed -f fixtm.sed -i.bak JSPELParserTokenManager.java
-diff -w JSPELParserTokenManager.java JSPELParserTokenManager.java.bak
-sed -f fixparser.sed -i.bak JSPELParser.java
-diff -w JSPELParser.java JSPELParser.java.bak
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java
deleted file mode 100644
index 2bd3ffa342..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java
+++ /dev/null
@@ -1,162 +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.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-
-/**
- * Re-indexes the entire workspace.
- * Ensures the JSP Index is in a stable state before performing a search.
- * (like after a crash or if previous indexing was canceled)
- *
- * @author pavery
- */
-public class IndexWorkspaceJob extends Job {
-
- // for debugging
- static final boolean DEBUG;
- static {
- String value= Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspindexmanager"); //$NON-NLS-1$
- DEBUG= value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- /**
- * Visitor that retrieves jsp project paths for all jsp files in the workspace,
- * and adds the files to be indexed as they are encountered
- */
- private class JSPFileVisitor implements IResourceProxyVisitor {
- private List files = new ArrayList();
-
- // monitor from the Job
- IProgressMonitor fInnerMonitor = null;
- public JSPFileVisitor(IProgressMonitor monitor) {
- this.fInnerMonitor = monitor;
- }
-
- public boolean visit(IResourceProxy proxy) throws CoreException {
-
- // check job canceled
- if (this.fInnerMonitor != null && this.fInnerMonitor.isCanceled()) {
- setCanceledState();
- return false;
- }
-
- // check search support canceled
- if(JSPSearchSupport.getInstance().isCanceled()) {
- setCanceledState();
- return false;
- }
-
- if (proxy.getType() == IResource.FILE) {
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3553
- // check this before description
- // check name before actually getting the file (less work)
- if(getJspContentType().isAssociatedWith(proxy.getName())) {
- IFile file = (IFile) proxy.requestResource();
- if(file.exists()) {
-
- if(DEBUG)
- System.out.println("(+) IndexWorkspaceJob adding file: " + file.getName()); //$NON-NLS-1$
- // this call will check the ContentTypeDescription, so don't need to do it here.
- //JSPSearchSupport.getInstance().addJspFile(file);
- this.files.add(file);
- this.fInnerMonitor.subTask(proxy.getName());
-
- // don't search deeper for files
- return false;
- }
- }
- }
- return true;
- }
-
- public final IFile[] getFiles() {
- return (IFile[])this.files.toArray(new IFile[this.files.size()]);
- }
- }
-
- private IContentType fContentTypeJSP = null;
-
- public IndexWorkspaceJob() {
- // pa_TODO may want to say something like "Rebuilding JSP Index" to be more
- // descriptive instead of "Updating JSP Index" since they are 2 different things
- super(JSPCoreMessages.JSPIndexManager_0);
- setPriority(Job.LONG);
- setSystem(true);
- }
-
- IContentType getJspContentType() {
- if(this.fContentTypeJSP == null)
- this.fContentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- return this.fContentTypeJSP;
- }
-
- /**
- * @see org eclipse.core.internal.jobs.InternalJob#run(org.eclipse.core.runtime.IProgressMonitor)
- * for similar method
- */
- protected IStatus run(IProgressMonitor monitor) {
-
- IStatus status = Status.OK_STATUS;
-
- if(monitor.isCanceled()) {
- setCanceledState();
- return Status.CANCEL_STATUS;
- }
-
- if(DEBUG)
- System.out.println(" ^ IndexWorkspaceJob started: "); //$NON-NLS-1$
-
- long start = System.currentTimeMillis();
-
- try {
- JSPFileVisitor visitor = new JSPFileVisitor(monitor);
- // collect all jsp files
- ResourcesPlugin.getWorkspace().getRoot().accept(visitor, IResource.DEPTH_INFINITE);
- // request indexing
- // this is pretty much like faking an entire workspace resource delta
- JSPIndexManager.getInstance().indexFiles(visitor.getFiles());
- }
- catch (CoreException e) {
- if(DEBUG)
- e.printStackTrace();
- }
- finally {
- monitor.done();
- }
- long finish = System.currentTimeMillis();
- if(DEBUG)
- System.out.println(" ^ IndexWorkspaceJob finished\n total time running: " + (finish - start)); //$NON-NLS-1$
-
- return status;
- }
-
- void setCanceledState() {
- JSPIndexManager.getInstance().setIndexState(JSPIndexManager.S_CANCELED);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java
deleted file mode 100644
index cd976e5429..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java
+++ /dev/null
@@ -1,727 +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.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.internal.core.JavaModelManager;
-import org.eclipse.jdt.internal.core.index.Index;
-import org.eclipse.jdt.internal.core.search.indexing.IndexManager;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-
-/**
- * Responsible for keeping the JSP index up to date.
- *
- * @author pavery
- */
-public class JSPIndexManager {
-
- // for debugging
- // TODO move this to Logger, as we have in SSE
- static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspindexmanager"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- private static final String PKEY_INDEX_STATE = "jspIndexState"; //$NON-NLS-1$
-
- private IndexWorkspaceJob indexingJob = new IndexWorkspaceJob();
-
-
-
- // TODO: consider enumeration for these int constants
- // set to S_UPDATING once a resource change comes in
- // set to S_STABLE if:
- // - we know we aren't interested in the resource change
- // - or the ProcessFilesJob completes
- // set to S_CANCELED if an indexing job is canceled
- // set to S_REBUILDING if re-indexing the entire workspace
-
- // the int '0' is reserved for the default value if a preference is not
- // there
- /** index is reliable to use */
- public static final int S_STABLE = 1;
- /** index is being updated (from a resource delta) */
- public static final int S_UPDATING = 2;
- /** entire index is being rebuilt */
- public static final int S_REBUILDING = 3;
- /**
- * indexing job was canceled in the middle of it, index needs to be
- * rebuilt
- */
- public static final int S_CANCELED = 4;
-
- /** symbolic name for OSGI framework */
- private final String OSGI_FRAMEWORK_ID = "org.eclipse.osgi"; //$NON-NLS-1$
-
- /**
- * Collects JSP files from a resource delta.
- */
- private class JSPResourceVisitor implements IResourceDeltaVisitor {
- // using hash map ensures only one of each file
- // must be reset before every use
- private HashMap jspFiles = null;
-
- public JSPResourceVisitor() {
- this.jspFiles = new HashMap();
- }
-
- public boolean visit(IResourceDelta delta) throws CoreException {
-
- // in case JSP search was canceled (eg. when closing the editor)
- if (JSPSearchSupport.getInstance().isCanceled() || frameworkIsShuttingDown()) {
- setCanceledState();
- return false;
- }
-
- try {
- if (!isHiddenResource(delta.getFullPath())) {
-
- int kind = delta.getKind();
- boolean added = (kind & IResourceDelta.ADDED) == IResourceDelta.ADDED;
- boolean isInterestingChange = false;
- if ((kind & IResourceDelta.CHANGED) == IResourceDelta.CHANGED) {
- int flags = delta.getFlags();
- // ignore things like marker changes
- isInterestingChange = (flags & IResourceDelta.CONTENT) == IResourceDelta.CONTENT || (flags & IResourceDelta.REPLACED) == IResourceDelta.REPLACED;
- }
- boolean removed = (kind & IResourceDelta.REMOVED) == IResourceDelta.REMOVED;
- if (added || isInterestingChange) {
-
- visitAdded(delta);
- }
- else if (removed) {
- visitRemoved(delta);
- }
- }
- }
- catch (Exception e) {
- // need to set state here somehow, and reindex
- // otherwise index will be unreliable
- if (DEBUG)
- Logger.logException("Delta analysis may not be complete", e); //$NON-NLS-1$
- }
- // if the delta has children, continue to add/remove files
- return true;
- }
-
- private void visitRemoved(IResourceDelta delta) {
- // handle cleanup
- if (delta.getResource() != null) {
- IResource r = delta.getResource();
- if (r.getType() == IResource.FOLDER && r.exists()) {
- deleteIndex((IFile) r);
- }
- }
- }
-
- private void visitAdded(IResourceDelta delta) {
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3553
- // quick check if it's even JSP related to improve
- // performance
- // checking name from the delta before getting
- // resource because it's lighter
- String filename = delta.getFullPath().lastSegment();
- if (filename != null && getJspContentType().isAssociatedWith(filename)) {
- IResource r = delta.getResource();
- if (r != null && r.exists() && r.getType() == IResource.FILE) {
- this.jspFiles.put(r.getFullPath(), r);
- }
- }
- }
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=93463
- private boolean isHiddenResource(IPath p) {
- String[] segments = p.segments();
- for (int i = 0; i < segments.length; i++) {
- if (segments[i].startsWith(".")) //$NON-NLS-1$
- return true;
- }
- return false;
- }
-
- private void deleteIndex(IFile folder) {
- // cleanup index
- IndexManager im = JavaModelManager.getIndexManager();
- IPath folderPath = folder.getFullPath();
- IPath indexLocation = JSPSearchSupport.getInstance().computeIndexLocation(folderPath);
- im.removeIndex(indexLocation);
- // im.indexLocations.removeKey(folderPath);
- // im.indexLocations.removeValue(indexLocation);
- File f = indexLocation.toFile();
- f.delete();
- }
-
- public IFile[] getFiles() {
- return (IFile[]) this.jspFiles.values().toArray(new IFile[this.jspFiles.size()]);
- }
-
- public void reset() {
- this.jspFiles.clear();
- }
- }
-
- // end class JSPResourceVisitor
-
- /**
- * schedules JSP files for indexing by Java core
- */
- private class ProcessFilesJob extends Job {
- List fileList = null;
- // keep track of how many files we've indexed
- int lastFileCursor = 0;
-
- ProcessFilesJob(String taskName) {
- super(taskName);
- fileList = new ArrayList();
- }
-
- synchronized void process(IFile[] files) {
- for (int i = 0; i < files.length; i++) {
- fileList.add(files[i]);
- }
- if (DEBUG) {
- System.out.println("JSPIndexManager queuing " + files.length + " files"); //$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-
- synchronized IFile[] getFiles() {
- return (IFile[]) fileList.toArray(new IFile[fileList.size()]);
- }
-
- synchronized void clearFiles() {
- fileList.clear();
- lastFileCursor = 0;
- //System.out.println("cleared files");
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- // System.out.println("indexer monitor" + monitor);
- if (isCanceled(monitor) || frameworkIsShuttingDown()) {
- setCanceledState();
- return Status.CANCEL_STATUS;
- }
-
- long start = System.currentTimeMillis();
-
- try {
- IFile[] filesToBeProcessed = getFiles();
-
- if (DEBUG) {
- System.out.println("JSPIndexManager indexing " + filesToBeProcessed.length + " files"); //$NON-NLS-2$ //$NON-NLS-1$
- }
- // API indicates that monitor is never null
- monitor.beginTask("", filesToBeProcessed.length); //$NON-NLS-1$
- JSPSearchSupport ss = JSPSearchSupport.getInstance();
- String processingNFiles = ""; //$NON-NLS-1$
-
-
- for (;lastFileCursor < filesToBeProcessed.length; lastFileCursor++) {
-
- if (isCanceled(monitor) || frameworkIsShuttingDown()) {
- setCanceledState();
- return Status.CANCEL_STATUS;
- }
- IFile file = filesToBeProcessed[lastFileCursor];
- try {
- IJavaProject project = JavaCore.create(file.getProject());
- if (project.exists()) {
- ss.addJspFile(file);
- // JSP Indexer processing n files
- processingNFiles = NLS.bind(JSPCoreMessages.JSPIndexManager_2, new String[]{Integer.toString((filesToBeProcessed.length - lastFileCursor))});
- monitor.subTask(processingNFiles + " - " + file.getName()); //$NON-NLS-1$
- monitor.worked(1);
-
- if (DEBUG) {
- System.out.println("JSPIndexManager Job added file: " + file.getName()); //$NON-NLS-1$
- }
- }
- }
- catch (Exception e) {
- // RATLC00284776
- // ISSUE: we probably shouldn't be catching EVERY
- // exception, but
- // the framework only allows to return IStatus in
- // order to communicate
- // that something went wrong, which means the loop
- // won't complete, and we would hit the same problem
- // the next time.
- //
- // a possible solution is to keep track of the
- // exceptions logged
- // and only log a certain amt of the same one,
- // otherwise skip it.
- if (!frameworkIsShuttingDown()) {
- String filename = file != null ? file.getFullPath().toString() : ""; //$NON-NLS-1$
- Logger.logException("JSPIndexer problem indexing:" + filename, e); //$NON-NLS-1$
- }
- }
- } // end for
- }
- finally {
- // just in case something didn't follow API (monitor is null)
- if (monitor != null)
- monitor.done();
- }
-
- // successfully finished, clear files list
- clearFiles();
-
- long finish = System.currentTimeMillis();
- long diff = finish - start;
- if (DEBUG) {
- fTotalTime += diff;
- System.out.println("============================================================================"); //$NON-NLS-1$
- System.out.println("this time: " + diff + " cumulative time for resource changed: " + fTotalTime); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("============================================================================"); //$NON-NLS-1$
- }
- return Status.OK_STATUS;
- }
-
- private boolean isCanceled(IProgressMonitor runMonitor) {
-
- boolean canceled = false;
- // check specific monitor passed into run method (the progress
- // group in this case)
- // check main search support canceled
- if (runMonitor != null && runMonitor.isCanceled())
- canceled = true;
- else if (JSPSearchSupport.getInstance().isCanceled()) {
- canceled = true;
- if (runMonitor != null) {
- runMonitor.setCanceled(true);
- }
- }
- return canceled;
- }
-
- }
-
- // end class ProcessFilesJob
-
- private static JSPIndexManager fSingleton = null;
- private boolean initialized;
- private boolean initializing = true;
-
- private IndexJobCoordinator indexJobCoordinator;
- private IResourceChangeListener jspResourceChangeListener;
-
- private JSPResourceVisitor fVisitor = null;
- private IContentType fContentTypeJSP = null;
-
- static long fTotalTime = 0;
-
- // Job for processing resource delta
- private ProcessFilesJob processFilesJob = null;
-
- private JSPIndexManager() {
- processFilesJob = new ProcessFilesJob(JSPCoreMessages.JSPIndexManager_0);
- // only show in verbose mode
- processFilesJob.setSystem(true);
- processFilesJob.setPriority(Job.LONG);
- processFilesJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- super.done(event);
- setStableState();
- }
- });
- }
-
- public synchronized static JSPIndexManager getInstance() {
-
- if (fSingleton == null)
- fSingleton = new JSPIndexManager();
- return fSingleton;
- }
-
- public void initialize() {
-
- JSPIndexManager singleInstance = getInstance();
-
-
- if (!singleInstance.initialized) {
- singleInstance.initialized = true;
-
- singleInstance.indexJobCoordinator = new IndexJobCoordinator();
- singleInstance.jspResourceChangeListener = new JSPResourceChangeListener();
-
- // added as JobChange listener so JSPIndexManager can be smarter
- // about when it runs
- Platform.getJobManager().addJobChangeListener(singleInstance.indexJobCoordinator);
-
- // add JSPIndexManager to keep JSP Index up to date
- // listening for IResourceChangeEvent.PRE_DELETE and
- // IResourceChangeEvent.POST_CHANGE
- ResourcesPlugin.getWorkspace().addResourceChangeListener(jspResourceChangeListener, IResourceChangeEvent.POST_CHANGE);
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5091
- // makes sure IndexManager is aware of our indexes
- saveIndexes();
- singleInstance.initializing = false;
-
- }
-
- }
-
- synchronized void setIndexState(int state) {
- if (DEBUG) {
- System.out.println("JSPIndexManager setting index state to: " + state2String(state)); //$NON-NLS-1$
- }
- Plugin jspModelPlugin = JSPCorePlugin.getDefault();
- jspModelPlugin.getPluginPreferences().setValue(PKEY_INDEX_STATE, state);
- jspModelPlugin.savePluginPreferences();
-
- }
-
- private String state2String(int state) {
- String s = "UNKNOWN"; //$NON-NLS-1$
- switch (state) {
- case (S_STABLE) :
- s = "S_STABLE"; //$NON-NLS-1$
- break;
- case (S_UPDATING) :
- s = "S_UPDATING"; //$NON-NLS-1$
- break;
- case (S_CANCELED) :
- s = "S_CANCELED"; //$NON-NLS-1$
- break;
- case (S_REBUILDING) :
- s = "S_REBUILDING"; //$NON-NLS-1$
- break;
- }
- return s;
- }
-
- int getIndexState() {
- return JSPCorePlugin.getDefault().getPluginPreferences().getInt(PKEY_INDEX_STATE);
- }
-
- void setUpdatingState() {
- //if (getIndexState() != S_CANCELED)
- setIndexState(S_UPDATING);
- }
-
- void setCanceledState() {
- setIndexState(JSPIndexManager.S_CANCELED);
- }
-
- void setStableState() {
- //if (getIndexState() != S_CANCELED)
- setIndexState(S_STABLE);
- }
-
- void setRebuildingState() {
- setIndexState(S_REBUILDING);
- }
-
- synchronized void rebuildIndexIfNeeded() {
- if (getIndexState() != S_STABLE) {
- rebuildIndex();
- }
- }
-
- void rebuildIndex() {
-
- if (DEBUG)
- System.out.println("*** JSP Index unstable, requesting re-indexing"); //$NON-NLS-1$
-
- getIndexingJob().addJobChangeListener(new JobChangeAdapter() {
- public void aboutToRun(IJobChangeEvent event) {
- super.aboutToRun(event);
- setRebuildingState();
- }
-
- public void done(IJobChangeEvent event) {
- super.done(event);
- setStableState();
- getIndexingJob().removeJobChangeListener(this);
- }
- });
- // we're about to reindex everything anyway
- getProcessFilesJob().clearFiles();
- getIndexingJob().schedule();
-
- }
-
- /**
- * Creates and schedules a Job to process collected files. All JSP
- * indexing should be done through this method or processFiles(IFile file)
- *
- * @param files
- */
- final void indexFiles(IFile[] files) {
- // don't use this rule
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4931
- // processFiles.setRule(new IndexFileRule());
- processFilesJob.process(files);
- }
-
-
- /**
- * Package protected for access by inner Job class in resourceChanged(...)
- *
- * @return
- */
- JSPResourceVisitor getVisitor() {
-
- if (this.fVisitor == null) {
- this.fVisitor = new JSPResourceVisitor();
- }
- return this.fVisitor;
- }
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5091
- // makes sure IndexManager is aware of our indexes
- void saveIndexes() {
- IndexManager indexManager = JavaModelManager.getIndexManager();
- IPath jspModelWorkingLocation = JSPSearchSupport.getInstance().getModelJspPluginWorkingLocation();
-
- File folder = new File(jspModelWorkingLocation.toOSString());
- String[] files = folder.list();
- String locay = ""; //$NON-NLS-1$
- Index index = null;
- try {
- for (int i = 0; i < files.length; i++) {
- if (files[i].toLowerCase().endsWith(".index")) { //$NON-NLS-1$
- locay = jspModelWorkingLocation.toString() + "/" + files[i]; //$NON-NLS-1$
- // reuse index file
- index = new Index(locay, "Index for " + locay, true); //$NON-NLS-1$
- indexManager.saveIndex(index);
- }
- }
- }
- catch (Exception e) {
- // we should be shutting down, want to shut down quietly
- if (DEBUG)
- e.printStackTrace();
- }
- }
-
- IContentType getJspContentType() {
- if (this.fContentTypeJSP == null)
- this.fContentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- return this.fContentTypeJSP;
- }
-
- /**
- * A check to see if the OSGI framework is shutting down.
- *
- * @return true if the System Bundle is stopped (ie. the framework is
- * shutting down)
- */
- boolean frameworkIsShuttingDown() {
- // in the Framework class there's a note:
- // set the state of the System Bundle to STOPPING.
- // this must be done first according to section 4.19.2 from the OSGi
- // R3 spec.
- boolean shuttingDown = Platform.getBundle(OSGI_FRAMEWORK_ID).getState() == Bundle.STOPPING;
- if (DEBUG && shuttingDown) {
- System.out.println("JSPIndexManager: system is shutting down!"); //$NON-NLS-1$
- }
- return shuttingDown;
- }
-
-
- public void shutdown() {
-
- // stop listening
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(jspResourceChangeListener);
-
-
- // stop any searching
- JSPSearchSupport.getInstance().setCanceled(true);
-
- // stop listening to jobs
- Platform.getJobManager().removeJobChangeListener(indexJobCoordinator);
-
-
- int maxwait = 5000;
- if (processFilesJob != null) {
- processFilesJob.cancel();
- }
- // attempt to make sure this indexing job is litterally
- // done before continuing, since we are shutting down
- waitTillNotRunning(maxwait, processFilesJob);
-
- if (indexingJob != null) {
- indexingJob.cancel();
- }
- waitTillNotRunning(maxwait, processFilesJob);
- }
-
- private void waitTillNotRunning(int maxSeconds, Job job) {
- int pauseTime = 10;
- int maxtries = maxSeconds / pauseTime;
- int count = 0;
- while (count++ < maxtries && job.getState() == Job.RUNNING) {
- try {
- Thread.sleep(pauseTime);
- // System.out.println("count: " + count + " max: " +
- // maxtries);
- }
- catch (InterruptedException e) {
- Logger.logException(e);
- }
- }
- }
-
- private class IndexJobCoordinator extends JobChangeAdapter {
-
- public void aboutToRun(IJobChangeEvent event) {
- Job jobToCoordinate = event.getJob();
- if (isJobToAvoid(jobToCoordinate)) {
- // job will be rescheduled when the job we
- // are avoiding (eg. build) is done
- getProcessFilesJob().cancel();
- //System.out.println("cancel:" + jobToCoordinate.getName());
- }
- }
-
- public void done(IJobChangeEvent event) {
-
- Job jobToCoordinate = event.getJob();
- if (isJobToAvoid(jobToCoordinate)) {
- if (getProcessFilesJob().getFiles().length > 0) {
- getProcessFilesJob().schedule(500);
- //System.out.println("schedule:" + jobToCoordinate.getName());
- }
-
-
- }
- }
-
- private boolean isJobToAvoid(Job jobToCoordinate) {
- boolean result = false;
- if (jobToCoordinate.belongsTo(ResourcesPlugin.FAMILY_AUTO_BUILD) || jobToCoordinate.belongsTo(ResourcesPlugin.FAMILY_MANUAL_BUILD) || jobToCoordinate.belongsTo(ResourcesPlugin.FAMILY_AUTO_REFRESH)) {
- result = true;
- }
- return result;
-
- }
-
- }
-
- private class JSPResourceChangeListener implements IResourceChangeListener {
-
-
- /**
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
-
- if (isInitializing())
- return;
-
- // ignore resource changes if already rebuilding
- if (getIndexState() == S_REBUILDING)
- return;
- // previously canceled, needs entire index rebuild
- if (getIndexState() == S_CANCELED) {
- // rebuildIndex();
- // just resume indexing
- getProcessFilesJob().schedule(500);
- //System.out.println("schedule: resource changed, previously canceled");
- return;
- }
-
- IResourceDelta delta = event.getDelta();
- if (delta != null) {
- // only care about adds or changes right now...
- int kind = delta.getKind();
- boolean added = (kind & IResourceDelta.ADDED) == IResourceDelta.ADDED;
- boolean changed = (kind & IResourceDelta.CHANGED) == IResourceDelta.CHANGED;
- if (added || changed) {
-
- // only analyze the full (starting at root) delta
- // hierarchy
- if (delta.getFullPath().toString().equals("/")) { //$NON-NLS-1$
- try {
- JSPResourceVisitor v = getVisitor();
- // clear from last run
- v.reset();
- // count files, possibly do this in a job too...
- // don't include PHANTOM resources
- delta.accept(v, false);
-
- // process files from this delta
- IFile[] files = v.getFiles();
- if (files.length > 0) {
- /*
- * Job change listener should set back to
- * stable when finished
- */
- setUpdatingState();
- // processFiles(files);
- indexFiles(files);
- }
- }
- catch (CoreException e) {
- // need to set state here somehow, and reindex
- // otherwise index will be unreliable
- if (DEBUG)
- Logger.logException(e);
- }
- catch (Exception e) {
- // need to set state here somehow, and reindex
- // otherwise index will be unreliable
- if (DEBUG)
- Logger.logException(e);
- }
- }
- }
-
- }
- }
-
- }
-
- IndexWorkspaceJob getIndexingJob() {
- return indexingJob;
- }
-
- ProcessFilesJob getProcessFilesJob() {
- return processFilesJob;
- }
-
- boolean isInitializing() {
- return initializing;
- }
-
-}
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 78332d11ff..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java
+++ /dev/null
@@ -1,257 +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)
- *
- * @author pavery
- */
-public class JSPSearchDocument {
-
- private String UNKNOWN_PATH = "**path unknown**"; //$NON-NLS-1$
- private String fJSPPathString = UNKNOWN_PATH;
- private String fCUPath = UNKNOWN_PATH;
- private SearchParticipant fParticipant = null;
- private long fLastModifiedStamp;
- private char[] fCachedCharContents;
-
- /**
- * @param file
- * @param participant
- * @throws CoreException
- */
- public JSPSearchDocument(String filePath, SearchParticipant participant) {
-
- this.fJSPPathString = filePath;
- this.fParticipant = participant;
- }
-
- public SearchParticipant getParticipant() {
- return this.fParticipant;
- }
-
- /**
- * @see org.eclipse.jdt.core.search.SearchDocument#getCharContents()
- */
- public char[] getCharContents() {
-
- if(fCachedCharContents == null || isDirty()) {
- JSPTranslation trans = getJSPTranslation();
- fCachedCharContents = trans != null ? trans.getJavaText().toCharArray() : new char[0];
- fCUPath = trans.getJavaPath();
- }
- return fCachedCharContents;
- }
-
- public String getJavaText() {
- return new String(getCharContents());
- }
-
- private IModelManager getModelManager() {
- return StructuredModelManager.getModelManager();
- }
-
- /**
- * It's not recommended for clients to hold on to this JSPTranslation
- * since it's kind of large. If possible, hold on to the
- * JSPSearchDocument, which is more of a lightweight proxy.
- *
- * @return the JSPTranslation for the jsp file, or null if it's an
- * unsupported file.
- */
- public final JSPTranslationExtension getJSPTranslation() {
- JSPTranslationExtension translation = null;
- IFile jspFile = getFile();
- if (!JSPSearchSupport.isJsp(jspFile))
- return translation;
-
- IStructuredModel model = null;
- try {
- // get existing model for read, then get document from it
- IModelManager modelManager = getModelManager();
- if (modelManager != null) {
- jspFile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
- model = modelManager.getModelForRead(jspFile);
- }
- // handle unsupported
- if (model instanceof IDOMModel) {
- IDOMModel xmlModel = (IDOMModel)model;
- setupAdapterFactory(xmlModel);
- IDOMDocument doc = xmlModel.getDocument();
- JSPTranslationAdapter adapter = (JSPTranslationAdapter) doc.getAdapterFor(IJSPTranslation.class);
- translation = adapter.getJSPTranslation();
- }
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- catch (UnsupportedCharsetExceptionWithDetail e) {
- // no need to log this. Just consider it an invalid file for our
- // purposes.
- // Logger.logException(e);
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- return translation;
- }
-
- /**
- * add the factory for JSPTranslationAdapter here
- *
- * @param sm
- */
- private void setupAdapterFactory(IStructuredModel sm) {
- 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() || this.fCUPath == UNKNOWN_PATH) {
- JSPTranslation trans = getJSPTranslation();
- if(trans != null) {
- this.fCUPath = trans.getJavaPath();
- // save since it's expensive to calculate again later
- fCachedCharContents = trans.getJavaText().toCharArray();
- }
- }
- return fCUPath != null ? fCUPath : UNKNOWN_PATH;
- }
-
- public int getJspOffset(int javaOffset) {
- // copied from JSPTranslation
- int result = -1;
- int offsetInRange = 0;
- Position jspPos, javaPos = null;
- JSPTranslation trans = getJSPTranslation();
- if (trans != null) {
- HashMap java2jspMap = trans.getJava2JspMap();
-
- // iterate all mapped java ranges
- Iterator it = java2jspMap.keySet().iterator();
- while (it.hasNext()) {
- javaPos = (Position) it.next();
- // need to count the last position as included
- if (!javaPos.includes(javaOffset) && !(javaPos.offset + javaPos.length == javaOffset))
- continue;
-
- offsetInRange = javaOffset - javaPos.offset;
- jspPos = (Position) java2jspMap.get(javaPos);
-
- if (jspPos != null)
- result = jspPos.offset + offsetInRange;
- else {
- Logger.log(Logger.ERROR, "jspPosition was null!" + javaOffset); //$NON-NLS-1$
- }
- break;
- }
- }
- return result;
- }
-
- public IFile getFile() {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IPath jspPath = new Path(this.fJSPPathString);
- IFile jspFile = root.getFile(jspPath);
- if (!jspFile.exists()) {
- // possibly outside workspace
- jspFile = root.getFileForLocation(jspPath);
- }
- return jspFile;
- }
-
-
- private boolean isDirty() {
- boolean modified = false;
- IFile f = getFile();
- if(f != null) {
- long currentStamp = f.getModificationStamp();
- if(currentStamp != fLastModifiedStamp)
- modified = true;
- fLastModifiedStamp = currentStamp;
- }
- return modified;
- }
-
- public void release() {
- // nothing to do now since JSPTranslation is created on the fly
- }
-
- /**
- * for debugging
- */
- public String toString() {
- return "[JSPSearchDocument:" + this.fJSPPathString + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jdt.core.search.SearchDocument#getEncoding()
- */
- public String getEncoding() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jdt.core.search.SearchDocument#getByteContents()
- */
- public byte[] getByteContents() {
- // TODO Auto-generated method stub
- return null;
- }
-}
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 398982ab0e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchSupport.java
+++ /dev/null
@@ -1,554 +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.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.jdt.internal.core.JavaModelManager;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.java.JSP2ServletNameUtil;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-
-/**
- * Central access to java indexing and search. All contact between JDT indexing
- * and Searching should be done through here.
- *
- * Clients should access the methods of this class via the single instance via
- * <code>getInstance()</code>.
- *
- * @author pavery
- */
-public class JSPSearchSupport {
-
- // for debugging
- static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspsearch"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- private static JSPSearchSupport singleton = null;
-
- private JSPSearchParticipant fParticipant = null;
-
- private IPath fJspPluginLocation = null;
-
- // pa_TODO may be slow (esp for indexing entire workspace)
- private final CRC32 fChecksumCalculator = new CRC32();
-
- /** main cancel montior for all search support */
- private final IProgressMonitor fMonitor = new NullProgressMonitor();
-
- private JSPSearchSupport() {
- // force use of single instance
- }
-
- /**
- * This operation ensures that the live resource's search markers show up in
- * the open editor. It also allows the ability to pass in a ProgressMonitor
- */
- private class SearchJob extends Job implements IJavaSearchConstants {
-
- String fSearchText = ""; //$NON-NLS-1$
-
- IJavaSearchScope fScope = null;
-
- int fSearchFor = FIELD;
-
- int fLimitTo = ALL_OCCURRENCES;
-
- int fMatchMode = SearchPattern.R_PATTERN_MATCH;
-
- boolean fIsCaseSensitive = false;
-
- SearchRequestor fRequestor = null;
-
- IJavaElement fElement = null;
-
- // constructor w/ java element
- public SearchJob(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
-
- super(JSPCoreMessages.JSP_Search + element.getElementName());
- this.fElement = element;
- this.fScope = scope;
- this.fRequestor = requestor;
- }
-
- // constructor w/ search text
- public SearchJob(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor) {
-
- super(JSPCoreMessages.JSP_Search + searchText);
- this.fSearchText = searchText;
- this.fScope = scope;
- this.fSearchFor = searchFor;
- this.fLimitTo = limitTo;
- this.fMatchMode = matchMode;
- this.fIsCaseSensitive = isCaseSensitive;
- this.fRequestor = requestor;
- }
-
- public IStatus run(IProgressMonitor jobMonitor) {
-
- if (jobMonitor != null && jobMonitor.isCanceled())
- return Status.CANCEL_STATUS;
- if (JSPSearchSupport.getInstance().isCanceled())
- return Status.CANCEL_STATUS;
-
- SearchPattern javaSearchPattern = null;
- // if an element is available, use that to create search pattern
- // (eg. LocalVariable)
- // otherwise use the text and other paramters
- if (this.fElement != null)
- javaSearchPattern = SearchPattern.createPattern(this.fElement, this.fLimitTo);
- else
- javaSearchPattern = SearchPattern.createPattern(this.fSearchText, this.fSearchFor, this.fLimitTo, this.fMatchMode);
-
- if (javaSearchPattern != null) {
- JSPSearchParticipant[] participants = { getSearchParticipant() };
- SearchEngine engine = new SearchEngine();
- try {
- if (jobMonitor != null)
- jobMonitor.beginTask("", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- engine.search(javaSearchPattern, participants, this.fScope, this.fRequestor, jobMonitor);
- } catch (CoreException e) {
- if (DEBUG)
- Logger.logException(e);
- }
- // non-CoreExceptions will permanently stall the Worker thread
- catch (Exception e) {
- if (DEBUG)
- Logger.logException(e);
- } finally {
- if (jobMonitor != null)
- jobMonitor.done();
- }
- }
- return Status.OK_STATUS;
- }
- }
-
- // end SearchJob
- /**
- * Runnable forces caller to wait until finished (as opposed to using a Job)
- */
- private class SearchRunnable implements IWorkspaceRunnable, IJavaSearchConstants {
-
- String fSearchText = ""; //$NON-NLS-1$
-
- IJavaSearchScope fScope = null;
-
- int fSearchFor = FIELD;
-
- int fLimitTo = ALL_OCCURRENCES;
-
- int fMatchMode = SearchPattern.R_PATTERN_MATCH;
-
- boolean fIsCaseSensitive = false;
-
- SearchRequestor fRequestor = null;
-
- IJavaElement fElement = null;
-
- // constructor w/ java element
- public SearchRunnable(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
-
- this.fElement = element;
- this.fScope = scope;
- this.fRequestor = requestor;
- }
-
- // constructor w/ search text
- public SearchRunnable(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor) {
-
- this.fSearchText = searchText;
- this.fScope = scope;
- this.fSearchFor = searchFor;
- this.fLimitTo = limitTo;
- this.fMatchMode = matchMode;
- this.fIsCaseSensitive = isCaseSensitive;
- this.fRequestor = requestor;
- }
-
- public void run(IProgressMonitor monitor) throws CoreException {
-
- if (monitor != null && monitor.isCanceled())
- return;
- if (JSPSearchSupport.getInstance().isCanceled())
- return;
-
- SearchPattern javaSearchPattern = null;
- // if an element is available, use that to create search pattern
- // (eg. LocalVariable)
- // otherwise use the text and other paramters
- if (this.fElement != null)
- javaSearchPattern = SearchPattern.createPattern(this.fElement, fLimitTo);
- else
- javaSearchPattern = SearchPattern.createPattern(fSearchText, fSearchFor, fLimitTo, fMatchMode);
-
- if (javaSearchPattern != null) {
- JSPSearchParticipant[] participants = { getSearchParticipant() };
- SearchEngine engine = new SearchEngine();
- try {
- if (monitor != null)
- monitor.beginTask("", 0); //$NON-NLS-1$
- engine.search(javaSearchPattern, participants, fScope, fRequestor, monitor);
- } catch (CoreException e) {
- Logger.logException(e);
- //throw e;
- }
- // non-CoreExceptions will permanently stall the Worker thread
- catch (Exception e) {
- Logger.logException(e);
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
- }
- }
-
- // end SearchRunnable
-
- /**
- * Clients should access the methods of this class via the single instance
- * via getInstance()
- *
- * @return
- */
- public synchronized static JSPSearchSupport getInstance() {
-
- if (singleton == null)
- singleton = new JSPSearchSupport();
- return singleton;
- }
-
- /**
- * Utility method to check if a file is a jsp file (since this is done
- * frequently)
- */
- public static boolean isJsp(IFile file) {
- // (pa) 20051025 removing deep content type check
- // because this method is called frequently
- // and IO is expensive
- boolean isJsp = false;
-
- if (file != null && file.exists()) {
-
- IContentType contentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- // check this before description, it's less expensive
- if (contentTypeJSP.isAssociatedWith(file.getName())) {
- isJsp = true;
- }
- }
-
- return isJsp;
- }
-
- /**
- * schedules a search document representing this JSP file for indexing (by
- * the java indexer)
- *
- * @param file
- * the JSP file
- * @return true if indexing was successful, false otherwise
- * @throws CoreException
- */
- public SearchDocument addJspFile(IFile file) {
- if (JSPSearchSupport.getInstance().isCanceled() || !file.isAccessible()) {
- return null;
- }
-
- if (DEBUG)
- System.out.println("adding JSP file:" + file.getFullPath()); //$NON-NLS-1$
-
- // create
- SearchDocument delegate = createSearchDocument(file);
- // null if not a jsp file
- if (delegate != null) {
- try {
- getSearchParticipant().scheduleDocumentIndexing(delegate, computeIndexLocation(file.getParent().getFullPath()));
- } catch (Exception e) {
- // ensure that failure here doesn't keep other documents from
- // being indexed
- // if peformed in a batch call (like JSPIndexManager)
- if (DEBUG)
- e.printStackTrace();
- }
- }
-
- if (DEBUG)
- System.out.println("scheduled" + delegate + "for indexing"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return delegate;
- }
-
- /**
- * Perform a java search w/ the given parameters. Runs in a background Job
- * (results may still come in after this method call)
- *
- * @param searchText
- * the string of text to search on
- * @param searchFor
- * IJavaSearchConstants.TYPE, METHOD, FIELD, PACKAGE, etc...
- * @param limitTo
- * IJavaSearchConstants.DECLARATIONS,
- * IJavaSearchConstants.REFERENCES,
- * IJavaSearchConstants.IMPLEMENTORS, or
- * IJavaSearchConstants.ALL_OCCURRENCES
- * @param matchMode
- * allow * wildcards or not
- * @param isCaseSensitive
- * @param requestor
- * passed in to accept search matches (and do "something" with
- * them)
- */
- public void search(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor) {
-
- JSPIndexManager.getInstance().rebuildIndexIfNeeded();
-
- SearchJob job = new SearchJob(searchText, scope, searchFor, limitTo, matchMode, isCaseSensitive, requestor);
- setCanceled(false);
- job.setUser(true);
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5032
- // pops up user operation blocked dialog if you perform a long search,
- // then open a file because it locks the workspace
- //job.setRule(ResourcesPlugin.getWorkspace().getRoot());
- job.schedule();
- }
-
- /**
- * Search for an IJavaElement, constrained by the given parameters. Runs in
- * a background Job (results may still come in after this method call)
- *
- * @param element
- * @param scope
- * @param requestor
- */
- public void search(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
-
- JSPIndexManager.getInstance().rebuildIndexIfNeeded();
-
- SearchJob job = new SearchJob(element, scope, requestor);
- setCanceled(false);
- job.setUser(true);
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5032
- //job.setRule(ResourcesPlugin.getWorkspace().getRoot());
- job.schedule();
- }
-
- /**
- * Search for an IJavaElement, constrained by the given parameters. Runs in
- * an IWorkspace runnable (results will be reported by the end of this
- * method)
- *
- * @param element
- * @param scope
- * @param requestor
- */
- public void searchRunnable(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
-
- JSPIndexManager.getInstance().rebuildIndexIfNeeded();
-
- SearchRunnable searchRunnable = new SearchRunnable(element, scope, requestor);
- try {
- setCanceled(false);
- ResourcesPlugin.getWorkspace().run(searchRunnable, JSPSearchSupport.getInstance().getProgressMonitor());
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @param jspFile
- * @return SearchDocument if the file is not null, exists, and is a JSP
- * file, otherwise null.
- */
- private SearchDocument createSearchDocument(IFile jspFile) {
-
- JavaSearchDocumentDelegate delegate = null;
- if (jspFile != null && jspFile.exists() && isJsp(jspFile)) {
-
- delegate = new JavaSearchDocumentDelegate(new JSPSearchDocument(jspFile.getFullPath().toString(), getSearchParticipant()));
- }
- return delegate;
-
- }
-
- /**
- * Centralized place to access JSPSearchDocuments (used by
- * JSPSearchParticipant and JSPSearchRequestor)
- *
- * @param searchDocPath
- * @param doc
- * @return the JSPSearchDocument or null if one is not found
- */
- public SearchDocument getSearchDocument(String searchDocPath) {
-
- SearchDocument delegate = null;
- IFile f = fileForCUPath(searchDocPath);
- if (f != null) {
- delegate = createSearchDocument(f);
- } else {
- // handle failure case... (file deleted maybe?)
- }
- return delegate;
- }
-
- /**
- * Unmangles the searchDocPath and returns the corresponding JSP file.
- *
- * @param searchDocPath
- */
- private IFile fileForCUPath(String searchDocPath) {
-
- String[] split = searchDocPath.split("/"); //$NON-NLS-1$
- String classname = split[split.length - 1];
-
- // ignore anything but .java matches (like .class binary matches)
- if(!searchDocPath.endsWith(".java")) { //$NON-NLS-1$
- return null;
- }
-
- String filePath = JSP2ServletNameUtil.unmangle(classname);
-
- // try absolute path
- IFile f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(filePath));
- // workspace relative then
- if(f == null) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=86009
- // must have a project name as well
- // which would mean >= 2 path segments
- IPath path = new Path(filePath);
- if(path.segmentCount() >= 2) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- }
- return f;
- }
-
- JSPSearchParticipant getSearchParticipant() {
-
- if (this.fParticipant == null)
- this.fParticipant = new JSPSearchParticipant();
- return this.fParticipant;
- }
-
- // This is called from JSPPathIndexer
- // pa_TODO
- //how can we make sure participant indexLocations are updated at startup?
- public final IPath computeIndexLocation(IPath containerPath) {
-
- 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);
-
- // pa_TODO need to add to java path too, so JDT search support knows
- // there should be a non internal way to do this.
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=77564
- JavaModelManager.getIndexManager().indexLocations.put(containerPath, indexLocation);
- //}
- 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");
-
- // 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 2ef213d789..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/JSPModelLoader.java
+++ /dev/null
@@ -1,639 +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.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.JSPCapableParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.model.AbstractModelLoader;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistry;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistryImpl;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.xml.core.internal.DebugAdapterFactory;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
-import org.eclipse.wst.xml.core.internal.propagate.PropagatingAdapterFactoryImpl;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.eclipse.wst.xml.core.internal.text.rules.StructuredTextPartitionerForXML;
-import org.w3c.dom.Document;
-
-public class JSPModelLoader extends AbstractModelLoader {
- protected final int MAX_BUFFERED_SIZE_FOR_RESET_MARK = 200000;
-
- /**
- * DMW - Note: I think the embeddedTypeRegistry in IModelManager can be
- * removed
- */
- private EmbeddedTypeRegistry embeddedContentTypeRegistry;
- private final static String DEFAULT_MIME_TYPE = "text/html"; //$NON-NLS-1$
- private final static String DEFAULT_LANGUAGE = "java"; //$NON-NLS-1$
-
- public JSPModelLoader() {
- super();
- }
-
- /**
- * Gets the embeddedContentTypeRegistry.
- *
- * @return Returns a EmbeddedContentTypeRegistry
- */
- private EmbeddedTypeRegistry getEmbeddedContentTypeRegistry() {
- if (embeddedContentTypeRegistry == null) {
- embeddedContentTypeRegistry = EmbeddedTypeRegistryImpl.getInstance();
- }
- return embeddedContentTypeRegistry;
- }
-
- public IStructuredModel newModel() {
- DOMModelForJSP model = new DOMModelForJSP();
- return model;
- }
-
- /**
- * For JSP files, text/html is the default content type. This may want
- * this different for types like jsv (jsp for voice xml) For now, hard
- * code to new instance. In future, should get instance from registry.
- *
- * Specification cites HTML as the default contentType.
- */
- private EmbeddedTypeHandler getJSPDefaultEmbeddedType(IStructuredModel model) {
- EmbeddedTypeRegistry reg = getEmbeddedContentTypeRegistry();
-
- String mimeType = null;
- // default embedded type for fragments
- if (model != null) {
- IFile file = getFile(model);
- if (file != null) {
- mimeType = JSPFContentProperties.getProperty(JSPFContentProperties.JSPCONTENTTYPE, file, true);
- }
- }
- mimeType = mimeType == null ? getDefaultMimeType() : mimeType;
- return reg.getTypeFor(mimeType);
- }
-
- /**
- * Method getDefaultMimeType.
- *
- * @return String
- */
- private String getDefaultMimeType() {
- return DEFAULT_MIME_TYPE;
- }
-
- /**
- * This method must return a new instance of IStructuredDocument, that has
- * been initialized with appropriate parser. For many loaders, the
- * (default) parser used is known for any input. For others, the correct
- * parser (and its initialization) is normall dependent on the content of
- * the file. This no-argument method should assume "empty input" and would
- * therefore return the default parser for the default contentType.
- *
- * If the parser is to handle tag libraries, it must have a TaglibSupport
- * object with a valid URIResolver and this IStructuredDocument attached
- * to it before the contents are set on the IStructuredDocument.
- */
- public IStructuredDocument newStructuredDocument() {
- IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- ((BasicStructuredDocument) structuredDocument).setReParser(new JSPReParser());
- // structuredDocument.setDocumentPartitioner(new
- // JSPJavaDocumentPartioner());
- // even though this is an "empty model" ... we want it to have at
- // least the
- // default embeddeded content type handler
- EmbeddedTypeHandler embeddedType = getJSPDefaultEmbeddedType(null);
- embeddedType.initializeParser((JSPCapableParser) structuredDocument.getParser());
- return structuredDocument;
- }
-
- public RegionParser getParser() {
- // remember, the Loader
- // will need to finish initialization of parser
- // based on "embedded content"
- return new JSPSourceParser();
- }
-
- protected void preLoadAdapt(IStructuredModel structuredModel) {
- super.preLoadAdapt(structuredModel);
- IDOMModel domModel = (IDOMModel) structuredModel;
- //
- // document must have already been set for this to
- // work.
- Document document = domModel.getDocument();
- Assert.isNotNull(document);
- // if there is a model in the adapter, this will adapt it to
- // first node. After that the PropagatingAdater spreads over the
- // children being
- // created. Each time that happends, a side effect is to
- // also "spread" sprecific registered adapters,
- // they two can propigate is needed.
- // This 'get' causes first to be be attached.
- PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
- // may make this easier to use in futue
- propagatingAdapter.addAdaptOnCreateFactory(new PageDirectiveWatcherFactory());
- if (Debug.debugNotificationAndEvents) {
- propagatingAdapter.addAdaptOnCreateFactory(new DebugAdapterFactory());
- }
- // For JSPs, the ModelQueryAdapter must be "attached" to the document
- // before content is set in the model, so taglib initization can
- // take place.
- ((INodeNotifier) document).getAdapterFor(ModelQueryAdapter.class);
- //
-
- }
-
- /**
- * This method must return those factories which must be attached to the
- * structuredModel before content is applied.
- */
- public List getAdapterFactories() {
- List result = new ArrayList();
- INodeAdapterFactory factory = null;
- //
- factory = new ModelQueryAdapterFactoryForJSP();
- result.add(factory);
- factory = new PropagatingAdapterFactoryImpl();
- result.add(factory);
- factory = new PageDirectiveAdapterFactory();
- result.add(factory);
-
- return result;
- }
-
-
- public IJSPHeadContentDetector getHeadParser() {
- return new JSPDocumentHeadContentDetector();
- }
-
- private IContentDescription getContentDescription(IDocument doc) {
- if (doc == null)
- return null;
- 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((JSPCapableParser) structuredDocument.getParser());
- // since 'document' is not recreated in this
- // reinit path, we need to remove all adapters,
- // except for the propagated adapters (including page
- // directive adapter, and model query adapter).
- // to accomplish this, we'll just remove all, then
- // add back with a call to pre-load adapt.
- // let clients decide to unload adapters from document
- // Collection oldAdapters = document.getAdapters();
- // Iterator oldAdaptersIterator = oldAdapters.iterator();
- // while (oldAdaptersIterator.hasNext()) {
- // INodeAdapter oldAdapter = (INodeAdapter)
- // oldAdaptersIterator.next();
- // if (oldAdapter != pageDirectiveAdapter && oldAdapter !=
- // propagatingAdapter && oldAdapter != modelQueryAdapter) {
- // // DO NOT remove directly!
- // // can change contents while in notifity loop!
- // //oldAdaptersIterator.remove();
- // document.removeAdapter(oldAdapter);
- // }
- // }
- // DMW: I believe something like the following is needed,
- // since releases cached adapters
- // if (document instanceof DocumentImpl) {
- // ((DocumentImpl) document).releaseDocumentType();
- // ((DocumentImpl) document).releaseStyleSheets();
- // }
- // remember, embedded type factories are automatically cleared when
- // embededType changed
- pageDirectiveAdapter.setEmbeddedType(newEmbeddedContentType);
- // // but still need to clear the page directive watchers, and let
- // them be rediscovered (with new, accurate node as target)
- // pageDirectiveAdapter.clearPageWatchers();
- if (newEmbeddedContentType != null) {
-
- // need to null out or else ModelParserAdapter
- // won't get reinitialized
- ((DOMModelImpl) model).setModelParser(null);
-
- newEmbeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- newEmbeddedContentType.initializeParser((JSPCapableParser) structuredDocument.getParser());
-
- // partitioner setup is the responsibility of this loader
- IDocumentPartitioner documentPartitioner = structuredDocument.getDocumentPartitioner();
- // ISSUE: this logic is flawed, not sure of original intent, but
- // added null/type checks for safety.
- if (documentPartitioner != null && documentPartitioner instanceof StructuredTextPartitionerForJSP) {
- if (newEmbeddedContentType.getFamilyId().equals(ContentTypeIdForXML.ContentTypeID_XML)) {
- ((StructuredTextPartitionerForJSP) documentPartitioner).setEmbeddedPartitioner(new StructuredTextPartitionerForXML());
- }
- else if (newEmbeddedContentType.getFamilyId().equals(ContentTypeIdForHTML.ContentTypeID_HTML)) {
- ((StructuredTextPartitionerForJSP) documentPartitioner).setEmbeddedPartitioner(new StructuredTextPartitionerForHTML());
- }
- }
- }
- // adding language here, in this convienent central
- // location, but some obvious renaming or refactoring
- // wouldn't hurt, in future.
- // I needed to add this language setting for JSP Fragment support
- // Note: this is the one that counts, since at this point,
- // the model has an ID, so we can look up IFile, etc.
- String language = getLanguage(model);
- if (language != null && language.length() > 0) {
- pageDirectiveAdapter.setLanguage(language);
- }
- }
-
- /**
- * This is "reinitialize" since there should always be at least the
- * default one assigned, before we start checking the stream
- */
- private void initCloneOfEmbeddedType(IStructuredModel model, EmbeddedTypeHandler oldEmbeddedContentType, EmbeddedTypeHandler newEmbeddedContentType) {
- // check program logic
- Assert.isNotNull(oldEmbeddedContentType, "Program error: invalid call during model initialization"); //$NON-NLS-1$
- // once we know the embedded content type, we need to set it in the
- // PageDirectiveAdapter ... the order of initialization is
- // critical here, the doc must have been created, but its contents not
- // set yet,
- // and all factories must have been set up also.
- IDOMModel domModel = (IDOMModel) model;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- IDOMDocument document = domModel.getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
- // ==> // PropagatingAdapter propagatingAdapter = (PropagatingAdapter)
- // ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
- // ==> // ModelQueryAdapter modelQueryAdapter = (ModelQueryAdapter)
- // ((INodeNotifier) document).getAdapterFor(ModelQueryAdapter.class);
- // because, even in the clone case, the model has been paritally
- // intialized with
- // the old embedded type (during createModel), we need to unitialize
- // parts of it, based on the old (or default) ones
- oldEmbeddedContentType.uninitializeFactoryRegistry(model.getFactoryRegistry());
- oldEmbeddedContentType.uninitializeParser((JSPCapableParser) structuredDocument.getParser());
- // remember, embedded type factories are automatically cleared when
- // embededType changed
- pageDirectiveAdapter.setEmbeddedType(newEmbeddedContentType);
- if (newEmbeddedContentType != null) {
- newEmbeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- newEmbeddedContentType.initializeParser((JSPCapableParser) structuredDocument.getParser());
- }
- // adding language here, in this convienent central
- // location, but some obvious renaming or refactoring
- // wouldn't hurt, in future.
- // I needed to add this language setting for JSP Fragment support
- // Note: this is the one that counts, since at this point,
- // the model has an ID, so we can look up IFile, etc.
- String language = getLanguage(model);
- if (language != null && language.length() > 0) {
- pageDirectiveAdapter.setLanguage(language);
- }
- }
-
- private EmbeddedTypeHandler getEmbeddedType(IStructuredModel model) {
- Document doc = ((IDOMModel) model).getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) ((INodeNotifier) doc).getAdapterFor(PageDirectiveAdapter.class);
- EmbeddedTypeHandler embeddedHandler = pageDirectiveAdapter.getEmbeddedType();
- return embeddedHandler;
- }
-
- protected void initEmbeddedTypePre(IStructuredModel model) {
-
- // note: this will currently only work for models backed by files
- EmbeddedTypeHandler embeddedContentType = null;
- IDOMModel domModel = (IDOMModel) model;
-
- if (embeddedContentType == null) {
- IContentDescription desc = getContentDescription(model.getStructuredDocument());
- if (desc != null) {
- Object prop = null;
-
- prop = desc.getProperty(IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE);
- if (prop != null) {
- if (ContentTypeFamilyForHTML.HTML_FAMILY.equals(prop)) {
- embeddedContentType = EmbeddedTypeRegistryImpl.getInstance().getTypeFor("text/html");
- }
- }
-
- if (embeddedContentType == null) {
-
- prop = desc.getProperty(IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE);
- if (prop != null) {
- embeddedContentType = EmbeddedTypeRegistryImpl.getInstance().getTypeFor((String) prop);
- }
- }
- }
- }
-
- IDOMDocument document = domModel.getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
-
- if (embeddedContentType != null) {
- pageDirectiveAdapter.setEmbeddedType(embeddedContentType);
- embeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- }
- else {
- // use default embeddedType if it couldn't determine one
- embeddedContentType = getJSPDefaultEmbeddedType(model);
- pageDirectiveAdapter.setEmbeddedType(embeddedContentType);
- embeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- }
- }
-
- protected void initEmbeddedTypePost(IStructuredModel model) {
- // should already be initialized (from initEmbeddedTypePre)
- // via IContentDescription
- setLanguageInPageDirective(model);
- }
-
- /**
- * Method initEmbeddedType.
- */
- protected void initEmbeddedType(IStructuredModel oldModel, IStructuredModel newModel) {
- EmbeddedTypeHandler existingEmbeddedType = getEmbeddedType(oldModel);
- EmbeddedTypeHandler newEmbeddedContentType = existingEmbeddedType.newInstance();
- if (existingEmbeddedType == null) {
- initEmbeddedTypePre(newModel);
- initEmbeddedTypePost(newModel);
- }
- else {
- // initEmbeddedType(newModel);
- initCloneOfEmbeddedType(newModel, existingEmbeddedType, newEmbeddedContentType);
- setLanguageInPageDirective(newModel);
- }
- }
-
- protected void setLanguageInPageDirective(IStructuredModel newModel) {
- if (newModel instanceof IDOMModel) {
- IDOMDocument document = ((IDOMModel) newModel).getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
- String language = getLanguage(newModel);
- pageDirectiveAdapter.setLanguage(language);
- }
- }
-
- public IStructuredModel reinitialize(IStructuredModel model) {
- EmbeddedTypeHandler oldHandler = null;
- EmbeddedTypeHandler newHandler = null;
- Object reinitStateData = model.getReinitializeStateData();
- if (reinitStateData instanceof EmbeddedTypeStateData) {
- EmbeddedTypeStateData oldStateData = (EmbeddedTypeStateData) reinitStateData;
- oldHandler = oldStateData.getOldHandler();
- newHandler = oldStateData.getNewHandler();
- // note. We should already have the new handler in the model's
- // (documents) adapters,
- // so need need to use the old one to undo the old state data
- reInitializeEmbeddedType(model, oldHandler, newHandler);
- }
- else {
- // for language ... we someday MIGHT have to do something
- // here, but for now, we don't have any model-side language
- // sensitive adapters.
- }
- return super.reinitialize(model);
- }
-
- public IModelLoader newInstance() {
- return new JSPModelLoader();
- }
-
- public IDocumentLoader getDocumentLoader() {
- if (documentLoaderInstance == null) {
- documentLoaderInstance = new JSPDocumentLoader();
- }
- return documentLoaderInstance;
- }
-
- /**
- * Ensures that an InputStream has mark/reset support.
- */
- public static InputStream getMarkSupportedStream(InputStream original) {
- if (original == null)
- return null;
- if (original.markSupported())
- return original;
- return new BufferedInputStream(original);
- }
-
- protected byte[] getBytes(InputStream inputStream, int max) throws IOException {
- byte[] smallBuffer = new byte[max];
- byte[] returnBuffer = null;
- int nRead = inputStream.read(smallBuffer, 0, max);
- if (nRead < max) {
- // empty file will return -1;
- if (nRead < 0)
- nRead = 0;
- byte[] smallerBuffer = new byte[nRead];
- System.arraycopy(smallBuffer, 0, smallerBuffer, 0, nRead);
- returnBuffer = smallerBuffer;
- }
- else {
- returnBuffer = smallBuffer;
- }
- return returnBuffer;
- }
-
- public IStructuredModel createModel(IStructuredModel oldModel) {
- IStructuredModel model = super.createModel(oldModel);
- // For JSPs, the ModelQueryAdapter must be "attached" to the document
- // before content is set in the model, so taglib initization can
- // take place.
- // In this "clone model" case, we create a ModelQuery adapter
- // create a new instance from the old data. Note: I think this
- // "forced fit" only works here since the implimentaiton of
- // ModelQueryAdatper does not
- // have to be released.
-
- ModelQueryAdapter modelQueryAdapter = getModelQueryAdapter(model);
- if (modelQueryAdapter == null) {
- modelQueryAdapter = getModelQueryAdapter(oldModel);
- IDOMDocument document = ((IDOMModel) model).getDocument();
- document.addAdapter(new JSPModelQueryAdapterImpl(modelQueryAdapter.getCMDocumentCache(), modelQueryAdapter.getModelQuery(), modelQueryAdapter.getIdResolver()));
-
- }
-
-
-
- return model;
- }
-
- private ModelQueryAdapter getModelQueryAdapter(IStructuredModel model) {
- IDOMDocument document = ((IDOMModel) model).getDocument();
-
- ModelQueryAdapter modelQueryAdapter = (ModelQueryAdapter) ((INodeNotifier) document).getAdapterFor(ModelQueryAdapter.class);
- return modelQueryAdapter;
- }
-
-}
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 b139f25e37..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, 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.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/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 5149774cb3..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;
- }
-
- 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 443c8ebc36..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForTag.java
+++ /dev/null
@@ -1,37 +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.ModelQueryImpl;
-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());
- }
-
- ModelQuery createModelQuery(IStructuredModel model, URIResolver resolver) {
- return new ModelQueryImpl(new SimpleAssociationProvider(new TagModelQueryCMProvider()));
- }
-}
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 a411467adb..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQueryCMProvider.java
+++ /dev/null
@@ -1,78 +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 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.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
-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.contentmodel.CMDocType;
-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 = HTMLCMDocumentFactory.getCMDocument(CMDocType.TAG20_DOC_TYPE);
-
- 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) 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.size() > 0)
- result = (CMDocument) documents.get(0);
- }
- }
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- if (result == null) {
- result = tagdoc;
- }
- return result;
- }
-}
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 fcb0642c96..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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 java.util.Iterator;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionParser;
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredTextReParser;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.text.CoreNodeList;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.xml.core.internal.parser.XMLStructuredDocumentReParser;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-public class JSPReParser extends XMLStructuredDocumentReParser {
-
- /**
- * Allow a reparser to check for extra syntactic cases that require
- * parsing beyond the flatNode boundary.
- *
- * This implementation adds JSP language markers (comments are handled
- * elsewhere).
- */
- protected StructuredDocumentEvent checkForCrossStructuredDocumentRegionSyntax() {
- StructuredDocumentEvent result = super.checkForCrossStructuredDocumentRegionSyntax();
- // None of the superclass' cases were valid, so check for JSP cases
- if (result == null) {
- result = checkForJSP();
- }
- return result;
- }
-
- /**
- * A change to a JSP tag can result in all being reparsed.
- */
- private StructuredDocumentEvent checkForJSP() {
- StructuredDocumentEvent result = null;
- result = checkForCriticalKey("<%"); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("<%="); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("<%!"); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("%>"); //$NON-NLS-1$
-
- return result;
- }
-
- /**
- * If a comment start or end tag is being added or deleted, we'll rescan
- * the whole document. The reason is that content that is revealed or
- * commented out can effect the interpretation of the rest of the
- * document. Note: for now this is very XML/JSP specific, can
- * refactor/improve later.
- */
- protected StructuredDocumentEvent checkForComments() {
-
- StructuredDocumentEvent result = super.checkForComments();
-
- if (result == null)
- result = checkForCriticalKey("<%--"); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("--%>"); //$NON-NLS-1$
- // we'll also check for these degenerate cases
- if (result == null)
- result = checkForCriticalKey("<%---%>"); //$NON-NLS-1$
-
- return result;
- }
-
- /**
- * The core reparsing method ... after the dirty start and dirty end have
- * been calculated elsewhere. - this method overrides, does not extend
- * super's method. changes/fixes to super may have to be made here as
- * well.
- */
- protected StructuredDocumentEvent reparse(IStructuredDocumentRegion dirtyStart, IStructuredDocumentRegion dirtyEnd) {
- StructuredDocumentEvent result = null;
- int rescanStart = -1;
- int rescanEnd = -1;
- boolean firstTime = false;
- boolean detectedBreakingChange = false;
-
- //
- // "save" the oldNodes (that may be replaced) in a list
- CoreNodeList oldNodes = formOldNodes(dirtyStart, dirtyEnd);
-
- if (containsBreakingChange(oldNodes) || isBreakingWithNestedTag(dirtyStart, dirtyEnd)) {
- if (Debug.debugTaglibs)
- System.out.println("reparse: is taglib or include"); //$NON-NLS-1$
- detectedBreakingChange = true;
- rescanStart = 0;
- rescanEnd = fStructuredDocument.getLength() + fLengthDifference;
- oldNodes = formOldNodes(fStructuredDocument.getFirstStructuredDocumentRegion(), fStructuredDocument.getLastStructuredDocumentRegion());
- clearTaglibInfo();
- }
- else if (dirtyStart == null || dirtyEnd == null) {
- // dirtyStart or dirty end are null, then that means we didn't
- // have a
- // cached node, which means we have an empty document, so we
- // just need to rescan the changes
- rescanStart = 0;
- rescanEnd = fChanges.length();
- firstTime = true;
- }
- else {
- // set the start of the text to rescan
- rescanStart = dirtyStart.getStart();
- //
- // set the end of the text to rescan
- // notice we use the same rationale as for the rescanStart,
- // with the added caveat that length has to be added to it,
- // to compensate for the new text which has been added or deleted.
- // If changes has zero length, then "length" will be negative,
- // since
- // we are deleting text. Otherwise, use the difference between
- // what's selected to be replaced and the length of the new text.
- rescanEnd = dirtyEnd.getEnd() + fLengthDifference;
- }
-
- // now that we have the old stuff "saved" away, update the document
- // with the changes.
- fStructuredDocument.updateDocumentData(fStart, fLengthToReplace, fChanges);
- // ------------------ now the real work
- result = core_reparse(rescanStart, rescanEnd, oldNodes, firstTime);
- //
-
- // if we did not detect a breaking type of change at the beginning,
- // but
- // do now, then reparse all! If we did detect them, then we may or may
- // not detect again, but presumably we've already set up to re-parsed
- // everthing, so no need to do again.
- if ((!detectedBreakingChange) && (containsBreakingChange(oldNodes))) {
- clearTaglibInfo();
- // reparse all
- oldNodes = formOldNodes(fStructuredDocument.getFirstStructuredDocumentRegion(), fStructuredDocument.getLastStructuredDocumentRegion());
- result = core_reparse(0, fStructuredDocument.getLength(), oldNodes, firstTime);
- }
-
- // event is returned to the caller, incase there is
- // some optimization they can do
- return result;
- }
-
- /**
- * Verifies that the regions given, representing the contents of a
- * IStructuredDocumentRegion, contain regions that could alter the
- * behavior of the parser or the parsing of areas outside of the regions
- * given.
- */
- private boolean isBreakingChange(IStructuredDocumentRegion node, ITextRegionList regions) {
- return isTaglibOrInclude(node, regions) || isJspRoot(regions);
- }
-
- /**
- * Verifies that the regions given, representing the regions touched by a
- * text change have: 1) ...an insertion at the textEndOffset of an
- * XML_TAG_OPEN that's in it's own IStructuredDocumentRegion and preceded
- * by an unended IStructuredDocumentRegion 2) ...a deletion happening in
- * an XML_EMPTY_TAG_CLOSE that ends a ITextRegionContainer 3) ...an
- * insertion happening with a ' <' character somewhere in an XML attribute
- * name or value 4) ...a deletion of a normal XML_TAG_CLOSE since
- * subsequent tags become attribute values
- */
-
- private boolean isBreakingWithNestedTag(boolean changesIncludeA_lt, boolean delsIncludeA_gt, IStructuredDocumentRegion parent, ITextRegion region) {
- boolean result = false;
-
- IStructuredDocumentRegion previous = parent.getPrevious();
- // case 1 test
- if (parent.getRegions().size() == 1 && region.getType() == DOMRegionContext.XML_TAG_OPEN && (previous == null || (!previous.isEnded() || previous.getType() == DOMRegionContext.XML_CONTENT))) {
- result = true;
- }
- // case 2 test
- if (region instanceof ITextRegionContainer) {
- ITextRegionContainer container = (ITextRegionContainer) region;
- ITextRegion internal = container.getRegions().get(container.getRegions().size() - 1);
- if (internal.getType() == DOMRegionContext.WHITE_SPACE && container.getRegions().size() >= 2)
- internal = container.getRegions().get(container.getRegions().size() - 2);
- if (internal.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE) {
- result = true;
- }
- }
- // case 3 test
- if (changesIncludeA_lt && (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME || region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
- result = true;
- }
- // case 4 test
- if (delsIncludeA_gt && region.getType() == DOMRegionContext.XML_TAG_CLOSE) {
- result = true;
- }
- return result;
- }
-
- /**
- * Verifies that the regions given, representing the contents of a
- * IStructuredDocumentRegion, includes a jsp:root tag
- */
- private boolean isJspRoot(ITextRegionList regions) {
- return regions.size() > 1 && regions.get(0).getType() == DOMRegionContext.XML_TAG_OPEN && regions.get(1).getType() == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME;
- }
-
- /**
- * Verifies that the regions given, representing the contents of a
- * IStructuredDocumentRegion, includes a valid taglib directive or include
- * directive
- */
- private boolean isTaglibOrInclude(IStructuredDocumentRegion node, ITextRegionList regions) {
- boolean sizeAndTypesMatch = (regions.size() > 1) && (regions.get(1).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) && (regions.get(0).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || regions.get(0).getType() == DOMRegionContext.XML_TAG_OPEN);
- if (!sizeAndTypesMatch)
- return false;
- ITextRegion region = regions.get(1);
- String directiveName = node.getText(region);
- return sizeAndTypesMatch && (directiveName.equals(JSP11TLDNames.TAGLIB) || directiveName.equals(JSP11TLDNames.INCLUDE) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE));
- }
-
- private void clearTaglibInfo() {
- if (Debug.debugTaglibs)
- System.out.println("clearing taglib info"); //$NON-NLS-1$
- RegionParser parser = fStructuredDocument.getParser();
- if (parser instanceof StructuredDocumentRegionParser)
- ((StructuredDocumentRegionParser) parser).resetHandlers();
- }
-
- private boolean containsBreakingChange(IStructuredDocumentRegionList list) {
- boolean contains = false;
- for (int i = 0; i < list.getLength(); i++) {
- IStructuredDocumentRegion node = list.item(i);
- if (isBreakingChange(node, node.getRegions())) {
- contains = true;
- break;
- }
- }
- return contains;
- }
-
- protected IStructuredDocumentRegion findDirtyEnd(int end) {
-
- IStructuredDocumentRegion result = super.findDirtyEnd(end);
-
- // if not well formed, get one past, if its not null
-
- // now, if any of to-be-scanned flatnodes are the start of a jsp
- // region, we'll
- // reparse all the way to the end, to be sure we detect embedded
- // regions (or not-embedded regions) correctly.
- // notice we don't need to do if we're only processing one node.
- // notice too we have a strong assumption here that dirtyStart has
- // already been found!
- //
- // note that dirtyEnd is not checked in the do-block below, so we'll
- // check it first.
- if (isJSPEmbeddedStartOrEnd(result)) {
- result = fStructuredDocument.getLastStructuredDocumentRegion();
- }
- else {
- // when end node and start node are the same, we only need the
- // above
- // check, otherwise, there's a few cases that we'll search the
- // rest of the
- // flatnodes needlessly.
- if (result != dirtyStart) {
- IStructuredDocumentRegion searchNode = dirtyStart;
- do {
- if (isJSPEmbeddedStartOrEnd(searchNode)) {
- result = fStructuredDocument.getLastStructuredDocumentRegion();
- break;
- }
- else {
- searchNode = searchNode.getNext();
- }
- // if we get to the current dirty end, or end of
- // flatnodes, without finding JSP region then we
- // don't need to check further
- }
- while ((searchNode != result) && (searchNode != null));
- }
- }
- // result should never be null, but cachedNode needs to be protected
- // from being changed to null
- if (result != null)
- fStructuredDocument.setCachedDocumentRegion(result);
- dirtyEnd = result;
- return dirtyEnd;
- }
-
- private boolean isBreakingWithNestedTag(IStructuredDocumentRegion start, IStructuredDocumentRegion end) {
- boolean result = false;
- boolean changesIncludeA_lt = fChanges != null && fChanges.indexOf('<') >= 0;
- boolean delsIncludeA_gt = fDeletedText != null && fDeletedText.indexOf('>') >= 0;
-
- // List regions = new ArrayList();
- IStructuredDocumentRegion node = start;
- int endReplace = fStart + fLengthToReplace;
- while (end != null && node != end.getNext()) {
- Iterator i = node.getRegions().iterator();
- while (i.hasNext()) {
- ITextRegion region = (ITextRegion) i.next();
- if (intersects(node, region, fStart, endReplace)) {
-
- result = isBreakingWithNestedTag(changesIncludeA_lt, delsIncludeA_gt, node, region);
-
- if (result)
- break;
- }
- }
- node = node.getNext();
- if (result)
- break;
- }
- return result;
- }
-
- private boolean intersects(IStructuredDocumentRegion node, ITextRegion region, int low, int high) {
- int start = node.getStartOffset(region);
- int end = node.getEndOffset(region);
- return (end >= low && start <= high) || (start <= low && end >= low) || (start <= high && end >= high);
- }
-
- /**
- * Returns true if potentially could be a jsp embedded region. Things like
- * JSP Declaration can't be embedded.
- */
- private boolean isJSPEmbeddedStartOrEnd(IStructuredDocumentRegion flatNode) {
- boolean result = false;
- String type = flatNode.getType();
- result = ((type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN));
- return result;
- }
-
- /**
- * extends super class behavior
- */
- protected boolean isPartOfBlockRegion(IStructuredDocumentRegion flatNode) {
- boolean result = false;
- String type = flatNode.getType();
- result = ((type == DOMJSPRegionContexts.JSP_CLOSE) || (type == DOMJSPRegionContexts.JSP_CONTENT) || super.isPartOfBlockRegion(flatNode));
- return result;
- }
-
- public IStructuredTextReParser newInstance() {
- return new JSPReParser();
- }
-
- public StructuredDocumentEvent quickCheck() {
- if (containsBreakingChange(new CoreNodeList(dirtyStart, dirtyEnd)))
- return null;
- return super.quickCheck();
- }
-
-}
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 280e3ff4f6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.parser;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.parser.internal.JSPTokenizer;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockTokenizer;
-import org.eclipse.wst.sse.core.internal.ltk.parser.JSPCapableParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandler;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandlerExtension;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.text.IRegionComparible;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-/**
- * Takes input from the JSPTokenizer and creates a tag list
- */
-
-public class JSPSourceParser extends XMLSourceParser implements JSPCapableParser {
- protected class NestablePrefixHandler implements StructuredDocumentRegionHandler, StructuredDocumentRegionHandlerExtension {
-
- private static final String XMLNS = "xmlns:"; //$NON-NLS-1$
-
- /**
- * Enables a TLD owning the given prefix loaded from the given URI at
- * the anchorFlatNode. The list of additionalCMDocuments will claim to
- * not know any of its tags at positions earlier than that
- * IStructuredDocumentRegion's position.
- *
- * For taglib directives, the taglib is the anchor while taglibs
- * registered through include directives use the primary include
- * directive as their anchor.
- */
- protected void enableForTaglib(String prefix, IStructuredDocumentRegion anchorFlatNode) {
- if (prefix == null)
- return;
- List tagmarkers = ((JSPTokenizer) getTokenizer()).getNestablePrefixes();
- for (int i = 0; i < tagmarkers.size(); i++) {
- if (((TagMarker) tagmarkers.get(i)).getTagName().equals(prefix))
- return;
- }
- ((JSPTokenizer) getTokenizer()).getNestablePrefixes().add(new TagMarker(prefix, anchorFlatNode));
- }
-
- public void nodeParsed(IStructuredDocumentRegion aCoreFlatNode) {
- // could test > 1, but since we only care if there are 8 (<%@,
- // taglib, uri, =, where, prefix, =, what) [or 4 for includes]
- if (aCoreFlatNode.getNumberOfRegions() > 4 && aCoreFlatNode.getRegions().get(1).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- ITextRegion name = aCoreFlatNode.getRegions().get(1);
- try {
- int offset = aCoreFlatNode.getStartOffset(name);
- int length = name.getTextLength();
- boolean taglibdetected = false;
- boolean taglibdirectivedetected = false;
- if (fCharSequenceSource instanceof IRegionComparible) {
- taglibdetected = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12TLDNames.TAGLIB);
- taglibdirectivedetected = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- }
- else {
- // old fashioned way
- String directiveName = getText(offset, length);
- taglibdetected = directiveName.equals(JSP12TLDNames.TAGLIB);
- taglibdirectivedetected = directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- }
- boolean processDirectiveName = taglibdetected || taglibdirectivedetected;
- if (processDirectiveName) {
- processTaglib(aCoreFlatNode);
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // do nothing
- }
- }
- // could test > 1, but since we only care if there are 5 (<,
- // jsp:root, xmlns:prefix, =, where)
- else if (aCoreFlatNode.getNumberOfRegions() > 4 && (aCoreFlatNode.getRegions().get(1)).getType() == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME) {
- processJSPRoot(aCoreFlatNode);
- }
- }
-
- protected void processJSPRoot(IStructuredDocumentRegion taglibFlatNode) {
- ITextRegionList regions = taglibFlatNode.getRegions();
- String prefix = null;
- boolean taglib = false;
- try {
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- int offset = taglibFlatNode.getStartOffset(region);
- int length = region.getTextLength();
-
- String name = getText(offset, length);
- if (name.startsWith(XMLNS) && name.length() > XMLNS.length()) { //$NON-NLS-1$
- prefix = name.substring(6);
- taglib = true;
- }
- else {
- prefix = null;
- taglib = false;
- }
- }
- else if (taglib && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- prefix = StringUtils.strip(prefix);
- if (prefix != null && prefix.length() > 0) {
- enableForTaglib(prefix, taglibFlatNode);
- prefix = null;
- }
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- prefix = null;
- }
- }
-
- /**
- * Pulls the prefix from the given taglib directive
- * IStructuredDocumentRegion and makes sure the prefix is nestable.
- */
- protected void processTaglib(IStructuredDocumentRegion taglibFlatNode) {
- ITextRegionList regions = taglibFlatNode.getRegions();
- String prefix = null;
- boolean prefixname = false;
- try {
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) {
- int offset = taglibFlatNode.getStartOffset(region);
- int length = region.getTextLength();
- prefixname = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12TLDNames.PREFIX);
- }
- else {
- // old fashioned way
- prefixname = (getText(taglibFlatNode.getStartOffset(region), region.getTextLength()).equals(JSP12TLDNames.PREFIX));
- }
- }
- else if (prefixname && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- prefix = getText(taglibFlatNode.getStartOffset(region), region.getTextLength());
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- prefix = null;
- }
- prefix = StringUtils.strip(prefix);
- if (prefix != null && prefix.length() > 0) {
- enableForTaglib(prefix, taglibFlatNode);
- }
- }
-
- public void resetNodes() {
- Iterator tagmarkers = ((JSPTokenizer) getTokenizer()).getNestablePrefixes().iterator();
- while (tagmarkers.hasNext()) {
- if (!((TagMarker) tagmarkers.next()).isGlobal())
- tagmarkers.remove();
- }
- }
-
- public void setStructuredDocument(IStructuredDocument newDocument) {
- resetNodes();
- getStructuredDocumentRegionHandlers().remove(this);
- if (newDocument != null && newDocument.getParser() instanceof StructuredDocumentRegionParser) {
- ((StructuredDocumentRegionParser) newDocument.getParser()).addStructuredDocumentRegionHandler(this);
- }
- }
- }
-
- /**
- * JSPSourceParser constructor comment.
- */
- public JSPSourceParser() {
- super();
- }
-
- public void addNestablePrefix(TagMarker marker) {
- ((JSPTokenizer) getTokenizer()).addNestablePrefix(marker);
- }
-
- public List getNestablePrefixes() {
- return ((JSPTokenizer) getTokenizer()).getNestablePrefixes();
- }
-
- protected BlockTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new JSPTokenizer();
- getStructuredDocumentRegionHandlers().add(new NestablePrefixHandler());
- }
- return fTokenizer;
- }
-
-
- public RegionParser newInstance() {
- JSPSourceParser newInstance = new JSPSourceParser();
- newInstance.setTokenizer(getTokenizer().newInstance());
- return newInstance;
- }
-
- protected IStructuredDocumentRegion parseNodes() {
- // regions are initially reported as complete offsets within the
- // scanned input
- // they are adjusted here to be indexes from the currentNode's start
- // offset
- IStructuredDocumentRegion headNode = null;
- IStructuredDocumentRegion lastNode = null;
- ITextRegion region = null;
- // DMW: 2/12/03. Made current node local variable, since
- // we changed class to not require state
- IStructuredDocumentRegion currentNode = null;
- String type = null;
-
- while ((region = getNextRegion()) != null) {
- type = region.getType();
- // these types (might) demand a IStructuredDocumentRegion for each
- // of them
- if (type == DOMRegionContext.BLOCK_TEXT) {
- if (currentNode != null && currentNode.getLastRegion().getType() == DOMRegionContext.BLOCK_TEXT) {
- // multiple block texts indicated embedded containers; no
- // new IStructuredDocumentRegion
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
- }
- else {
- // not continuing a IStructuredDocumentRegion
- if (currentNode != null) {
- // ensure that any existing node is at least
- // terminated
- if (!currentNode.isEnded()) {
- currentNode.setLength(region.getStart() - currentNode.getStart());
- // fCurrentNode.setTextLength(region.getStart() -
- // fCurrentNode.getStart());
- }
- lastNode = currentNode;
- }
- fireNodeParsed(currentNode);
- currentNode = createStructuredDocumentRegion(type);
- if (lastNode != null) {
- lastNode.setNext(currentNode);
- }
- currentNode.setPrevious(lastNode);
- currentNode.setStart(region.getStart());
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- currentNode.setEnded(true);
- region.adjustStart(-currentNode.getStart());
- currentNode.addRegion(region);
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
-
- }
- }
- // the following contexts OPEN new StructuredDocumentRegions
- else if ((currentNode != null && currentNode.isEnded()) || (type == DOMRegionContext.XML_CONTENT) || (type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE) || (type == DOMRegionContext.XML_PI_OPEN) || (type == DOMRegionContext.XML_TAG_OPEN) || (type == DOMRegionContext.XML_END_TAG_OPEN) || (type == DOMRegionContext.XML_COMMENT_OPEN) || (type == DOMRegionContext.XML_CDATA_OPEN) || (type == DOMRegionContext.XML_DECLARATION_OPEN) || (type == DOMJSPRegionContexts.JSP_COMMENT_OPEN) || (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) || (type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) || (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == DOMJSPRegionContexts.JSP_CLOSE) || type == DOMJSPRegionContexts.JSP_EL_OPEN) {
- if (currentNode != null) {
- // ensure that any existing node is at least terminated
- if (!currentNode.isEnded()) {
- currentNode.setLength(region.getStart() - currentNode.getStart());
- // fCurrentNode.setTextLength(region.getStart() -
- // fCurrentNode.getStart());
- }
- lastNode = currentNode;
- }
- fireNodeParsed(currentNode);
- currentNode = createStructuredDocumentRegion(type);
- if (lastNode != null) {
- lastNode.setNext(currentNode);
- }
- currentNode.setPrevious(lastNode);
- currentNode.setStart(region.getStart());
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
-
- }
- // the following contexts NEITHER open nor close
- // StructuredDocumentRegions; just add to them
- else if ((type == DOMRegionContext.XML_TAG_NAME) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) || (type == DOMRegionContext.XML_COMMENT_TEXT) || (type == DOMRegionContext.XML_PI_CONTENT) || (type == DOMRegionContext.XML_DOCTYPE_INTERNAL_SUBSET) || (type == DOMJSPRegionContexts.JSP_COMMENT_TEXT) || (type == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME) || (type == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) || type == DOMJSPRegionContexts.JSP_EL_CONTENT) {
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
- }
- // the following contexts close off StructuredDocumentRegions
- // cleanly
- else if ((type == DOMRegionContext.XML_PI_CLOSE) || (type == DOMRegionContext.XML_TAG_CLOSE) || (type == DOMRegionContext.XML_EMPTY_TAG_CLOSE) || (type == DOMRegionContext.XML_COMMENT_CLOSE) || (type == DOMRegionContext.XML_CDATA_CLOSE) || (type == DOMJSPRegionContexts.JSP_CLOSE) || (type == DOMJSPRegionContexts.JSP_COMMENT_CLOSE) || (type == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE) || (type == DOMRegionContext.XML_DECLARATION_CLOSE) || type == DOMJSPRegionContexts.JSP_EL_CLOSE) {
- currentNode.setEnded(true);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- currentNode.addRegion(region);
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
- }
- // this is extremely rare, but valid
- else if (type == DOMRegionContext.WHITE_SPACE) {
- ITextRegion lastRegion = currentNode.getLastRegion();
- // pack the embedded container with this region
- if (lastRegion instanceof ITextRegionContainer) {
- ITextRegionContainer container = (ITextRegionContainer) lastRegion;
- container.getRegions().add(region);
- // DW, 4/16/2003 container regions have parent. Probably a
- // better place to set,
- // but for now, will (re)set each time through
- container.setParent(currentNode);
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(container);
- region.adjustStart(container.getLength() - region.getStart());
- }
- currentNode.getLastRegion().adjustLength(region.getLength());
- currentNode.adjustLength(region.getLength());
- }
- else if (type == DOMRegionContext.UNDEFINED && currentNode != null) {
- // skip on a very-first region situation as the default
- // behavior is good enough
- // combine with previous if also undefined
- if (currentNode.getLastRegion() != null && currentNode.getLastRegion().getType() == DOMRegionContext.UNDEFINED) {
- currentNode.getLastRegion().adjustLength(region.getLength());
- currentNode.adjustLength(region.getLength());
- }
- // previous wasn't undefined
- else {
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- }
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
- }
- else {
- // if an unknown type is the first region in the document,
- // ensure that a node exists
- if (currentNode == null) {
- currentNode = createStructuredDocumentRegion(type);
- currentNode.setStart(region.getStart());
- }
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
-
- if (Debug.debugTokenizer)
- System.out.println(getClass().getName() + " found region of not specifically handled type " + region.getType() + " @ " + region.getStart() + "[" + region.getLength() + "]");//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-
- }
-
- // these regions also get their own node, so close them cleanly
- // NOTE: these regions have new StructuredDocumentRegions created
- // for them above; it may
- // be more readable if that is handled here as well, but the
- // current layout
- // ensures that they open StructuredDocumentRegions the same way
- if ((type == DOMRegionContext.XML_CONTENT) || (type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE) || (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) || (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == DOMJSPRegionContexts.JSP_CONTENT) || (type == DOMJSPRegionContexts.JSP_CLOSE)) {
- currentNode.setEnded(true);
- }
- if (headNode == null && currentNode != null) {
- headNode = currentNode;
- }
- }
- if (currentNode != null) {
- fireNodeParsed(currentNode);
- currentNode.setPrevious(lastNode);
- }
- primReset();
- return headNode;
- }
-
- public void removeNestablePrefix(String tagName) {
- ((JSPTokenizer) getTokenizer()).removeNestablePrefix(tagName);
- }
-
-}
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 b4244760d2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java
+++ /dev/null
@@ -1,3838 +0,0 @@
-/* The following code was generated by JFlex 1.2.2 on 10/24/07 5:16 AM */
-
-/*******************************************************************************
- * 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.parser.internal;
-
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockTokenizer;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.parser.ContextRegionContainer;
-import org.eclipse.wst.xml.core.internal.parser.IntStack;
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2
- * on 10/24/07 5:16 AM from the specification file
- * <tt>file:/D:/eclipse.wtp/workspace/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.jflex</tt>
- */
-public class JSPTokenizer implements BlockTokenizer, DOMJSPRegionContexts {
-
- /** this character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** lexical states */
- final public static int ST_JSP_VBL_DQUOTES = 51;
- final public static int ST_JSP_VBL_SQUOTES = 50;
- final public static int ST_JSP_VBL_SQUOTES_END = 52;
- 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 = 45;
- final public static int ST_JSP_EL_DQUOTES = 44;
- final public static int ST_JSP_EL = 42;
- final public static int ST_BLOCK_TAG_SCAN = 36;
- final public static int ST_JSP_EL_SQUOTES = 43;
- final public static int ST_DHTML_ATTRIBUTE_VALUE = 14;
- final public static int ST_XML_PI_ATTRIBUTE_NAME = 8;
- final public static int ST_DHTML_TAG_CLOSE = 15;
- final public static int ST_XML_ATTRIBUTE_VALUE_DQUOTED = 41;
- final public static int ST_DHTML_EQUALS = 13;
- final public static int ST_XML_PI_ATTRIBUTE_VALUE = 10;
- final public static int ST_XML_ATTRIBUTE_VALUE = 25;
- final public static int ST_JSP_VBL = 49;
- final public static int ST_JSP_SQUOTED_VBL = 55;
- final public static int ST_XML_ATTRIBUTE_VALUE_SQUOTED = 40;
- final public static int ST_XML_ATTRIBUTE_NAME = 23;
- final public static int ST_XML_EQUALS = 24;
- final public static int YYINITIAL = 0;
- final public static int ST_JSP_DIRECTIVE_ATTRIBUTE_NAME = 19;
- final public static int ST_JSP_CONTENT = 16;
- final public static int ST_XML_DOCTYPE_ID_SYSTEM = 31;
- final public static int ST_XML_ELEMENT_DECLARATION = 32;
- final public static int ST_XML_DECLARATION_CLOSE = 27;
- final public static int ST_JSP_DIRECTIVE_EQUALS = 20;
- final public static int ST_JSP_VBL_DQUOTES_END = 53;
- final public static int ST_JSP_DQUOTED_EL = 47;
- 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 = 46;
- final public static int ST_JSP_SQUOTED_EL = 48;
- 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 = 54;
- 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;
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed =
- "\11\0\1\5\1\26\2\0\1\17\22\0\1\17\1\25\1\12\1\65"+
- "\1\15\1\22\1\13\1\14\1\24\1\24\1\24\1\24\1\24\1\7"+
- "\1\6\1\3\12\20\1\11\1\72\1\1\1\51\1\2\1\4\1\21"+
- "\1\40\1\73\1\36\1\37\1\55\1\70\1\62\1\62\1\63\1\62"+
- "\1\62\1\33\1\31\1\64\1\52\1\54\1\62\1\67\1\66\1\41"+
- "\1\71\2\62\1\27\1\53\1\62\1\35\1\104\1\23\1\0\1\10"+
- "\1\0\1\57\1\103\1\74\1\60\1\43\1\70\1\75\1\106\1\46"+
- "\1\100\1\62\1\34\1\32\1\50\1\47\1\101\1\62\1\44\1\45"+
- "\1\56\1\102\1\42\1\62\1\30\1\61\1\62\1\16\1\0\1\105"+
- "\71\0\1\77\10\0\27\76\1\0\37\76\1\0\72\76\2\0\13\76"+
- "\2\0\10\76\1\0\65\76\1\0\104\76\11\0\44\76\3\0\2\76"+
- "\4\0\36\76\70\0\131\76\22\0\7\76\16\0\2\77\56\0\106\77"+
- "\32\0\2\77\44\0\1\76\1\77\3\76\1\0\1\76\1\0\24\76"+
- "\1\0\54\76\1\0\7\76\3\0\1\76\1\0\1\76\1\0\1\76"+
- "\1\0\1\76\1\0\22\76\15\0\14\76\1\0\102\76\1\0\14\76"+
- "\1\0\44\76\1\0\4\77\11\0\65\76\2\0\2\76\2\0\2\76"+
- "\3\0\34\76\2\0\10\76\2\0\2\76\67\0\46\76\2\0\1\76"+
- "\7\0\46\76\12\0\21\77\1\0\27\77\1\0\3\77\1\0\1\77"+
- "\1\0\2\77\1\0\1\77\13\0\33\76\5\0\3\76\56\0\32\76"+
- "\5\0\1\77\12\76\10\77\15\0\12\77\6\0\1\77\107\76\2\0"+
- "\5\76\1\0\17\76\1\0\4\76\1\0\1\76\17\77\2\76\2\77"+
- "\1\0\4\77\2\0\12\77\u0207\0\3\77\1\0\65\76\2\0\1\77"+
- "\1\76\20\77\3\0\4\77\3\0\12\76\2\77\2\0\12\77\21\0"+
- "\3\77\1\0\10\76\2\0\2\76\2\0\26\76\1\0\7\76\1\0"+
- "\1\76\3\0\4\76\2\0\1\77\1\0\7\77\2\0\2\77\2\0"+
- "\3\77\11\0\1\77\4\0\2\76\1\0\3\76\2\77\2\0\12\77"+
- "\2\76\20\0\1\77\2\0\6\76\4\0\2\76\2\0\26\76\1\0"+
- "\7\76\1\0\2\76\1\0\2\76\1\0\2\76\2\0\1\77\1\0"+
- "\5\77\4\0\2\77\2\0\3\77\13\0\4\76\1\0\1\76\7\0"+
- "\12\77\2\77\3\76\14\0\3\77\1\0\7\76\1\0\1\76\1\0"+
- "\3\76\1\0\26\76\1\0\7\76\1\0\2\76\1\0\5\76\2\0"+
- "\1\77\1\76\10\77\1\0\3\77\1\0\3\77\22\0\1\76\5\0"+
- "\12\77\21\0\3\77\1\0\10\76\2\0\2\76\2\0\26\76\1\0"+
- "\7\76\1\0\2\76\2\0\4\76\2\0\1\77\1\76\6\77\3\0"+
- "\2\77\2\0\3\77\10\0\2\77\4\0\2\76\1\0\3\76\4\0"+
- "\12\77\22\0\2\77\1\0\6\76\3\0\3\76\1\0\4\76\3\0"+
- "\2\76\1\0\1\76\1\0\2\76\3\0\2\76\3\0\3\76\3\0"+
- "\10\76\1\0\3\76\4\0\5\77\3\0\3\77\1\0\4\77\11\0"+
- "\1\77\17\0\11\77\21\0\3\77\1\0\10\76\1\0\3\76\1\0"+
- "\27\76\1\0\12\76\1\0\5\76\4\0\7\77\1\0\3\77\1\0"+
- "\4\77\7\0\2\77\11\0\2\76\4\0\12\77\22\0\2\77\1\0"+
- "\10\76\1\0\3\76\1\0\27\76\1\0\12\76\1\0\5\76\4\0"+
- "\7\77\1\0\3\77\1\0\4\77\7\0\2\77\7\0\1\76\1\0"+
- "\2\76\4\0\12\77\22\0\2\77\1\0\10\76\1\0\3\76\1\0"+
- "\27\76\1\0\20\76\4\0\6\77\2\0\3\77\1\0\4\77\11\0"+
- "\1\77\10\0\2\76\4\0\12\77\221\0\56\76\1\0\1\76\1\77"+
- "\2\76\7\77\5\0\6\76\1\77\10\77\1\0\12\77\47\0\2\76"+
- "\1\0\1\76\2\0\2\76\1\0\1\76\2\0\1\76\6\0\4\76"+
- "\1\0\7\76\1\0\3\76\1\0\1\76\1\0\1\76\2\0\2\76"+
- "\1\0\2\76\1\0\1\76\1\77\2\76\6\77\1\0\2\77\1\76"+
- "\2\0\5\76\1\0\1\77\1\0\6\77\2\0\12\77\76\0\2\77"+
- "\6\0\12\77\13\0\1\77\1\0\1\77\1\0\1\77\4\0\2\77"+
- "\10\76\1\0\41\76\7\0\24\77\1\0\6\77\4\0\6\77\1\0"+
- "\1\77\1\0\25\77\3\0\7\77\1\0\1\77\346\0\46\76\12\0"+
- "\47\76\11\0\1\76\1\0\2\76\1\0\3\76\1\0\1\76\1\0"+
- "\2\76\1\0\5\76\51\0\1\76\1\0\1\76\1\0\1\76\13\0"+
- "\1\76\1\0\1\76\1\0\1\76\3\0\2\76\3\0\1\76\5\0"+
- "\3\76\1\0\1\76\1\0\1\76\1\0\1\76\1\0\1\76\3\0"+
- "\2\76\3\0\2\76\1\0\1\76\50\0\1\76\11\0\1\76\2\0"+
- "\1\76\2\0\2\76\7\0\2\76\1\0\1\76\1\0\7\76\50\0"+
- "\1\76\4\0\1\76\10\0\1\76\u0c06\0\234\76\4\0\132\76\6\0"+
- "\26\76\2\0\6\76\2\0\46\76\2\0\6\76\2\0\10\76\1\0"+
- "\1\76\1\0\1\76\1\0\1\76\1\0\37\76\2\0\65\76\1\0"+
- "\7\76\1\0\1\76\3\0\3\76\1\0\7\76\3\0\4\76\2\0"+
- "\6\76\4\0\15\76\5\0\3\76\1\0\7\76\323\0\15\77\4\0"+
- "\1\77\104\0\1\76\3\0\2\76\2\0\1\76\121\0\3\76\u0e82\0"+
- "\1\77\1\0\1\76\31\0\11\76\6\77\1\0\5\77\13\0\124\76"+
- "\4\0\2\77\2\0\2\77\2\0\132\76\1\0\3\77\6\0\50\76"+
- "\u1cd3\0\u51a6\76\u0c5a\0\u2ba4\76\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, 4402, 4473, 4544, 4402, 4402, 4473,
- 4615, 4686, 4757, 4828, 4899, 4970, 5041, 5112, 4402, 4473,
- 5183, 5254, 5325, 4402, 5396, 5396, 5467, 5538, 5609, 5183,
- 4402, 5680, 5751, 4402, 5822, 5893, 5964, 6035, 4402, 4473,
- 6106, 6177, 6248, 6319, 6390, 6461, 4402, 6532, 6532, 6603,
- 6674, 6745, 6816, 6887, 4402, 6958, 7029, 7100, 7171, 7242,
- 7313, 4402, 7384, 7455, 7526, 7597, 7668, 7739, 7810, 7881,
- 4402, 7952, 8023, 8094, 8165, 8236, 8307, 8378, 8449, 8449,
- 8520, 8591, 8662, 8733, 8733, 8804, 8875, 8946, 9017, 9017,
- 9088, 9159, 9230, 9301, 4402, 9372, 9372, 9443, 9514, 9585,
- 9656, 4402, 4402, 4473, 4402, 4473, 9727, 9798, 9869, 9940,
- 4402, 10011, 10082, 10153, 10224, 4402, 10295, 10366, 10437, 10508,
- 4402, 4402, 10579, 4402, 10650, 10721, 10650, 10792, 10863, 10792,
- 4402, 4402, 10934, 11005, 11076, 4402, 11147, 11218, 11289, 11360,
- 11431, 4402, 4402, 11502, 4402, 11573, 11644, 11573, 11715, 11786,
- 11715, 4402, 4402, 11857, 11928, 11999, 4402, 12070, 12141, 12212,
- 4402, 4402, 12283, 12354, 12425, 12496, 12567, 4402, 12638, 12709,
- 12780, 12851, 12922, 12993, 13064, 13135, 4402, 13206, 13277, 13348,
- 4402, 4402, 5396, 5538, 4402, 13419, 5609, 13490, 5680, 5822,
- 5893, 13561, 5964, 4402, 13632, 13703, 6035, 13774, 4402, 12354,
- 4402, 6532, 6603, 4402, 13845, 6674, 13916, 4402, 13987, 14058,
- 7384, 14129, 7597, 4402, 14200, 7668, 14271, 14342, 14413, 14484,
- 14555, 14626, 8165, 4402, 14697, 14768, 8449, 8520, 4402, 14839,
- 14910, 14981, 15052, 15123, 8662, 8449, 8733, 8804, 4402, 8875,
- 8946, 8733, 9017, 9088, 4402, 15194, 15265, 15336, 15407, 15478,
- 15549, 15620, 9372, 9443, 4402, 15691, 15762, 15833, 15904, 15975,
- 16046, 16117, 16188, 16259, 4402, 4402, 4402, 16330, 4402, 4402,
- 16401, 16472, 16543, 16614, 10650, 4402, 16685, 16756, 10792, 4402,
- 16827, 16898, 16969, 17040, 17111, 17182, 17253, 17324, 17395, 11360,
- 11573, 4402, 17466, 17537, 11715, 4402, 17608, 17679, 17750, 17821,
- 17892, 17963, 18034, 18105, 18176, 4402, 4402, 4402, 18247, 18318,
- 18389, 18460, 18531, 4402, 18602, 18673, 4402, 4402, 4402, 4402,
- 4402, 4828, 18744, 18815, 18886, 18957, 19028, 19099, 19170, 19099,
- 19241, 19312, 19241, 19383, 19454, 19525, 19596, 19667, 19738, 19809,
- 19809, 19880, 19951, 19951, 20022, 9230, 9230, 9230, 20093, 20164,
- 20235, 20235, 20306, 9585, 9585, 9585, 20377, 20448, 16543, 20519,
- 10437, 10437, 10437, 20590, 20661, 10650, 10650, 10650, 20732, 20803,
- 10792, 10792, 10792, 20874, 20945, 10934, 10934, 10934, 17111, 21016,
- 21087, 11147, 11147, 11147, 17324, 21158, 21229, 11360, 11360, 11360,
- 21300, 11573, 11573, 11573, 21371, 21442, 11715, 11715, 11715, 21513,
- 21584, 11857, 11857, 11857, 17892, 21655, 21726, 12070, 12070, 12070,
- 18105, 21797, 4402, 4402, 21868, 21939, 4402, 22010, 22081, 22152,
- 22223, 7384, 4402, 4402, 22294, 22365, 22436, 22507, 22578, 15052,
- 15407, 9230, 22649, 15904, 9585, 22720, 4402, 10437, 10650, 22791,
- 10792, 22862, 10934, 22933, 4402, 11147, 23004, 11360, 11573, 23075,
- 11715, 23146, 11857, 23217, 4402, 12070, 23288, 23359, 23430, 23501,
- 23572, 23643, 23714, 23785, 23856, 23927, 23998, 24069, 24140, 24211,
- 24282, 24353, 24424, 24495, 24566, 24637, 24708, 24779, 24850, 4828,
- 24921, 24992, 25063, 25134, 25205, 4402, 4402, 25276, 25347, 25418,
- 25489, 17111, 17324, 25560, 25631, 17892, 18105, 25702, 25773, 25844,
- 25915, 4402, 4402, 4402, 25986, 26057, 26128, 26199, 26270, 26341,
- 26412, 26483, 7100, 26554, 26625, 26696, 26767, 26838, 26909, 26980,
- 4402, 27051, 27122, 9230, 9585, 10650, 10792, 11573, 11715, 27193,
- 27264, 27335, 27406, 27477, 27548, 27619, 27690, 4828, 27761, 27832,
- 27903, 27974, 28045, 28116, 28187, 28258, 28329, 28400, 28471, 28542,
- 28613, 28684, 28755, 28826, 28897, 28968, 29039, 29110, 29181, 29252,
- 29323, 29394, 29465, 29536, 29607, 29678, 29749, 29820, 29891, 29962,
- 30033, 30104, 30175, 30246, 4402, 30317, 30388, 30459, 30530, 7100,
- 30601, 30672, 30743, 30814, 30885, 30956, 31027, 31098, 31169, 31240,
- 31311, 31382, 31453, 31524
- };
-
- /**
- * The packed transition table of the DFA
- */
- final private static String yy_packed =
- "\1\71\1\72\11\71\1\73\1\71\1\74\4\71\1\75"+
- "\42\71\1\76\21\71\1\77\1\100\105\77\1\101\1\102"+
- "\21\101\1\103\2\101\1\104\60\101\1\105\1\106\105\105"+
- "\1\101\1\102\5\101\1\107\16\101\1\104\61\101\1\102"+
- "\2\101\1\110\1\111\2\101\2\112\5\101\1\111\6\101"+
- "\1\111\1\113\1\114\4\112\1\101\10\112\1\115\2\112"+
- "\1\101\11\112\1\115\1\112\1\101\4\112\1\101\4\112"+
- "\1\101\4\112\2\101\1\112\1\101\1\102\2\101\1\110"+
- "\1\116\11\101\1\116\6\101\1\116\60\101\1\117\1\120"+
- "\2\117\1\121\21\117\1\104\60\117\1\101\1\102\2\101"+
- "\1\122\1\111\2\101\2\123\5\101\1\111\6\101\1\111"+
- "\6\123\1\101\13\123\1\101\13\123\1\101\4\123\1\101"+
- "\4\123\1\101\4\123\2\101\1\123\1\101\1\102\2\101"+
- "\1\122\1\111\2\101\2\123\5\101\1\111\6\101\1\111"+
- "\6\123\1\101\13\123\1\124\13\123\1\101\4\123\1\101"+
- "\4\123\1\101\4\123\2\101\1\123\1\125\1\102\1\101"+
- "\1\126\1\127\1\111\4\125\1\130\1\125\1\131\2\125"+
- "\1\111\6\125\1\111\60\125\1\101\1\102\2\101\1\132"+
- "\21\101\1\104\61\101\1\102\1\133\1\134\1\101\1\111"+
- "\2\101\2\135\5\101\1\111\6\101\1\111\6\135\1\101"+
- "\13\135\1\101\13\135\1\101\4\135\1\101\4\135\1\101"+
- "\4\135\2\101\1\135\1\101\1\102\1\133\1\134\1\101"+
- "\1\111\2\101\2\135\5\101\1\111\6\101\1\111\6\135"+
- "\1\101\13\135\1\136\13\135\1\101\4\135\1\101\4\135"+
- "\1\101\4\135\2\101\1\135\1\137\1\102\1\133\1\140"+
- "\1\137\1\111\4\137\1\141\1\137\1\142\2\137\1\111"+
- "\6\137\1\111\60\137\1\101\1\102\3\101\1\111\11\101"+
- "\1\111\6\101\1\111\60\101\1\143\1\144\20\143\1\145"+
- "\64\143\1\101\1\146\3\101\1\111\2\101\2\147\5\101"+
- "\1\111\2\101\1\150\3\101\1\111\6\147\1\101\13\147"+
- "\1\101\13\147\1\101\4\147\1\101\4\147\1\101\4\147"+
- "\2\101\1\147\1\101\1\146\3\101\1\151\11\101\1\151"+
- "\2\101\1\150\3\101\1\151\61\101\1\146\3\101\1\111"+
- "\2\101\2\152\5\101\1\111\2\101\1\150\3\101\1\111"+
- "\6\152\1\101\13\152\1\101\13\152\1\101\4\152\1\101"+
- "\4\152\1\101\4\152\2\101\1\152\1\101\1\146\3\101"+
- "\1\111\2\101\2\152\5\101\1\111\2\101\1\150\3\101"+
- "\1\111\6\152\1\101\13\152\1\153\13\152\1\101\4\152"+
- "\1\101\4\152\1\101\4\152\2\101\1\152\1\154\1\146"+
- "\1\101\1\155\1\154\1\111\4\154\1\156\1\154\1\157"+
- "\2\154\1\111\2\154\1\160\3\154\1\111\60\154\1\161"+
- "\1\162\1\163\1\164\4\161\2\165\15\161\6\166\1\161"+
- "\13\166\1\161\13\166\1\161\4\166\1\161\4\166\1\161"+
- "\1\167\3\166\2\161\1\166\1\101\1\170\1\163\1\164"+
- "\1\101\1\111\2\101\2\171\5\101\1\111\6\101\1\111"+
- "\6\171\1\101\13\171\1\101\13\171\1\101\4\171\1\101"+
- "\4\171\1\101\4\171\2\101\1\171\1\101\1\170\1\163"+
- "\1\164\1\101\1\111\2\101\2\171\5\101\1\111\6\101"+
- "\1\111\6\171\1\101\13\171\1\172\13\171\1\101\4\171"+
- "\1\101\4\171\1\101\4\171\2\101\1\171\1\173\1\174"+
- "\1\163\1\175\1\173\1\111\4\173\1\176\1\173\1\177"+
- "\1\200\1\173\1\111\6\173\1\111\36\173\1\201\21\173"+
- "\1\101\1\202\1\203\2\101\1\111\11\101\1\111\6\101"+
- "\1\111\10\101\1\204\1\205\2\101\1\206\11\101\1\206"+
- "\1\101\1\205\1\204\27\101\1\102\1\203\2\101\1\111"+
- "\11\101\1\111\6\101\1\111\6\101\1\207\52\101\1\102"+
- "\1\203\2\101\1\111\2\101\2\210\5\101\1\111\6\101"+
- "\1\111\6\210\1\207\13\210\1\101\13\210\1\101\4\210"+
- "\1\101\4\210\1\101\4\210\2\101\1\210\1\101\1\102"+
- "\1\203\2\101\1\111\11\101\1\111\6\101\1\111\6\101"+
- "\1\207\7\101\1\211\6\101\1\212\11\101\1\211\12\101"+
- "\1\212\5\101\1\213\1\102\1\203\1\214\1\213\1\111"+
- "\4\213\1\215\1\213\1\216\2\213\1\111\6\213\1\111"+
- "\6\213\1\217\51\213\1\220\1\102\1\203\1\221\1\220"+
- "\1\111\4\220\1\222\1\220\1\223\2\220\1\111\6\220"+
- "\1\111\6\220\1\224\51\220\1\225\1\102\1\203\1\226"+
- "\1\225\1\111\4\225\1\227\1\225\1\230\2\225\1\111"+
- "\6\225\1\111\60\225\1\231\1\232\1\233\104\231\1\234"+
- "\1\102\1\203\1\235\1\234\1\111\4\234\1\236\1\234"+
- "\1\237\2\234\1\111\6\234\1\111\60\234\1\240\1\241"+
- "\1\242\104\240\1\243\1\244\105\243\1\101\1\102\24\101"+
- "\1\104\60\101\1\245\1\246\105\245\1\101\1\102\5\101"+
- "\1\247\16\101\1\104\60\101\1\250\1\251\3\250\1\252"+
- "\6\250\1\253\1\254\1\250\1\252\6\250\1\252\36\250"+
- "\1\255\21\250\1\256\1\251\3\256\1\257\4\256\1\260"+
- "\2\256\1\261\1\256\1\257\6\256\1\257\36\256\1\262"+
- "\21\256\1\263\1\264\10\263\1\265\1\263\1\266\1\267"+
- "\67\263\1\270\1\263\1\271\1\272\12\271\1\101\11\271"+
- "\1\273\60\271\1\274\1\275\10\274\1\101\13\274\1\276"+
- "\60\274\1\101\1\102\12\101\1\277\11\101\1\104\61\101"+
- "\1\102\10\101\1\300\13\101\1\104\60\101\1\301\1\302"+
- "\10\301\1\260\71\301\1\303\1\304\1\301\1\305\1\306"+
- "\12\305\1\253\67\305\1\307\1\304\1\305\1\310\1\311"+
- "\10\310\1\312\1\310\1\313\50\310\1\314\17\310\1\315"+
- "\1\310\1\316\1\317\12\316\1\101\11\316\1\320\60\316"+
- "\1\321\1\322\10\321\1\101\13\321\1\323\60\321\1\101"+
- "\1\102\12\101\1\324\11\101\1\104\61\101\1\102\10\101"+
- "\1\325\13\101\1\104\60\101\1\326\1\327\10\326\1\260"+
- "\71\326\1\330\1\331\1\326\1\332\1\333\12\332\1\253"+
- "\67\332\1\334\1\331\1\332\1\71\1\0\11\71\1\0"+
- "\1\71\1\0\4\71\1\0\42\71\1\0\21\71\3\0"+
- "\1\335\1\336\15\0\1\337\2\0\1\340\66\0\1\341"+
- "\2\0\2\342\5\0\1\341\6\0\1\341\6\342\1\0"+
- "\13\342\1\0\13\342\1\343\4\342\1\0\4\342\1\0"+
- "\4\342\2\0\1\342\1\344\1\0\11\344\1\0\1\344"+
- "\1\345\1\346\3\344\1\0\64\344\5\0\1\341\2\0"+
- "\2\347\5\0\1\341\6\0\1\341\6\347\1\0\13\347"+
- "\1\0\13\347\1\0\4\347\1\0\4\347\1\0\4\347"+
- "\2\0\1\347\1\344\1\0\11\344\1\0\2\344\1\350"+
- "\3\344\1\0\42\344\1\351\21\344\131\0\1\337\2\0"+
- "\1\352\104\0\1\353\72\0\1\354\101\0\1\355\111\0"+
- "\1\111\11\0\1\111\6\0\1\111\66\0\4\112\6\0"+
- "\1\112\6\0\6\112\1\0\13\112\1\0\13\112\1\0"+
- "\4\112\1\0\11\112\2\0\1\112\6\0\4\112\6\0"+
- "\1\112\6\0\2\112\2\356\2\112\1\0\13\112\1\0"+
- "\13\112\1\0\4\112\1\0\11\112\2\0\1\112\6\0"+
- "\4\112\6\0\1\112\6\0\2\112\1\356\1\357\2\112"+
- "\1\0\13\112\1\0\13\112\1\0\4\112\1\0\11\112"+
- "\2\0\1\112\6\0\4\112\6\0\1\112\6\0\2\112"+
- "\2\360\2\112\1\0\13\112\1\0\13\112\1\0\4\112"+
- "\1\0\11\112\2\0\1\112\5\0\1\116\11\0\1\116"+
- "\6\0\1\116\62\0\1\361\106\0\1\362\112\0\4\123"+
- "\6\0\1\123\6\0\6\123\1\0\13\123\1\0\13\123"+
- "\1\0\4\123\1\0\11\123\2\0\1\123\1\125\2\0"+
- "\1\363\1\125\1\0\4\125\1\0\1\125\1\0\2\125"+
- "\1\0\6\125\1\0\61\125\1\0\1\362\1\363\1\125"+
- "\1\0\4\125\1\0\1\125\1\0\2\125\1\0\6\125"+
- "\1\0\60\125\1\364\1\0\10\364\1\365\2\364\1\366"+
- "\47\364\1\366\21\364\1\367\1\0\12\367\1\365\1\370"+
- "\47\367\1\370\21\367\2\0\1\133\1\371\111\0\4\135"+
- "\6\0\1\135\6\0\6\135\1\0\13\135\1\0\13\135"+
- "\1\0\4\135\1\0\11\135\2\0\1\135\1\137\2\0"+
- "\1\372\1\137\1\0\4\137\1\0\1\137\1\0\2\137"+
- "\1\0\6\137\1\0\61\137\1\0\1\133\1\373\1\137"+
- "\1\0\4\137\1\0\1\137\1\0\2\137\1\0\6\137"+
- "\1\0\60\137\1\141\1\0\1\374\1\375\1\141\1\374"+
- "\4\141\1\376\1\141\1\374\1\377\1\141\1\374\6\141"+
- "\1\374\36\141\1\377\21\141\1\142\1\0\1\u0100\1\u0101"+
- "\1\142\1\u0100\4\142\1\u0100\1\142\1\376\1\u0102\1\142"+
- "\1\u0100\6\142\1\u0100\36\142\1\u0102\21\142\2\0\1\u0103"+
- "\126\0\1\337\2\0\1\u0104\67\0\4\147\6\0\1\147"+
- "\6\0\6\147\1\0\13\147\1\0\13\147\1\0\4\147"+
- "\1\0\11\147\2\0\1\147\2\0\1\u0105\111\0\1\151"+
- "\11\0\1\151\6\0\1\151\66\0\4\152\6\0\1\152"+
- "\6\0\6\152\1\0\13\152\1\0\13\152\1\0\4\152"+
- "\1\0\11\152\2\0\1\152\1\154\2\0\1\u0106\1\154"+
- "\1\0\4\154\1\0\1\154\1\0\2\154\1\0\6\154"+
- "\1\0\60\154\1\u0107\1\0\10\u0107\1\u0108\2\u0107\1\u0109"+
- "\47\u0107\1\u0109\21\u0107\1\u010a\1\0\12\u010a\1\u0108\1\u010b"+
- "\47\u010a\1\u010b\21\u010a\1\154\1\0\1\u0105\1\u0106\1\154"+
- "\1\0\4\154\1\0\1\154\1\0\2\154\1\0\6\154"+
- "\1\0\60\154\1\161\3\0\23\161\6\0\1\161\13\0"+
- "\1\161\13\0\1\161\4\0\1\161\4\0\1\161\4\0"+
- "\2\161\4\0\1\335\16\0\1\337\2\0\1\340\63\0"+
- "\1\u010c\104\0\1\161\3\0\2\161\4\165\6\161\1\165"+
- "\6\161\6\166\1\161\13\166\1\161\13\166\1\161\4\166"+
- "\1\161\4\166\1\165\4\166\2\161\1\166\6\0\4\166"+
- "\6\0\1\166\6\0\6\166\1\0\13\166\1\0\13\166"+
- "\1\0\4\166\1\0\11\166\2\0\1\166\6\0\4\166"+
- "\6\0\1\166\6\0\6\166\1\0\7\166\1\u010d\3\166"+
- "\1\0\13\166\1\0\4\166\1\0\11\166\2\0\1\166"+
- "\3\0\1\335\4\0\2\u010e\10\0\1\337\2\0\1\340"+
- "\1\0\6\u010e\1\0\13\u010e\1\0\13\u010e\1\0\4\u010e"+
- "\1\0\4\u010e\1\0\4\u010e\2\0\1\u010e\6\0\4\171"+
- "\6\0\1\171\6\0\6\171\1\0\13\171\1\0\13\171"+
- "\1\0\4\171\1\0\11\171\2\0\1\171\1\173\2\0"+
- "\1\u010f\1\173\1\0\4\173\1\0\1\173\1\0\2\173"+
- "\1\0\6\173\1\0\60\173\3\0\1\335\4\0\2\u0110"+
- "\10\0\1\337\2\0\1\340\1\0\6\u0110\1\0\13\u0110"+
- "\1\0\13\u0110\1\0\4\u0110\1\0\4\u0110\1\0\4\u0110"+
- "\2\0\1\u0110\1\173\1\0\1\u010c\1\u010f\1\173\1\0"+
- "\4\173\1\0\1\173\1\0\2\173\1\0\6\173\1\0"+
- "\60\173\1\u0111\1\0\10\u0111\1\u0112\2\u0111\1\u0113\47\u0111"+
- "\1\u0113\21\u0111\1\u0114\1\0\12\u0114\1\u0112\1\u0115\47\u0114"+
- "\1\u0115\21\u0114\1\173\2\0\1\u010f\1\173\1\0\4\173"+
- "\1\0\1\173\1\0\1\173\1\u0116\1\0\6\173\1\0"+
- "\61\173\2\0\1\u010f\1\173\1\0\4\173\1\0\1\173"+
- "\1\0\1\173\1\u0117\1\0\6\173\1\0\60\173\3\0"+
- "\1\335\16\0\1\337\2\0\1\u0104\130\0\1\u0118\2\0"+
- "\1\u0118\75\0\1\u0119\14\0\1\u0119\63\0\2\u011a\52\0"+
- "\23\u011b\1\u011c\63\u011b\6\0\4\210\6\0\1\210\6\0"+
- "\6\210\1\0\13\210\1\0\13\210\1\0\4\210\1\0"+
- "\11\210\2\0\1\210\53\0\1\u011d\5\0\1\u011d\116\0"+
- "\1\u011e\10\0\1\u011e\4\0\1\213\2\0\1\u011f\1\213"+
- "\1\0\4\213\1\0\1\213\1\0\2\213\1\0\6\213"+
- "\1\0\60\213\1\u0120\1\0\10\u0120\1\u0121\2\u0120\1\u0122"+
- "\47\u0120\1\u0122\21\u0120\1\u0123\1\0\1\u0123\2\u0124\1\u0123"+
- "\4\u0124\2\u0123\1\u0125\1\u0126\1\u0123\4\u0124\1\u0123\11\u0124"+
- "\1\u0123\27\u0124\1\u0126\10\u0124\2\u0123\4\u0124\2\u0123\1\u0124"+
- "\1\217\2\u011b\1\u0127\1\217\1\u011b\4\217\1\u011b\1\217"+
- "\1\u011b\2\217\1\u011b\3\217\1\u0128\2\217\1\u011b\60\217"+
- "\1\220\2\0\1\u0129\1\220\1\0\4\220\1\0\1\220"+
- "\1\0\2\220\1\0\6\220\1\0\60\220\12\u012a\1\u012b"+
- "\74\u012a\14\u012c\1\u012b\72\u012c\1\224\2\u011b\1\u012d\1\224"+
- "\1\u011b\4\224\1\u011b\1\224\1\u011b\2\224\1\u011b\3\224"+
- "\1\u012e\2\224\1\u011b\60\224\1\225\2\0\1\u012f\1\225"+
- "\1\0\4\225\1\0\1\225\1\0\2\225\1\0\6\225"+
- "\1\0\60\225\1\u0130\1\0\10\u0130\1\u0131\2\u0130\1\u0132"+
- "\47\u0130\1\u0132\21\u0130\1\u0133\1\0\1\u0133\2\u0134\1\u0133"+
- "\4\u0134\2\u0133\1\u0135\1\u0136\1\u0133\4\u0134\1\u0133\11\u0134"+
- "\1\u0133\27\u0134\1\u0136\10\u0134\2\u0133\4\u0134\2\u0133\1\u0134"+
- "\2\231\1\0\106\231\1\0\17\231\1\u0137\2\231\1\u0138"+
- "\61\231\1\234\2\0\1\u0139\1\234\1\0\4\234\1\0"+
- "\1\234\1\0\2\234\1\0\6\234\1\0\60\234\1\u013a"+
- "\1\0\10\u013a\1\u013b\2\u013a\1\u013c\47\u013a\1\u013c\21\u013a"+
- "\1\u013d\1\0\1\u013d\2\u013e\1\u013d\4\u013e\2\u013d\1\u013f"+
- "\1\u0140\1\u013d\4\u013e\1\u013d\11\u013e\1\u013d\27\u013e\1\u0140"+
- "\10\u013e\2\u013d\4\u013e\2\u013d\1\u013e\2\240\1\0\106\240"+
- "\1\0\17\240\1\u0141\2\240\1\u0142\61\240\7\0\1\u0143"+
- "\77\0\1\250\1\0\12\250\1\0\1\u0144\47\250\1\u0144"+
- "\21\250\3\0\1\u0145\16\0\1\337\2\0\1\352\61\0"+
- "\1\250\1\0\3\250\1\252\6\250\1\0\1\u0144\1\250"+
- "\1\252\6\250\1\252\36\250\1\u0144\37\250\1\u0146\106\250"+
- "\1\u0147\70\250\1\256\1\0\10\256\1\0\2\256\1\u0148"+
- "\47\256\1\u0148\22\256\1\0\3\256\1\257\4\256\1\0"+
- "\2\256\1\u0148\1\256\1\257\6\256\1\257\36\256\1\u0148"+
- "\37\256\1\u0149\106\256\1\u014a\70\256\12\263\1\0\1\263"+
- "\1\0\1\u014b\67\263\1\0\13\263\1\0\1\263\1\0"+
- "\1\u014b\4\263\1\u014c\62\263\1\0\13\263\1\0\1\263"+
- "\1\0\1\263\1\u014d\66\263\1\u014e\1\263\14\u014f\1\u0150"+
- "\106\u014f\1\u0150\5\u014f\1\u0151\2\u014f\1\u0152\61\u014f\12\u0153"+
- "\1\u0154\106\u0153\1\u0154\7\u0153\1\u0155\2\u0153\1\u0156\61\u0153"+
- "\12\301\1\0\71\301\1\u0157\1\0\13\301\1\0\7\301"+
- "\1\u0158\61\301\1\u0157\1\0\13\301\1\u0159\74\301\14\305"+
- "\1\0\67\305\1\u015a\1\0\15\305\1\0\5\305\1\u015b"+
- "\61\305\1\u015a\1\0\15\305\1\u015c\72\305\12\310\1\0"+
- "\1\310\1\0\70\310\1\0\13\310\1\0\1\310\1\0"+
- "\5\310\1\u015d\62\310\1\0\13\310\1\0\1\310\1\0"+
- "\1\310\1\u015e\66\310\1\0\1\310\14\u015f\1\u0160\106\u015f"+
- "\1\u0160\5\u015f\1\u0161\2\u015f\1\u0162\61\u015f\12\u0163\1\u0164"+
- "\106\u0163\1\u0164\7\u0163\1\u0165\2\u0163\1\u0166\61\u0163\12\326"+
- "\1\0\71\326\1\u0167\1\0\13\326\1\0\7\326\1\u0168"+
- "\61\326\1\u0167\1\0\13\326\1\u0169\74\326\14\332\1\0"+
- "\67\332\1\u016a\1\0\15\332\1\0\5\332\1\u016b\61\332"+
- "\1\u016a\1\0\15\332\1\u016c\72\332\7\0\1\u016d\11\0"+
- "\1\u016e\3\0\1\u016f\23\0\1\u0170\44\0\1\u0171\25\0"+
- "\1\u0172\56\0\1\341\2\0\2\u0173\5\0\1\341\6\0"+
- "\1\341\6\u0173\1\0\13\u0173\1\0\13\u0173\1\0\4\u0173"+
- "\1\0\4\u0173\1\0\4\u0173\2\0\1\u0173\1\u0174\1\0"+
- "\3\u0174\1\u0175\4\342\1\u0174\1\0\3\u0174\1\u0175\1\342"+
- "\1\u0174\1\0\3\u0174\1\u0175\6\342\1\u0174\13\342\1\u0174"+
- "\13\342\1\u0174\4\342\1\u0176\11\342\2\u0174\1\342\20\0"+
- "\1\u0177\7\0\1\u0178\73\0\1\345\71\0\105\346\1\u0179"+
- "\1\346\1\u0174\1\0\3\u0174\1\u0175\4\347\1\u0174\1\0"+
- "\3\u0174\1\u0175\1\347\1\u0174\1\0\3\u0174\1\u0175\6\347"+
- "\1\u0174\13\347\1\u0174\13\347\1\u0174\4\347\1\u017a\11\347"+
- "\2\u0174\1\347\105\350\1\u017b\1\350\65\0\1\351\56\0"+
- "\1\u0172\53\0\1\u017c\106\0\1\u017d\112\0\4\112\6\0"+
- "\1\112\6\0\4\112\2\u017e\1\0\13\112\1\0\13\112"+
- "\1\0\4\112\1\0\11\112\2\0\1\112\6\0\4\112"+
- "\6\0\1\112\6\0\4\112\1\u017e\1\u017f\1\0\13\112"+
- "\1\0\13\112\1\0\4\112\1\0\11\112\2\0\1\112"+
- "\6\0\4\112\6\0\1\112\6\0\6\112\1\0\13\112"+
- "\1\0\2\112\1\u0180\10\112\1\0\4\112\1\0\6\112"+
- "\1\u0180\2\112\2\0\1\112\12\364\1\365\3\364\1\0"+
- "\70\364\14\367\1\365\1\367\1\0\70\367\1\374\1\0"+
- "\10\374\1\376\2\374\1\u0181\47\374\1\u0181\21\374\1\141"+
- "\2\374\1\375\1\141\1\374\4\141\1\376\1\141\1\374"+
- "\1\141\1\137\1\374\6\141\1\374\60\141\1\u0100\1\0"+
- "\12\u0100\1\376\1\u0182\47\u0100\1\u0182\21\u0100\1\142\2\u0100"+
- "\1\u0101\1\142\1\u0100\4\142\1\u0100\1\142\1\376\1\142"+
- "\1\137\1\u0100\6\142\1\u0100\60\142\12\u0107\1\u0108\3\u0107"+
- "\1\0\70\u0107\14\u010a\1\u0108\1\u010a\1\0\70\u010a\6\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\13\166\1\0"+
- "\13\166\1\0\4\166\1\0\6\166\1\u0183\2\166\2\0"+
- "\1\166\6\0\4\u010e\6\0\1\u010e\6\0\6\u010e\1\0"+
- "\13\u010e\1\0\13\u010e\1\0\4\u010e\1\0\11\u010e\2\0"+
- "\1\u010e\6\0\4\u0110\6\0\1\u0110\6\0\6\u0110\1\0"+
- "\13\u0110\1\0\13\u0110\1\0\4\u0110\1\0\11\u0110\2\0"+
- "\1\u0110\12\u0111\1\u0112\3\u0111\1\0\70\u0111\14\u0114\1\u0112"+
- "\1\u0114\1\0\70\u0114\1\u0184\2\u0185\1\u0186\1\u0184\1\u0185"+
- "\4\u0184\1\u0185\1\u0184\1\u0185\2\u0184\1\u0185\6\u0184\1\u0185"+
- "\56\u0184\1\173\1\u0184\1\u0187\2\u0188\1\u0189\1\u0187\1\u0188"+
- "\4\u0187\1\u0188\1\u0187\1\u0188\2\u0187\1\u0188\6\u0187\1\u0188"+
- "\56\u0187\1\173\1\u0187\36\0\1\u018a\35\0\1\u018a\53\0"+
- "\1\u018b\14\0\1\u018b\73\0\1\u018c\11\0\1\u018c\76\0"+
- "\1\u018d\20\0\1\u018d\113\0\1\u018e\7\0\1\u018e\3\0"+
- "\12\u0120\1\u0121\3\u0120\1\0\70\u0120\1\u0123\1\0\12\u0123"+
- "\1\u0121\1\u018f\47\u0123\1\u018f\22\u0123\1\0\12\u0123\1\u0190"+
- "\1\u018f\47\u0123\1\u018f\21\u0123\14\0\1\u0191\72\0\14\u0123"+
- "\1\u0190\1\u0123\1\0\70\u0123\12\u0130\1\u0131\3\u0130\1\0"+
- "\70\u0130\1\u0133\1\0\12\u0133\1\u0131\1\u0192\47\u0133\1\u0192"+
- "\22\u0133\1\0\12\u0133\1\u0193\1\u0192\47\u0133\1\u0192\21\u0133"+
- "\14\0\1\u0194\72\0\14\u0133\1\u0193\1\u0133\1\0\70\u0133"+
- "\2\231\1\0\4\231\1\u0195\11\231\1\u0196\3\231\1\u0197"+
- "\23\231\1\u0198\37\231\1\0\32\231\1\u0199\51\231\12\u013a"+
- "\1\u013b\3\u013a\1\0\70\u013a\1\u013d\1\0\12\u013d\1\u013b"+
- "\1\u019a\47\u013d\1\u019a\22\u013d\1\0\12\u013d\1\u019b\1\u019a"+
- "\47\u013d\1\u019a\21\u013d\14\0\1\u019c\72\0\14\u013d\1\u019b"+
- "\1\u013d\1\0\70\u013d\2\240\1\0\4\240\1\u019d\11\240"+
- "\1\u019e\3\240\1\u019f\23\240\1\u01a0\37\240\1\0\32\240"+
- "\1\u01a1\51\240\22\0\1\u01a2\64\0\16\250\1\0\70\250"+
- "\16\256\1\0\70\256\12\263\1\0\1\263\1\0\1\263"+
- "\1\u01a3\66\263\1\u014e\10\263\1\u01a4\2\263\1\0\1\263"+
- "\1\0\1\u014b\3\263\1\u01a5\3\263\1\u01a6\23\263\1\u01a7"+
- "\33\263\1\0\1\263\12\u01a3\1\0\1\u01a3\1\0\70\u01a3"+
- "\1\0\1\u01a3\12\u014e\1\0\1\u014e\1\0\1\u01a8\67\u014e"+
- "\1\0\1\u014e\7\u014f\1\u01a9\4\u014f\1\u0150\4\u014f\1\u01aa"+
- "\3\u014f\1\u01ab\23\u014f\1\u01ac\51\u014f\1\u0150\20\u014f\1\u01ad"+
- "\51\u014f\7\u0153\1\u01ae\2\u0153\1\u0154\6\u0153\1\u01af\3\u0153"+
- "\1\u01b0\23\u0153\1\u01b1\47\u0153\1\u0154\22\u0153\1\u01b2\51\u0153"+
- "\12\301\1\0\103\301\1\u01b3\2\301\1\0\6\301\1\u01b4"+
- "\3\301\1\u01b5\23\301\1\u01b6\32\301\1\u0157\1\0\1\301"+
- "\104\u01b7\1\u01b8\2\u01b7\14\305\1\0\101\305\1\u01b9\4\305"+
- "\1\0\4\305\1\u01ba\3\305\1\u01bb\23\305\1\u01bc\32\305"+
- "\1\u015a\1\0\1\305\104\u01bd\1\u01be\2\u01bd\7\310\1\u01bf"+
- "\2\310\1\0\1\310\1\0\4\310\1\u01c0\3\310\1\u01c1"+
- "\23\310\1\u01c2\33\310\1\0\1\310\7\u015f\1\u01c3\4\u015f"+
- "\1\u0160\4\u015f\1\u01c4\3\u015f\1\u01c5\23\u015f\1\u01c6\51\u015f"+
- "\1\u0160\20\u015f\1\u01c7\51\u015f\7\u0163\1\u01c8\2\u0163\1\u0164"+
- "\6\u0163\1\u01c9\3\u0163\1\u01ca\23\u0163\1\u01cb\47\u0163\1\u0164"+
- "\22\u0163\1\u01cc\51\u0163\12\326\1\0\103\326\1\u01cd\2\326"+
- "\1\0\6\326\1\u01ce\3\326\1\u01cf\23\326\1\u01d0\32\326"+
- "\1\u0167\1\0\1\326\104\u01d1\1\u01d2\2\u01d1\14\332\1\0"+
- "\101\332\1\u01d3\4\332\1\0\4\332\1\u01d4\3\332\1\u01d5"+
- "\23\332\1\u01d6\32\332\1\u016a\1\0\1\332\104\u01d7\1\u01d8"+
- "\2\u01d7\7\0\1\u01d9\106\0\1\u01da\135\0\1\u01db\50\0"+
- "\1\u0173\1\0\11\u0173\1\0\6\u0173\1\0\64\u0173\1\u0174"+
- "\1\0\11\u0174\1\0\6\u0174\1\0\47\u0174\1\0\15\u0174"+
- "\1\0\3\u0174\1\u0175\5\u0174\1\0\3\u0174\1\u0175\2\u0174"+
- "\1\0\3\u0174\1\u0175\43\u0174\1\u01dc\14\u0174\20\0\1\u0177"+
- "\51\0\1\u01dd\34\0\1\u01de\15\0\3\u01de\2\0\1\u01de"+
- "\11\0\1\u01de\1\0\2\u01de\7\0\1\u01de\2\0\2\u01de"+
- "\6\0\1\u01de\11\0\1\112\1\u01df\2\112\6\0\1\112"+
- "\6\0\6\112\1\0\13\112\1\0\13\112\1\0\4\112"+
- "\1\0\11\112\2\0\1\112\6\0\4\112\6\0\1\112"+
- "\6\0\6\112\1\0\11\112\1\u01e0\1\112\1\0\1\u01e0"+
- "\12\112\1\0\4\112\1\0\11\112\2\0\1\112\12\374"+
- "\1\376\3\374\1\0\70\374\14\u0100\1\376\1\u0100\1\0"+
- "\70\u0100\6\0\3\166\1\u01e1\6\0\1\166\6\0\6\166"+
- "\1\0\13\166\1\0\13\166\1\0\4\166\1\0\11\166"+
- "\2\0\1\166\1\u0184\2\u0185\1\u0186\1\u0184\1\u0185\4\u0184"+
- "\1\u0185\1\u0184\1\u0185\2\u0184\1\u0185\6\u0184\1\u0185\56\u0184"+
- "\1\u01e2\1\u0184\105\u0185\1\u01e3\1\u0185\1\u0187\2\u0188\1\u0189"+
- "\1\u0187\1\u0188\4\u0187\1\u0188\1\u0187\1\u0188\2\u0187\1\u0188"+
- "\6\u0187\1\u0188\56\u0187\1\u01e2\1\u0187\105\u0188\1\u01e4\1\u0188"+
- "\41\0\1\u01e5\14\0\1\u01e5\63\0\2\u01e6\103\0\2\u01e7"+
- "\115\0\1\u01e8\14\0\1\u01e8\63\0\2\u01e9\52\0\14\u0123"+
- "\1\u0121\1\u0123\1\0\70\u0123\3\0\2\u01ea\1\0\4\u01ea"+
- "\2\0\1\u0125\1\u01ea\1\0\4\u01ea\1\0\11\u01ea\1\0"+
- "\40\u01ea\2\0\4\u01ea\2\0\1\u01ea\14\u0133\1\u0131\1\u0133"+
- "\1\0\70\u0133\3\0\2\u01eb\1\0\4\u01eb\2\0\1\u0135"+
- "\1\u01eb\1\0\4\u01eb\1\0\11\u01eb\1\0\40\u01eb\2\0"+
- "\4\u01eb\2\0\1\u01eb\2\231\1\0\4\231\1\u01ec\101\231"+
- "\1\0\33\231\1\u01ed\50\231\14\u013d\1\u013b\1\u013d\1\0"+
- "\70\u013d\3\0\2\u01ee\1\0\4\u01ee\2\0\1\u013f\1\u01ee"+
- "\1\0\4\u01ee\1\0\11\u01ee\1\0\40\u01ee\2\0\4\u01ee"+
- "\2\0\1\u01ee\2\240\1\0\4\240\1\u01ef\101\240\1\0"+
- "\33\240\1\u01f0\50\240\2\0\1\u01f1\104\0\7\263\1\u01f2"+
- "\2\263\1\0\1\263\1\0\1\u014b\67\263\1\0\1\263"+
- "\12\u014e\1\0\1\u014e\1\0\1\u014e\1\0\70\u014e\7\u014f"+
- "\1\u01f3\4\u014f\1\u0150\106\u014f\1\u0150\21\u014f\1\u01f4\50\u014f"+
- "\7\u0153\1\u01f5\2\u0153\1\u0154\106\u0153\1\u0154\23\u0153\1\u01f6"+
- "\50\u0153\7\301\1\u01f7\2\301\1\0\71\301\1\u0157\1\0"+
- "\1\301\12\u01f8\1\u01f9\72\u01f8\1\0\1\u01f8\7\305\1\u01fa"+
- "\4\305\1\0\67\305\1\u015a\1\0\1\305\14\u01fb\1\u01f9"+
- "\70\u01fb\1\0\1\u01fb\7\310\1\u01fc\2\310\1\0\1\310"+
- "\1\0\70\310\1\0\1\310\7\u015f\1\u01fd\4\u015f\1\u0160"+
- "\106\u015f\1\u0160\21\u015f\1\u01fe\50\u015f\7\u0163\1\u01ff\2\u0163"+
- "\1\u0164\106\u0163\1\u0164\23\u0163\1\u0200\50\u0163\7\326\1\u0201"+
- "\2\326\1\0\71\326\1\u0167\1\0\1\326\12\u0202\1\u0203"+
- "\72\u0202\1\0\1\u0202\7\332\1\u0204\4\332\1\0\67\332"+
- "\1\u016a\1\0\1\332\14\u0205\1\u0203\70\u0205\1\0\1\u0205"+
- "\37\0\1\u0206\141\0\1\u01dc\34\0\1\u01de\15\0\3\u01de"+
- "\2\0\1\u01de\11\0\1\u01de\1\0\2\u01de\7\0\1\u01de"+
- "\1\0\1\u01dd\2\u01de\6\0\1\u01de\11\0\4\112\6\0"+
- "\1\112\6\0\6\112\1\0\7\112\1\u0207\3\112\1\0"+
- "\13\112\1\0\4\112\1\0\11\112\2\0\1\112\6\0"+
- "\4\112\6\0\1\112\6\0\6\112\1\0\6\112\1\u0208"+
- "\4\112\1\0\13\112\1\0\1\112\1\u0208\2\112\1\0"+
- "\11\112\2\0\1\112\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\6\166\1\u0209\4\166\1\0\6\166\1\u020a"+
- "\4\166\1\0\4\166\1\0\11\166\2\0\1\166\53\0"+
- "\1\u020b\5\0\1\u020b\73\0\1\u020c\14\0\1\u020c\66\0"+
- "\1\u020d\11\0\1\u020d\74\0\1\u020e\11\0\1\u020e\77\0"+
- "\1\u020f\14\0\1\u020f\23\0\2\231\1\0\34\231\1\u0210"+
- "\47\231\2\240\1\0\34\240\1\u0211\47\240\14\u014f\1\u0150"+
- "\22\u014f\1\u0212\47\u014f\12\u0153\1\u0154\24\u0153\1\u0213\47\u0153"+
- "\12\u01f8\1\u01b7\71\u01f8\1\u0214\1\u01b7\1\u01f8\14\u01fb\1\u01bd"+
- "\67\u01fb\1\u0215\1\u01bd\1\u01fb\14\u015f\1\u0160\22\u015f\1\u0216"+
- "\47\u015f\12\u0163\1\u0164\24\u0163\1\u0217\47\u0163\12\u0202\1\u01d1"+
- "\71\u0202\1\u0218\1\u01d1\1\u0202\14\u0205\1\u01d7\67\u0205\1\u0219"+
- "\1\u01d7\1\u0205\40\0\1\u021a\54\0\4\112\6\0\1\112"+
- "\6\0\6\112\1\0\13\112\1\0\4\112\1\u021b\6\112"+
- "\1\0\4\112\1\0\11\112\2\0\1\112\6\0\4\112"+
- "\6\0\1\112\6\0\6\112\1\0\3\112\1\u021c\7\112"+
- "\1\0\4\112\1\u021c\6\112\1\0\4\112\1\0\11\112"+
- "\2\0\1\112\6\0\4\166\6\0\1\166\6\0\6\166"+
- "\1\0\11\166\1\u021d\1\166\1\0\13\166\1\0\4\166"+
- "\1\0\11\166\2\0\1\166\6\0\4\166\6\0\1\166"+
- "\6\0\6\166\1\0\10\166\1\u021e\2\166\1\0\13\166"+
- "\1\0\4\166\1\0\11\166\2\0\1\166\54\0\1\u021f"+
- "\24\0\1\u021f\52\0\1\u0220\20\0\1\u0220\70\0\1\u0221"+
- "\13\0\1\u0221\53\0\2\u0222\112\0\1\u0223\35\0\1\u0223"+
- "\12\0\2\231\1\0\35\231\1\u0224\46\231\2\240\1\0"+
- "\35\240\1\u0225\46\240\14\u014f\1\u0150\23\u014f\1\u0226\46\u014f"+
- "\12\u0153\1\u0154\25\u0153\1\u0227\46\u0153\12\u01f8\1\u0228\71\u01f8"+
- "\1\u0214\1\u01b7\1\u01f8\14\u01fb\1\u0229\67\u01fb\1\u0215\1\u01bd"+
- "\1\u01fb\14\u015f\1\u0160\23\u015f\1\u022a\46\u015f\12\u0163\1\u0164"+
- "\25\u0163\1\u022b\46\u0163\12\u0202\1\u022c\71\u0202\1\u0218\1\u01d1"+
- "\1\u0202\14\u0205\1\u022d\67\u0205\1\u0219\1\u01d7\1\u0205\41\0"+
- "\1\u022e\53\0\4\112\6\0\1\112\6\0\6\112\1\0"+
- "\13\112\1\0\7\112\1\u022f\3\112\1\0\4\112\1\0"+
- "\11\112\2\0\1\112\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\11\166\1\u0230\1\166\1\0\13\166\1\0"+
- "\4\166\1\0\11\166\2\0\1\166\6\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\6\166\1\u0231\4\166\1\0"+
- "\13\166\1\0\4\166\1\0\11\166\2\0\1\166\43\0"+
- "\1\u0232\11\0\1\u0232\72\0\1\u0233\14\0\1\u0233\71\0"+
- "\1\u0234\14\0\1\u0234\30\0\2\231\1\0\36\231\1\u0235"+
- "\45\231\2\240\1\0\36\240\1\u0236\45\240\14\u014f\1\u0150"+
- "\24\u014f\1\u0237\45\u014f\12\u0153\1\u0154\26\u0153\1\u0238\45\u0153"+
- "\14\u015f\1\u0160\24\u015f\1\u0239\45\u015f\12\u0163\1\u0164\26\u0163"+
- "\1\u023a\45\u0163\40\0\1\u023b\54\0\4\112\6\0\1\112"+
- "\6\0\5\112\1\u023c\1\0\13\112\1\0\13\112\1\0"+
- "\4\112\1\0\11\112\2\0\1\112\6\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\13\166\1\0\4\166\1\u023d"+
- "\6\166\1\0\4\166\1\0\11\166\2\0\1\166\6\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\5\166\1\u023e"+
- "\5\166\1\0\13\166\1\0\4\166\1\0\11\166\2\0"+
- "\1\166\2\231\1\0\35\231\1\u023f\46\231\2\240\1\0"+
- "\35\240\1\u0240\46\240\14\u014f\1\u0150\23\u014f\1\u0241\46\u014f"+
- "\12\u0153\1\u0154\25\u0153\1\u0242\46\u0153\14\u015f\1\u0160\23\u015f"+
- "\1\u0243\46\u015f\12\u0163\1\u0164\25\u0163\1\u0244\46\u0163\35\0"+
- "\1\u0245\57\0\4\112\6\0\1\112\6\0\6\112\1\0"+
- "\5\112\1\u0246\5\112\1\0\13\112\1\0\4\112\1\0"+
- "\11\112\2\0\1\112\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\13\166\1\0\13\166\1\0\4\166\1\0"+
- "\1\166\1\u0247\7\166\2\0\1\166\2\231\1\0\32\231"+
- "\1\u0248\51\231\2\240\1\0\32\240\1\u0249\51\240\14\u014f"+
- "\1\u0150\20\u014f\1\u024a\51\u014f\12\u0153\1\u0154\22\u0153\1\u024b"+
- "\51\u0153\14\u015f\1\u0160\20\u015f\1\u024c\51\u015f\12\u0163\1\u0164"+
- "\22\u0163\1\u024d\51\u0163\6\0\4\112\6\0\1\112\6\0"+
- "\6\112\1\0\7\112\1\u024e\3\112\1\0\13\112\1\0"+
- "\4\112\1\0\11\112\2\0\1\112\6\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\13\166\1\0\4\166\1\u024f"+
- "\6\166\1\0\4\166\1\0\11\166\2\0\1\166\6\0"+
- "\4\112\6\0\1\112\6\0\6\112\1\0\13\112\1\0"+
- "\13\112\1\0\4\112\1\0\11\112\2\0\1\u0250\6\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\10\166\1\u0251"+
- "\2\166\1\0\13\166\1\0\4\166\1\0\11\166\2\0"+
- "\1\166\6\0\4\112\6\0\1\112\6\0\6\112\1\0"+
- "\5\112\1\u0252\5\112\1\0\13\112\1\0\4\112\1\0"+
- "\11\112\2\0\1\112\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\4\166\1\u0253\6\166\1\0\13\166\1\0"+
- "\4\166\1\0\11\166\2\0\1\166\6\0\4\112\6\0"+
- "\1\112\6\0\6\112\1\0\5\112\1\u0254\5\112\1\0"+
- "\13\112\1\0\4\112\1\0\11\112\2\0\1\112\6\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\5\166\1\u0255"+
- "\5\166\1\0\13\166\1\0\4\166\1\0\11\166\2\0"+
- "\1\166\6\0\4\112\6\0\1\112\6\0\6\112\1\0"+
- "\13\112\1\0\4\112\1\u0256\6\112\1\0\4\112\1\0"+
- "\11\112\2\0\1\112\6\u0257\4\u0258\6\u0257\1\u0258\5\u0257"+
- "\1\0\6\u0258\1\u0257\13\u0258\1\u0257\13\u0258\1\u0257\4\u0258"+
- "\1\u0257\11\u0258\2\u0257\1\u0258\42\0\1\u0259\3\0\1\u025a"+
- "\7\0\1\u025b\1\u025c\21\0\1\u025d\13\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\4\166\1\u025e\3\166\1\u025f"+
- "\2\166\1\0\4\166\1\u0260\1\u0261\5\166\1\0\4\166"+
- "\1\0\6\166\1\u0262\2\166\2\0\1\166\57\0\1\u0263"+
- "\77\0\1\u0264\115\0\1\u0265\105\0\1\u0266\107\0\1\u0267"+
- "\35\0\4\166\6\0\1\166\6\0\6\166\1\0\13\166"+
- "\1\0\5\166\1\u0268\5\166\1\0\4\166\1\0\11\166"+
- "\2\0\1\166\6\0\4\166\6\0\1\166\6\0\6\166"+
- "\1\0\12\166\1\u0269\1\0\13\166\1\0\4\166\1\0"+
- "\11\166\2\0\1\166\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\13\166\1\0\5\166\1\u026a\5\166\1\0"+
- "\4\166\1\0\11\166\2\0\1\166\6\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\13\166\1\0\4\166\1\u026b"+
- "\6\166\1\0\4\166\1\0\11\166\2\0\1\166\6\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\13\166\1\0"+
- "\5\166\1\u026c\5\166\1\0\4\166\1\0\11\166\2\0"+
- "\1\166\44\0\1\u026d\136\0\1\u026e\107\0\1\u026f\67\0"+
- "\1\u0270\125\0\1\u0271\17\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\6\166\1\u0272\4\166\1\0\13\166\1\0"+
- "\4\166\1\0\11\166\2\0\1\166\6\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\13\166\1\0\13\166\1\0"+
- "\4\166\1\0\1\166\1\u0273\7\166\2\0\1\166\6\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\13\166\1\0"+
- "\13\166\1\0\4\166\1\0\2\166\1\u0274\6\166\2\0"+
- "\1\166\6\0\4\166\6\0\1\166\6\0\6\166\1\0"+
- "\13\166\1\0\4\166\1\u0275\6\166\1\0\4\166\1\0"+
- "\11\166\2\0\1\166\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\13\166\1\0\13\166\1\0\4\166\1\0"+
- "\2\166\1\u0276\6\166\2\0\1\166\46\0\1\u0277\74\0"+
- "\1\u0278\106\0\1\u0279\116\0\1\u027a\105\0\1\u027b\51\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\10\166\1\u027c"+
- "\2\166\1\0\13\166\1\0\4\166\1\0\11\166\2\0"+
- "\1\166\6\0\4\166\6\0\1\166\6\0\5\166\1\u027d"+
- "\1\0\13\166\1\0\13\166\1\0\4\166\1\0\11\166"+
- "\2\0\1\166\6\0\4\166\6\0\1\166\6\0\5\166"+
- "\1\u027e\1\0\13\166\1\0\13\166\1\0\4\166\1\0"+
- "\11\166\2\0\1\166\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\6\166\1\u027f\4\166\1\0\13\166\1\0"+
- "\4\166\1\0\11\166\2\0\1\166\6\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\5\166\1\u0280\5\166\1\0"+
- "\13\166\1\0\4\166\1\0\11\166\2\0\1\166\57\0"+
- "\1\u0281\131\0\1\u0282\52\0\1\u0283\106\0\1\u0284\46\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\13\166\1\0"+
- "\5\166\1\u0285\5\166\1\0\4\166\1\0\11\166\2\0"+
- "\1\166\6\0\4\166\6\0\1\166\6\0\6\166\1\0"+
- "\13\166\1\0\13\166\1\0\4\166\1\0\7\166\1\u0286"+
- "\1\166\2\0\1\166\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\10\166\1\u0287\2\166\1\0\13\166\1\0"+
- "\4\166\1\0\11\166\2\0\1\166\6\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\10\166\1\u0288\2\166\1\0"+
- "\13\166\1\0\4\166\1\0\11\166\2\0\1\166\103\0"+
- "\1\u0289\63\0\1\u0271\131\0\1\u027b\106\0\1\u028a\11\0"+
- "\4\166\6\0\1\166\6\0\6\166\1\0\13\166\1\0"+
- "\13\166\1\0\4\166\1\0\10\166\1\u028b\2\0\1\166"+
- "\6\0\4\166\6\0\1\166\6\0\6\166\1\0\13\166"+
- "\1\0\6\166\1\u0276\4\166\1\0\4\166\1\0\11\166"+
- "\2\0\1\166\6\0\4\166\6\0\1\166\6\0\6\166"+
- "\1\0\13\166\1\0\13\166\1\0\4\166\1\0\10\166"+
- "\1\u0280\2\0\1\166\6\0\4\166\6\0\1\166\6\0"+
- "\6\166\1\0\13\166\1\0\13\166\1\0\4\166\1\0"+
- "\10\166\1\u028c\2\0\1\166\34\0\1\u0271\154\0\1\u028d"+
- "\12\0\4\166\6\0\1\166\6\0\5\166\1\u0276\1\0"+
- "\13\166\1\0\13\166\1\0\4\166\1\0\11\166\2\0"+
- "\1\166\6\0\4\166\6\0\1\166\6\0\6\166\1\0"+
- "\13\166\1\0\13\166\1\0\4\166\1\0\7\166\1\u028e"+
- "\1\166\2\0\1\166\56\0\1\u0271\36\0\4\166\6\0"+
- "\1\166\6\0\6\166\1\0\13\166\1\0\4\166\1\u0276"+
- "\6\166\1\0\4\166\1\0\11\166\2\0\1\166";
-
- /**
- * 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, 0, 0, 0, 0, 0,
- 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 9, 1,
- 9, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1,
- 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 1, 1, 9, 1, 1,
- 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1,
- 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1,
- 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1,
- 1, 9, 9, 1, 9, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 9,
- 1, 1, 1, 1, 9, 9, 1, 9, 3, 3, 3, 3, 3, 3, 9, 9,
- 1, 1, 1, 9, 1, 1, 1, 1, 1, 9, 9, 1, 9, 3, 3, 3,
- 3, 3, 3, 9, 9, 1, 1, 1, 9, 1, 1, 1, 9, 9, 1, 1,
- 0, 1, 0, 9, 1, 2, 1, 2, 1, 0, 0, 0, 9, 1, 1, 1,
- 9, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 0,
- 0, 1, 9, 0, 9, 0, 0, 9, 0, 0, 0, 9, 1, 1, 0, 1,
- 0, 9, 0, 0, 0, 1, 1, 0, 0, 0, 0, 9, 0, 0, 0, 0,
- 9, 0, 0, 0, 1, 0, 0, 1, 0, 0, 9, 0, 0, 1, 0, 0,
- 9, 0, 0, 0, 1, 0, 1, 1, 0, 0, 9, 0, 0, 0, 1, 0,
- 1, 1, 0, 0, 9, 9, 9, 0, 9, 9, 1, 1, 1, 1, 2, 13,
- 3, 2, 2, 13, 3, 2, 0, 1, 1, 0, 1, 1, 1, 1, 2, 13,
- 3, 2, 2, 13, 3, 2, 0, 1, 1, 0, 1, 1, 0, 9, 9, 9,
- 0, 0, 1, 1, 1, 9, 0, 0, 13, 9, 13, 9, 9, 1, 1, 1,
- 0, 0, 1, 3, 2, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 1,
- 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1,
- 1, 0, 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,
- 1, 5, 13, 13, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1,
- 9, 1, 3, 2, 3, 2, 1, 0, 9, 1, 0, 1, 3, 2, 3, 2,
- 1, 0, 9, 1, 0, 0, 1, 1, 1, 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 ContextRegionContainer fBufferedEmbeddedContainer = null;
- private String f_context = null;
-
- // state stack for handling embedded regions
- private IntStack fStateStack = new IntStack();
- // a "hint" as to what an embedded region should be evaluated
- private String fEmbeddedHint = UNDEFINED;
- // a "hint" as to what state to enter once an embedded region has
- // been completed
- private int fEmbeddedPostState = YYINITIAL;
- // the container used to create embedded regions
- private ContextRegionContainer fEmbeddedContainer = null;
- private static final String PROXY_CONTEXT = "PROXY_CONTEXT";
-
- private String context = null;
- private int start = 0;
- private int textLength = 0;
- private int length = 0;
-
- // offset for tracking position specific block tags
- private int fOffset = 0;
-
- // the name of the current tag being opened
- private String fCurrentTagName = null;
-
- // the name of the current tag inside of an embedded region
- private String internalTagName = null;
- private String internalContext = null;
-
- // the list of tag name BlockMarkers
- private List fBlockMarkers = new ArrayList(0);
- private List fNestablePrefixes = new ArrayList(1);
-
- // where the last internal container block was found
- private int fLastInternalBlockStart = -1;
-
- // required to not seek text blocks on an end tag
- private boolean fIsBlockingEnabled = false;
- private boolean fIsCaseSensitiveBlocking = true;
-
- private static final boolean fForbidJSP = false;
-
- private int fELlevel = 0;
-
- private JSPParserRegionFactory fRegionFactory = new JSPParserRegionFactory();
-
- /**
- * user method
- */
- public final void addBlockMarker(BlockMarker marker) {
- if(containsTagName(marker.getTagName()))
- return;
- fBlockMarkers.add(marker);
- }
- /**
- * user method
- */
- public final void addNestablePrefix(TagMarker marker) {
- fNestablePrefixes.add(marker);
- }
- /* user method */
- public List getNestablePrefixes() {
- return fNestablePrefixes;
- }
- /**
- * user method
- */
- private boolean isNestable(String tagName) {
- //Iterator blocks = fNestablePrefixes.iterator();
- //while(blocks.hasNext()) {
- // TagMarker marker = (TagMarker)blocks.next();
- // String markerName = marker.getTagName();
- // if(tagName.length() > markerName.length() + 1 && tagName.startsWith(markerName) && tagName.charAt(markerName.length()) == ':') {
- // return marker.isGlobal() || getOffset() >= marker.getMarker().getStart();
- // }
- //}
- //return false;
- return true;
- }
- /**
- * user method
- */
- public final void removeNestablePrefix(String name) {
- if (fNestablePrefixes != null) {
- Iterator nestables = fNestablePrefixes.iterator();
- while (nestables.hasNext()) {
- if (((TagMarker) nestables.next()).getTagName().equalsIgnoreCase(name))
- nestables.remove();
- }
- }
- }
- /**
- * user method
- */
- public final void removeBlockMarker(BlockMarker marker) {
- fBlockMarkers.remove(marker);
- }
- /**
- * user method
- */
- public final void removeBlockMarker(String tagname) {
- if (fBlockMarkers != null) {
- Iterator blocks = fBlockMarkers.iterator();
- while (blocks.hasNext()) {
- if (((BlockMarker) blocks.next()).getTagName().equals(tagname))
- blocks.remove();
- }
- }
- }
- /* user method */
- private final void assembleEmbeddedTagSequence(String startType, String endTagName) {
- assembleEmbeddedContainer(startType, null, endTagName);
- }
- /* user method */
- private final void assembleEmbeddedContainer(String startType, String[] endTypes) {
- assembleEmbeddedContainer(startType, endTypes, null);
- }
- /* user method */
- private final void assembleEmbeddedContainer(String startType, String endType) {
- assembleEmbeddedContainer(startType, new String[]{endType}, null);
- }
- /**
- * user method
- *
- * Assembles an embedded container beginning with the given startType as
- * the first ContextRegion within it and of the type fEmbeddedHint. The
- * endTypes[] array contains the context types that will cause a successful
- * exit. Use of the endTagName parameter alters this behavior to force an
- * exit on an XML_TAG_CLOSE after seeing an XML_TAG_NAME whose significant
- * text matches the endTagName String. All contents in between are
- * insignificant, and yes, this means comments are allowed inside.
- **/
- private final void assembleEmbeddedContainer(String startType, String[] endTypes, String endTagName) {
- // the context of the region being added to the embedded container
- internalContext = startType;
- // keep track of where this container began; to provide relative indeces for the regions
- int containerStart = yychar;
- boolean notFinished = true;
- // keep track of where we seem to be so that the endTagName can be checked
- boolean isInEndTag = false;
- boolean isInFirstTag = true;
- // create the embedded container and setup its "type"
- if (fEmbeddedContainer == null) {
- fEmbeddedContainer = new ContextRegionContainer();
- fEmbeddedContainer.setType(fEmbeddedHint);
- fEmbeddedContainer.setStart(containerStart);
- // TODO: parent region needs to be set .... but not sure where to get it from
- // fEmbeddedContainer.setParent(parentRegion);
- }
- containerStart = fEmbeddedContainer.getStart();
- while (notFinished) {
- // add the region to the container
- if (internalContext != null && internalContext != PROXY_CONTEXT) {
- ITextRegion newToken = fRegionFactory.createToken(internalContext, yychar - containerStart, yylength(), yylength());
- fEmbeddedContainer.getRegions().add(newToken);
- fEmbeddedContainer.setLength(fEmbeddedContainer.getLength() + yylength());
- fEmbeddedContainer.setTextLength(fEmbeddedContainer.getTextLength() + yylength());
- // DW, 4/16/2003 token regions no longer have parents
- //newToken.setParent(fEmbeddedContainer);
- }
- try {
- // longscan determines whether to attempt a blockTagScan within the embedded container
- boolean longscan = false;
- // save the tokenizer state in case of a block tag scan
- int previousState = yystate();
- String previousCurrentTagName = fCurrentTagName;
- int previousPostState = fEmbeddedPostState;
- String previousEmbeddedHint = fEmbeddedHint;
- // determine if a block tag scan is necessary
- if (internalContext == XML_TAG_NAME) {
- internalTagName = yytext();
- if(!isNestable(internalTagName)) {
- internalTagName = null;
- // snagged a tag name we shouldn't have
- fEmbeddedPostState = ST_ABORT_EMBEDDED;
- notFinished = false;
- }
- }
- else if (internalContext == XML_TAG_OPEN || internalContext == XML_END_TAG_OPEN) {
- internalTagName = null;
- }
- // do upkeep for endTagName usage; must be here since the next token could be the close
- if (internalContext == XML_END_TAG_OPEN) {
- isInEndTag = true;
- } else if (internalContext == XML_TAG_CLOSE) {
- isInFirstTag = isInEndTag = false;
- } else {
- ITextRegionList embeddedRegions = fEmbeddedContainer.getRegions();
- if (embeddedRegions.size() > 2 && (embeddedRegions.get(embeddedRegions.size()-1)).getType() == XML_TAG_CLOSE && (embeddedRegions.get(embeddedRegions.size() - 3)).getType() == XML_TAG_OPEN && internalTagName != null) {
- if (containsTagName(internalTagName)) {
- longscan = true;
- yybegin(ST_BLOCK_TAG_SCAN);
- }
- }
- }
- if (longscan)
- fCurrentTagName = internalTagName;
- // read the next region and context
- internalContext = primGetNextToken();
- if (longscan) {
- // Returning from a block tag scan requires restoring some state variables
- // as well as handling the block region and setting up for normal scanning
- // inside the embedded container
- ITextRegion newToken = fRegionFactory.createToken(internalContext, yychar - containerStart, yylength(), yylength());
- fEmbeddedContainer.getRegions().add(newToken);
- fEmbeddedContainer.setLength(fEmbeddedContainer.getLength() + yylength());
- fEmbeddedContainer.setTextLength(fEmbeddedContainer.getTextLength() + yylength());
- // DW, 4/16/2003 token regions no longer have parents
- // newToken.setParent(fEmbeddedContainer);
- longscan = false;
- fEmbeddedPostState = previousPostState;
- fEmbeddedHint = previousEmbeddedHint;
- fCurrentTagName = previousCurrentTagName;
- yybegin(previousState);
- internalContext = primGetNextToken();
- }
- } catch (IOException e) {
- // primGetNextToken() calls may throw an IOException
- // catch and do nothing since the isEOF check below
- // will properly exit if the input was too short
- } catch (Exception f) {
- // some other exception happened; never should
- Logger.logException(f);
- }
- boolean isEndingType = yystate() == ST_ABORT_EMBEDDED;
- if(!isEndingType) {
- // check for ending context
- if (endTagName == null) {
- for (int i = 0; i < endTypes.length; i++) {
- isEndingType = isEndingType || (internalContext == endTypes[i]);
- }
- }
- else {
- isEndingType = ((isInEndTag && internalContext == XML_TAG_CLOSE) || (isInFirstTag && internalContext == XML_EMPTY_TAG_CLOSE)) && internalTagName != null && internalTagName.equals(endTagName);
- }
- }
- ITextRegionList embeddedList = fEmbeddedContainer.getRegions();
- notFinished = notFinished && ((!isEndingType) && !isEOF() && (endTagName != null || internalContext != UNDEFINED) && !(internalContext == PROXY_CONTEXT && (embeddedList.get(embeddedList.size()-1)).getType() == UNDEFINED));
- }
- // finish adding the last context
- if (internalContext != null && internalContext != PROXY_CONTEXT) {
- ITextRegion newToken = fRegionFactory.createToken(internalContext, yychar - containerStart, yylength(), yylength());
- fEmbeddedContainer.getRegions().add(newToken);
- // DW, 4/16/2003 token regions no longer have parents
- //newToken.setParent(fEmbeddedContainer);
- fEmbeddedContainer.setLength(yychar - containerStart + yylength());
- fEmbeddedContainer.setTextLength(yychar - containerStart + yylength());
- }
- yybegin(fEmbeddedPostState);
- }
- /* user method */
- public final boolean isCaseSensitiveBlocking() {
- return fIsCaseSensitiveBlocking;
- }
- /* user method */
- public final void setCaseSensitiveBlocking(boolean newValue) {
- fIsCaseSensitiveBlocking = newValue;
- }
- /* user method */
- public boolean getBlockMarkerAllowsJSP() {
- return getBlockMarkerAllowsJSP(fCurrentTagName);
- }
- /* user method */
- public boolean getBlockMarkerAllowsJSP(String name) {
- Iterator iterator = fBlockMarkers.iterator();
- while(iterator.hasNext()) {
- BlockMarker marker = (BlockMarker)iterator.next();
- boolean casesensitive = marker.isCaseSensitive();
- if(casesensitive && marker.getTagName().equals(name))
- return marker.allowsJSP();
- else if(!casesensitive && marker.getTagName().equalsIgnoreCase(name))
- return marker.allowsJSP();
- }
- return true;
- }
- /* user method */
- public boolean getBlockMarkerCaseSensitivity() {
- return getBlockMarkerCaseSensitivity(fCurrentTagName);
- }
- public boolean getBlockMarkerCaseSensitivity(String name) {
- Iterator iterator = fBlockMarkers.iterator();
- while(iterator.hasNext()) {
- BlockMarker marker = (BlockMarker)iterator.next();
- boolean casesensitive = marker.isCaseSensitive();
- if(casesensitive && marker.getTagName().equals(name))
- return casesensitive;
- else if(!casesensitive && marker.getTagName().equalsIgnoreCase(name))
- return casesensitive;
- }
- return true;
- }
- /* user method */
- public String getBlockMarkerContext() {
- return getBlockMarkerContext(fCurrentTagName);
- }
- /* user method */
- public String getBlockMarkerContext(String name) {
- Iterator iterator = fBlockMarkers.iterator();
- while(iterator.hasNext()) {
- BlockMarker marker = (BlockMarker)iterator.next();
- if(marker.getTagName().equals(name))
- return marker.getContext();
- }
- return BLOCK_TEXT;
- }
- /* user method */
- public List getBlockMarkers() {
- return fBlockMarkers;
- }
- /* user method */
- public final int getOffset() {
- return fOffset + yychar;
- }
- private final boolean isBlockMarker() {
- return isBlockMarker(fCurrentTagName);
- }
- private final boolean isBlockMarker(String tagName) {
- if (!fIsBlockingEnabled)
- return false;
- return containsTagName(tagName);
- }
- /**
- * user method
- */
- public final void beginBlockTagScan(String newTagName) {
- beginBlockMarkerScan(newTagName, BLOCK_TEXT);
- }
- /**
- * user method
- *
- * Special tokenizer setup. Allows tokenization to be initiated at the
- * start of a text block within a "newTagName" tag.
- *
- * Example:
- * Tokenizer toker = new Tokenizer();
- * toker.setCaseSensitiveBlocking(false);
- * toker.reset(new java.io.StringReader("afiuhqwkejhtasihgalkwhtq</scripter></scr></script>asgdasga"));
- * toker.beginBlockMarkerScan("script", BLOCK_TEXT);
- * toker.getRegions();
- *
- * Returns:
- * BLOCK_TEXT: 0-40
- * XML_END_TAG_OPEN: 41-42
- * XML_TAG_NAME: 43-48
- * XML_TAG_CLOSE: 49-49
- * XML_CONTENT: 50-57
- *
- */
- public final void beginBlockMarkerScan(String newTagName, String blockcontext) {
- yybegin(ST_BLOCK_TAG_SCAN);
- fCurrentTagName = newTagName;
- }
-
-/**
- * Method doScan.
- *
- * Returns a context region for all of the text from the current position upto the end of input or
- * to right *before* the first occurence of searchString
- *
- * @param searchString - target string to search for ex.: "-->", "</tagname"
- * @param requireTailSeparator - whether the target must be immediately followed by whitespace or '>'
- * @param allowJSP - check for and allow for JSP markup <%%>
- * @param context - the context of the scanned region if non-zero length
- * @param exitState - the state to go to if the region was of non-zero length
- * @param abortState - the state to go to if the searchString was found immediately
- * @return String - the context found: the desired context on a non-zero length match, the abortContext on immediate success
- * @throws IOException
- */
-private final String doScan(String searchString, boolean requireTailSeparator, boolean allowJSP, boolean allowCDATA, String searchContext, int exitState, int immediateFallbackState) throws IOException {
- boolean stillSearching = true;
- // Disable further block (probably)
- fIsBlockingEnabled = false;
- int searchStringLength = searchString.length();
- int n = 0;
- char lastCheckChar;
- int i;
- boolean same = false;
- // Check for JSP starts ("<%") if the tag is global like SCRIPT or STYLE
- boolean checkJSPs = allowJSP && !fForbidJSP;
- boolean checkedForJSPsOnce = !checkJSPs;
- boolean checkedJSPsAtStartOnce = false;
-
- while (stillSearching) {
- n = 0;
- // Ensure that enough data from the input exists to compare against the search String.
- n = yy_advance();
- while(n != YYEOF && yy_currentPos < searchStringLength)
- n = yy_advance();
-// c = (char) n;
- // If the input was too short or we've exhausted the input, stop immediately.
- if (n == YYEOF && checkedForJSPsOnce) {
- stillSearching = false;
- }
- else {
- /**
- * Look for starting JSPs "<%"
- */
- checkedForJSPsOnce = true;
- // 1) yy_currentPos - searchStringLength : There's at least searchStringLength of input available; once that's read, check for JSPs
- // ---
- // Look for a JSP beginning at current-searchStringLength; if so, backup and switch scanner states to handle it.
- // Ensure that we've not encountered a complete block (<%%>) that was *shorter* than the closeTagString and
- // thus found twice at current-targetLength [since the first scan would have come out this far anyway].
- if(checkJSPs && yy_currentPos > searchStringLength && yy_currentPos - searchStringLength != fLastInternalBlockStart &&
- yy_buffer[yy_currentPos - searchStringLength] == '<' && yy_buffer[yy_currentPos - searchStringLength + 1] == '%') {
- fLastInternalBlockStart = yy_markedPos = yy_currentPos - searchStringLength;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
- // 2) yy_currentPos - jspstarter.length : There's not searchStringLength of input available; check for a JSP 2 spots back in what we could read
- // ---
- // Look for a JSP beginning at the current position; this case wouldn't be handled by the preceding section
- // since it relies upon *having* closeTagStringLength amount of input to work as designed. Must be sure we don't
- // spill over the end of the buffer while checking.
- else if(checkJSPs && yy_startRead != fLastInternalBlockStart && yy_currentPos > 0 && yy_currentPos < yy_buffer.length - 1 &&
- yy_buffer[yy_currentPos - 1] == '<' && yy_buffer[yy_currentPos] == '%') {
- fLastInternalBlockStart = yy_markedPos = yy_currentPos - 1;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
- // 3) yy_currentPos..(yy_currentPos+jspStartlength-1) : Check at the start of the block one time
- // ---
- // Look for a JSP beginning immediately in the block area; this case wouldn't be handled by the preceding section
- // since it relies upon yy_currentPos equaling exactly the previous end +1 to work as designed.
- else if(checkJSPs && !checkedJSPsAtStartOnce && yy_startRead != fLastInternalBlockStart && yy_startRead > 0 &&
- yy_startRead < yy_buffer.length - 1 && yy_buffer[yy_startRead] == '<' && yy_buffer[yy_startRead + 1] == '%') {
- checkedJSPsAtStartOnce = true;
- fLastInternalBlockStart = yy_markedPos = yy_startRead;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
-
-
- /**
- * Look for starting CDATA "<![CDATA["
- */
- // 1) yy_currentPos - searchStringLength: There's at least searchStringLength of input available; once that's read, check for CDATA
- // ---
- // Look for a CDATA beginning at current-searchStringLength; if so, backup and switch scanner states to handle it.
- // Ensure that we've not encountered a complete block (<[!CDATA[]]>) that was *shorter* than the closeTagString and
- // thus found twice at current-targetLength [since the first scan would have come out this far anyway].
-/* if(checkCDATA && yy_currentPos > searchStringLength && yy_currentPos + searchStringLength < yy_buffer.length && yy_currentPos - searchStringLength != fLastInternalBlockStart &&
- charsMatch(cdataStarter, yy_buffer, 0, yy_currentPos - searchStringLength)) {
- fLastInternalBlockStart = yy_markedPos = yy_currentPos - searchStringLength;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- // go to a state where CDATA can be found
- if (fEmbeddedContainer == null) {
- fEmbeddedContainer = new ContextRegionContainer();
- fEmbeddedContainer.setType(searchContext);
- fEmbeddedContainer.setStart(yychar);
- }
- ITextRegion newToken = fRegionFactory.createToken(searchContext, yychar, yylength(), yylength());
- fEmbeddedContainer.getRegions().add(newToken);
- fEmbeddedContainer.setLength(fEmbeddedContainer.getLength() + yylength());
- fEmbeddedContainer.setTextLength(fEmbeddedContainer.getTextLength() + yylength());
- yybegin(YYINITIAL);
- String context = primGetNextToken();
- if(context.equals(XMLRegionContexts.XML_CDATA_OPEN)) {
- assembleEmbeddedContainer(XMLRegionContexts.XML_CDATA_OPEN, XMLRegionContexts.XML_CDATA_CLOSE);
- }
- yybegin(resumeState);
- return searchContext;
- }
-*//*
- // 2) yy_currentPos - cdataStarter.length: There's not searchStringLength of input available; check for a CDATA right here spots back in what we could read
- // ---
- // Look for a JSP beginning at the current position; this case wouldn't be handled by the preceding section
- // since it relies upon *having* closeTagStringLength amount of input to work as designed. Must be sure we don't
- // spill over the end of the buffer while checking.
- else if(checkCDATA && yy_startRead != fLastInternalBlockStart && yy_currentPos > 0 && yy_currentPos < yy_buffer.length - 1 &&
- yy_buffer[yy_currentPos - 1] == '<' && yy_buffer[yy_currentPos] == '%') {
- fLastInternalBlockStart = yy_markedPos = yy_currentPos - 1;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
- // 3) yy_currentPos : Check at the start of the block one time
- // ---
- // Look for a JSP beginning immediately in the block area; this case wouldn't be handled by the preceding section
- // since it relies upon yy_currentPos equaling exactly the previous end +1 to work as designed.
- else if(checkCDATA && !checkedForCDATAOnce && yy_startRead != fLastInternalBlockStart && yy_startRead > 0 &&
- yy_startRead < yy_buffer.length - 1 && yy_buffer[yy_startRead] == '<' && yy_buffer[yy_startRead + 1] == '%') {
- checkedForCDATAOnce = true;
- fLastInternalBlockStart = yy_markedPos = yy_startRead;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
-*/
- // Check the characters in the target versus the last targetLength characters read from the buffer
- // and see if it matches
- if (n == YYEOF) {
- stillSearching = false;
- }
- else {
- same = true;
- // safety check for array accesses
- if(yy_currentPos >= searchStringLength && yy_currentPos <= yy_buffer.length) {
- for(i = 0; i < searchStringLength; i++) {
- if(same && fIsCaseSensitiveBlocking)
- same = yy_buffer[i + yy_currentPos - searchStringLength] == searchString.charAt(i);
- else if(same && !fIsCaseSensitiveBlocking)
- same = Character.toLowerCase(yy_buffer[i + yy_currentPos - searchStringLength]) == Character.toLowerCase(searchString.charAt(i));
- }
- }
- // safety check failed; no match is possible right now
- else {
- same = false;
- }
- }
- if (same && requireTailSeparator && yy_currentPos < yy_buffer.length) {
- // Additional check for close tags to ensure that targetString="</script" doesn't match
- // "</scriptS"
- lastCheckChar = yy_buffer[yy_currentPos];
- // Succeed on "</script>" and "</script "
- if(lastCheckChar == '>' || Character.isWhitespace(lastCheckChar))
- stillSearching = false;
- }
- else {
- stillSearching = !same || (yy_currentPos < yy_startRead + searchStringLength);
- }
- }
- }
- if (n != YYEOF || same) {
- // We've stopped short of the end or definitely found a match
- yy_markedPos = yy_currentPos - searchStringLength;
- yy_currentPos = yy_markedPos + 1;
- // If the searchString occurs at the very beginning of what would have
- // been a Block, resume scanning normally immediately
- if (yy_markedPos == yy_startRead) {
- yybegin(immediateFallbackState);
- return primGetNextToken();
- }
- }
- else {
- // We ran through the rest of the input
- yy_markedPos = yy_currentPos;
- yy_currentPos++;
- }
- yybegin(exitState);
- // If the ending occurs at the very beginning of what would have
- // been a Block, resume scanning normally immediately
- if(yy_markedPos == yy_startRead)
- return primGetNextToken();
- return searchContext;
-}
-/**
- * user method
- * does a lookahead for the current tag name
- */
-private final String doBlockTagScan() throws IOException {
- fIsCaseSensitiveBlocking = getBlockMarkerCaseSensitivity();
- return doScan("</" + fCurrentTagName, true, getBlockMarkerAllowsJSP(), true, getBlockMarkerContext(fCurrentTagName), YYINITIAL, YYINITIAL);
-}
- /**
- * user method
- *
- * Converts the raw context String returned by the primGetNextToken()
- * method into a full ITextRegion by pulling in values for the
- * current offset within the scanning text.
- *
- * Returns null when EOF is encountered and attaches intermittently
- * discovered whitespace onto the end of useful regions.
- *
- * Note that this algorithm caches the token following the one being returned
- * so that whitespace can be collapsed.
- */
- public final ITextRegion getNextToken() throws IOException {
- fEmbeddedContainer = null;
- // load the starting non-whitespace token (assume that it is so)
- if (fShouldLoadBuffered) {
- if (fBufferedEmbeddedContainer != null) {
- ITextRegion container = fBufferedEmbeddedContainer;
- fBufferedEmbeddedContainer = null;
- fShouldLoadBuffered = false;
- return container;
- }
- context = fBufferedContext;
- start = fBufferedStart;
- textLength = length = fBufferedLength;
- fShouldLoadBuffered = false;
- } else {
- context = primGetNextToken();
- if (context == PROXY_CONTEXT) {
- return fEmbeddedContainer;
- } else if (context == XML_TAG_NAME || f_context == JSP_ROOT_TAG_NAME || f_context == JSP_DIRECTIVE_NAME) {
- if(containsTagName(yy_buffer, yy_startRead, yy_markedPos-yy_startRead))
- fCurrentTagName = yytext();
- else
- fCurrentTagName = null;
- } else if (context == XML_TAG_OPEN) {
- fIsBlockingEnabled = true;
- } else if (context == XML_END_TAG_OPEN) {
- fIsBlockingEnabled = false;
- }
- start = yychar;
- textLength = length = yylength();
- if (yy_atEOF) {
- fTokenCount++;
- return null;
- }
- }
- // store the next token
- f_context = primGetNextToken();
- if (f_context == PROXY_CONTEXT) {
- fBufferedEmbeddedContainer = fEmbeddedContainer;
- fShouldLoadBuffered = true;
- } else if (f_context == XML_TAG_NAME || f_context == JSP_ROOT_TAG_NAME || f_context == JSP_DIRECTIVE_NAME) {
- if(containsTagName(yy_buffer, yy_startRead, yy_markedPos-yy_startRead))
- fCurrentTagName = yytext();
- else
- fCurrentTagName = null;
- } else if (f_context == XML_TAG_OPEN) {
- fIsBlockingEnabled = true;
- } else if (f_context == XML_END_TAG_OPEN) {
- fIsBlockingEnabled = false;
- }
- fBufferedContext = f_context;
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- fShouldLoadBuffered = true;
- if (fBufferedContext == WHITE_SPACE) {
- fShouldLoadBuffered = false;
- length += fBufferedLength;
- }
- if (context == null) {
- // EOF
- if (Debug.debugTokenizer) {
- System.out.println(getClass().getName() + " discovered " + fTokenCount + " tokens."); //$NON-NLS-2$//$NON-NLS-1$
- }
- return null;
- }
- fTokenCount++;
- return fRegionFactory.createToken(context, start, textLength, length, null, fCurrentTagName);
- }
- /* user method */
- public JSPTokenizer(){
- super();
- }
- /* user method */
- public JSPTokenizer(char[] charArray){
- this(new CharArrayReader(charArray));
- }
- /* user method */
- public void reset(char[] charArray) {
- reset(new CharArrayReader(charArray), 0);
- }
- /* user method */
- public void reset(char[] charArray, int newOffset) {
- reset(new CharArrayReader(charArray), newOffset);
- }
- /* user method */
- public void reset(java.io.InputStream in) {
- reset(new java.io.InputStreamReader(in), 0);
- }
- /* user method */
- public void reset(java.io.InputStream in, int newOffset) {
- reset(new java.io.InputStreamReader(in), newOffset);
- }
- /* user method */
- public void reset(java.io.Reader in) {
- reset(in, 0);
- }
- /**
- * user method *
- *
- * Reset internal counters and vars to "newly created" values, in the hopes
- * that resetting a pre-existing tokenizer is faster than creating a new one.
- *
- * This method contains code blocks that were essentially duplicated from the
- * <em>generated</em> output of this specification before this method was
- * added. Those code blocks were under the above copyright.
- */
- public void reset(java.io.Reader in, int newOffset) {
- if (Debug.debugTokenizer) {
- System.out.println("resetting tokenizer");//$NON-NLS-1$
- }
- fOffset = newOffset;
-
- /* the input device */
- yy_reader = in;
-
- /* the current state of the DFA */
- yy_state = 0;
-
- /* the current lexical state */
- yy_lexical_state = YYINITIAL;
-
- /* this buffer contains the current text to be matched and is
- the source of the yytext() string */
- java.util.Arrays.fill(yy_buffer, (char)0);
-
- /* the textposition at the last accepting state */
- yy_markedPos = 0;
-
- /* the textposition at the last state to be included in yytext */
- yy_pushbackPos = 0;
-
- /* the current text position in the buffer */
- yy_currentPos = 0;
-
- /* startRead marks the beginning of the yytext() string in the buffer */
- yy_startRead = 0;
-
- /**
- * endRead marks the last character in the buffer, that has been read
- * from input
- */
- yy_endRead = 0;
-
- /* number of newlines encountered up to the start of the matched text */
- yyline = 0;
-
- /* the number of characters up to the start of the matched text */
- yychar = 0;
-
- /* yy_atEOF == true <=> the scanner has returned a value for EOF */
- yy_atEOF = false;
-
- /* denotes if the user-EOF-code has already been executed */
- yy_eof_done = false;
-
-
- /* user vars: */
- fTokenCount = 0;
-
- fShouldLoadBuffered = false;
- fBufferedContext = null;
- fBufferedStart = 1;
- fBufferedLength = 0;
- fStateStack = new IntStack();
-
- fLastInternalBlockStart = -1;
-
- context = null;
- start = 0;
- textLength = 0;
- length = 0;
-
- fEmbeddedContainer = null;
-
- fELlevel = 0;
- }
- /**
- * user method
- *
- */
- public BlockTokenizer newInstance() {
- JSPTokenizer newInstance = new JSPTokenizer();
- // global tagmarkers can be shared; they have no state and
- // are never destroyed (e.g. 'release')
- for(int i = 0; i < fBlockMarkers.size(); i++) {
- BlockMarker blockMarker = (BlockMarker) fBlockMarkers.get(i);
- if(blockMarker.isGlobal())
- newInstance.addBlockMarker(blockMarker);
- }
- for(int i = 0; i < fNestablePrefixes.size(); i++) {
- TagMarker marker = (TagMarker) fNestablePrefixes.get(i);
- if(marker.isGlobal())
- newInstance.addNestablePrefix(marker);
- }
- return newInstance;
- }
- /* user method */
- private final String scanXMLCommentText() throws IOException {
- // Scan for '-->' and return the text up to that point as
- // XML_COMMENT_TEXT unless the string occurs IMMEDIATELY, in which
- // case change to the ST_XML_COMMENT_END state and return the next
- // context as usual.
- return doScan("-->", false, true, true, XML_COMMENT_TEXT, ST_XML_COMMENT_END, ST_XML_COMMENT_END);
- }
- /* user method */
- private final String scanJSPCommentText() throws IOException {
- // Scan for '--%>' and return the text up to that point as
- // JSP_COMMENT_TEXT unless the string occurs IMMEDIATELY, in which
- // case change to the ST_JSP_COMMENT_END state and return the next
- // context as usual.
- return doScan("--%>", false, false, true, JSP_COMMENT_TEXT, ST_JSP_COMMENT_END, ST_JSP_COMMENT_END);
- }
-
-
- /**
- * Creates a new scanner
- * There is also a java.io.InputStream version of this constructor.
- *
- * @param in the java.io.Reader to read input from.
- */
- public JSPTokenizer(java.io.Reader in) {
- this.yy_reader = in;
- }
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public JSPTokenizer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed DFA transition table.
- *
- * @param packed the packed transition table
- * @return the unpacked transition table
- */
- private static int [] yy_unpack(String packed) {
- int [] trans = new int[31595];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 8206) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- value--;
- do trans[j++] = value; while (--count > 0);
- }
- return trans;
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] yy_unpack_cmap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 1376) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do map[j++] = value; while (--count > 0);
- }
- return map;
- }
-
-
- /**
- * Gets the next input character.
- *
- * @return the next character of the input stream, EOF if the
- * end of the stream is reached.
- * @exception IOException if any I/O-Error occurs
- */
- private int yy_advance() throws java.io.IOException {
-
- /* standard case */
- if (yy_currentPos < yy_endRead) return yy_buffer[yy_currentPos++];
-
- /* if the eof is reached, we don't need to work hard */
- if (yy_atEOF) return YYEOF;
-
- /* otherwise: need to refill the buffer */
-
- /* first: make room (if you can) */
- if (yy_startRead > 0) {
- System.arraycopy(yy_buffer, yy_startRead,
- yy_buffer, 0,
- yy_endRead-yy_startRead);
-
- /* translate stored positions */
- yy_endRead-= yy_startRead;
- yy_currentPos-= yy_startRead;
- yy_markedPos-= yy_startRead;
- yy_pushbackPos-= yy_startRead;
- yy_startRead = 0;
- }
-
- /* is the buffer big enough? */
- if (yy_currentPos >= yy_buffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[yy_currentPos*2];
- System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);
- yy_buffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = yy_reader.read(yy_buffer, yy_endRead,
- yy_buffer.length-yy_endRead);
-
- if ( numRead == -1 ) return YYEOF;
-
- yy_endRead+= numRead;
-
- return yy_buffer[yy_currentPos++];
- }
-
-
- /**
- * Closes the input stream.
- */
- final public void yyclose() throws java.io.IOException {
- yy_atEOF = true; /* indicate end of file */
- yy_endRead = yy_startRead; /* invalidate buffer */
- yy_reader.close();
- }
-
-
- /**
- * Returns the current lexical state.
- */
- final public int yystate() {
- return yy_lexical_state;
- }
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- final public void yybegin(int newState) {
- yy_lexical_state = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- final public String yytext() {
- return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );
- }
-
- /**
- * Returns the length of the matched text region.
- */
- final public int yylength() {
- return yy_markedPos-yy_startRead;
- }
-
-
- /**
- * Reports an error that occured while scanning - from the SED JFlex skeleton
- *
- * @param errorCode the code of the errormessage to display
- */
- private void yy_ScanError(int errorCode) {
- try {
- Logger.log(Logger.ERROR, YY_ERROR_MSG[errorCode]);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- Logger.log(Logger.ERROR, YY_ERROR_MSG[YY_UNKNOWN_ERROR]);
- }
- // DO NOT EXIT the VM on an error
- // System.exit(1);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- void yypushback(int number) {
- if ( number > yylength() )
- yy_ScanError(YY_PUSHBACK_2BIG);
-
- yy_markedPos -= number;
- }
-
- /**
- * user method - skeleton.sed
- */
- protected final boolean containsTagName(char[] markerTagName, int offset, int tagnameLength) {
- for(int j = 0; j < fBlockMarkers.size(); j++) {
- BlockMarker marker = (BlockMarker)fBlockMarkers.get(j);
- if(marker.getTagName().length() == tagnameLength) {
- boolean matchesSoFar = true;
- for(int i = 0; i < tagnameLength && matchesSoFar; i++) {
- if(marker.isCaseSensitive()) {
- if(marker.getTagName().charAt(i) != markerTagName[i + offset])
- matchesSoFar = false;
- }
- else {
- if(Character.toLowerCase(marker.getTagName().charAt(i)) != Character.toLowerCase(markerTagName[i + offset]))
- matchesSoFar = false;
- }
- }
- if(matchesSoFar)
- return true;
- }
- }
- return false;
- }
-
- /**
- * user method - skeleton.sed
- *
- * Return ALL of the regions scannable within the remaining text
- * Note: for verification use
- */
- public final List getRegions() {
- List tokens = new ArrayList();
- ITextRegion region = null;
- try {
- region = getNextToken();
- while(region != null) {
- if (region != null) {
- tokens.add(region);
- }
- region = getNextToken();
- }
- }
- catch (StackOverflowError e) {
- Logger.logException(getClass().getName()+": input could not be tokenized correctly at position " + getOffset(), e);//$NON-NLS-1$
- throw e;
- }
- catch (Exception e) {
- // Since this is convenience method and NOT the recommended
- // way of getting tokens, many errors are simply hidden
- Logger.logException("Exception not handled retrieving regions: " + e.getLocalizedMessage(), e);//$NON-NLS-1$
- }
- return tokens;
- }
- /**
- * user method - skeleton.sed
- */
- private final void dump(String s) {
- if (Debug.debugTokenizer) {
- System.out.println(s + " (" + yychar + "-" + //$NON-NLS-2$//$NON-NLS-1$
- (yylength() + yychar) + "):\'" +//$NON-NLS-1$
- StringUtils.escape(yytext()) + "\'");//$NON-NLS-1$
- }
- }
- /* user method - skeleton.sed */
- public final boolean isEOF() {
- return yy_atEOF;
- }
-/* user method - skeleton.sed */
-protected final boolean containsTagName(String markerTagName) {
- Iterator blocks = fBlockMarkers.iterator();
- while(blocks.hasNext()) {
- BlockMarker marker = (BlockMarker)blocks.next();
- if(marker.isCaseSensitive()) {
- if(marker.getTagName().equals(markerTagName))
- return true;
- }
- else {
- if(marker.getTagName().equalsIgnoreCase(markerTagName))
- return true;
- }
- }
- return false;
-}
-
- /**
- * Contains user EOF-code, which will be executed exactly once,
- * when the end of file is reached
- */
- private void yy_do_eof() {
- if (!yy_eof_done) {
- yy_eof_done = true;
- // do nothing, this is the downstream parser's job
-
- }
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception IOException if any I/O-Error occurs
- */
- public String primGetNextToken() throws java.io.IOException {
- int yy_input;
- int yy_action;
-
- yy_pushbackPos = -1;
- boolean yy_was_pushback;
-
- while (true) {
-
- yychar+= yylength();
-
- boolean yy_counted = false;
- for (yy_currentPos = yy_startRead; yy_currentPos < yy_markedPos;
- yy_currentPos++) {
- switch (yy_buffer[yy_currentPos]) {
- case '\r':
- yyline++;
- yy_counted = true;
- break;
- case '\n':
- if (yy_counted)
- yy_counted = false;
- else {
- yyline++;
- }
- break;
- default:
- yy_counted = false;
- }
- }
-
- if (yy_counted) {
- if ( yy_advance() == '\n' ) yyline--;
- if ( !yy_atEOF ) yy_currentPos--;
- }
-
- yy_action = -1;
-
- yy_currentPos = yy_startRead = yy_markedPos;
-
- yy_state = yy_lexical_state;
-
- yy_was_pushback = false;
-
- yy_forAction: {
- while (true) {
-
- yy_input = yy_advance();
-
- if ( yy_input == YYEOF ) break yy_forAction;
-
- int yy_next = yytrans[ yy_rowMap[yy_state] + yycmap[yy_input] ];
- if (yy_next == -1) break yy_forAction;
- yy_state = yy_next;
-
- int yy_attributes = YY_ATTRIBUTE[yy_state];
- if ( (yy_attributes & 2) > 0 )
- yy_pushbackPos = yy_currentPos;
-
- if ( (yy_attributes & 1) > 0 ) {
- yy_was_pushback = (yy_attributes & 4) > 0;
- yy_action = yy_state;
- yy_markedPos = yy_currentPos;
- if ( (yy_attributes & 8) > 0 ) break yy_forAction;
- }
-
- }
- }
-
- if (yy_was_pushback)
- yy_markedPos = yy_pushbackPos;
-
- switch (yy_action) {
-
- case 622:
- case 627:
- case 634:
- case 639:
- {
- 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 655: break;
- case 597:
- {
- 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 656: break;
- case 580:
- case 583:
- case 584:
- case 585:
- case 586:
- case 587:
- case 588:
- {
- if(Debug.debugTokenizer)
- dump("\nCDATA start");//$NON-NLS-1$
- fStateStack.push(yystate());
- yybegin(ST_CDATA_TEXT);
- return XML_CDATA_OPEN;
- }
- case 657: break;
- case 572:
- {
- 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 658: break;
- case 563:
- {
- if(Debug.debugTokenizer)
- dump("element");//$NON-NLS-1$
- yybegin(ST_XML_ELEMENT_DECLARATION);
- return XML_ELEMENT_DECLARATION;
- }
- case 659: break;
- case 562:
- {
- if(Debug.debugTokenizer)
- dump("attlist");//$NON-NLS-1$
- yybegin(ST_XML_ATTLIST_DECLARATION);
- return XML_ATTLIST_DECLARATION;
- }
- case 660: break;
- case 561:
- {
- if(Debug.debugTokenizer)
- dump("doctype");//$NON-NLS-1$
- yybegin(ST_XML_DOCTYPE_DECLARATION);
- return XML_DOCTYPE_DECLARATION;
- }
- case 661: break;
- case 546:
- {
- 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 662: break;
- case 545:
- {
- 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 663: break;
- case 539:
- {
- 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 664: break;
- case 514:
- case 555:
- case 556:
- {
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 665: break;
- case 504:
- case 551:
- case 552:
- {
- return JSP_EL_QUOTED_CONTENT;
- }
- case 666: break;
- case 496:
- {
- if(Debug.debugTokenizer)
- dump("\nJSP comment close");//$NON-NLS-1$
- yybegin(YYINITIAL);
- return JSP_COMMENT_CLOSE;
- }
- case 667: break;
- case 483:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- if(yylength() > 2)
- yypushback(yylength() -2);
- if(Debug.debugTokenizer)
- dump("VBL in attr value");//$NON-NLS-1$
- yybegin(ST_JSP_VBL);
- fELlevel++;
- assembleEmbeddedContainer(JSP_VBL_OPEN, new String[]{JSP_VBL_CLOSE});
- fStateStack.pop();
- yybegin(ST_XML_ATTRIBUTE_NAME);
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- return PROXY_CONTEXT;
- }
- case 668: break;
- case 482:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- if(yylength() > 2)
- yypushback(yylength() -2);
- if(Debug.debugTokenizer)
- dump("EL in attr value");//$NON-NLS-1$
- yybegin(ST_JSP_EL);
- fELlevel++;
- assembleEmbeddedContainer(JSP_EL_OPEN, new String[]{JSP_EL_CLOSE});
- fStateStack.pop();
- yybegin(ST_XML_ATTRIBUTE_NAME);
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- return PROXY_CONTEXT;
- }
- case 669: break;
- case 476:
- {
- if(Debug.debugTokenizer)
- dump("\nCharRef");//$NON-NLS-1$
- return XML_CHAR_REFERENCE;
- }
- case 670: break;
- case 473:
- {
- 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 671: break;
- case 472:
- case 491:
- case 494:
- case 497:
- case 498:
- case 500:
- case 502:
- case 505:
- case 507:
- case 508:
- case 510:
- case 512:
- case 515:
- {
- /* JSP comment begun (anywhere)
- * A consequence of the start anywhere possibility is that the
- * incoming state must be checked to see if it's erroneous
- * due to the order of precedence generated
- */
- // begin sanity checks
- if(yystate() == ST_JSP_CONTENT) {
- // at the beginning?!
- yypushback(3);
- return JSP_CONTENT;
- }
- else if(yystate() == ST_BLOCK_TAG_SCAN) {
- yypushback(4);
- return doBlockTagScan();
- }
- else if(yystate() == ST_XML_COMMENT) {
- yypushback(4);
- return scanXMLCommentText();
- }
- else if(yystate() == ST_JSP_COMMENT) {
- yypushback(4);
- return scanJSPCommentText();
- }
- else if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_JSP_COMMENT);
- assembleEmbeddedContainer(JSP_COMMENT_OPEN, JSP_COMMENT_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN)
- yybegin(ST_BLOCK_TAG_SCAN);
- return PROXY_CONTEXT;
- }
- // finished sanity checks
- if(yystate()==YYINITIAL) {
- // the simple case, just a regular scriptlet out in content
- if(Debug.debugTokenizer)
- dump("\nJSP comment start");//$NON-NLS-1$
- yybegin(ST_JSP_COMMENT);
- return JSP_COMMENT_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP comment start");//$NON-NLS-1$
- if(yystate() == ST_XML_ATTRIBUTE_VALUE_DQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE_SQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- else if(yystate() == ST_CDATA_TEXT) {
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- }
- yybegin(ST_JSP_COMMENT);
- // the comment container itself will act as comment text
- fEmbeddedHint = JSP_COMMENT_TEXT;
- assembleEmbeddedContainer(JSP_COMMENT_OPEN, JSP_COMMENT_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- /*
- * required help for successive embedded regions; mark this one as a
- * comment so it will be otherwise ignored but preserved (which is why
- * we can't use white-space)
- */
- if(yystate() == ST_XML_TAG_NAME) {
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else if((yystate() == ST_XML_ATTRIBUTE_NAME || yystate() == ST_XML_EQUALS)) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- }
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 672: break;
- case 381:
- case 382:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction target");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_PI_ATTRIBUTE_NAME);
- return XML_TAG_NAME;
- }
- case 673: break;
- case 380:
- {
- if(Debug.debugTokenizer)
- dump("comment end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_COMMENT_CLOSE;
- }
- case 674: break;
- case 379:
- {
- if(Debug.debugTokenizer)
- dump("CDATA end");//$NON-NLS-1$
- yybegin(fStateStack.pop());
- return XML_CDATA_CLOSE;
- }
- case 675: break;
- case 378:
- {
- 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 676: break;
- case 377:
- {
- if(Debug.debugTokenizer)
- dump("\nPEReference");//$NON-NLS-1$
- return XML_PE_REFERENCE;
- }
- case 677: break;
- case 376:
- {
- 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 678: break;
- case 373:
- {
- if(Debug.debugTokenizer)
- dump("\nEntityRef");//$NON-NLS-1$
- return XML_ENTITY_REFERENCE;
- }
- case 679: break;
- case 367:
- case 407:
- case 415:
- case 422:
- case 427:
- case 432:
- case 437:
- case 443:
- case 449:
- case 453:
- case 458:
- case 463:
- case 469:
- {
- /* JSP expression begun (anywhere)
- * A consequence of the start anywhere possibility is that the
- * incoming state must be checked to see if it's erroneous
- * due to the order of precedence generated
- */
- // begin sanity checks
- if(yystate() == ST_JSP_CONTENT) {
- // at the beginning?!
- yypushback(2);
- return JSP_CONTENT;
- }
- else if(yystate() == ST_BLOCK_TAG_SCAN) {
- yypushback(3);
- return doBlockTagScan();
- }
- else if(yystate() == ST_XML_COMMENT) {
- yypushback(3);
- return scanXMLCommentText();
- }
- else if(yystate() == ST_JSP_COMMENT) {
- yypushback(3);
- return scanJSPCommentText();
- }
- // end sanity checks
- fStateStack.push(yystate());
- if(fStateStack.peek()==YYINITIAL) {
- // the simple case, just an expression out in content
- if(Debug.debugTokenizer)
- dump("\nJSP expression start");//$NON-NLS-1$
- yybegin(ST_JSP_CONTENT);
- return JSP_EXPRESSION_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP expression start");//$NON-NLS-1$
- if(yystate() == ST_XML_ATTRIBUTE_VALUE_DQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE_SQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- else if(yystate() == ST_CDATA_TEXT) {
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- }
- yybegin(ST_JSP_CONTENT);
- assembleEmbeddedContainer(JSP_EXPRESSION_OPEN, JSP_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- // required help for successive embedded regions
- if(yystate() == ST_XML_TAG_NAME) {
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else if((yystate() == ST_XML_ATTRIBUTE_NAME || yystate() == ST_XML_EQUALS)) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- }
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 680: break;
- case 366:
- case 406:
- case 414:
- case 421:
- case 426:
- case 431:
- case 436:
- case 442:
- case 448:
- case 452:
- case 457:
- case 462:
- case 468:
- {
- /* JSP declaration begun (anywhere)
- * A consequence of the start anywhere possibility is that the
- * incoming state must be checked to see if it's erroneous
- * due to the order of precedence generated
- */
- // begin sanity checks
- if(yystate() == ST_JSP_CONTENT) {
- // at the beginning?!
- yypushback(2);
- return JSP_CONTENT;
- }
- else if(yystate() == ST_BLOCK_TAG_SCAN) {
- yypushback(3);
- return doBlockTagScan();
- }
- else if(yystate() == ST_XML_COMMENT) {
- yypushback(3);
- return scanXMLCommentText();
- }
- else if(yystate() == ST_JSP_COMMENT) {
- yypushback(3);
- return scanJSPCommentText();
- }
- // end sanity checks
- fStateStack.push(yystate());
- if(fStateStack.peek()==YYINITIAL) {
- // the simple case, just a declaration out in content
- if(Debug.debugTokenizer)
- dump("\nJSP declaration start");//$NON-NLS-1$
- yybegin(ST_JSP_CONTENT);
- return JSP_DECLARATION_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP declaration start");//$NON-NLS-1$
- if(yystate() == ST_XML_ATTRIBUTE_VALUE_DQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE_SQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- else if(yystate() == ST_CDATA_TEXT) {
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- }
- yybegin(ST_JSP_CONTENT);
- assembleEmbeddedContainer(JSP_DECLARATION_OPEN, JSP_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- // required help for successive embedded regions
- if(yystate() == ST_XML_TAG_NAME) {
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else if((yystate() == ST_XML_ATTRIBUTE_NAME || yystate() == ST_XML_EQUALS)) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- }
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 681: break;
- case 365:
- case 405:
- case 413:
- case 420:
- case 425:
- case 430:
- case 435:
- case 441:
- case 447:
- case 451:
- case 456:
- case 461:
- case 467:
- {
- /* 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);//$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 682: break;
- case 355:
- {
- yybegin(ST_JSP_VBL_DQUOTES_END);
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 683: break;
- case 351:
- {
- yybegin(ST_JSP_VBL_SQUOTES_END);
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 684: break;
- case 349:
- {
- fELlevel++;
- if(fELlevel == 1) {
- return JSP_VBL_OPEN;
- }
- }
- case 685: break;
- case 339:
- {
- yybegin(ST_JSP_EL_DQUOTES_END);
- return JSP_EL_QUOTED_CONTENT;
- }
- case 686: break;
- case 335:
- {
- yybegin(ST_JSP_EL_SQUOTES_END);
- return JSP_EL_QUOTED_CONTENT;
- }
- case 687: break;
- case 333:
- {
- //System.out.println(JSP_EL_CONTENT+ ":[" + yytext() + "]");
- return JSP_EL_CONTENT;
- }
- case 688: break;
- case 332:
- {
- fELlevel++;
- if(fELlevel == 1) {
- return JSP_EL_OPEN;
- }
- }
- case 689: break;
- case 329:
- {
- int enterState = yystate();
- yybegin(ST_JSP_DQUOTED_VBL);
- assembleEmbeddedContainer(JSP_VBL_OPEN, new String[]{JSP_VBL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_DQUOTE});
- // abort early when an unescaped double quote is found in the VBL
- if(fEmbeddedContainer.getLastRegion().getType().equals(XML_TAG_ATTRIBUTE_VALUE_DQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 690: break;
- case 328:
- {
- int enterState = yystate();
- yybegin(ST_JSP_DQUOTED_EL);
- assembleEmbeddedContainer(JSP_EL_OPEN, new String[]{JSP_EL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_DQUOTE});
- // abort early when an unescaped double quote is found in the EL
- if(fEmbeddedContainer.getLastRegion().getType().equals(XML_TAG_ATTRIBUTE_VALUE_DQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 691: break;
- case 326:
- {
- int enterState = yystate();
- yybegin(ST_JSP_SQUOTED_VBL);
- assembleEmbeddedContainer(JSP_VBL_OPEN, new String[]{JSP_VBL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_SQUOTE});
- // abort early when an unescaped single quote is found in the VBL
- if(fEmbeddedContainer.getLastRegion().getType().equals(XML_TAG_ATTRIBUTE_VALUE_SQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 692: break;
- case 325:
- {
- int enterState = yystate();
- yybegin(ST_JSP_SQUOTED_EL);
- assembleEmbeddedContainer(JSP_EL_OPEN, new String[]{JSP_EL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_SQUOTE});
- // abort early when an unescaped single quote is found in the EL
- if(fEmbeddedContainer.getLastRegion().getType().equals(XML_TAG_ATTRIBUTE_VALUE_SQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 693: break;
- case 324:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- int incomingState = yystate();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- if(Debug.debugTokenizer)
- dump("JSP attribute value start - end tag");//$NON-NLS-1$
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedContainer(XML_END_TAG_OPEN, new String[]{XML_TAG_CLOSE,XML_EMPTY_TAG_CLOSE});
- if(yystate() != ST_ABORT_EMBEDDED)
- yybegin(incomingState);
- return PROXY_CONTEXT;
- }
- case 694: break;
- case 283:
- case 295:
- case 301:
- {
- return XML_DOCTYPE_INTERNAL_SUBSET;
- }
- case 695: break;
- case 271:
- {
- String tagName = yytext().substring(1);
- // pushback to just after the opening bracket
- yypushback(yylength() - 1);
- /*
- * If this tag can not be nested or we're already searching for an
- * attribute name, equals, or value, return immediately.
- */
- if (!isNestable(tagName) || (!fStateStack.empty() && (fStateStack.peek() == ST_XML_ATTRIBUTE_NAME || fStateStack.peek() == ST_XML_EQUALS || fStateStack.peek() == ST_XML_ATTRIBUTE_VALUE))) {
- yybegin(ST_XML_TAG_NAME);
- return XML_TAG_OPEN;
- }
- if(Debug.debugTokenizer)
- dump("tag in place of attr value");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- // embedded container should be looking for the name (again) next
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedTagSequence(XML_TAG_OPEN, tagName); // ?
- fStateStack.pop();
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return PROXY_CONTEXT;
- }
- case 696: break;
- case 269:
- {
- String tagName = yytext().substring(1);
- // pushback to just after the opening bracket
- yypushback(yylength() - 1);
- /*
- * If this tag can not be nested or we're already searching for an
- * attribute name, equals, or value, return immediately.
- */
- if (!isNestable(tagName) || (!fStateStack.empty() && (fStateStack.peek() == ST_XML_ATTRIBUTE_NAME || fStateStack.peek() == ST_XML_EQUALS || fStateStack.peek() == ST_XML_ATTRIBUTE_VALUE))) {
- yybegin(ST_XML_TAG_NAME);
- return XML_TAG_OPEN;
- }
- if(Debug.debugTokenizer)
- dump("tag in place of attr name");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- // embedded container should be looking for the name (again) next
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedTagSequence(XML_TAG_OPEN, tagName); // ?
- fStateStack.pop();
- yybegin(ST_XML_EQUALS);
- return PROXY_CONTEXT;
- }
- case 697: break;
- case 267:
- {
- yybegin(YYINITIAL);
- fEmbeddedHint = UNDEFINED;
- if(Debug.debugTokenizer)
- dump("empty tag close");//$NON-NLS-1$
- return XML_EMPTY_TAG_CLOSE;
- }
- case 698: break;
- case 125:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- yybegin(ST_XML_ATTRIBUTE_VALUE_DQUOTED);
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("JSP attribute value start - complex double quoted");//$NON-NLS-1$
- assembleEmbeddedContainer(XML_TAG_ATTRIBUTE_VALUE_DQUOTE, XML_TAG_ATTRIBUTE_VALUE_DQUOTE);
- fStateStack.pop();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return PROXY_CONTEXT;
- }
- case 699: break;
- case 123:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("JSP tag embedded name start - start tag");//$NON-NLS-1$
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedContainer(XML_TAG_OPEN, new String[]{XML_TAG_CLOSE,XML_EMPTY_TAG_CLOSE});
- fStateStack.pop();
- yybegin(ST_XML_ATTRIBUTE_NAME);
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- return PROXY_CONTEXT;
- }
- case 700: break;
- case 122:
- case 127:
- case 128:
- case 273:
- case 277:
- case 278:
- case 387:
- case 390:
- case 481:
- {
- 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 701: break;
- case 121:
- {
- if(Debug.debugTokenizer)
- dump("equals");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 702: break;
- case 120:
- {
- if(Debug.debugTokenizer)
- dump("attr name");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 703: break;
- case 116:
- case 117:
- case 118:
- case 268:
- case 386:
- case 480:
- case 520:
- case 521:
- case 540:
- case 541:
- case 559:
- case 560:
- case 573:
- case 582:
- case 590:
- case 592:
- case 594:
- case 596:
- case 599:
- case 605:
- case 606:
- case 607:
- case 608:
- case 609:
- case 615:
- case 616:
- case 617:
- case 618:
- case 619:
- case 625:
- case 626:
- case 628:
- case 629:
- case 635:
- case 636:
- case 637:
- case 638:
- case 644:
- case 645:
- case 646:
- case 647:
- case 650:
- case 651:
- case 653:
- {
- if(Debug.debugTokenizer)
- dump("tag name");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return XML_TAG_NAME;
- }
- case 704: break;
- case 114:
- {
- if(Debug.debugTokenizer)
- dump("tag close");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- if(isBlockMarker()) {
- fEmbeddedHint = getBlockMarkerContext();
- fEmbeddedPostState = ST_BLOCK_TAG_SCAN;
- yybegin(ST_BLOCK_TAG_SCAN);
- }
- else
- yybegin(YYINITIAL);
- return XML_TAG_CLOSE;
- }
- case 705: break;
- case 107:
- case 111:
- case 263:
- {
- if(Debug.debugTokenizer)
- dump("attr value");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_NAME);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 706: break;
- case 106:
- {
- if(Debug.debugTokenizer)
- dump("equals");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 707: break;
- case 105:
- {
- if(Debug.debugTokenizer)
- dump("attr name");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 708: break;
- case 102:
- {
- if(Debug.debugTokenizer)
- dump("JSP directive name");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_NAME_WHITESPACE);
- return JSP_DIRECTIVE_NAME;
- }
- case 709: break;
- case 98:
- case 99:
- case 100:
- {
- if(Debug.debugTokenizer)
- dump("JSP code content");//$NON-NLS-1$
- return doScan("%>", false, false, false, JSP_CONTENT, ST_JSP_CONTENT, ST_JSP_CONTENT);
- }
- case 710: break;
- case 94:
- case 96:
- case 97:
- case 253:
- case 254:
- case 257:
- {
- 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 711: break;
- case 93:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction '='");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_DHTML_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 712: break;
- case 92:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction attribute name");//$NON-NLS-1$
- yybegin(ST_DHTML_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 713: break;
- case 90:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 714: break;
- case 84:
- case 86:
- case 244:
- {
- 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 715: break;
- case 83:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction '='");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_PI_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 716: break;
- case 49:
- case 199:
- case 200:
- case 203:
- case 213:
- case 214:
- case 217:
- case 218:
- case 360:
- case 363:
- case 446:
- case 460:
- case 466:
- {
- return JSP_VBL_CONTENT;
- }
- case 717: break;
- case 42:
- case 178:
- case 179:
- case 182:
- case 192:
- case 193:
- case 196:
- case 197:
- case 330:
- case 344:
- case 347:
- case 418:
- case 419:
- case 434:
- case 440:
- {
- return JSP_EL_CONTENT;
- }
- case 718: break;
- case 35:
- case 159:
- case 160:
- case 321:
- case 412:
- case 416:
- case 495:
- case 528:
- case 548:
- case 565:
- case 575:
- {
- if(Debug.debugTokenizer)
- dump("attlist contentspec");//$NON-NLS-1$
- return XML_ATTLIST_DECL_CONTENT;
- }
- case 719: break;
- case 33:
- case 152:
- case 153:
- case 311:
- case 404:
- case 408:
- case 492:
- case 527:
- case 547:
- case 564:
- case 574:
- {
- if(Debug.debugTokenizer)
- dump("elementdecl contentspec");//$NON-NLS-1$
- return XML_ELEMENT_DECL_CONTENT;
- }
- case 720: break;
- case 22:
- case 112:
- {
- if(Debug.debugTokenizer)
- dump("inappropriate tag name");//$NON-NLS-1$
- if(!fStateStack.empty() && (fStateStack.peek()==ST_XML_ATTRIBUTE_VALUE_SQUOTED||fStateStack.peek()==ST_XML_ATTRIBUTE_VALUE_DQUOTED)) {
- yybegin(ST_ABORT_EMBEDDED);
- yypushback(yylength()-1);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- yybegin(YYINITIAL);
- return XML_CONTENT;
- }
- case 721: break;
- case 18:
- case 104:
- {
- if(Debug.debugTokenizer)
- dump("white space");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_NAME);
- return WHITE_SPACE;
- }
- case 722: 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 72:
- case 169:
- case 174:
- {
- if(Debug.debugTokenizer)
- dump("white space");//$NON-NLS-1$
- return WHITE_SPACE;
- }
- case 723: break;
- case 0:
- case 56:
- case 59:
- case 61:
- case 225:
- case 227:
- case 228:
- case 230:
- case 232:
- case 370:
- case 371:
- case 372:
- case 475:
- {
- if(Debug.debugTokenizer)
- dump("\nXML content");//$NON-NLS-1$
- return XML_CONTENT;
- }
- case 724: break;
- case 57:
- case 101:
- case 113:
- case 119:
- case 129:
- {
- if(Debug.debugTokenizer)
- dump("\nstart tag open");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_TAG_NAME);
- return XML_TAG_OPEN;
- }
- case 725: break;
- case 58:
- case 60:
- case 64:
- case 65:
- case 66:
- case 70:
- case 71:
- case 81:
- case 85:
- case 87:
- case 88:
- case 89:
- case 91:
- case 95:
- case 103:
- case 108:
- case 109:
- case 110:
- case 115:
- case 124:
- case 131:
- case 132:
- case 133:
- case 134:
- case 136:
- case 137:
- case 139:
- case 140:
- case 141:
- case 144:
- case 145:
- case 146:
- case 149:
- case 150:
- case 151:
- case 156:
- case 157:
- case 158:
- case 166:
- case 171:
- case 172:
- case 176:
- case 177:
- case 184:
- case 185:
- case 187:
- case 188:
- case 194:
- case 198:
- case 205:
- case 206:
- case 208:
- case 209:
- case 215:
- case 219:
- {
- if (Debug.debugTokenizer)
- System.out.println("!!!unexpected!!!: \"" + yytext() + "\":" + //$NON-NLS-2$//$NON-NLS-1$
- yychar + "-" + (yychar + yylength()));//$NON-NLS-1$
- return UNDEFINED;
- }
- case 726: break;
- case 62:
- case 63:
- {
- 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 727: break;
- case 67:
- case 186:
- case 189:
- case 207:
- case 210:
- {
- if(Debug.debugTokenizer)
- dump("LINE FEED");//$NON-NLS-1$
- return WHITE_SPACE;
- }
- case 728: break;
- case 68:
- case 69:
- {
- if(Debug.debugTokenizer)
- dump("comment content");//$NON-NLS-1$
- return scanXMLCommentText();
- }
- case 729: break;
- case 73:
- case 74:
- case 75:
- case 76:
- case 237:
- case 238:
- case 239:
- case 383:
- case 478:
- case 479:
- case 518:
- case 519:
- case 538:
- case 558:
- case 571:
- case 581:
- case 589:
- case 591:
- case 593:
- case 595:
- {
- if(Debug.debugTokenizer)
- dump("processing instruction target");//$NON-NLS-1$
- fEmbeddedHint = XML_CONTENT;
- yybegin(ST_PI_WS);
- return XML_TAG_NAME;
- }
- case 730: break;
- case 77:
- {
- yybegin(ST_PI_CONTENT);
- return WHITE_SPACE;
- }
- case 731: break;
- case 78:
- case 79:
- case 80:
- {
- // block scan until close is found
- return doScan("?>", false, false, false, XML_PI_CONTENT, ST_XML_PI_TAG_CLOSE, ST_XML_PI_TAG_CLOSE);
- }
- case 732: break;
- case 82:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction attribute name");//$NON-NLS-1$
- yybegin(ST_XML_PI_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 733: break;
- case 126:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- yybegin(ST_XML_ATTRIBUTE_VALUE_SQUOTED);
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("JSP attribute value start - complex single quoted");//$NON-NLS-1$
- assembleEmbeddedContainer(XML_TAG_ATTRIBUTE_VALUE_SQUOTE, XML_TAG_ATTRIBUTE_VALUE_SQUOTE);
- fStateStack.pop();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return PROXY_CONTEXT;
- }
- case 734: break;
- case 130:
- {
- if(Debug.debugTokenizer)
- dump("declaration end");//$NON-NLS-1$
- if (Debug.debugTokenizer) {
- if(fStateStack.peek()!=YYINITIAL)
- System.out.println("end embedded region");//$NON-NLS-1$
- }
- yybegin(fStateStack.pop());
- return XML_DECLARATION_CLOSE;
- }
- case 735: break;
- case 135:
- {
- if(Debug.debugTokenizer)
- dump("doctype type");//$NON-NLS-1$
- yybegin(ST_XML_DOCTYPE_EXTERNAL_ID);
- return XML_DOCTYPE_NAME;
- }
- case 736: break;
- case 138:
- case 142:
- case 288:
- case 292:
- case 399:
- {
- if(Debug.debugTokenizer)
- dump("doctype public reference");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- fEmbeddedPostState = YYINITIAL;
- yybegin(ST_XML_DOCTYPE_ID_SYSTEM);
- return XML_DOCTYPE_EXTERNAL_ID_PUBREF;
- }
- case 737: break;
- case 143:
- case 147:
- case 298:
- {
- 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 738: break;
- case 148:
- case 304:
- case 308:
- case 402:
- {
- if(Debug.debugTokenizer)
- dump("elementdecl name");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- fEmbeddedPostState = YYINITIAL;
- yybegin(ST_XML_ELEMENT_DECLARATION_CONTENT);
- return XML_ELEMENT_DECL_NAME;
- }
- case 739: break;
- case 154:
- {
- if(Debug.debugTokenizer)
- dump("elementdecl close");//$NON-NLS-1$
- if (Debug.debugTokenizer) {
- if(fStateStack.peek()!=YYINITIAL)
- System.out.println("end embedded region");//$NON-NLS-1$
- }
- yybegin(fStateStack.pop());
- return XML_DECLARATION_CLOSE;
- }
- case 740: break;
- case 155:
- case 314:
- case 318:
- case 410:
- {
- 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 741: break;
- case 161:
- {
- if(Debug.debugTokenizer)
- dump("attlist close");//$NON-NLS-1$
- if (Debug.debugTokenizer) {
- if(fStateStack.peek()!=YYINITIAL)
- System.out.println("end embedded region");//$NON-NLS-1$
- }
- yybegin(fStateStack.pop());
- return XML_DECLARATION_CLOSE;
- }
- case 742: break;
- case 164:
- case 165:
- {
- if(Debug.debugTokenizer)
- dump("\nJSP comment text");//$NON-NLS-1$
- return scanJSPCommentText();
- }
- case 743: break;
- case 167:
- case 173:
- {
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 744: break;
- case 168:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- int incomingState = yystate();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- if(Debug.debugTokenizer)
- dump("tag inside of JSP attribute value start");//$NON-NLS-1$
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedContainer(XML_TAG_OPEN, new String[]{XML_TAG_CLOSE,XML_EMPTY_TAG_CLOSE});
- if(yystate() != ST_ABORT_EMBEDDED)
- yybegin(incomingState);
- return PROXY_CONTEXT;
- }
- case 745: break;
- case 170:
- {
- return XML_TAG_ATTRIBUTE_VALUE_SQUOTE;
- }
- case 746: break;
- case 175:
- {
- return XML_TAG_ATTRIBUTE_VALUE_DQUOTE;
- }
- case 747: break;
- case 180:
- {
- yybegin(ST_JSP_EL_DQUOTES);
- return JSP_EL_DQUOTE;
- }
- case 748: break;
- case 181:
- {
- yybegin(ST_JSP_EL_SQUOTES);
- return JSP_EL_SQUOTE;
- }
- case 749: break;
- case 183:
- {
- fELlevel--;
- if(fELlevel == 0) {
- yybegin(YYINITIAL);
- return JSP_EL_CLOSE;
- }
- return JSP_EL_CONTENT;
- }
- case 750: break;
- case 190:
- {
- yybegin(ST_JSP_EL);
- return JSP_EL_SQUOTE;
- }
- case 751: break;
- case 191:
- {
- yybegin(ST_JSP_EL);
- return JSP_EL_DQUOTE;
- }
- case 752: break;
- case 195:
- {
- return JSP_EL_CLOSE;
- }
- case 753: break;
- case 201:
- {
- yybegin(ST_JSP_VBL_DQUOTES);
- return JSP_VBL_DQUOTE;
- }
- case 754: break;
- case 202:
- {
- yybegin(ST_JSP_VBL_SQUOTES);
- return JSP_VBL_SQUOTE;
- }
- case 755: break;
- case 204:
- {
- fELlevel--;
- if(fELlevel == 0) {
- yybegin(YYINITIAL);
- return JSP_VBL_CLOSE;
- }
- return JSP_VBL_CONTENT;
- }
- case 756: break;
- case 211:
- {
- yybegin(ST_JSP_VBL);
- return JSP_VBL_SQUOTE;
- }
- case 757: break;
- case 212:
- {
- yybegin(ST_JSP_VBL);
- return JSP_VBL_DQUOTE;
- }
- case 758: break;
- case 216:
- {
- return JSP_VBL_CLOSE;
- }
- case 759: break;
- case 220:
- {
- 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 760: break;
- case 221:
- {
- if(Debug.debugTokenizer)
- dump("\nprocessing instruction start");//$NON-NLS-1$
- yybegin(ST_PI);
- return XML_PI_OPEN;
- }
- case 761: break;
- case 222:
- case 310:
- case 320:
- case 331:
- case 336:
- case 340:
- case 343:
- case 346:
- case 348:
- case 352:
- case 356:
- case 359:
- case 362:
- {
- /* JSP scriptlet begun (anywhere)
- * A consequence of the start anywhere possibility is that the
- * incoming state must be checked to see if it's erroneous
- * due to the order of precedence generated
- */
- // begin sanity checks
- if(yystate() == ST_JSP_CONTENT) {
- // at the beginning?!
- yypushback(1);
- return JSP_CONTENT;
- }
- else if(yystate() == ST_BLOCK_TAG_SCAN) {
- yypushback(2);
- return doBlockTagScan();
- }
- else if(yystate() == ST_XML_COMMENT) {
- yypushback(2);
- return scanXMLCommentText();
- }
- else if(yystate() == ST_JSP_COMMENT) {
- yypushback(2);
- return scanJSPCommentText();
- }
- // finished sanity checks
- fStateStack.push(yystate());
- if(fStateStack.peek()==YYINITIAL) {
- // the simple case, just a regular scriptlet out in content
- if(Debug.debugTokenizer)
- dump("\nJSP scriptlet start");//$NON-NLS-1$
- yybegin(ST_JSP_CONTENT);
- return JSP_SCRIPTLET_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP scriptlet start");//$NON-NLS-1$
- if(yystate() == ST_XML_ATTRIBUTE_VALUE_DQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE_SQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- else if(yystate() == ST_CDATA_TEXT) {
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- }
- yybegin(ST_JSP_CONTENT);
- assembleEmbeddedContainer(JSP_SCRIPTLET_OPEN, JSP_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- // required help for successive embedded regions
- if(yystate() == ST_XML_TAG_NAME) {
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else if((yystate() == ST_XML_ATTRIBUTE_NAME || yystate() == ST_XML_EQUALS)) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- }
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 762: break;
- case 223:
- {
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("\ndeclaration start");//$NON-NLS-1$
- yybegin(ST_XML_DECLARATION);
- return XML_DECLARATION_OPEN;
- }
- case 763: break;
- case 236:
- {
- if(Debug.debugTokenizer)
- dump("processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 764: break;
- case 240:
- {
- // ended with nothing inside
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 765: break;
- case 241:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 766: break;
- case 258:
- {
- 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 767: break;
- case 260:
- {
- 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 768: break;
- case 162:
- case 163:
- {
- return doBlockTagScan();
- }
- case 769: 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 09edd42e6d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java
+++ /dev/null
@@ -1,77 +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.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_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_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_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 651dbe8818..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java
+++ /dev/null
@@ -1,82 +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.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_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_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_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/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 2e3c581024..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/regions/DOMJSPRegionContexts.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.regions;
-
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-/**
- *
- */
-
-public interface DOMJSPRegionContexts extends DOMRegionContext {
- public static final String JSP_CLOSE = "JSP_CLOSE"; //$NON-NLS-1$
- public static final String JSP_COMMENT_CLOSE = "JSP_COMMENT_CLOSE"; //$NON-NLS-1$
-
- public static final String JSP_COMMENT_OPEN = "JSP_COMMENT_OPEN"; //$NON-NLS-1$
- public static final String JSP_COMMENT_TEXT = "JSP_COMMENT_TEXT"; //$NON-NLS-1$
-
- public static final String JSP_CONTENT = "JSP_CONTENT"; //$NON-NLS-1$
- public static final String JSP_DECLARATION_OPEN = "JSP_DECLARATION_OPEN"; //$NON-NLS-1$
- public static final String JSP_DIRECTIVE_CLOSE = "JSP_DIRECTIVE_CLOSE"; //$NON-NLS-1$
- public static final String JSP_DIRECTIVE_NAME = "JSP_DIRECTIVE_NAME"; //$NON-NLS-1$
-
- public static final String JSP_DIRECTIVE_OPEN = "JSP_DIRECTIVE_OPEN"; //$NON-NLS-1$
- public static final String JSP_EL_CLOSE = "JSP_EL_CLOSE"; //$NON-NLS-1$
- public static final String JSP_EL_CONTENT = "JSP_EL_CONTENT"; //$NON-NLS-1$
- public static final String JSP_EL_DQUOTE = "JSP_EL_DQUOTE"; //$NON-NLS-1$
-
- public static final String JSP_EL_OPEN = "JSP_EL_OPEN"; //$NON-NLS-1$
- public static final String JSP_EL_QUOTED_CONTENT = "JSP_EL_QUOTED_CONTENT"; //$NON-NLS-1$
- public static final String JSP_EL_SQUOTE = "JSP_EL_SQUOTE"; //$NON-NLS-1$
- public static final String JSP_EXPRESSION_OPEN = "JSP_EXPRESSION_OPEN"; //$NON-NLS-1$
-
- public static final String JSP_ROOT_TAG_NAME = "JSP_ROOT_TAG_NAME"; //$NON-NLS-1$
-
- public static final String JSP_SCRIPTLET_OPEN = "JSP_SCRIPTLET_OPEN"; //$NON-NLS-1$
- public static final String JSP_VBL_CLOSE = "JSP_VBL_CLOSE"; //$NON-NLS-1$
- public static final String JSP_VBL_CONTENT = "JSP_VBL_CONTENT"; //$NON-NLS-1$
- public static final String JSP_VBL_DQUOTE = "JSP_VBL_DQUOTE"; //$NON-NLS-1$
- public static final String JSP_VBL_OPEN = "JSP_VBL_OPEN"; //$NON-NLS-1$
- public static final String JSP_VBL_QUOTED_CONTENT = "JSP_VBL_QUOTED_CONTENT"; //$NON-NLS-1$
- public static final String JSP_VBL_SQUOTE = "JSP_VBL_SQUOTE"; //$NON-NLS-1$
- public static final String XML_TAG_ATTRIBUTE_VALUE_DQUOTE = "XML_TAG_ATTRIBUTE_VALUE_DQUOTE"; //$NON-NLS-1$
-
- public static final String XML_TAG_ATTRIBUTE_VALUE_SQUOTE = "XML_TAG_ATTRIBUTE_VALUE_SQUOTE"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java
deleted file mode 100644
index b8706cd92a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java
+++ /dev/null
@@ -1,373 +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.taglib;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jst.jsp.core.internal.Logger;
-
-
-
-/**
- * Custom classloader which allows you to add source directories (folders
- * containing .class files) and jars to the classpath.
- *
- * @author pavery
- */
-public class TaglibClassLoader extends ClassLoader {
-
- // for debugging
- private static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/taglibclassloader"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- private List jarsList = new ArrayList();
- private List dirsList = new ArrayList();
- private List usedJars = new ArrayList();
- private List usedDirs = new ArrayList();
-
- private Map failedClasses = new HashMap(); // CL: added to optimize
- // failed loading
-
- // private List loadedClassFilenames = new ArrayList();
-
- public TaglibClassLoader(ClassLoader parentLoader) {
- super(parentLoader);
- }
-
- /**
- * Adds a new jar to classpath.
- *
- * @param filename -
- * full path to the jar file
- */
- public void addJar(String filename) {
- if (DEBUG)
- System.out.println("trying to add: [" + filename + "] to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- // don't add the same entry twice, or search times will get even worse
- if (!jarsList.contains(filename)) {
- jarsList.add(filename);
- failedClasses = new HashMap();
- if (DEBUG)
- System.out.println(" + [" + filename + "] added to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Removes a jar from the classpath.
- *
- * @param filename -
- * full path to the jar file
- */
- public void removeJar(String filename) {
- jarsList.remove(filename);
- failedClasses = new HashMap();
- if (DEBUG)
- System.out.println("removed: [" + filename + "] from classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void addDirectory(String dirPath) {
- if (!dirsList.contains(dirPath)) {
- dirsList.add(dirPath);
- failedClasses = new HashMap();
- if (DEBUG)
- System.out.println("added: [" + dirPath + "] to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Removes a directory from the classpath.
- *
- * @param dirPath -
- * full path of the directory
- */
- public void removeDirectory(String dirPath) {
- dirsList.remove(dirPath);
- failedClasses = new HashMap();
- if (DEBUG)
- System.out.println("removed: [" + dirPath + "] from classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Returns the list of JARs on this loader's classpath that contain
- * classes that have been loaded.
- *
- * @return List - the list of JARs
- */
- public List getJarsInUse() {
- return usedJars;
- }
-
- /**
- * Returns a list of directories on this loader's classpath that contain
- * classes that have been loaded.
- *
- * @return List - the list of directories (fully-qualified filename
- * Strings)
- */
- public List getDirectoriesInUse() {
- return usedDirs;
- }
-
- Map getFailures() {
- return failedClasses;
- }
-
- /**
- * Returns a list of filenames for loose classes that have been loaded out
- * of directories.
- *
- * @return List - the list of class filenames
- */
- // public List getClassFilenamesFromDirectories() {
- // return loadedClassFilenames;
- // }
- /**
- * Searches for the given class name on the defined classpath -
- * directories are checked before JARs.
- *
- * @param className -
- * the name of the class to find
- * @return Class - the loaded class
- * @throws ClassNotFoundException
- */
- protected synchronized Class findClass(String className) throws ClassNotFoundException {
- Class oldClass = findLoadedClass(className);
- if (oldClass != null) {
- if (DEBUG)
- System.out.println(">> TaglibClassLoader " + this + " returning existing class: " + className); //$NON-NLS-1$ //$NON-NLS-2$
- return oldClass;
- }
- if (failedClasses.containsKey(className)) {
- if (DEBUG)
- System.out.println(">> TaglibClassLoader " + this + " known missing class: " + className); //$NON-NLS-1$ //$NON-NLS-2$
- throw new ClassNotFoundException();
- }
-
- if (DEBUG)
- System.out.println(">> TaglibClassLoader " + this + " finding class: " + className); //$NON-NLS-1$ //$NON-NLS-2$
-
- Class newClass = null;
- JarFile jarfile = null;
- JarEntry entry = null;
-
- // get the correct name of the actual .class file to search for
- String fileName = calculateClassFilename(className);
- InputStream stream = null;
- try {
- // first try searching the classpath directories
- Iterator dirs = dirsList.iterator();
- File f;
- String dirName;
- String fileToFind = ""; //$NON-NLS-1$
- while (dirs.hasNext()) {
- dirName = (String) dirs.next();
- fileToFind = dirName + "/" + fileName; //$NON-NLS-1$
-
- f = new File(fileToFind);
- if (f.exists()) {
- stream = new FileInputStream(f);
- usedDirs.add(dirName);
- // loadedClassFilenames.add(fileToFind);
- if (DEBUG)
- System.out.println(">> added file from dir: " + dirName + "/" + fileName); //$NON-NLS-1$ //$NON-NLS-2$
- break;
-
- }
- }
-
- if (stream != null) {
- // found a class from a directory
- ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
- byte[] buffer = new byte[2048];
- while (stream.available() > 0) {
- int amountRead = stream.read(buffer);
- if(amountRead > 0) {
- byteStream.write(buffer, 0, amountRead);
- }
- }
-
- byte[] byteArray = byteStream.toByteArray();
- try {
- if (DEBUG)
- System.out.println(">> defining newClass:" + className); //$NON-NLS-1$
- newClass = defineClass(className, byteArray, 0, byteArray.length);
- resolveClass(newClass);
- }
- catch (Throwable t) {
- Logger.logException("Error loading TEI class " + className, t);
-
- // j9 can give ClassCircularityError
- // parent should already have the class then
- // try parent loader
- try {
- Class c = getParent().loadClass(className);
- if (DEBUG)
- System.out.println(">> loaded: " + className + " with: " + getParent()); //$NON-NLS-1$ //$NON-NLS-2$
- return c;
- }
- catch (ClassNotFoundException cnf) {
- if (DEBUG)
- cnf.printStackTrace();
- }
- }
- stream.close();
- }
-
- if (stream == null) {
- // still haven't found the class, so now try searching the
- // jars
- // search each of the jars until we find an entry matching the
- // classname
- Iterator jars = jarsList.iterator();
- String jarName;
- while (jars.hasNext()) {
- jarName = (String) jars.next();
-
- // make sure the file exists or "new JarFile()" will throw
- // an exception
- f = new File(jarName);
- if (!f.exists()) {
- continue;
- }
- try {
- jarfile = new JarFile(jarName);
- }
- catch (IOException e) {
- if (DEBUG)
- Logger.logException("bad jar file", e); //$NON-NLS-1$
- }
- if (jarfile == null) {
- continue;
- }
-
- entry = jarfile.getJarEntry(fileName);
-
- if (DEBUG)
- System.out.println("looking for filename: " + fileName + " in: " + jarfile.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- if (entry != null) {
- if (DEBUG)
- System.out.println("found the entry: " + entry + " for filename: " + fileName); //$NON-NLS-1$ //$NON-NLS-2$
- // found the class
- if (!usedJars.contains(jarName)) {
- // add the jar to the list of in-use jars
- usedJars.add(jarName);
- }
- break;
- }
- jarfile.close();
- }
-
- if (entry != null) {
- // we've found an entry for the desired class
- stream = jarfile.getInputStream(entry);
- ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
- long byteLength = entry.getSize();
- long totalBytesRead = 0;
- int bytesRead;
- byte[] byteBuffer = new byte[10000];
- while (totalBytesRead < byteLength) {
- bytesRead = stream.read(byteBuffer);
- if (bytesRead == -1) {
- break;
- }
- totalBytesRead = totalBytesRead + bytesRead;
- byteStream.write(byteBuffer, 0, bytesRead);
- }
-
- byte[] byteArray = byteStream.toByteArray();
- try {
- if (DEBUG)
- System.out.println(">> defining newClass:" + className); //$NON-NLS-1$
- // define the class from the byte array
- newClass = defineClass(className, byteArray, 0, byteArray.length);
- resolveClass(newClass);
- }
- catch (Throwable t) {
- Logger.logException("Error loading TEI class " + className, t);
- // j9 can give ClassCircularityError
- // parent should already have the class then
-
- // try parent
- try {
- Class c = getParent().loadClass(className);
- if (DEBUG)
- System.out.println(">> loaded: " + className + " with: " + getParent()); //$NON-NLS-1$ //$NON-NLS-2$
- return c;
- }
- catch (ClassNotFoundException cnf) {
- if (DEBUG)
- cnf.printStackTrace();
- failedClasses.put(className, cnf);
- }
- }
- stream.close();
- jarfile.close();
- }
- }
- }
- catch (Throwable t) {
- failedClasses.put(className, t);
- return null;
- }
- finally {
- try {
- if (stream != null) {
- stream.close();
- }
- if (jarfile != null) {
- jarfile.close();
- }
- }
- catch (IOException ioe) {
- // ioe.printStackTrace();
- // just trying to close down anyway - ignore
- }
- }
-
- if (newClass != null) {
- if (DEBUG)
- System.out.println(">> loaded: " + newClass + " with: " + this); //$NON-NLS-1$ //$NON-NLS-2$
- return newClass;
- }
-
-// failedClasses.add(className);
- throw new ClassNotFoundException();
- }
-
- /**
- * Replaces '.' in the classname with '/' and appends '.class' if needed.
- *
- * @return String - the properly-formed class name
- */
- private String calculateClassFilename(String name) {
- StringBuffer buffer = new StringBuffer(name.replace('.', '/'));
- if (!name.endsWith(".class")) { //$NON-NLS-1$
- buffer.append(".class"); //$NON-NLS-1$
- }
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java
deleted file mode 100644
index fe85bf7e0d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java
+++ /dev/null
@@ -1,895 +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.core.internal.taglib;
-
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-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.TagAttributeInfo;
-import javax.servlet.jsp.tagext.TagData;
-import javax.servlet.jsp.tagext.TagExtraInfo;
-import javax.servlet.jsp.tagext.TagInfo;
-import javax.servlet.jsp.tagext.TagLibraryInfo;
-import javax.servlet.jsp.tagext.ValidationMessage;
-import javax.servlet.jsp.tagext.VariableInfo;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.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.TLDElementDeclaration;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDVariable;
-import org.eclipse.jst.jsp.core.internal.java.IJSPProblem;
-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.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.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 com.ibm.icu.text.MessageFormat;
-
-/**
- * This class helps find TaglibVariables in a JSP file.
- *
- * @author pavery
- */
-public class TaglibHelper {
-
- // for debugging
- private static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/taglibvars"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- private IProject fProject = null;
- private TaglibClassLoader fLoader = null;
-
- private Set fProjectEntries = null;
- private Map fTranslationProblems = null;
- private Set fContainerEntries = null;
- private IJavaProject fJavaProject;
-
- public TaglibHelper(IProject project) {
- setProject(project);
- fProjectEntries = new HashSet();
- fContainerEntries = new HashSet();
- fTranslationProblems = new HashMap();
- }
-
- /**
- * @param tagToAdd
- * is the name of the tag whose variables we want
- * @param structuredDoc
- * is the IStructuredDocument where the tag is found
- * @param customTag
- * is the IStructuredDocumentRegion opening tag for the custom
- * tag
- */
- public TaglibVariable[] getTaglibVariables(String tagToAdd, IStructuredDocument structuredDoc, ITextRegionCollection customTag) {
-
- List results = new ArrayList();
- List 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.
- */
- 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);
- }
- }
- }
- }
-
- IPath location = TaglibController.getLocation(structuredDoc);
- if (location != null) {
- fTranslationProblems.put(location, 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) {
- String teiClassname = decl.getTeiclass();
- if (teiClassname == null || teiClassname.length() == 0 || fJavaProject == null)
- return;
-
- TaglibClassLoader 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) {
- 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
- 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));
- }
- 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(TLDElementDeclaration decl, TagExtraInfo tei, String prefix, String uri) {
-
- TagLibraryInfo libInfo = new TagLibraryInfo(prefix, uri) { /*
- * dummy
- * impl
- */
- };
-
- CMNamedNodeMap attrs = decl.getAttributes();
- TagAttributeInfo[] attrInfos = new TagAttributeInfo[attrs.getLength()];
- TLDAttributeDeclaration attr = null;
- String type = ""; //$NON-NLS-1$
-
- // get tag attribute infos
- for (int i = 0; i < attrs.getLength(); i++) {
- attr = (TLDAttributeDeclaration) attrs.item(i);
- type = attr.getType();
- // default value for type is String
- if (attr.getType() == null || attr.getType().equals("")) //$NON-NLS-1$
- type = "java.lang.String"; //$NON-NLS-1$
- attrInfos[i] = new TagAttributeInfo(attr.getAttrName(), attr.isRequired(), type, false);
- }
-
- String tagName = decl.getNodeName();
- String tagClass = decl.getTagclass();
- String bodyContent = decl.getBodycontent();
- if (tagName != null && tagClass != null && bodyContent != null)
- return new TagInfo(tagName, tagClass, bodyContent, decl.getInfo(), libInfo, tei, attrInfos);
- return null;
-
- }
-
- /**
- * @param e
- */
- private void logException(String teiClassname, Throwable e) {
-
- String message = "teiClassname: ["; //$NON-NLS-1$
- if (teiClassname != null)
- message += teiClassname;
- message += "]"; //$NON-NLS-1$
- Logger.logException(message, e);
- }
-
- /**
- * Returns all attribute -> value pairs for the tag in a Hashtable.
- *
- * @param customTag
- * @return
- */
- private Hashtable extractTagData(ITextRegionCollection customTag) {
- Hashtable tagDataTable = new Hashtable();
- ITextRegionList regions = customTag.getRegions();
- ITextRegion r = null;
- String attrName = ""; //$NON-NLS-1$
- String attrValue = ""; //$NON-NLS-1$
- for (int i = 2; i < regions.size(); i++) {
- r = regions.get(i);
- // check if attr name
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- attrName = customTag.getText(r);
- // check equals is next region
- if (regions.size() > ++i) {
- r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS && regions.size() > ++i) {
- // get attr value
- r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- // attributes in our document have quotes, so we
- // need to strip them
- attrValue = StringUtils.stripQuotes(customTag.getText(r));
- tagDataTable.put(attrName, attrValue);
- }
- }
- }
- }
- }
-
- tagDataTable.put("jsp:id", customTag.getText(regions.get(1)) + "_" + customTag.getStartOffset()); //$NON-NLS-1$
-
- return tagDataTable;
- }
-
- private TaglibClassLoader getClassloader() {
- if (fLoader == null) {
- fLoader = new TaglibClassLoader(this.getClass().getClassLoader());
- fProjectEntries.clear();
- fContainerEntries.clear();
- addClasspathEntriesForProject(getProject(), fLoader);
- }
- return fLoader;
- }
-
- /**
- * @param loader
- */
- private void addClasspathEntriesForProject(IProject p, TaglibClassLoader loader) {
-
- // avoid infinite recursion and closed project
- if (!p.isAccessible() || fProjectEntries.contains(p.getFullPath().toString()))
- return;
- fProjectEntries.add(p.getFullPath().toString());
-
- // add things on classpath that we are interested in
- try {
- if (p.hasNature(JavaCore.NATURE_ID)) {
-
- IJavaProject project = JavaCore.create(p);
-
- try {
- IClasspathEntry[] entries = project.getRawClasspath();
- addDefaultDirEntry(loader, project);
- addClasspathEntries(loader, project, entries);
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
-
- private void addClasspathEntries(TaglibClassLoader loader, IJavaProject project, IClasspathEntry[] entries) throws JavaModelException {
- IClasspathEntry entry;
- for (int i = 0; i < entries.length; i++) {
-
- entry = entries[i];
- if (DEBUG)
- System.out.println("current entry is: " + entry); //$NON-NLS-1$
-
- switch (entry.getEntryKind()) {
- case IClasspathEntry.CPE_SOURCE :
- addSourceEntry(loader, entry);
- break;
- case IClasspathEntry.CPE_LIBRARY :
- addLibraryEntry(loader, entry.getPath());
- break;
- case IClasspathEntry.CPE_PROJECT :
- addProjectEntry(loader, entry);
- break;
- case IClasspathEntry.CPE_VARIABLE :
- addVariableEntry(loader, entry);
- break;
- case IClasspathEntry.CPE_CONTAINER :
- addContainerEntry(loader, project, entry);
- break;
- }
- }
- }
-
- /**
- * @param loader
- * @param entry
- */
- private void addVariableEntry(TaglibClassLoader loader, IClasspathEntry entry) {
- if (DEBUG)
- System.out.println(" -> adding variable entry: [" + entry + "]"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // variable should either be a project or a library entry
-
- // BUG 169431
- String variableName = entry.getPath().toString();
- IPath variablePath = JavaCore.getResolvedVariablePath(entry.getPath());
- variablePath = JavaCore.getClasspathVariable(variableName);
-
- // RATLC01076854
- // variable paths may not exist
- // in that case null will be returned
- if (variablePath != null) {
- if (variablePath.segments().length == 1) {
- IProject varProj = ResourcesPlugin.getWorkspace().getRoot().getProject(variablePath.toString());
- if (varProj != null && varProj.exists()) {
- addClasspathEntriesForProject(varProj, loader);
- return;
- }
- }
- addLibraryEntry(loader, variablePath);
- }
- }
-
- /**
- * @param loader
- * @param project
- * @param entry
- * @throws JavaModelException
- */
- private void addContainerEntry(TaglibClassLoader loader, IJavaProject project, IClasspathEntry entry) throws JavaModelException {
-
- IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
- if (container != null) {
- // avoid infinite recursion
- if (!fContainerEntries.contains(container.getPath().toString())) {
- fContainerEntries.add(container.getPath().toString());
-
- IClasspathEntry[] cpes = container.getClasspathEntries();
- // recursive call here
- addClasspathEntries(loader, project, cpes);
- }
- }
- }
-
- /**
- * @param loader
- * @param entry
- */
- private void addProjectEntry(TaglibClassLoader loader, IClasspathEntry entry) {
-
- if (DEBUG)
- System.out.println(" -> project entry: [" + entry + "]"); //$NON-NLS-1$ //$NON-NLS-2$
-
- IPath path = entry.getPath();
- IProject referenceProject = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
- if (referenceProject != null && referenceProject.isAccessible()) {
- addClasspathEntriesForProject(referenceProject, loader);
- }
- }
-
- /**
- * @param loader
- * @param project
- * @param projectLocation
- * @throws JavaModelException
- */
- private void addDefaultDirEntry(TaglibClassLoader loader, IJavaProject project) throws JavaModelException {
- // add default bin directory for the project
- IPath outputPath = project.getOutputLocation();
- String outputLocation = null;
- if (!outputPath.toFile().exists()) {
- if (outputPath.segmentCount() > 1) {
- IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(outputPath);
- if (folder.getLocation() != null) {
- outputLocation = folder.getLocation().toString();
- }
- }
- else {
- IProject iproject = ResourcesPlugin.getWorkspace().getRoot().getProject(outputPath.segment(0));
- if (iproject.getLocation() != null) {
- outputLocation = iproject.getLocation().toString();
- }
- }
- }
- else {
- outputLocation = outputPath.toString();
- }
- loader.addDirectory(outputLocation);
- }
-
- /**
- * @param loader
- * @param entry
- */
- private void addLibraryEntry(TaglibClassLoader loader, IPath libPath) {
- String jarPathString = libPath.toString();
- File file = new File(libPath.toOSString());
-
- // if not absolute path, it's workspace relative
- if (!file.exists() && libPath.segmentCount() > 1) {
- IFile jarFile = ResourcesPlugin.getWorkspace().getRoot().getFile(libPath);
- if (jarFile.isAccessible() && jarFile.getLocation() != null) {
- jarPathString = jarFile.getLocation().toString();
- }
- }
-
- if (jarPathString != null) {
- if (jarPathString.endsWith(".jar")) { //$NON-NLS-1$
- loader.addJar(jarPathString);
- }
- else if (file.isDirectory()) {
- /*
- * unlikely, the UI prevents adding folder variables to the
- * classpath - it's actually a folder containing binaries
- */
- loader.addDirectory(jarPathString);
- }
- }
- }
-
- /**
- * @param loader
- * @param entry
- */
- private void addSourceEntry(TaglibClassLoader loader, IClasspathEntry entry) {
- // add bin directory for specific entry if it has
- // one
- IPath outputLocation = entry.getOutputLocation();
- if (outputLocation != null && outputLocation.segmentCount() > 1) {
- IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(outputLocation);
- if (folder != null && folder.isAccessible()) {
- outputLocation = folder.getLocation();
- loader.addDirectory(outputLocation.toString());
- }
- }
- }
-
- /**
- * @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;
- }
- }
-
- /**
- * @param path
- * @return
- */
- public Collection getProblems(IPath path) {
- return (Collection) fTranslationProblems.remove(path);
- }
-
- private void validateTagClass(IStructuredDocument document, ITextRegionCollection customTag, TLDElementDeclaration decl, List problems) {
- // skip if from a tag file
- if (TLDElementDeclaration.SOURCE_TAG_FILE.equals(decl.getProperty(TLDElementDeclaration.TAG_SOURCE))) {
- return;
- }
-
- String tagClassname = decl.getTagclass();
- IType tagClass = null;
- if (tagClassname != null && tagClassname.length() > 0 && fJavaProject != null) {
- try {
- tagClass = fJavaProject.findType(tagClassname, new NullProgressMonitor());
- }
- 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);
- }
- }
- }
-}
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 acf1e30a6b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperCache.java
+++ /dev/null
@@ -1,166 +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.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
- Object removed = fHelpers.remove(fHelpers.size()-1);
- if(DEBUG) {
- Logger.log(Logger.INFO, "(-) TaglibHelperCache removed: " + removed); //$NON-NLS-1$
- printCacheContents();
- }
- }
- return helper;
- }
-
- public final synchronized void removeHelper(String projectName) {
- Entry entry = null;
- Iterator it = fHelpers.iterator();
- while(it.hasNext()) {
- entry = (Entry)it.next();
- if(entry.getProjectName().equals(projectName)) {
- fHelpers.remove(entry);
- if(DEBUG) {
- Logger.log(Logger.INFO, "(-) TaglibHelperCache removed: " + entry); //$NON-NLS-1$
- printCacheContents();
- }
- break;
- }
- }
- }
-
- private void printCacheContents() {
- StringBuffer debugString = new StringBuffer();
- debugString.append("\n-----------------------------------------------------------"); //$NON-NLS-1$
- debugString.append("\ncache contents:"); //$NON-NLS-1$
- for (int i=0; i<fHelpers.size(); i++)
- debugString.append("\n -" + i + "- " + fHelpers.get(i)); //$NON-NLS-1$ //$NON-NLS-2$
- debugString.append("\n-----------------------------------------------------------"); //$NON-NLS-1$
- Logger.log(Logger.INFO, debugString.toString());
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java
deleted file mode 100644
index 840958131d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java
+++ /dev/null
@@ -1,88 +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;
-
-/**
- * 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) {
- IJavaElement proj = changed[i].getElement();
- handleClasspathChange(changed, i, proj);
- }
- }
- }
- }
-
- /**
- * @param changed
- * @param i
- * @param proj
- */
- private void handleClasspathChange(IJavaElementDelta[] changed, int i, IJavaElement proj) {
- if (proj.getElementType() == IJavaElement.JAVA_PROJECT) {
- String 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 d73bbbc4d4..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, 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.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() + " = null;" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
- else {
- declaration = "/** " + ENDL + StringUtils.replace(getDescription(), "*/", "*\\/") + ENDL + " */ " + ENDL + getVarClass() + " " + getVarName() + " = null;" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
- }
- else {
- if (style == M_PRIVATE) {
- declaration = "private " + getVarClass() + " " + getVarName() + " = null;" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- else {
- declaration = getVarClass() + " " + getVarName() + " = null;" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- 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 5974322120..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.text;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jst.jsp.core.internal.encoding.JSPDocumentHeadContentDetector;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.wst.html.core.internal.text.StructuredTextPartitionerForHTML;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.parser.ForeignRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredTextPartitioner;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.core.internal.text.rules.StructuredTextPartitionerForXML;
-
-public class StructuredTextPartitionerForJSP extends StructuredTextPartitioner {
- // for compatibility with v5.1.0, we'll reuse ST_JSP_DIRECTIVE for action
- // tags
- private final static boolean fEnableJSPActionPartitions = true;
- // list of valid JSP 1.2 tag and action names
- private static List fJSPActionTagNames = null;
- private static final String HTML_MIME_TYPE = "text/html"; //$NON-NLS-1$
- private static final String XHTML_MIME_TYPE = "text/xhtml"; //$NON-NLS-1$
- private static final String XML_MIME_TYPE = "text/xml"; //$NON-NLS-1$
- private static final String VND_WAP_WML = "text/vnd.wap.wml"; //$NON-NLS-1$
-
- private final static String[] fConfiguredContentTypes = new String[]{IJSPPartitions.JSP_DEFAULT, IJSPPartitions.JSP_DEFAULT_EL, IJSPPartitions.JSP_DEFAULT_EL2, IJSPPartitions.JSP_DIRECTIVE, IJSPPartitions.JSP_CONTENT_DELIMITER, IJSPPartitions.JSP_CONTENT_JAVA, IJSPPartitions.JSP_CONTENT_JAVASCRIPT, IJSPPartitions.JSP_COMMENT};
-
- /**
- * @return
- */
- public static String[] getConfiguredContentTypes() {
- return fConfiguredContentTypes;
- }
-
- private IStructuredTextPartitioner fEmbeddedPartitioner = null;
- /*
- * Save last taglib prefix that was checked (see isAction()) for better
- * performance
- */
- private String fLastCheckedPrefix = null;
-
- /**
- * Assume language=java by default ... client, such as
- * PageDirectiveAdapter, must set language of document partitioner,
- * if/when it changes.
- */
- private String fLanguage = "java"; //$NON-NLS-1$
-
- /**
- * Constructor for JSPDocumentPartioner.
- */
- public StructuredTextPartitionerForJSP() {
- super();
- if (fJSPActionTagNames == null) {
- fJSPActionTagNames = new ArrayList(); // uses .equals() for
- // contains()
- fJSPActionTagNames.add(JSP12Namespace.ElementName.DECLARATION);
- // fJSPActionTagNames.add(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
- // fJSPActionTagNames.add(JSP12Namespace.ElementName.DIRECTIVE_PAGE);
- // fJSPActionTagNames.add(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.EXPRESSION);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.FALLBACK);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.FORWARD);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.GETPROPERTY);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.INCLUDE);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.PARAM);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.PARAMS);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.PLUGIN);
- // fJSPActionTagNames.add(JSP12Namespace.ElementName.ROOT);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.SCRIPTLET);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.SETPROPERTY);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.TEXT);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.USEBEAN);
- }
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#connect(org.eclipse.jface.text.IDocument)
- */
- public void connect(IDocument document) {
- super.connect(document);
- fSupportedTypes = null;
- }
-
- private IStructuredTextPartitioner createStructuredTextPartitioner(IStructuredDocument structuredDocument) {
- IStructuredTextPartitioner result = null;
- // this same detector should underly content describer, to have consistent results
- JSPDocumentHeadContentDetector jspHeadContentDetector = new JSPDocumentHeadContentDetector();
- jspHeadContentDetector.set(structuredDocument);
- String contentType = null;
- try {
- contentType = jspHeadContentDetector.getContentType();
- // if XHTML or WML, that trumps what is in the page directive
- if (jspHeadContentDetector.isXHTML() || jspHeadContentDetector.isWML()) {
- contentType = "text/html";
- }
- }
- catch (IOException e) {
- // impossible in this context, since working with document stream
- throw new Error(e);
- }
- // null or empty, treat as "default"
- if (contentType == null || contentType.length() == 0) {
- contentType = "text/html"; //$NON-NLS-1$
- }
- // we currently only have two ... eventually should
- // make or tie-in to existing registry.
- if (contentType.equalsIgnoreCase(HTML_MIME_TYPE) || contentType.equalsIgnoreCase(VND_WAP_WML)) {
- result = new StructuredTextPartitionerForHTML();
- result.connect(structuredDocument);
- }
- else if (contentType.equalsIgnoreCase(XHTML_MIME_TYPE)) {
- result = new StructuredTextPartitionerForHTML();
- result.connect(structuredDocument);
- }
- else if (contentType.equalsIgnoreCase(XML_MIME_TYPE) || contentType.endsWith("+xml")) { //$NON-NLS-1$
- result = new StructuredTextPartitionerForXML();
- result.connect(structuredDocument);
- }
- else {
- result = new StructuredTextPartitioner();
- result.connect(structuredDocument);
- }
- return result;
-
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#disconnect()
- */
- public void disconnect() {
- if (fEmbeddedPartitioner != null) {
- fEmbeddedPartitioner.disconnect();
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4909
- /**
- * force recreation when reconnected
- */
- fEmbeddedPartitioner = null;
- }
- // super.disconnect should come at end, since it (may) set
- // structuredDocument to null
- super.disconnect();
- }
-
- public String getDefaultPartitionType() {
- return getEmbeddedPartitioner().getDefaultPartitionType();
- }
-
- /**
- * Returns the embeddedPartitioner.
- *
- * @return IStructuredTextPartitioner
- */
- public IStructuredTextPartitioner getEmbeddedPartitioner() {
- if (fEmbeddedPartitioner == null) {
- fEmbeddedPartitioner = createStructuredTextPartitioner(fStructuredDocument);
- fEmbeddedPartitioner.connect(fStructuredDocument);
- }
-
- return fEmbeddedPartitioner;
- }
-
- /**
- * Returns the language.
- *
- * @return String
- */
- public String getLanguage() {
- return fLanguage;
- }
-
- private List getLocalLegalContentTypes() {
- List types = new ArrayList();
- Object[] configuredTypes = getConfiguredContentTypes();
- for (int i = 0; i < configuredTypes.length; i++)
- types.add(configuredTypes[i]);
- return types;
- }
-
- private String getParentName(IStructuredDocumentRegion sdRegion) {
- String result = "UNKNOWN"; //$NON-NLS-1$
- while (sdRegion != null && isValidJspActionRegionType(sdRegion.getType()))
- sdRegion = sdRegion.getPrevious();
-
- if (sdRegion != null) {
- ITextRegionList regions = sdRegion.getRegions();
- // only find parent names from a start tag
- if (regions.size() > 1) {
- ITextRegion r = regions.get(1);
- if (regions.get(0).getType().equals(DOMRegionContext.XML_TAG_OPEN) && r.getType().equals(DOMRegionContext.XML_TAG_NAME)) {
- result = sdRegion.getText(r);
- }
- }
- }
- return result;
- }
-
- protected String getPartitionType(ForeignRegion region, int offset) {
- return getEmbeddedPartitioner().getPartitionType(region, offset);
- }
-
-
- public String getPartitionType(ITextRegion region, int offset) {
- String result = null;
- final String region_type = region.getType();
- if (region_type == DOMJSPRegionContexts.JSP_CONTENT) {
- result = getPartitionTypeForDocumentLanguage();
- }
- else if (region_type == DOMJSPRegionContexts.JSP_COMMENT_TEXT || region_type == DOMJSPRegionContexts.JSP_COMMENT_OPEN || region_type == DOMJSPRegionContexts.JSP_COMMENT_CLOSE)
- result = IJSPPartitions.JSP_COMMENT;
- else if (region_type == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME || region_type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || region_type == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE)
- result = IJSPPartitions.JSP_DIRECTIVE;
- else if (region_type == DOMJSPRegionContexts.JSP_CLOSE || region_type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || region_type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || region_type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN)
- result = IJSPPartitions.JSP_CONTENT_DELIMITER;
- else if (region_type == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME)
- result = IJSPPartitions.JSP_DEFAULT;
- else if (region_type == DOMJSPRegionContexts.JSP_EL_OPEN || region_type == DOMJSPRegionContexts.JSP_EL_CONTENT || region_type == DOMJSPRegionContexts.JSP_EL_CLOSE || region_type == DOMJSPRegionContexts.JSP_EL_DQUOTE || region_type == DOMJSPRegionContexts.JSP_EL_SQUOTE || region_type == DOMJSPRegionContexts.JSP_EL_QUOTED_CONTENT)
- result = IJSPPartitions.JSP_DEFAULT_EL;
- else if (region_type == DOMJSPRegionContexts.JSP_VBL_OPEN || region_type == DOMJSPRegionContexts.JSP_VBL_CONTENT || region_type == DOMJSPRegionContexts.JSP_VBL_CLOSE || region_type == DOMJSPRegionContexts.JSP_VBL_DQUOTE || region_type == DOMJSPRegionContexts.JSP_VBL_SQUOTE || region_type == DOMJSPRegionContexts.JSP_VBL_QUOTED_CONTENT)
- result = IJSPPartitions.JSP_DEFAULT_EL2;
- else if (region_type == DOMRegionContext.XML_CDATA_TEXT) {
- // BUG131463: possibly between <jsp:scriptlet>, <jsp:expression>,
- // <jsp:declaration>
- IStructuredDocumentRegion sdRegion = this.fStructuredDocument.getRegionAtCharacterOffset(offset);
- if (isJspJavaActionName(getParentName(sdRegion)))
- result = getPartitionTypeForDocumentLanguage();
- else
- result = getEmbeddedPartitioner().getPartitionType(region, offset);
- }
- else if (region_type == DOMRegionContext.XML_CONTENT) {
- // possibly between <jsp:scriptlet>, <jsp:expression>,
- // <jsp:declaration>
- IStructuredDocumentRegion sdRegion = this.fStructuredDocument.getRegionAtCharacterOffset(offset);
- if (isJspJavaActionName(getParentName(sdRegion)))
- result = getPartitionTypeForDocumentLanguage();
- else
- result = getDefaultPartitionType();
- }
- else {
- result = getEmbeddedPartitioner().getPartitionType(region, offset);
- }
- return result;
- }
-
- public String getPartitionTypeBetween(IStructuredDocumentRegion previousNode, IStructuredDocumentRegion nextNode) {
- return getEmbeddedPartitioner().getPartitionTypeBetween(previousNode, nextNode);
- }
-
- private String getPartitionTypeForDocumentLanguage() {
- String result;
- if (fLanguage == null || fLanguage.equalsIgnoreCase("java")) { //$NON-NLS-1$
- result = IJSPPartitions.JSP_CONTENT_JAVA;
- }
- else if (fLanguage.equalsIgnoreCase("javascript")) { //$NON-NLS-1$
- result = IJSPPartitions.JSP_CONTENT_JAVASCRIPT;
- }
- else {
- result = IJSPPartitions.JSP_SCRIPT_PREFIX + getLanguage().toUpperCase(Locale.ENGLISH);
- }
- return result;
- }
-
- protected void initLegalContentTypes() {
- List combinedTypes = getLocalLegalContentTypes();
- if (getEmbeddedPartitioner() != null) {
- String[] moreTypes = getEmbeddedPartitioner().getLegalContentTypes();
- for (int i = 0; i < moreTypes.length; i++)
- combinedTypes.add(moreTypes[i]);
- }
- fSupportedTypes = new String[0];
- combinedTypes.toArray(fSupportedTypes);
- }
-
- /**
- * @param sdRegion
- * @param offset
- * @return
- */
- private boolean isAction(IStructuredDocumentRegion sdRegion, int offset) {
- if (!sdRegion.getType().equals(DOMRegionContext.XML_TAG_NAME))
- return false;
- /*
- * shouldn't get a tag name region type unless a tag name region
- * exists at [1]
- */
- ITextRegion tagNameRegion = sdRegion.getRegions().get(1);
- String tagName = sdRegion.getText(tagNameRegion);
-
- RegionParser parser = fStructuredDocument.getParser();
- if (parser instanceof JSPSourceParser) {
- if (tagName.equals(fLastCheckedPrefix))
- return true;
- List fCustomActionPrefixes = ((JSPSourceParser) parser).getNestablePrefixes();
- for (int i = 0; i < fCustomActionPrefixes.size(); i++)
- if (tagName.startsWith(((TagMarker) fCustomActionPrefixes.get(i)).getTagName())) {
- fLastCheckedPrefix = ((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;
- }
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=113346
- if (fEnableJSPActionPartitions && isAction(sdRegion, offset) && !(containedChildRegion instanceof ITextRegionContainer)) {
- // if (fEnableJSPActionPartitions && isAction(sdRegion,
- // offset)) {
- setInternalPartition(offset, containedChildRegion.getLength(), IJSPPartitions.JSP_DIRECTIVE);
- return true;
- }
- }
- return super.isDocumentRegionBasedPartition(sdRegion, containedChildRegion, offset);
- }
-
- /**
- * @param possibleJspJavaAction
- * @return
- */
- private boolean isJspJavaActionName(String possibleJspJavaAction) {
- return possibleJspJavaAction.equals(JSP11Namespace.ElementName.SCRIPTLET) || possibleJspJavaAction.equals(JSP11Namespace.ElementName.EXPRESSION) || possibleJspJavaAction.equals(JSP11Namespace.ElementName.DECLARATION);
- }
-
- private boolean isValidJspActionRegionType(String type) {
- // true for anything that can be within <jsp:scriptlet>,
- // <jsp:expression>, <jsp:declaration>
- return type == DOMRegionContext.XML_CONTENT || type == DOMRegionContext.BLOCK_TEXT || type == DOMRegionContext.XML_CDATA_OPEN || type == DOMRegionContext.XML_CDATA_TEXT || type == DOMRegionContext.XML_CDATA_CLOSE;
- }
-
- public IDocumentPartitioner newInstance() {
- StructuredTextPartitionerForJSP instance = new StructuredTextPartitionerForJSP();
- instance.setEmbeddedPartitioner(createStructuredTextPartitioner(fStructuredDocument));
- instance.setLanguage(fLanguage);
- return instance;
- }
-
- /**
- * Sets the embeddedPartitioner.
- *
- * @param embeddedPartitioner
- * The embeddedPartitioner to set
- */
- public void setEmbeddedPartitioner(IStructuredTextPartitioner embeddedPartitioner) {
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4909
- /**
- * manage connected state of embedded partitioner
- */
- if (fEmbeddedPartitioner != null && fStructuredDocument != null) {
- fEmbeddedPartitioner.disconnect();
- }
-
- this.fEmbeddedPartitioner = embeddedPartitioner;
-
- if (fEmbeddedPartitioner != null && fStructuredDocument != null) {
- fEmbeddedPartitioner.connect(fStructuredDocument);
- }
- }
-
- protected void setInternalPartition(int offset, int length, String type) {
- // TODO: need to carry this single instance idea further to be
- // complete,
- // but hopefully this will be less garbage than before (especially for
- // HTML, XML,
- // naturally!)
- internalReusedTempInstance = getEmbeddedPartitioner().createPartition(offset, length, type);
-
- }
-
- /**
- * Sets the language.
- *
- * @param language
- * The language to set
- */
- public void setLanguage(String language) {
- this.fLanguage = language;
- }
-
-}
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 3db336cb20..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/CommonXML.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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.util;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.w3c.dom.Document;
-
-public class CommonXML {
-
- public synchronized static DocumentBuilder getDocumentBuilder() {
- DocumentBuilder result = null;
- try {
- result = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- }
- catch (ParserConfigurationException e) {
- Logger.logException(e);
- }
- return result;
- }
-
- public synchronized static DocumentBuilder getDocumentBuilder(boolean validating) {
- DocumentBuilder result = null;
- try {
- DocumentBuilderFactory instance = DocumentBuilderFactory.newInstance();
- instance.setValidating(validating);
- instance.setExpandEntityReferences(false);
- instance.setCoalescing(true);
- result = instance.newDocumentBuilder();
- }
- catch (ParserConfigurationException e) {
- Logger.logException(e);
- }
- return result;
- }
-
- public static void serialize(Document document, OutputStream ostream) throws IOException {
- Source domSource = new DOMSource(document);
- try {
- Transformer serializer = TransformerFactory.newInstance().newTransformer();
- try {
- serializer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-16"); //$NON-NLS-1$
- }
- catch (IllegalArgumentException e) {
- // unsupported properties
- }
- serializer.transform(domSource, new StreamResult(ostream));
- }
- catch (TransformerConfigurationException e) {
- throw new IOException(e.getMessage());
- }
- catch (TransformerFactoryConfigurationError e) {
- throw new IOException(e.getMessage());
- }
- catch (TransformerException e) {
- throw new IOException(e.getMessage());
- }
- }
-}
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 3607088d1d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java
+++ /dev/null
@@ -1,485 +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.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.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-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;
- }
-
- ThreadLocal fDocumentBuilder = new ThreadLocal();
-
- private DocumentBuilder getDocumentBuilder() {
- DocumentBuilder db = null;
-
- Reference builderReference = (Reference) fDocumentBuilder.get();
- if (builderReference != null) {
- db = (DocumentBuilder) builderReference.get();
- }
- if (db == null) {
- db = CommonXML.getDocumentBuilder(isValidating());
- fDocumentBuilder.set(new SoftReference(db));
- }
- return db;
- }
-
- private DOMImplementation getDomImplementation() {
- DocumentBuilder builder = null;
- try {
- builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- }
- catch (ParserConfigurationException e1) {
- Logger.logException(e1);
- }
- catch (FactoryConfigurationError e1) {
- Logger.logException(e1);
- }
- DOMImplementation impl = builder.getDOMImplementation();
- return impl;
- }
-
- /*************************************************************************
- * Takes a single string of the form "a/b/c" and ensures that that
- * structure exists below the head element, down through 'c', and returns
- * a <em>single</em> element 'c'. For multiple elements (such as
- * multiple &lt;macro&gt; elements contained within a single
- * &lt;macros&gt; element, full DOM access is required for searching and
- * child element manipulation.
- ************************************************************************/
- public Element getElement(String name) {
- Element result = null;
- if (document == null)
- load(false);
- if (document != null) {
- result = (Element) getNode(getRootElement(), name);
- }
- return result;
- }
-
- /**
- * Returns an EntityResolver that won't try to load and resolve ANY
- * entities
- */
- private EntityResolver getEntityResolver() {
- if (resolver == null) {
- resolver = new EntityResolver() {
- public InputSource resolveEntity(String publicID, String systemID) throws SAXException, IOException {
- InputSource result = null;
- if (isValidating()) {
- try {
- URL spec = new URL("file://" + getBaseReference()); //$NON-NLS-1$
- URL url = new URL(spec, systemID);
- if (url.getProtocol().startsWith("file:")) { //$NON-NLS-1$
- URLConnection connection = url.openConnection();
- result = new InputSource(systemID != null ? systemID : "/_" + toString()); //$NON-NLS-1$
- result.setPublicId(publicID);
- result.setByteStream(connection.getInputStream());
- }
- }
- catch (Exception e) {
- result = null;
- }
- }
-
- if (result == null) {
- result = new InputSource(new ByteArrayInputStream(new byte[0]));
- result.setPublicId(publicID);
- result.setSystemId(systemID != null ? systemID : "/_" + getClass().getName()); //$NON-NLS-1$
- }
- return result;
- }
- };
- }
- return resolver;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getFileName() {
- return fileName;
- }
-
- /**
- * Returns and input stream to use as the source of the Document 1) from
- * an InputStream set on this instance 2) from a JAR file with the given
- * entry name 3) from a normal file
- *
- * @return InputStream
- */
- public InputStream getInputStream() throws FileNotFoundException {
- if (inputStream != null)
- return inputStream;
- else if (isJAR()) {
- return JarUtilities.getInputStream(getJarFileName(), getFileName());
- }
- else {
- return new BufferedInputStream(new FileInputStream(getFileName()));
- }
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getJarFileName() {
- return jarFileName;
- }
-
- private Node getNamedChild(Node parent, String childName) {
- if (parent == null) {
- return null;
- }
- NodeList childList = parent.getChildNodes();
- for (int i = 0; i < childList.getLength(); i++) {
- if (childList.item(i).getNodeName().equals(childName))
- return childList.item(i);
- }
- return null;
- }
-
- private Document getNewDocument() {
- Document result = null;
- try {
- result = getDomImplementation().createDocument("http://www.w3.org/XML/1998/namespace", getRootElementName(), null); //$NON-NLS-1$
- NodeList children = result.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- result.removeChild(children.item(i));
- }
- // we're going through this effort to avoid a NS element
- Element settings = result.createElementNS("http://www.w3.org/XML/1998/namespace", getRootElementName()); //$NON-NLS-1$
- result.appendChild(settings);
- return result;
- }
- catch (DOMException e) {
- Logger.logException(e);
- }
- return null;
- }
-
- /*************************************************************************
- * Takes a single string of the form "a/b/c" and ensures that that
- * structure exists below the head element, down through 'c', and returns
- * the element 'c'.
- ************************************************************************/
- private Node getNode(Node node, String name) {
- StringTokenizer tokenizer = new StringTokenizer(name, "/"); //$NON-NLS-1$
- String token = null;
- while (tokenizer.hasMoreTokens()) {
- token = tokenizer.nextToken();
- if (getNamedChild(node, token) == null)
- node.appendChild(document.createElement(token));
- node = getNamedChild(node, token);
- }
- return node;
- }
-
- /**
- * Returns an ErrorHandler that will not stop the parser on reported
- * errors
- */
- private ErrorHandler getNullErrorHandler() {
- if (errorHandler == null) {
- errorHandler = new ErrorHandler() {
- public void error(SAXParseException exception) throws SAXException {
- Logger.log(Logger.WARNING, "SAXParseException with " + 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, "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, "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 775d9b1a61..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupport.java
+++ /dev/null
@@ -1,229 +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.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);
-
- /**
- * @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 -1 if the project does not have the JST Web facet, the version
- * number of it 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 = 2.5f;
- 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;
- }
-
- 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
- * @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 the applicable Web context root path, if one exists
- */
- 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 2b7e2888b3..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java
+++ /dev/null
@@ -1,191 +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 License v1.0
- * which accompanies this distribution, 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.IFile;
-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.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.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 -1 if the project does not have the JST Web facet, the version
- * number of it otherwise
- * @throws CoreException
- */
- static float getDynamicWebProjectVersion(IProject project) {
- if (project == null)
- return 2.5f;
-
- // In the absence of any facet information, assume the highest level
- float version = 2.5f;
- 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) {
- IFile baseFile = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
- IVirtualResource[] virtualResources = ComponentCore.createResources(baseFile);
- for (int i = 0; i < virtualResources.length; i++) {
- IPath baseRuntimePath = virtualResources[i].getRuntimePath();
- IPath referenceRuntimePath = null;
- if (reference.startsWith(SLASH)) {
- referenceRuntimePath = new Path(reference);
- }
- else {
- 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].exists()) {
- return underlyingFiles[j].getFullPath();
- }
-
- }
- }
- }
- }
- else {
- IVirtualFile virtualFile = ComponentCore.createFile(project, new Path(reference));
- if (virtualFile != null && virtualFile.exists()) {
- return virtualFile.getUnderlyingFile().getFullPath();
- }
- }
- return null;
- }
-}
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 e6243ad509..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java
+++ /dev/null
@@ -1,225 +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 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) {
- Logger.logException(e);
- }
- 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);
- is = f.getContents();
- Reader reader = new InputStreamReader(is, charset);
- char[] readBuffer = new char[2048];
- int n = reader.read(readBuffer);
- while (n > 0) {
- s.append(readBuffer, 0, n);
- n = reader.read(readBuffer);
- }
- }
- }
- catch (Exception e) {
- if (Debug.debugStructuredDocument) {
- Logger.logException(e);
- e.printStackTrace();
- }
- }
- 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() {
- 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);
- 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/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 e9cb19e6f8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPActionValidator.java
+++ /dev/null
@@ -1,350 +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 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.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.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.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Checks for: missing required attributes & undefined attributes in jsp
- * action tags such as jsp directives and jsp custom tags 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 HashSet fTaglibPrefixes = new HashSet();
-
- 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);
- }
- }
-
- private void checkRequiredAttributes(IDOMElement element, CMNamedNodeMap attrMap, IReporter reporter, IFile file, IStructuredDocument document, IStructuredDocumentRegion documentRegion) {
- Iterator it = attrMap.iterator();
- CMAttributeDeclaration attr = null;
- while (it.hasNext()) {
- attr = (CMAttributeDeclaration) it.next();
- if (attr.getUsage() == CMAttributeDeclaration.REQUIRED) {
- Attr a = element.getAttributeNode(attr.getAttrName());
- if (a == null) {
- String msgText = NLS.bind(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);
- }
- }
- }
- }
-
- private boolean checkUnknownAttributes(IDOMElement element, CMNamedNodeMap cmAttrs, IReporter reporter, IFile file, IStructuredDocument document, IStructuredDocumentRegion documentRegion) {
- boolean foundjspattribute = false;
-
- NamedNodeMap attrs = element.getAttributes();
- for (int i = 0; i < attrs.getLength(); i++) {
- Attr a = (Attr) attrs.item(i);
- CMAttributeDeclaration adec = (CMAttributeDeclaration) cmAttrs.getNamedItem(a.getName());
- if (adec == null) {
- // No attr declaration was found. That is, the attr name is
- // undefined.
- // but not regard it as undefined name if it includes JSP
- if (!hasJSPRegion(((IDOMNode) a).getNameRegion()) && fSeverityUnknownAttribute != ValidationMessage.IGNORE) {
- 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;
- }
- }
- }
- return foundjspattribute;
- }
-
- 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();
- 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);
- }
-
- 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();
-
- // 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 = cmElement.getAttributes();
-
- CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(cmAttributes);
- 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, 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 d4dde9f9cc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPBatchValidator.java
+++ /dev/null
@@ -1,495 +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.core.internal.validation;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentProperties;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.validation.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$
-
- /**
- * 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);
-
-
- 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 = Boolean.valueOf(JSPFContentProperties.getProperty(JSPFContentProperties.VALIDATE_FRAGMENTS, file, true)).booleanValue();
- /*
- * if jsp fragments should not be validated, check if file is
- * really jsp fragment
- */
- if (!shouldValidateFragments) {
- boolean isFragment = isFragment(file);
- shouldValidate = !isFragment;
- }
- }
- return shouldValidate;
- }
-
- /**
- * Returns JSP fragment content type
- *
- * @return jspf content type
- */
- private IContentType getJSPFContentType() {
- if (fJSPFContentType == null) {
- fJSPFContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSPFRAGMENT);
- }
- return fJSPFContentType;
- }
-
- public ISchedulingRule getSchedulingRule(IValidationContext helper) {
- if (helper instanceof IWorkbenchContext) {
- /*
- * Use a single build rule when running batch validation.
- */
- return ResourcesPlugin.getWorkspace().getRuleFactory().buildRule();
- }
- /*
- * For other kinds of validation, use no specific rule
- */
- return null;
- }
-
- /**
- * 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) {
- try {
- f.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- 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;
- ValidationResult result = new ValidationResult();
- final IReporter reporter = result.getReporter(monitor);
- IWorkspaceRunnable validationRunnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- validateFile((IFile) resource, reporter);
- }
- };
- 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 fd9a126e4b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPContentValidator.java
+++ /dev/null
@@ -1,96 +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.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.jsp.core.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.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.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;
-
-/**
- * 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 {
- /*
- * 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);
- }
-
- /*
- * Copied from HTMLValidator
- */
- private HTMLValidationReporter getReporter(IReporter reporter, IFile file, IDOMModel model) {
- return new HTMLValidationReporter(this, reporter, file, model);
- }
-
- /*
- * 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
- if (hasHTMLFeature(document)) {
- 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);
- }
- }
-
- protected void validateFile(IFile f, IReporter reporter) {
- IStructuredModel model = null;
- try {
- 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 687e96627b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPDirectiveValidator.java
+++ /dev/null
@@ -1,580 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * 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.List;
-import java.util.Locale;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.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.ITaglibRecord;
-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.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 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 fSeverityTaglibDuplicatePrefixWithSameURIs = -1;
- private int fSeverityTaglibMissingPrefix = -1;
-
- private int fSeverityTaglibMissingURI = -1;
-
-
- private int fSeverityTaglibUnresolvableURI = -1;
-
- private HashMap fTaglibPrefixesInUse = new HashMap();
-
- public JSPDirectiveValidator() {
- initReservedPrefixes();
- fMessageOriginator = this;
- }
-
- public JSPDirectiveValidator(IValidator validator) {
- initReservedPrefixes();
- this.fMessageOriginator = validator;
- }
-
- public void cleanup(IReporter reporter) {
- super.cleanup(reporter);
- fTaglibPrefixesInUse.clear();
- fPrefixValueRegionToDocumentRegionMap.clear();
- }
-
- private void collectTaglibPrefix(IStructuredDocumentRegion 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);
-
- }
-
- 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();
-
- // 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);
- }
- region = region.getNext();
- }
-
- if (!reporter.isCancelled()) {
- reportTaglibDuplicatePrefixes(f, reporter, sDoc);
- }
-
- fPrefixValueRegionToDocumentRegionMap.clear();
- fTaglibPrefixesInUse.clear();
- setProject(null);
- unloadPreferences();
- }
-
- private void processDirective(IReporter reporter, IFile file, IStructuredDocument sDoc, IStructuredDocumentRegion documentRegion) {
- String directiveName = getDirectiveName(documentRegion);
- // we only care about taglib directive
- if (directiveName.equals("taglib")) { //$NON-NLS-1$
- processTaglibDirective(reporter, file, sDoc, documentRegion);
- }
- else if (directiveName.equals("include")) { //$NON-NLS-1$
- processIncludeDirective(reporter, file, sDoc, documentRegion);
- }
- else if (directiveName.equals("page")) { //$NON-NLS-1$
- processPageDirective(reporter, file, sDoc, documentRegion);
- }
- }
-
- private void processIncludeDirective(IReporter reporter, IFile file, IStructuredDocument sDoc, IStructuredDocumentRegion documentRegion) {
- ITextRegion fileValueRegion = getAttributeValueRegion(documentRegion, JSP11Namespace.ATTR_NAME_FILE);
- if (fileValueRegion != null) {
- // 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, JSP11Namespace.ATTR_NAME_FILE);
- LocalizedMessage message = new LocalizedMessage(fSeverityIncludeFileNotSpecified, msgText, file);
- int start = documentRegion.getStartOffset(fileValueRegion);
- int length = fileValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- else if (fSeverityIncludeFileMissing != ValidationMessage.IGNORE) {
- IPath testPath = FacetModuleCoreSupport.resolve(file.getFullPath(), fileValue);
- if (testPath.segmentCount() > 1) {
- IFile testFile = file.getWorkspace().getRoot().getFile(testPath);
- if (!testFile.isAccessible()) {
- // 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);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
- }
- else if (fSeverityIncludeFileNotSpecified != ValidationMessage.IGNORE) {
- // file is not specified at all
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_3, JSP11Namespace.ATTR_NAME_FILE);
- LocalizedMessage message = new LocalizedMessage(fSeverityIncludeFileNotSpecified, msgText, file);
- int start = documentRegion.getStartOffset();
- int length = documentRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo);
- 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, IStructuredDocumentRegion 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) {
- // file value is specified but empty
- 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);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
-
- private void processTaglibDirective(IReporter reporter, IFile file, IStructuredDocument sDoc, IStructuredDocumentRegion 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 tld = TaglibIndex.resolve(file.getFullPath().toString(), uri, false);
- if (tld == null && fSeverityTaglibUnresolvableURI != ValidationMessage.IGNORE) {
- // URI specified but does not resolve
- String 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);
- message.setOffset(start);
- message.setLength(length);
-
- message.setAttribute("PROBLEM_ID", new Integer(611));
-
- 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);
- 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);
- 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_1, 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);
- 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);
- 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);
- 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);
- 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);
- 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++) {
- IStructuredDocumentRegion documentRegion = (IStructuredDocumentRegion) 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;
- }
- }
- }
- }
-
- 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);
- IStructuredDocumentRegion documentRegion = (IStructuredDocumentRegion) 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);
- 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;
- }
-
- /**
- * 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 8fb17de24d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java
+++ /dev/null
@@ -1,178 +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 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();
- if (childRegion.getType() == DOMJSPRegionContexts.JSP_EL_CONTENT)
- validateXMLNode(parentRegion, childRegion, reporter, file);
- }
- }
- }
- }
-
- 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 9972e34dfa..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPJavaValidator.java
+++ /dev/null
@@ -1,335 +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.core.internal.validation;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-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 = null;
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
- private IScopeContext[] fScopes = null;
-
- 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());
- }
- break;
- }
- }
- }
- }
-
- /**
- * Creates an IMessage from an 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 = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED);
- }
- break;
- case IProblem.NullLocalVariableReference : {
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE);
- }
- break;
- case IProblem.ArgumentIsNeverUsed : {
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED);
- }
- break;
- case IProblem.PotentialNullLocalVariableReference : {
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE);
- }
- break;
- case IProblem.UnusedImport : {
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_UNUSED_IMPORT);
- }
- break;
-
- default : {
- if (problem.isError()) {
- sev = IMessage.HIGH_SEVERITY;
- }
- else {
- sev = IMessage.NORMAL_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;
- }
-
- // 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 + 1);
-
- // need additional adjustment for problems from
- // indirect (included) files
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=119633
- if (translation.isIndirect(problem.getSourceStart())) {
- adjustIndirectPosition(m, translation);
- }
-
- return m;
- }
-
- 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()};
-
- 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()};
- }
- }
- }
-
- void performValidation(IFile f, IReporter reporter, IStructuredModel model) {
- 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);
-
- translation.setProblemCollectingActive(true);
- translation.reconcileCompilationUnit();
- List problems = translation.getProblems();
- // add new messages
- for (int i = 0; i < problems.size() && !reporter.isCancelled(); i++) {
- IMessage m = createMessageFromProblem((IProblem) problems.get(i), f, translation, domModel.getStructuredDocument());
- if (m != null)
- reporter.addMessage(fMessageOriginator, m);
- }
- }
- }
- unloadPreferences();
- }
-
- private void unloadPreferences() {
- fPreferencesService = null;
- 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) {
- // 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();
- }
- }
-}
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 1ecbf45861..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.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.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 sdr
- * @return the jsp directive name
- */
- protected String getDirectiveName(IStructuredDocumentRegion sdr) {
- String name = ""; //$NON-NLS-1$
- ITextRegionList subRegions = sdr.getRegions();
- for (int j = 0; j < subRegions.size(); j++) {
- ITextRegion subRegion = subRegions.get(j);
- if (subRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- name = sdr.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(IStructuredDocumentRegion 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(IStructuredDocumentRegion 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/jspel/ELProblem.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java
deleted file mode 100644
index cb548c0e01..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java
+++ /dev/null
@@ -1,34 +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 org.eclipse.jface.text.Position;
-
-public class ELProblem {
- private Position fPos;
- private String fMessage;
-
- public ELProblem(Position pos, String message) {
- fPos = pos;
- fMessage = message;
- }
-
- public String getMessage() {
- return fMessage;
- }
-
-
- public Position getPosition() {
- return fPos;
- }
-}
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 14b3bb867e..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 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, 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>
- * 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 b81027e440..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexListener.java
+++ /dev/null
@@ -1,32 +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;
-
-/**
- * A listener for changes in the index's records.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.2
- */
-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 c1d17ca3b2..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 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, 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>
- * 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 6c24aca1cc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
+++ /dev/null
@@ -1,2192 +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 java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-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.net.URLConnection;
-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 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.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.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.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.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.util.StringTokenizer;
-
-class ProjectDescription {
-
- 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) {
- 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;
- }
- }
-
- static class JarRecord implements IJarRecord {
- boolean has11TLD;
- TaglibInfo info;
-
- boolean isExported = true;
- boolean isMappedInWebXML;
- IPath location;
- List 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 List 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 (int i = 0; i < urlRecords.size(); i++) {
- s.append(urlRecords.get(i));
- 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 = "";
- String displayName = "";
- String jspVersion = "";
- String largeIcon = "";
- String shortName = "";
- String smallIcon = "";
- String tlibVersion = "";
- String uri = "";
-
- public TaglibInfo() {
- super();
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof TaglibInfo))
- return false;
- return ((TaglibInfo) obj).jspVersion == 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|" + shortName + "|" + tlibVersion + "|" + smallIcon + "|" + largeIcon + "|" + jspVersion + "|" + uri + "|" + 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.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;
- 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 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 ""; //$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();
- }
- }
-
- 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.0.3"; //$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$
-
- /**
- * 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;
-
- Hashtable fTagDirReferences;
-
- Hashtable fTLDReferences;
-
- IResourceDeltaVisitor fVisitor;
- Hashtable fWebXMLReferences;
-
- ILock LOCK = Job.getJobManager().newLock();
-
- private long time0;
-
- 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) {
- 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
- }
- 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) {
- }
- }
- }
- }
- 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;
- ByteArrayInputStream cachedContents = null;
- InputStream tldStream = null;
- try {
- url = new URL(urlString);
- URLConnection connection = url.openConnection();
- connection.setDefaultUseCaches(false);
- tldStream = connection.getInputStream();
- }
- catch (Exception e1) {
- Logger.logException("Exception reading TLD contributed to the XML Catalog", e1);
- }
-
- if (tldStream != null) {
- int c;
- ByteArrayOutputStream buffer = new ByteArrayOutputStream();
- // array dim restriction?
- byte bytes[] = new byte[2048];
- try {
- while ((c = tldStream.read(bytes)) >= 0) {
- buffer.write(bytes, 0, c);
- }
- cachedContents = new ByteArrayInputStream(buffer.toByteArray());
- }
- catch (IOException ioe) {
- // no cleanup can be done
- }
- finally {
- try {
- tldStream.close();
- }
- catch (IOException e) {
- }
- }
-
- URLRecord urlRecord = null;
- TaglibInfo info = extractInfo(urlString, cachedContents);
- 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 {
- cachedContents.close();
- }
- catch (IOException 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) {
- JarRecord record = new JarRecord();
- record.info = new TaglibInfo();
- record.location = new Path(fileLocation);
- record.urlRecords = new ArrayList(0);
- 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 = "";
- record.info.displayName = "";
- record.info.smallIcon = "";
- record.info.largeIcon = "";
-
- 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(true);
- String basePath = tld.getFullPath().toString();
- TaglibInfo info = extractInfo(basePath, contents);
- if (info != null) {
- record.info = info;
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- finally {
- try {
- if (contents != null) {
- contents.close();
- }
- }
- catch (IOException e) {
- // ignore
- }
- }
- return record;
- }
-
- private void ensureUpTodate() {
- try {
- LOCK.acquire();
-
- if (!fBuildPathIsDirty) {
- /*
- * 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.
- */
- try {
- IJavaProject jproject = JavaCore.create(fProject);
- if (jproject != null && jproject.exists()) {
- IClasspathEntry[] entries = jproject.getResolvedClasspath(true);
- fBuildPathIsDirty = (fBuildPathEntryCount != entries.length);
- }
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- if (fBuildPathIsDirty) {
- indexClasspath();
- fBuildPathIsDirty = false;
- }
- }
- 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 ArrayList(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 (jspVersion >= 2.0) {
- records.addAll(fTagDirReferences.values());
- }
-
- 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
- }
- finally {
- try {
- entryInputStream.close();
- }
- catch (IOException 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 Hashtable(1);
- fImplicitReferences.put(localRoot, implicitReferences);
- }
- return implicitReferences;
- }
-
- /**
- * @param basePath
- * @return the applicable Web context root path, if one exists
- * @deprecated
- */
- 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) {
- 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();
- }
-
- /**
- * @return Returns the visitor.
- */
- IResourceDeltaVisitor getVisitor() {
- if (fVisitor == null) {
- fVisitor = new DeltaVisitor();
- }
- return fVisitor;
- }
-
- void handleElementChanged(IJavaElementDelta delta) {
- if (fBuildPathIsDirty) {
- return;
- }
-
- // Logger.log(Logger.INFO_DEBUG, "IJavaElementDelta: " + delta);
- IJavaElement element = delta.getElement();
- 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.ADDED;
- 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) {
- Logger.logException("Problem handling build path entry for " + element.getPath(), e); //$NON-NLS-1$
- }
- 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(), 0);
- }
- 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() {
- if (_debugIndexTime)
- time0 = System.currentTimeMillis();
- fClasspathProjects.clear();
- fClasspathReferences.clear();
- fClasspathJars.clear();
- fBuildPathEntryCount = 0;
-
- IJavaProject javaProject = JavaCore.create(fProject);
- /*
- * If the Java nature isn't present (or something else is wrong),
- * don't check the build path.
- */
- if (javaProject != null && javaProject.exists()) {
- indexClasspath(javaProject);
- }
- // else {
- // Logger.log(Logger.WARNING, "TaglibIndex was asked to index non-Java
- // Project " + fProject.getName()); //$NON-NLS-1$
- // }
-
- if (_debugIndexTime)
- Logger.log(Logger.INFO, "indexed " + fProject.getName() + " classpath in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /**
- * @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())) {
- if (libPath.toFile().exists()) {
- 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().
- */
- IFile libFile = ResourcesPlugin.getWorkspace().getRoot().getFile(libPath);
- if (libFile != null && libFile.exists()) {
- updateClasspathLibrary(libFile.getLocation().toString(), ITaglibIndexDelta.ADDED, entry.isExported());
- }
- }
- }
- }
- 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 :
- 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)); } }
- */
-
- /**
- * @param javaProject
- */
- private void indexClasspath(IJavaProject javaProject) {
- if (javaProject == null)
- return;
-
- IProject project = javaProject.getProject();
- if (project.equals(fProject)) {
- try {
- IClasspathEntry[] entries = javaProject.getResolvedClasspath(true);
- fBuildPathEntryCount = entries.length;
- for (int i = 0; i < entries.length; i++) {
- indexClasspath(entries[i]);
- }
- }
- catch (JavaModelException e) {
- Logger.logException("Error searching Java Build Path + (" + fProject.getName() + ") for tag libraries", e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- 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 ""; //$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));
- getImplicitReferences(jar.getFullPath().toString()).remove(records[i].getURI());
- }
- 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) {
- getImplicitReferences(tld.getFullPath().toString()).remove(record.getURI());
- }
- 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$
- getImplicitReferences(webxml.getFullPath().toString()).remove(records[i].getURI());
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, records[i], ITaglibIndexDelta.REMOVED));
- }
- }
- }
-
- /**
- * @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));
-
- /**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=196177 Support
- * resolution in flexible projects
- */
- IPath resourcePath = FacetModuleCoreSupport.resolve(new Path(basePath), reference);
- if (resourcePath.segmentCount() > 1) {
- if (resourcePath.toString().toLowerCase(Locale.US).endsWith(".tld")) { //$NON-NLS-1$
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(resourcePath);
- if (file.isAccessible()) {
- path = resourcePath.toString();
- }
- }
- else if (resourcePath.toString().toLowerCase(Locale.US).endsWith(".jar")) { //$NON-NLS-1$
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(resourcePath);
- if (file.isAccessible()) {
- path = resourcePath.toString();
- }
- }
- }
-
- LOCK.acquire();
-
- /**
- * Workaround for problem in URIHelper; uris starting with '/' are
- * returned as-is.
- */
- if (path == null) {
- if (reference.startsWith("/")) { //$NON-NLS-1$
- path = getLocalRoot(basePath) + reference;
- }
- else {
- path = URIHelper.normalize(reference, basePath, getLocalRoot(basePath));
- }
- }
-
- // 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) {
- record = (ITaglibRecord) getImplicitReferences(basePath).get(reference);
- }
-
-
- 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(getLocalRoot(basePath))) {
- WebXMLRecord[] webxmls = (WebXMLRecord[]) fWebXMLReferences.values().toArray(new WebXMLRecord[0]);
- for (int i = 0; i < webxmls.length; i++) {
- if (record != null)
- continue;
- record = (ITaglibRecord) getImplicitReferences(webxmls[i].path.toString()).get(reference);
- }
- }
- }
- 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()) {
- 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) {
- }
- }
- }
-
- 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); //$NON-NLS-1$ //$NON-NLS-2$
- urlRecord.isExported = exported;
- urlRecord.baseLocation = libraryRecord.location.toString();
- libraryRecord.urlRecords.add(urlRecord);
-
- ByteArrayInputStream cachedContents = null;
- InputStream tldStream = null;
- try {
- URLConnection connection = urlRecord.url.openConnection();
- connection.setDefaultUseCaches(false);
- tldStream = connection.getInputStream();
- }
- catch (IOException e1) {
- Logger.logException(e1);
- }
-
- int c;
- ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
- // array dim restriction?
- byte bytes[] = new byte[2048];
- try {
- while ((c = tldStream.read(bytes)) >= 0) {
- byteArrayOutput.write(bytes, 0, c);
- }
- cachedContents = new ByteArrayInputStream(byteArrayOutput.toByteArray());
- }
- catch (IOException ioe) {
- // no cleanup can be done
- }
- finally {
- try {
- tldStream.close();
- }
- catch (IOException e) {
- }
- }
-
- TaglibInfo info = extractInfo(urlRecord.url.toString(), cachedContents);
- if (info != null) {
- urlRecord.info = info;
- }
- try {
- cachedContents.close();
- }
- catch (IOException e) {
- }
- 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, "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) {
- }
- }
- }
- }
-
- // ================ 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.0.1
- * 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) {
- }
- finally {
- try {
- if (writer != null) {
- writer.close();
- }
- }
- catch (Exception 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$
- }
-
- void updateClasspathLibrary(String libraryLocation, int deltaKind, boolean isExported) {
- JarRecord libraryRecord = null;
- if (deltaKind == ITaglibIndexDelta.REMOVED || deltaKind == ITaglibIndexDelta.CHANGED) {
- libraryRecord = (JarRecord) fClasspathJars.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) {
- libraryRecord = createJARRecord(libraryLocation);
- 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 (z.getName().toLowerCase(Locale.US).endsWith(".tld")) { //$NON-NLS-1$
- 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);
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, urlRecord, deltaKind));
- 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) {
- }
- }
- }
- }
- }
- }
- 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);
- }
- }
- if (libraryRecord != null) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, libraryRecord, deltaKind));
- }
- }
-
- 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();
- String[] entries = JarUtilities.getEntryNames(jar);
- JarRecord jarRecord = createJARRecord(jar);
- fJARReferences.put(jar.getFullPath().toString(), jarRecord);
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].endsWith(".tld")) { //$NON-NLS-1$
- if (entries[i].equals(JarUtilities.JSP11_TAGLIB)) {
- jarRecord.has11TLD = true;
- }
- InputStream contents = JarUtilities.getInputStream(jar, entries[i]);
- 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 + "!/" + entries[i]); //$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(record.getURI(), 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) {
- }
- }
- else {
- Logger.log(Logger.ERROR_DEBUG, getClass().getName() + "could not read resource " + jar.getFullPath()); //$NON-NLS-1$
- }
- }
- }
- if (jarRecord.has11TLD) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, jarRecord, deltaKind));
- }
- }
-
-
- 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(IResource tld, int deltaKind) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "creating record for " + tld.getFullPath()); //$NON-NLS-1$
- TLDRecord record = createTLDRecord(tld);
- fTLDReferences.put(tld.getFullPath().toString(), record);
- if (record.getURI() != null) {
- getImplicitReferences(tld.getFullPath().toString()).put(record.getURI(), record);
- }
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, deltaKind));
- }
-
- void updateWebXML(IResource webxml, int deltaKind) {
- if (webxml.getType() != IResource.FILE)
- return;
- InputStream webxmlContents = null;
- Document document = null;
- try {
- webxmlContents = ((IFile) webxml).getContents(true);
- 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, "", e); //$NON-NLS-1$
- }
- finally {
- if (webxmlContents != null)
- try {
- webxmlContents.close();
- }
- catch (IOException e1) {
- // ignore
- }
- }
- 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 webapp
- String taglibLocation = readTextofChild(taglibs.item(iTaglib), "taglib-location").trim(); //$NON-NLS-1$
- IPath path = null;
- if (taglibLocation.startsWith("/")) { //$NON-NLS-1$
- path = new Path(getLocalRoot(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) {
- }
- }
- }
- }
- }
- 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
- 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 4836346ebd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
+++ /dev/null
@@ -1,947 +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.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.osgi.framework.Bundle;
-
-/**
- * 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, 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
- removeIndex(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, 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.setBuildPathIsDirty();
- }
- }
- }
- 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;
- }
- }
- }
- 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;
- }
- }
- }
- for (int i = 0; i < projects.length; i++) {
- if (deltas[i].getKind() == IResourceDelta.CHANGED && (deltas[i].getFlags() == IResourceDelta.ENCODING || deltas[i].getFlags() == IResourceDelta.MARKERS))
- continue;
- 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();
- }
- }
- }
-
- 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 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.
- *
- * @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
- * @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 subiinterface of ITaglibRecord.
- *
- * @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 (_instance.isInitialized()) {
- _instance.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;
-
- /** 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()) {
- /*
- * 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();
- if (ENABLED) {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(fResourceChangeListener, IResourceChangeEvent.POST_CHANGE);
- JavaCore.addElementChangedListener(fClasspathChangeListener);
- }
- setIntialized(true);
- }
- }
- finally {
- LOCK.release();
- }
- }
-
- /**
- * Adds the given delta as a child to an overall delta
- *
- * @param delta
- */
- void addDelta(ITaglibIndexDelta delta) {
- ensureDelta(delta.getProject()).addChildDelta(delta);
- }
-
- /**
- * Based on org.eclipse.jdt.internal.core.search.indexing.IndexManager
- *
- * @param containerPath
- * @return
- */
- 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
- */
- ProjectDescription createDescription(IProject project) {
- 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;
- }
-
- 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.
- */
- private void removeIndex(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) {
- String osPath = getTaglibIndexStateLocation().toOSString();
- File folder = new File(osPath);
- if (!folder.isDirectory()) {
- try {
- folder.mkdir();
- }
- catch (SecurityException e) {
- }
- }
-
- // 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()) {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(fResourceChangeListener);
- JavaCore.removeElementChangedListener(fClasspathChangeListener);
-
- /*
- * Clearing the existing saved states helps prune dead data from
- * the index folder.
- */
- removeIndexes(true);
-
- Iterator i = fProjectDescriptions.values().iterator();
- while (i.hasNext()) {
- ProjectDescription description = (ProjectDescription) i.next();
- description.saveReferences();
- }
-
- fProjectDescriptions.clear();
-
- setState(CLEAN);
- fProjectDescriptions = null;
- fResourceChangeListener = null;
- fClasspathChangeListener = null;
- setIntialized(false);
- }
- }
-
- 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 cdb75fd49e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java
+++ /dev/null
@@ -1,2075 +0,0 @@
-/* The following code was generated by JFlex 1.4.1 on 06/04/30 15:49 */
-
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.css.core.internal.parser;
-
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.jsp.css.core.internal.parserz.JSPedCSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.internal.parser.ICSSTokenizer;
-import org.eclipse.wst.css.core.internal.parser.regions.CSSTextRegionFactory;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.1
- * on 06/04/30 15:49 from the specification file
- */
-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;
- }
- }
- if (context == CSS_JSP_SCRIPTLET){
- while (nextTokenType != CSS_JSP_COMMENT_END) {
-// text.append(yytext());
- textLength += yylength();
- length = textLength;
- if (context.equals(CSS_JSP_SCRIPTLET) && yystate() == ST_JSP_COMMENT){
- context = nextTokenType;
- }
-
- nextTokenType = primGetNextToken();
- if (nextTokenType == null){
- break;
- }
- }
- if (context == CSS_JSP_COMMENT){
- context = CSS_COMMENT;
- }
- }
- textLength += yylength();
- length = textLength;
-
- }
- if (context == UNDEFINED) {
- // undef -> concatenate undef's
- nextTokenType = primGetNextToken();
- while (nextTokenType == UNDEFINED) {
-// text.append(yytext());
- textLength += yylength();
- length = textLength;
- nextTokenType = primGetNextToken();
- }
- fBufferedContext = nextTokenType;
-// fBufferedText = new StringBuffer(yytext());
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- } else {
- nextTokenType = null;
- spaceFollows = false;
- if (CSSRegionUtil.isDeclarationValueType(context)) { // declaration value can contain VALUE_S
- nextTokenType = primGetNextToken();
- spaceFollows = (nextTokenType == CSS_DECLARATION_VALUE_S);
- } else if (canContainSpace(context)) {
- nextTokenType = primGetNextToken();
- spaceFollows = (nextTokenType == CSS_S);
- }
- if (nextTokenType != null) { // nextToken is retrieved
- if (spaceFollows) {
- // next is space -> append
-// text.append(yytext());
- length += yylength();
- } else {
- // next is NOT space -> push this for next time, return itself
- fBufferedContext = nextTokenType;
-// fBufferedText = new StringBuffer(yytext());
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- }
- }
- }
- }
-
- if (context != null) {
- if (context == UNDEFINED) {
- context = CSS_UNKNOWN;
- }
- return fRegionFactory.createRegion(context, start, textLength, length);
- } else {
- return null;
- }
- }
-
- /* user method */
- /* for standalone use */
- public final List parseText() throws IOException {
- List tokens = new ArrayList();
-
- CSSTextToken token;
- for (String kind = primGetNextToken(); kind != null; kind = primGetNextToken()) {
- token = new CSSTextToken();
- token.kind = kind;
- token.start = yychar;
- token.length = yylength();
- token.image = yytext();
- tokens.add(token);
- }
-
- return tokens;
- }
-
- /* user method */
- private boolean canContainSpace(String type) {
- if (type == CSS_DELIMITER || type == CSS_RBRACE || type == CSS_DECLARATION_DELIMITER) {
- return false;
- } else {
- return true;
- }
- }
-
- /* user method */
- public final int getOffset() {
- return yychar;
- }
-
- /* user method */
- public final boolean isEOF() {
- return zzAtEOF;
- }
-
- /* user method */
- public void reset(char[] charArray) {
- reset(new CharArrayReader(charArray), 0);
- }
-
- /* user method */
- public final void reset(java.io.Reader in, int newOffset) {
- /** the input device */
- zzReader = in;
-
- /** the current state of the DFA */
- zzState = 0;
-
- /** the current lexical state */
- zzLexicalState = fInitialState; //YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- if (zzBuffer.length != fInitialBufferSize) {
- zzBuffer = new char[fInitialBufferSize];
- }
- java.util.Arrays.fill(zzBuffer, (char)0);
-
- /** the textposition at the last accepting state */
- zzMarkedPos = 0;
-
- /** the textposition at the last state to be included in yytext */
- zzPushbackPos = 0;
-
- /** the current text position in the buffer */
- zzCurrentPos = 0;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- zzStartRead = 0;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- zzEndRead = 0;
-
- /** number of newlines encountered up to the start of the matched text */
- yyline = 0;
-
- /** the number of characters up to the start of the matched text */
- yychar = 0;
-
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- //yycolumn = 0;
-
- /**
- * yy_atBOL == true <=> the scanner is currently at the beginning of a line
- */
- //zzAtBOL = false;
-
- /** yy_atEOF == true <=> the scanner has returned a value for EOF */
- zzAtEOF = false;
-
- /* user variables */
- // fUndefined.delete(0, fUndefined.length());
- }
-
- /* user method */
- public JSPedCSSTokenizer() {
- super();
- }
-
- private int fJSPPreviousState = fInitialState;
- private void yyJspBegin(int newstate){
- fJSPPreviousState = yystate();
- yybegin(newstate);
- }
- private void yyJspEnd(){
- yybegin(fJSPPreviousState);
- }
-
-
- /**
- * 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;
- 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;
-
- boolean zzR = false;
- for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL;
- zzCurrentPosL++) {
- switch (zzBufferL[zzCurrentPosL]) {
- case '\u000B':
- case '\u000C':
- case '\u0085':
- case '\u2028':
- case '\u2029':
- yyline++;
- zzR = false;
- break;
- case '\r':
- yyline++;
- zzR = true;
- break;
- case '\n':
- if (zzR)
- zzR = false;
- else {
- yyline++;
- }
- break;
- default:
- zzR = false;
- }
- }
-
- if (zzR) {
- // peek one character ahead if it is \n (if we have counted one line too much)
- boolean zzPeek;
- if (zzMarkedPosL < zzEndReadL)
- zzPeek = zzBufferL[zzMarkedPosL] == '\n';
- else if (zzAtEOF)
- zzPeek = false;
- else {
- boolean eof = zzRefill();
- zzEndReadL = zzEndRead;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- if (eof)
- zzPeek = false;
- else
- zzPeek = zzBufferL[zzMarkedPosL] == '\n';
- }
- if (zzPeek) yyline--;
- }
- 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 2d42e46796..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jst.jsp.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 c09e0eee8a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,66 +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.300.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.projection;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
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.forms;bundle-version="[3.3.100,3.4.0]",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.html.ui;bundle-version="[1.0.300,1.1.0)",
- org.eclipse.wst.css.ui;bundle-version="[1.0.300,1.1.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.400,1.1.0)",
- org.eclipse.jst.jsp.core;bundle-version="[1.2.100,1.3.0)",
- org.eclipse.wst.html.core;bundle-version="[1.1.200,1.2.0)",
- org.eclipse.wst.css.core;bundle-version="[1.1.200,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.jdt.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jdt.debug;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.search;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ltk.core.refactoring;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.views;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.0,1.3.0)",
- com.ibm.icu;bundle-version="[3.8.1,4.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 f70f87f462..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/build.properties
+++ /dev/null
@@ -1,22 +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/**
-src.includes = build.properties
-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/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 0e63e445c1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/plugin.properties
+++ /dev/null
@@ -1,105 +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
-# Matthias Fuessel, mat.fuessel@gmx.net - [177387] use base hyperlinking extension points
-###############################################################################
-providerName=Eclipse.org
-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_Templates.name=Templates
-JSP_Styles.name=Styles
-JSP_Syntax_Coloring=Syntax Coloring
-JSP_Source_target_name=JSP Source
-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
-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_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
-_UI_WIZARD_CREATE_NEW_FILE = Create a new JavaServer Page
-_UI_WIZARD_TAG_NAME = Tag
-_UI_WIZARD_TAG_CREATE_NEW_FILE = Create a new 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.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
-
-##
-JSPJava_hyperlink=Java Content In JSP
-Taglib_hyperlink=Taglib Directive
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 23fb162aab..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/plugin.xml
+++ /dev/null
@@ -1,1011 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <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" />
- <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="structuredtextfoldingprovider"
- class="org.eclipse.jst.jsp.ui.internal.projection.StructuredTextFoldingProviderJSP"
- 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"
- 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.comments, org.eclipse.wst.xml.selection"
- target="org.eclipse.jst.jsp.core.jspsource" />
- </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="partial"
- 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>
- <!--======================================================================================-->
- <!-- custom XML source (as you type) validation -->
- <!--======================================================================================-->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="partial"
- class="org.eclipse.wst.xml.ui.internal.validation.MarkupValidator"
- id="org.eclipse.jst.jsp.ui.internal.validation.markupvalidator">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType id="org.eclipse.jst.jsp.JSP_DIRECTIVE"/>
- <partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
- <partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
- </contentTypeIdentifier>
- </validator>
- </extension>
- <!--======================================================================================-->
- <!-- HTML (as you type) validation -->
- <!--======================================================================================-->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="partial"
- 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.wst.html.HTML_DEFAULT"/>
- <partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
- <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
- 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.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>
- </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>
-
-
- <!-- 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>
- </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="structuredtextfoldingprovider"
- class="org.eclipse.wst.css.ui.internal.projection.StructuredTextFoldingProviderCSS"
- 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="%JSPJava_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>
- </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>
- </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">
- <test property="org.eclipse.wst.sse.core.resources.contentTypeId"
- value="org.eclipse.jst.jsp.core.jspsource"/>
- </adapt>
- </iterate>
- </definition>
- </extension>
-
-</plugin>
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 bc4158feaa..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
+++ /dev/null
@@ -1,382 +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
- * 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.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.autoedit.AutoEditStrategyForTabs;
-import org.eclipse.jst.jsp.ui.internal.autoedit.StructuredAutoEditStrategyJSP;
-import org.eclipse.jst.jsp.ui.internal.contentassist.JSPContentAssistProcessor;
-import org.eclipse.jst.jsp.ui.internal.contentassist.JSPELContentAssistProcessor;
-import org.eclipse.jst.jsp.ui.internal.contentassist.JSPJavaContentAssistProcessor;
-import org.eclipse.jst.jsp.ui.internal.contentassist.NoRegionContentAssistProcessorForJSP;
-import org.eclipse.jst.jsp.ui.internal.format.FormattingStrategyJSPJava;
-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.core.text.IStructuredPartitions;
-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.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);
-
- 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) {
- // 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;
- }
-
- protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType) {
- IContentAssistProcessor[] processors = null;
-
- if (partitionType == IHTMLPartitions.SCRIPT) {
- // HTML JavaScript
- IContentAssistant htmlContentAssistant = getHTMLSourceViewerConfiguration().getContentAssistant(sourceViewer);
- IContentAssistProcessor processor = htmlContentAssistant.getContentAssistProcessor(IHTMLPartitions.SCRIPT);
- processors = new IContentAssistProcessor[]{processor};
- }
- else if (partitionType == ICSSPartitions.STYLE) {
- // HTML CSS
- IContentAssistant htmlContentAssistant = getHTMLSourceViewerConfiguration().getContentAssistant(sourceViewer);
- IContentAssistProcessor processor = htmlContentAssistant.getContentAssistProcessor(ICSSPartitions.STYLE);
- processors = new IContentAssistProcessor[]{processor};
- }
- // // jspcontentassistprocessor handles this?
- // else if ((partitionType == IHTMLPartitionTypes.HTML_DEFAULT) ||
- // (partitionType == IHTMLPartitionTypes.HTML_COMMENT)) {
- // processors = new IContentAssistProcessor[]{new
- // HTMLContentAssistProcessor()};
- // }
- else if ((partitionType == IXMLPartitions.XML_DEFAULT) || (partitionType == IHTMLPartitions.HTML_DEFAULT) || (partitionType == IHTMLPartitions.HTML_COMMENT) || (partitionType == IJSPPartitions.JSP_DEFAULT) || (partitionType == IJSPPartitions.JSP_DIRECTIVE) || (partitionType == IJSPPartitions.JSP_CONTENT_DELIMITER) || (partitionType == IJSPPartitions.JSP_CONTENT_JAVASCRIPT) || (partitionType == IJSPPartitions.JSP_COMMENT)) {
- // jsp
- processors = new IContentAssistProcessor[]{new JSPContentAssistProcessor()};
- }
- else if ((partitionType == IXMLPartitions.XML_CDATA) || (partitionType == IJSPPartitions.JSP_CONTENT_JAVA)) {
- // jsp java
- processors = new IContentAssistProcessor[]{new JSPJavaContentAssistProcessor()};
- }
- else if (partitionType == IJSPPartitions.JSP_DEFAULT_EL) {
- // jsp el
- processors = new IContentAssistProcessor[]{new JSPELContentAssistProcessor()};
- }
- else if (partitionType == IStructuredPartitions.UNKNOWN_PARTITION) {
- // unknown
- processors = new IContentAssistProcessor[]{new NoRegionContentAssistProcessorForJSP()};
- }
-
- return processors;
- }
-
- 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) {
- 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));
- }
- 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 0c8ba64a05..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java
+++ /dev/null
@@ -1,174 +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 - 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 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 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 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 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 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_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_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_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;
-}
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 d8ca7a2a52..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties
+++ /dev/null
@@ -1,154 +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
-###############################################################################
-## 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
-#
-_UI_WIZARD_NEW_TITLE = New JavaServer Page
-_UI_WIZARD_NEW_HEADING = JavaServer Page
-_UI_WIZARD_NEW_DESCRIPTION = Create a new JavaServer Page.
-_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.
-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.
-# 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=Syntax 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
-# 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_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>''{0}''</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_HEADER_CUSTOM_ACTIONS=Custom actions
-VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE=Missing required attribute:
-VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE=Unknown attribute:
-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:
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/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 82a8f9fabb..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java
+++ /dev/null
@@ -1,110 +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.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.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-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) {
- if (command.text.equals("%") && isPreferenceEnabled(JSPUIPreferenceNames.TYPING_COMPLETE_SCRIPTLETS)) { //$NON-NLS-1$
- // scriptlet - add end %>
- IDOMNode node = (IDOMNode) model.getIndexedRegion(command.offset);
- if (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 ((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;
- }
- }
-}
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/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 f897fe2603..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaStratumBreakpointProvider.java
+++ /dev/null
@@ -1,220 +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.breakpointproviders;
-
-import java.util.HashMap;
-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.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);
- for (int i = 0; i < types.length; i++) {
- Object pattern = ((Map) fData).get(types[i].getId());
- if (pattern != null) {
- patternBuffer.append(","); //$NON-NLS-1$
- patternBuffer.append(pattern);
- }
- }
- 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) {
- 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 a3e5a62b34..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/AutoImportProposal.java
+++ /dev/null
@@ -1,202 +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
- * 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.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.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.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.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class AutoImportProposal extends JSPCompletionProposal {
-
- // the import string, no quotes or colons
- String fImportDeclaration;
-
- 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 void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
- super.apply(viewer, trigger, stateMask, offset);
- addImportDeclaration(viewer);
- }
- /**
- * 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());
- }
- /**
- *
- * @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();
- Node docElement = documentNode.getDocumentElement();
- if (docElement != null && docElement instanceof IDOMElement) {
- IStructuredDocumentRegion sdRegion = ((IDOMElement) docElement).getFirstStructuredDocumentRegion();
- if (isXml) {
- // insert right after document element
- pos = sdRegion.getEndOffset();
- }
- else {
- // insert before document element
- pos = sdRegion.getStartOffset();
- }
- }
- }
- }
- }
- 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 delim + opening + getImportDeclaration() + closing;
- }
-
- 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 912121ebf1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/CustomTemplateProposal.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.ui.internal.contentassist;
-
-import org.eclipse.jface.text.IRegion;
-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 {
- // 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);
- }
-}
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 d23d28e620..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
+++ /dev/null
@@ -1,285 +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.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.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
- */
-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;
-
- /**
- * 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) {
- 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)
- fTranslationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- if (fTranslationAdapter != null) {
-
- JSPTranslation translation = fTranslationAdapter.getJSPTranslation();
- fJavaPosition = translation.getJavaOffset(getDocumentPosition());
-
- 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, 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 075eadc8d0..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java
+++ /dev/null
@@ -1,65 +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.contentassist;
-
-import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-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 {
-
- /*
- * 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) {
- super.apply(viewer, trigger, stateMask, offset);
- }
-
- 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;
- }
-}
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 5f7c5090e0..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
+++ /dev/null
@@ -1,1330 +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.contentassist;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-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.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.JSP20Namespace;
-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.HTMLElementDeclaration;
-import org.eclipse.wst.html.core.internal.contentmodel.JSPCMDocument;
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-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.StructuredTextViewer;
-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.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryAction;
-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.internal.ssemodelquery.ModelQueryAdapter;
-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.NonValidatingModelQueryAction;
-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.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
- *
- * @plannedfor 1.0
- */
-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;
- }
-
- String attributeName = null;
- if (nameRegion != null)
- attributeName = open.getText(nameRegion);
- String currentValue = null;
- if (attributeName != null)
- currentValue = node.getAttributes().getNamedItem(attributeName).getNodeValue();
-
- // on an empty value, add all the JSP and taglib tags
- if ((contentAssistRequest.getRegion().getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS && contentAssistRequest.getReplacementLength() == 0) || (contentAssistRequest.getRegion().getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE && (currentValue == null || currentValue.length() == 0))) {
- List rejectElements = new ArrayList();
- 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.DIRECTIVE_TAGLIB);
- rejectElements.add(JSP12Namespace.ElementName.FALLBACK);
- rejectElements.add(JSP12Namespace.ElementName.USEBEAN);
- rejectElements.add(JSP12Namespace.ElementName.SETPROPERTY);
- rejectElements.add(JSP12Namespace.ElementName.FORWARD);
- rejectElements.add(JSP12Namespace.ElementName.PLUGIN);
- rejectElements.add(JSP12Namespace.ElementName.FALLBACK);
- rejectElements.add(JSP12Namespace.ElementName.PARAMS);
-
- List additionalElements = getAdditionalChildren(new ArrayList(), node, -1);
- for (i = 0; i < additionalElements.size(); i++) {
- CMElementDeclaration ed = (CMElementDeclaration) additionalElements.get(i);
- if (rejectElements.contains(ed.getNodeName()))
- continue;
- String tagname = getContentGenerator().getRequiredName(node, ed);
- StringBuffer contents = new StringBuffer("\""); //$NON-NLS-1$
- getContentGenerator().generateTag(node, ed, contents);
- contents.append('"');
- 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$
- }
- }
-
-
- }
-
- private List getAdditionalChildren(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;
- }
-
- /**
- * 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 List getAvailableChildrenAtIndex(Element parent, int index, int validityChecking) {
- List list = new ArrayList();
- List additionalElements = getAdditionalChildren(new ArrayList(), parent, index);
- for (int i = 0; i < additionalElements.size(); i++) {
- ModelQueryAction insertAction = new NonValidatingModelQueryAction((CMElementDeclaration) additionalElements.get(i), ModelQueryAction.INSERT, 0, parent.getChildNodes().getLength(), null);
- list.add(insertAction);
- }
-
- // add allowed children of implicit tags that don't already exist
- NodeList children = parent.getChildNodes();
- List childNames = new ArrayList();
- if (children != null) {
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child.getNodeType() == Node.ELEMENT_NODE)
- childNames.add(child.getNodeName().toLowerCase());
- }
- }
- List allActions = new ArrayList();
- Iterator iterator = list.iterator();
- ModelQuery modelQuery = ModelQueryUtil.getModelQuery(parent.getOwnerDocument());
- while (iterator.hasNext()) {
- ModelQueryAction action = (ModelQueryAction) iterator.next();
- allActions.add(action);
- if (action.getCMNode() instanceof HTMLElementDeclaration) {
- HTMLElementDeclaration ed = (HTMLElementDeclaration) action.getCMNode();
- String ommission = (String) ed.getProperty(HTMLCMProperties.OMIT_TYPE);
- if (!childNames.contains(ed.getNodeName().toLowerCase()) && ((ommission != null) && (ommission.equals(HTMLCMProperties.Values.OMIT_BOTH)))) {
- List implicitValidActions = new ArrayList();
- modelQuery.getInsertActions(parent, ed, 0, ModelQuery.INCLUDE_CHILD_NODES, ModelQuery.VALIDITY_NONE, implicitValidActions);
- if (implicitValidActions != null) {
- Iterator implicitValidActionsIterator = implicitValidActions.iterator();
- while (implicitValidActionsIterator.hasNext()) {
- ModelQueryAction insertAction = new NonValidatingModelQueryAction(((ModelQueryAction) implicitValidActionsIterator.next()).getCMNode(), ModelQueryAction.INSERT, 0, parent.getChildNodes().getLength(), null);
- allActions.add(insertAction);
- }
- }
- }
- }
- }
- return allActions;
- }
-
- protected List getAvailableRootChildren(Document document, int childIndex) {
- List list = new ArrayList();
- if (!isXMLFormat(document))
- getAdditionalChildren(list, document, childIndex);
- return list;
- }
-
- 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((StructuredTextViewer) 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((StructuredTextViewer) 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((StructuredTextViewer) 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((StructuredTextViewer) 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);
- }
- if (useEmbeddedResults) {
- if (embeddedResults != null && embeddedResults.length > 0) {
- List results = new ArrayList();
- for (int i = 0; i < embeddedResults.length; i++)
- results.add(embeddedResults[i]);
- if (jspResults != null) {
- for (int i = 0; i < jspResults.length; i++)
- results.add(jspResults[i]);
- }
- jspResults = new ICompletionProposal[results.size()];
- Collections.sort(results, new ProposalComparator());
- for (int i = 0; i < results.size(); i++)
- jspResults[i] = (ICompletionProposal) results.get(i);
-
- }
- }
- 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;
- importProposal.setReplacementLength(newReplacementLength);
-
- int newCursorPosition = importProposal.getCursorPosition() - 1;
- importProposal.setCursorPosition(newCursorPosition);
-
- return importProposal;
- }
-
- /**
- * Adds 2 arrays of ICompletionProposals and sorts them with a
- * ProposalComparator.
- *
- * @param jspResults
- * @param htmlResults
- * @return
- */
- private ICompletionProposal[] merge(ICompletionProposal[] jspResults, ICompletionProposal[] htmlResults) {
- List results = new ArrayList();
- List jsps = Arrays.asList(jspResults);
- List htmls = Arrays.asList(htmlResults);
-
- results.addAll(jsps);
- results.addAll(htmls);
-
- Collections.sort(results, new ProposalComparator());
- 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(StructuredTextViewer viewer, int documentPosition) {
- String partitionType = null;
- try {
- partitionType = TextUtilities.getContentType(viewer.getDocument(), IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, viewer.modelOffset2WidgetOffset(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);
-
- super.addTagInsertionProposals(contentAssistRequest, childPosition);
- if (isInternalAdapter)
- useEmbeddedResults = false;
- }
-}
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 4664973fff..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
+++ /dev/null
@@ -1,304 +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.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.XMLContentModelGenerator;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * This class is a "null" version of AbstractContentAssistProcessor
- *
- * @plannedfor 1.0
- */
-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 0ef4b79b2b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProcessor.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.contentassist;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-
-public class JSPELCompletionProcessor extends JSPCompletionProcessor {
- protected JSPProposalCollector getProposalCollector(ICompilationUnit cu, JSPTranslation translation) {
- return new JSPELProposalCollector(cu, translation);
- }
-}
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 ad5ce00aa9..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELContentAssistProcessor.java
+++ /dev/null
@@ -1,149 +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.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;
-
-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 5aa3eb8894..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELProposalCollector.java
+++ /dev/null
@@ -1,92 +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.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() + 1;
-
- // replacement length
- int length = proposal.getReplaceEnd() - offset + 1;
-
- // 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/JSPJavaContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
deleted file mode 100644
index 1e4b3981fe..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
+++ /dev/null
@@ -1,305 +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 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
- */
-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/JSPPropertyContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java
deleted file mode 100644
index 007744d872..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java
+++ /dev/null
@@ -1,259 +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.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.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.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.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.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.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;
-
-/**
- * This class computes attribute value completion proposals for &lt;jsp:[gs]etProperty&gt; tags.
- * @plannedfor 1.0
- */
-public class JSPPropertyContentAssistProcessor extends JSPDummyContentAssistProcessor {
- public JSPPropertyContentAssistProcessor() {
- super();
- }
-
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
- // 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("'")) && contentAssistRequest.getMatchString().length() > 0) //$NON-NLS-1$ //$NON-NLS-2$
- 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);
- }
- }
- }
-
- private void addBeanPropertyProposals(ContentAssistRequest contentAssistRequest, IDOMNode node, boolean isGetProperty, String matchString) {
- // 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 != null && 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 (useBean.getAttribute(JSP11Namespace.ATTR_NAME_ID).equals(useBeanName)) {
- typeName = useBean.getAttribute(JSP11Namespace.ATTR_NAME_CLASS);
- if (typeName == null || typeName.length() < 1) {
- typeName = useBean.getAttribute(JSP11Namespace.ATTR_NAME_TYPE);
- }
- if (typeName == null || 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 = 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);
- }
- }
- }
- }
- }
- }
- }
-
- 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()) {
- id = StringUtils.strip(useBean.getAttribute(JSP11Namespace.ATTR_NAME_ID));
- displayString = null;
- classOrType = null;
- imageName = JSPEditorPluginImages.IMG_OBJ_CLASS_OBJ;
- // set the Image based on whether the class, type, or beanName attribute is present
- classOrType = useBean.getAttribute(JSP11Namespace.ATTR_NAME_CLASS);
- if (classOrType == null || classOrType.length() < 1) {
- classOrType = useBean.getAttribute(JSP11Namespace.ATTR_NAME_TYPE);
- imageName = JSPEditorPluginImages.IMG_OBJ_PUBLIC;
- }
- if (classOrType == null || classOrType.length() < 1) {
- 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);
- }
- }
- }
- }
- }
- }
-
- /**
- * Returns project request is in
- *
- * @param request
- * @return
- */
- private 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/JSPProposalCollector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java
deleted file mode 100644
index 61e9cebd6b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java
+++ /dev/null
@@ -1,219 +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.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.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.jst.jsp.core.internal.java.JSPTranslation;
-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;
-
- public JSPProposalCollector(ICompilationUnit cu, JSPTranslation translation) {
- super(cu);
-
- if(translation == null)
- throw new IllegalArgumentException("JSPTranslation cannot be null"); //$NON-NLS-1$
-
- fTranslation = translation;
- }
-
- /**
- * 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()) {
-
- if(proposal.getKind() == CompletionProposal.TYPE_REF) {
- String signature = String.valueOf(proposal.getDeclarationSignature());
- String completion = String.valueOf(proposal.getCompletion());
- if(completion.indexOf(signature) != -1) {
- jspProposal = createAutoImportProposal(proposal);
- }
- }
-
- // default behavior
- if(jspProposal == null)
- jspProposal = createJspProposal(proposal);
- }
- return jspProposal;
- }
-
-
-
- private JSPCompletionProposal createAutoImportProposal(CompletionProposal proposal) {
-
- JSPCompletionProposal jspProposal = null;
-
- String signature = new String(proposal.getDeclarationSignature());
- String completion = new String(proposal.getCompletion());
-
- // it's fully qualified so we should
- // add an import statement
- // create an autoimport proposal
- String newCompletion = completion.replaceAll(signature + ".", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- // 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, 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();
- 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;
- }
-
- /**
- * 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/JSPTaglibDirectiveContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibDirectiveContentAssistProcessor.java
deleted file mode 100644
index b2f7d0839c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibDirectiveContentAssistProcessor.java
+++ /dev/null
@@ -1,389 +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.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.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.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.w3c.dom.Node;
-
-/**
- * @plannedfor 1.0
- */
-public class JSPTaglibDirectiveContentAssistProcessor extends JSPDummyContentAssistProcessor {
-
- public JSPTaglibDirectiveContentAssistProcessor() {
- super();
- }
-
- 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 = "file:" + FacetModuleCoreSupport.resolve(file.getFullPath(), record.getDescriptor().getSmallIcon()); //$NON-NLS-1$
- }
- }
- 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;
- }
-
-
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- IPath basePath = getBasePath(contentAssistRequest);
- if (basePath == null)
- return;
-
- IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
- // 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 : {
- IPath path = ((ITLDRecord) taglibRecord).getPath();
- IPath localContextRoot = FacetModuleCoreSupport.computeWebContentRootPath(basePath);
- if (localContextRoot.isPrefixOf(path)) {
- uri = IPath.SEPARATOR + path.removeFirstSegments(localContextRoot.segmentCount()).toString();
- uriToRecords.put(uri, taglibRecord);
- }
- 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.getDescription() + "<br/>" + descriptor.getTlibVersion();
- 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, 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();
- 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();
- IPath localContextRoot = TaglibIndex.getContextRoot(basePath);
- 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();
- 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, 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 (descriptor != null && descriptor.getURI() != null && descriptor.getURI().toLowerCase(Locale.US).equals(uri.toLowerCase(Locale.US))) {
- 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, 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, image, shortName, null, descriptor.getDescription(), IRelevanceConstants.R_NONE);
- contentAssistRequest.addProposal(proposal);
- }
- else {
- if (dir.startsWith("/WEB-INF/")) {
- dir = dir.substring(9);
- }
- String prefix = StringUtils.replace(dir, "/", "-");
-
- Image image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
- CustomCompletionProposal proposal = new CustomCompletionProposal("\"" + prefix + "\"", start, length, prefix.length() + 2, image, prefix, null, null, IRelevanceConstants.R_NONE);
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * 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/JSPTemplateCompletionProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
deleted file mode 100644
index 753a206574..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, 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.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;
-
-/**
- * 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) {
- // just return the same image for now
- return JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_JSP);
- }
-
- 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/JSPUseBeanContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java
deleted file mode 100644
index 120986d363..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java
+++ /dev/null
@@ -1,173 +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.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.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-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.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;
-
-/**
- * @plannedfor 1.0
- */
-public class JSPUseBeanContentAssistProcessor extends JSPDummyContentAssistProcessor {
-
- public JSPUseBeanContentAssistProcessor() {
- super();
- }
-
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
-
- IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
- // 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 = 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 = 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 = 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);
- }
- }
- }
- }
- }
- }
-
- /**
- * Returns project request is in
- *
- * @param request
- * @return
- */
- private 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/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/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 1f4e9d13bf..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java
+++ /dev/null
@@ -1,104 +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.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;
-
-/**
- * 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)
- */
-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
- buffer = new TemplateBuffer(prefix + buffer.getString(), buffer.getVariables());
- }
- }
- }
- 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 bb61592e35..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/JSPFContentSettingsPropertyPage.java
+++ /dev/null
@@ -1,254 +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
- * 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.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.Combo;
-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.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 class ButtonListener extends SelectionAdapter {
- public void widgetSelected(SelectionEvent e) {
- boolean specific = fSpecificSetting.getSelection();
- updateButtons(specific);
- }
- }
-
- private Combo fLanguageCombo;
- private Combo fContentTypeCombo;
- private Button fValidateFragments;
- Button fSpecificSetting;
- private SelectionListener fSpecificListener;
-
- 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);
-
- // create separator
- Label label = new Label(propertyPage, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = 2;
- data.verticalSpan = 8;
- label.setLayoutData(data);
-
- // specific setting
- fSpecificSetting = new Button(propertyPage, SWT.CHECK | SWT.LEFT);
- fSpecificSetting.setText(JSPUIMessages.JSPFContentSettingsPropertyPage_4);
- data = new GridData(GridData.FILL, GridData.FILL, true, false);
- data.horizontalSpan = 2;
- fSpecificSetting.setLayoutData(data);
-
- fSpecificListener = new ButtonListener();
- fSpecificSetting.addSelectionListener(fSpecificListener);
-
- // validate file
- fValidateFragments = new Button(propertyPage, SWT.CHECK | SWT.LEFT);
- fValidateFragments.setText(JSPUIMessages.JSPFilesPreferencePage_1);
- data = new GridData(GridData.FILL, GridData.FILL, true, false);
- data.horizontalSpan = 2;
- data.horizontalIndent = 5;
- fValidateFragments.setLayoutData(data);
-
- initializeValues();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(propertyPage, IHelpContextIds.JSP_FRAGMENT_HELPID);
- Dialog.applyDialogFont(parent);
- return propertyPage;
- }
-
- void updateButtons(boolean enabled) {
- fSpecificSetting.setSelection(enabled);
- fValidateFragments.setEnabled(enabled);
- }
-
- /**
- * 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);
-
- String validate = JSPFContentProperties.getProperty(JSPFContentProperties.VALIDATE_FRAGMENTS, getResource(), false);
- String validate2 = JSPFContentProperties.getProperty(JSPFContentProperties.VALIDATE_FRAGMENTS, getResource(), true);
- if (validate == null || validate.length() == 0) {
- updateButtons(false);
- fValidateFragments.setSelection(Boolean.valueOf(validate2).booleanValue());
- }
- else {
- updateButtons(true);
- fValidateFragments.setSelection(Boolean.valueOf(validate).booleanValue());
- }
- }
-
- 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);
-
- updateButtons(false);
- fValidateFragments.setSelection(true);
-
- 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);
-
- String validate = null;
- if (fSpecificSetting.getSelection()) {
- validate = Boolean.toString(fValidateFragments.getSelection());
- }
- JSPFContentProperties.setProperty(JSPFContentProperties.VALIDATE_FRAGMENTS, getResource(), validate);
- }
- 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/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 ec15d5c1e3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.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.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);
- String langValue = pageDirective.getAttribute(JSP11Namespace.ATTR_NAME_LANGUAGE);
- // last one to declare a language wins
- if (langValue != null)
- language = langValue;
- }
- }
- }
- // 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 309b910297..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/format/FormattingStrategyJSPJava.java
+++ /dev/null
@@ -1,110 +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.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();
- TextEdit textEdit = formatString(CodeFormatter.K_COMPILATION_UNIT, cuSource, 0, 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);
- }
- }
- }
-
- /*
- * @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 c3467da564..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/handlers/JSPFindOccurrencesHandler.java
+++ /dev/null
@@ -1,38 +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.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);
-// temporary, workaround to disable function, since using the function
-// can easily cause deadlock to occur.
-// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=103662
-// 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/ExternalFileEditorInput.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileEditorInput.java
deleted file mode 100644
index 4b50266650..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileEditorInput.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.hyperlink;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPathEditorInput;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.editors.text.ILocationProvider;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * EditorInput for external files. Copied from
- * org.eclipse.ui.internal.editors.text.JavaFileEditorInput
- */
-class ExternalFileEditorInput implements IEditorInput, ILocationProvider {
- // 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
-
- /**
- * The workbench adapter which simply provides the label.
- *
- * @see Eclipse 3.1
- */
- private class WorkbenchAdapter implements IWorkbenchAdapter {
- /*
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- return null;
- }
-
- /*
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
-
- /*
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return ((ExternalFileEditorInput) o).getName();
- }
-
- /*
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- return null;
- }
- }
-
- private File fFile;
- private WorkbenchAdapter fWorkbenchAdapter = new WorkbenchAdapter();
-
- public ExternalFileEditorInput(File file) {
- super();
- fFile = file;
- fWorkbenchAdapter = new WorkbenchAdapter();
- }
-
- /*
- * @see org.eclipse.ui.IEditorInput#exists()
- */
- public boolean exists() {
- return fFile.exists();
- }
-
- /*
- * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- /*
- * @see org.eclipse.ui.IEditorInput#getName()
- */
- public String getName() {
- return fFile.getName();
- }
-
- /*
- * @see org.eclipse.ui.IEditorInput#getPersistable()
- */
- public IPersistableElement getPersistable() {
- return null;
- }
-
- /*
- * @see org.eclipse.ui.IEditorInput#getToolTipText()
- */
- public String getToolTipText() {
- return fFile.getAbsolutePath();
- }
-
- /*
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (ILocationProvider.class.equals(adapter))
- return this;
- if (IWorkbenchAdapter.class.equals(adapter))
- return fWorkbenchAdapter;
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- /*
- * @see org.eclipse.ui.editors.text.ILocationProvider#getPath(java.lang.Object)
- */
- public IPath getPath(Object element) {
- if (element instanceof ExternalFileEditorInput) {
- ExternalFileEditorInput input = (ExternalFileEditorInput) element;
- return Path.fromOSString(input.fFile.getAbsolutePath());
- }
- return null;
- }
-
- /*
- * @see org.eclipse.ui.IPathEditorInput#getPath()
- * @since 3.1
- */
- public IPath getPath() {
- return Path.fromOSString(fFile.getAbsolutePath());
- }
-
- /*
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object o) {
- if (o == this)
- return true;
-
- if (o instanceof ExternalFileEditorInput) {
- ExternalFileEditorInput input = (ExternalFileEditorInput) o;
- return fFile.equals(input.fFile);
- }
-
- if (o instanceof IPathEditorInput) {
- IPathEditorInput input= (IPathEditorInput)o;
- return getPath().equals(input.getPath());
- }
-
- return false;
- }
-
- /*
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return fFile.hashCode();
- }
-}
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 a85757e5a3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileHyperlink.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.hyperlink;
-
-import java.io.File;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-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 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 fHyperlinkFile.getAbsolutePath();
- }
-
- public String getHyperlinkText() {
- return fHyperlinkFile.getName();
- }
-
- public void open() {
- if (fHyperlinkFile != null) {
- IEditorInput input = new ExternalFileEditorInput(fHyperlinkFile);
- IEditorDescriptor descriptor;
- try {
- descriptor = IDE.getEditorDescriptor(input.getName(), true);
- 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/JSPJavaHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlink.java
deleted file mode 100644
index 38d81b0b2e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlink.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.hyperlink;
-
-import org.eclipse.jdt.core.IJavaElement;
-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.Logger;
-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 fElement.getPath().toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- return fElement.getElementName();
- }
-
- /*
- * (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 846dee2b30..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java
+++ /dev/null
@@ -1,256 +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.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...
- 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();
- }
- // 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();
- }
- // 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();
- }
- }
-
- 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) {
- 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 9b059c4627..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TLDFileHyperlink.java
+++ /dev/null
@@ -1,124 +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.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-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 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 a3aa679a32..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
+++ /dev/null
@@ -1,454 +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.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) {
- // check if jsp taglib directive
- Node currentNode = getCurrentNode(doc, 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);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- 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);// ||
- // (startOffset2
- // <=
- // startOffset1
- // &&
- // startOffset1
- // <=
- // endOffset2)
- // ||
- // (startOffset2
- // <=
- // endOffset2
- // &&
- // endOffset2
- // <=
- // endOffset2);
- }
-
- 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));
- }
- 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);
- }
- 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;
- }
-
- /**
- * Returns the node the cursor is currently on in the document. null if no
- * node is selected
- *
- * @param offset
- * @return Node either element, doctype, text, or null
- */
- private Node getCurrentNode(IDocument document, int offset) {
- // get the current node at the offset (returns either: element,
- // doctype, text)
- IndexedRegion inode = null;
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (sModel != null) {
- inode = sModel.getIndexedRegion(offset);
- if (inode == null) {
- inode = sModel.getIndexedRegion(offset - 1);
- }
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
-
- 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 30394470c8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarHyperlink.java
+++ /dev/null
@@ -1,112 +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.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 fZipFilePath.toString();
- }
-
- 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 8333586803..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarUriHyperlink.java
+++ /dev/null
@@ -1,85 +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;
-
-/**
- * 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() {
- if (fTaglibRecord != null) {
- switch (fTaglibRecord.getRecordType()) {
- case (ITaglibRecord.JAR) : {
- IJarRecord record = (IJarRecord) fTaglibRecord;
- return record.getLocation().toString();
- }
- case (ITaglibRecord.URL) : {
- IURLRecord record = (IURLRecord) fTaglibRecord;
- return record.getBaseLocation();
- }
- }
- }
- return null;
- }
-
- 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 fac4bd80dd..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileHyperlink.java
+++ /dev/null
@@ -1,173 +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.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-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;
-
-/**
- * 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 = 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;
-
- 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() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- return 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 115ebed1a6..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileRegionHyperlink.java
+++ /dev/null
@@ -1,217 +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.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-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() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- return 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();
- 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 6b8ceb8fda..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/WorkspaceFileHyperlink.java
+++ /dev/null
@@ -1,78 +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.Logger;
-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() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- return fFile.getFullPath().toString();
- }
-
- 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/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 fbeae08f0f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java
+++ /dev/null
@@ -1,372 +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.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-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.Document;
-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.DocumentChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-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.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;
-
-/**
- * Creates document change(s) for an IJavaElement rename.
- * Changes are created for every type "match" in the workspace
- * @author pavery
- */
-public class BasicRefactorSearchRequestor extends SearchRequestor {
-
- /**
- * Workspace operation to perform save on model for updated documents.
- * Should only be done on models not open in an editor.
- */
- private 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
- }
- }
- }
- }
- // end inner class SaveJspFileOp
-
- /**
- * Change class that wraps a text edit on the jsp document
- */
- private class RenameChange extends DocumentChange {
-
- private TextEdit fEdit = null;
- private IFile fJSPFile = null;
- private IDocument fJSPDoc = null;
- private String fDescription = JSPUIMessages.BasicRefactorSearchRequestor_0;
-
- public RenameChange(IFile jspFile, IDocument jspDoc, TextEdit edit, String description) {
- super(JSPUIMessages.BasicRefactorSearchRequestor_6, jspDoc);
- this.fEdit = edit;
- this.fJSPFile = jspFile;
- this.fJSPDoc = jspDoc;
- this.fDescription = description;
- }
-
- public RefactoringStatus isValid(IProgressMonitor pm)throws CoreException {
- return new RefactoringStatus();
- }
-
- public IDocument getPreviewDocument(IProgressMonitor pm) throws CoreException {
- IDocument copyDoc = new Document(fJSPDoc.get());
- try {
- fEdit.apply(copyDoc);
- }
- catch (MalformedTreeException e) {
- // ignore
- }
- catch (BadLocationException e) {
- // ignore
- }
- return copyDoc;
- }
-
- public Change perform(IProgressMonitor pm) throws CoreException {
- RenameChange undoChange = null;
- try {
-
- if(!isOpenInEditor(this.fJSPDoc)) {
- // apply edit to JSP doc AND save model
- undoChange = new RenameChange(this.fJSPFile, this.fJSPDoc, this.fEdit.apply(fJSPDoc), this.fDescription);
- saveFile(this.fJSPFile, this.fJSPDoc);
- }
- else {
- // just apply edit to JSP document
- undoChange = new RenameChange(this.fJSPFile, this.fJSPDoc, this.fEdit.apply(fJSPDoc), this.fDescription);
- }
-
- } catch (MalformedTreeException e) {
- Logger.logException(e);
- } catch (BadLocationException e) {
- Logger.logException(e);
- }
- return undoChange;
- }
-
- /**
- * Performed in an operation since it modifies resources in the workspace
- * @param jspDoc
- * @throws CoreException
- */
- private void saveFile(IFile jspFile, IDocument jspDoc) {
-
- SaveJspFileOp op = new SaveJspFileOp(jspFile, jspDoc);
-
- try {
- op.run(JSPSearchSupport.getInstance().getProgressMonitor());
- } catch (InvocationTargetException e) {
- Logger.logException(e);
- } catch (InterruptedException e) {
- Logger.logException(e);
- }
- }
-
- /**
- * Checks if a document is open in an editor
- * @param jspDoc
- * @return
- */
- private boolean isOpenInEditor(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(true);
- // 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 true;
- }
- }
- }
- }
- }
- return false;
- }
-
- public String getName() {
- return this.fDescription;
- }
-
- public Object getModifiedElement() {
- return getElement();
- }
- }
- // end inner class RenameChange
-
-
- /** 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);
-
- // add it for the correct document
- addJavaEdit(searchDoc.getPath(), new ReplaceEdit(javaMatch.getOffset(), javaMatch.getLength(), renameText));
- }
- }
-
- /**
- * @param searchDoc
- * @return
- */
- 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);
- }
- }
-
- /**
- *
- * @return all JSP changes for the search matches for the given Type
- */
- 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()]);
- }
-
- 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 RenameChange(searchDoc.getFile(), doc, edit, description);
- }
-
- // 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/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 eea4cac8c3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java
+++ /dev/null
@@ -1,67 +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.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;
-
-/**
- * @author pavery
- */
-public class JSPMethodRenameChange extends Change {
-
- 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 0e23beff8f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java
+++ /dev/null
@@ -1,74 +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.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.JavaModelException;
-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.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-
-/**
- * @author pavery
- */
-public class JSPMethodRenameParticipant extends RenameParticipant {
-
- private IMethod fMethod = null;
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- if(element instanceof IMethod) {
- this.fMethod = (IMethod) element;
- return true;
- }
- return false;
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- public String getName() {
- String name = ""; //$NON-NLS-1$
- if(this.fMethod != null) {
- try {
- name = this.fMethod.getSource();
- } catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- return name;
- }
- /* (non-Javadoc)
- * @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) {
- // TODO Auto-generated method stub
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change createChange(IProgressMonitor pm) throws CoreException {
- Change[] changes = JSPMethodRenameChange.createChangesFor(this.fMethod, getArguments().getNewName());
- CompositeChange multiChange = null;
- if(changes.length > 0)
- multiChange = new CompositeChange(JSPUIMessages.JSP_changes, changes); //$NON-NLS-1$
- return multiChange;
- }
-}
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/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 c6b9d03462..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java
+++ /dev/null
@@ -1,68 +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.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;
-
-/**
- * @author pavery
- */
-public class JSPPackageRenameChange extends Change {
-
- 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 6aed5ecf90..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java
+++ /dev/null
@@ -1,74 +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.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
-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.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-
-/**
- * Remember to change the plugin.xml file if the name of this class changes.
- *
- * @author pavery
- */
-public class JSPPackageRenameParticipant extends RenameParticipant {
-
- private IPackageFragment fPkg = null;
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- if(element instanceof IPackageFragment) {
- this.fPkg = (IPackageFragment) element;
- return true;
- }
- return false;
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- public String getName() {
- String name = ""; //$NON-NLS-1$
- if(this.fPkg != null) {
- name = this.fPkg.getElementName();
- }
- return name;
- }
-
- /**
- * @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) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change createChange(IProgressMonitor pm) throws CoreException {
- Change[] changes = JSPPackageRenameChange.createChangesFor(this.fPkg, getArguments().getNewName());
- CompositeChange multiChange = null;
- if(changes.length > 0)
- multiChange = new CompositeChange(JSPUIMessages.JSP_changes, changes); //$NON-NLS-1$
- return multiChange;
- }
-
-
-}
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/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/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 0448544eea..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java
+++ /dev/null
@@ -1,66 +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.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;
-
-/**
- * @author pavery
- */
-public class JSPTypeMoveChange extends Change {
-
- 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 312efe3e68..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.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.java.refactoring;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-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.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.MoveParticipant;
-
-/**
- * @author pavery
- */
-public class JSPTypeMoveParticipant extends MoveParticipant {
-
- IType fType = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
-
- if(element instanceof IType) {
- this.fType = (IType)element;
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- public String getName() {
-
- String name = ""; //$NON-NLS-1$
- if(this.fType != null)
- name = this.fType.getElementName();
- return name;
- }
-
- /* (non-Javadoc)
- * @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) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change createChange(IProgressMonitor pm) throws CoreException {
-
- if(pm != null && pm.isCanceled())
- return null;
-
- CompositeChange multiChange = null;
- Object dest = getArguments().getDestination();
-
- if(dest instanceof IPackageFragment) {
- Change[] changes = JSPTypeMoveChange.createChangesFor(fType, ((IPackageFragment)dest).getElementName());
- if(changes.length > 0)
- multiChange = new CompositeChange(JSPUIMessages.JSP_changes, changes); //$NON-NLS-1$
- }
- return multiChange;
- }
-
-
-}
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 4953031ba3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java
+++ /dev/null
@@ -1,60 +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.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);
- }
-
- 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$
- }
- 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 e59baf5b49..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.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 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;
-
-
-/**
- * @author pavery
- */
-public class JSPTypeRenameChange extends Change {
-
- 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 2332069899..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java
+++ /dev/null
@@ -1,80 +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.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-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.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-
-/**
- * Remember to change the plugin.xml file if the name of this class changes.
- *
- * @author pavery
- */
-public class JSPTypeRenameParticipant extends RenameParticipant {
-
- private IType fType = null;
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- if(element instanceof IType) {
- this.fType = (IType) element;
- return true;
- }
- return false;
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- public String getName() {
- String name = ""; //$NON-NLS-1$
- if(this.fType != null) {
- try {
- name = this.fType.getSource();
- } catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- return name;
- }
-
- /**
- * @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) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change createChange(IProgressMonitor pm) throws CoreException {
- Change[] changes = JSPTypeRenameChange.createChangesFor(fType, getArguments().getNewName());
- CompositeChange multiChange = null;
- if(changes.length > 0)
- multiChange = new CompositeChange(JSPUIMessages.JSP_changes, changes); //$NON-NLS-1$
- return multiChange;
- }
-
-
-}
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 cff180cd57..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.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.ui.internal.java.refactoring;
-
-import java.text.MessageFormat;
-
-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();
- 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
- if(trans.isImport(javaMatch.getOffset()) || /*trans.isUseBean(javaMatch.getOffset()) ||*/ isFullyQualified(matchText)) {
- if(!pkg.equals("")) //$NON-NLS-1$
- renameText = pkg + "." + 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 7d054c27df..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/RenameElementHandler.java
+++ /dev/null
@@ -1,78 +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;
-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.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;
- }
- 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 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/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 2eaeec0af6..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesActionDelegate.java
+++ /dev/null
@@ -1,40 +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);
-// temporary, workaround to disable function, since using the function
-// can easily cause deadlock to occur.
-// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=103662
-// 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 1de8c3dd27..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesProcessor.java
+++ /dev/null
@@ -1,82 +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.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.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 {
-
- 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 f1d4f8e4db..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 ((JSPSearchQuery)getQuery()).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 af8ca1127a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java
+++ /dev/null
@@ -1,117 +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.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.osgi.util.NLS;
-import org.eclipse.search.ui.ISearchResult;
-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);
- this.fElement = element;
- }
-
- public IJavaElement getJavaElement() {
- return this.fElement;
- }
-
- // for access by inner class
- public JSPSearchQuery getInstance() {
- return this;
- }
-
- protected IStatus doQuery() {
-
- clearMatches();
-
- 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()));
- }
- 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[] args = {getSearchText(), getOccurrencesCountText(), getFilename()};
- return NLS.bind(JSPUIMessages.OccurrencesSearchQuery_0, args);
- }
-
- private String getFilename() {
- String filename = JSPUIMessages.OccurrencesSearchQuery_2;
- if(getFile() != null)
- filename = getFile().getName();
- return filename;
- }
-
- private String getOccurrencesCountText() {
- String count = ""; //$NON-NLS-1$
- // pa_TODO make dynamic
- return count;
- }
-
- protected String getSearchText() {
- return fElement.getElementName();
- }
-
- public boolean canRerun() {
-
- return false;
- }
-
- /**
- * @see org.eclipse.search.ui.ISearchQuery#canRunInBackground()
- */
- public boolean canRunInBackground() {
- return true;
- }
-
- /**
- * @see org.eclipse.search.ui.ISearchQuery#getSearchResult()
- */
- public ISearchResult getSearchResult() {
-
- return new JSPOccurrencesSearchResult(this);
- }
-
-}
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 c257ee9ceb..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPQueryParticipant.java
+++ /dev/null
@@ -1,98 +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.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.java.search.JSPSearchRequestor;
-
-/**
- * @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 {
-
- //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);
-
- }
- 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);
- }
- }
-
- /**
- * @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();
- }
-
-}
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 b0e9b10c10..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceInitializer.java
+++ /dev/null
@@ -1,78 +0,0 @@
-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.jface.text.templates.Template;
-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 differnt language)
- */
- String templateName = ""; //$NON-NLS-1$
- Template template = JSPUIPlugin.getDefault().getTemplateStore().findTemplateById("org.eclipse.jst.jsp.ui.templates.jsphtml"); //$NON-NLS-1$
- if (template != null)
- templateName = template.getName();
- store.setDefault(JSPUIPreferenceNames.NEW_FILE_TEMPLATE_NAME, templateName);
-
- store.setDefault(JSPUIPreferenceNames.TYPING_COMPLETE_EL_BRACES, true);
- store.setDefault(JSPUIPreferenceNames.TYPING_COMPLETE_SCRIPTLETS, 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 fb67d1a70f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceNames.java
+++ /dev/null
@@ -1,83 +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;
-
-/**
- * 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 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$
-}
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 25b9311dd3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractPropertyPreferencePage.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * 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.core.internal.tasks.TaskTagPreferenceKeys;
-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); //$NON-NLS-1$//$NON-NLS-2$
- 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 " + TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT + " (" + 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 " + TaskTagPreferenceKeys.TASK_TAG_PER_PROJECT + " from scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- 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/AbstractValidationSettingsPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractValidationSettingsPage.java
deleted file mode 100644
index 616486775c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractValidationSettingsPage.java
+++ /dev/null
@@ -1,422 +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 java.util.ArrayList;
-import java.util.Iterator;
-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.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-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.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-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.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.forms.events.ExpansionAdapter;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ScrolledPageContent;
-import org.eclipse.wst.validation.ValidationFramework;
-import org.osgi.service.prefs.BackingStoreException;
-
-/**
- * Based on org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock
- */
-abstract class AbstractValidationSettingsPage extends AbstractPropertyPreferencePage {
-
- private List fCombos;
- private List fExpandables;
-
- private SelectionListener fSelectionListener;
-
- private IPreferencesService fPreferencesService = null;
-
- private static final String SETTINGS_EXPANDED = "expanded"; //$NON-NLS-1$
-
- private ValidationFramework fValidation;
-
- private class ComboData {
- private String fKey;
- private int[] fSeverities;
- private int fIndex;
- int originalSeverity = -2;
-
- public ComboData(String key, int[] severities, int index) {
- fKey = key;
- fSeverities = severities;
- fIndex = index;
- }
-
- public String getKey() {
- return fKey;
- }
-
- public void setIndex(int index) {
- fIndex = index;
- }
-
- public int getIndex() {
- return fIndex;
- }
-
- /**
- * Sets the severity index based on <code>severity</code>.
- * If the severity doesn't exist, the index is set to -1.
- *
- * @param severity the severity level
- */
- public void setSeverity(int severity) {
- for (int i = 0; fSeverities != null && i < fSeverities.length; i++) {
- if (fSeverities[i] == severity) {
- setIndex(i);
- return;
- }
- }
-
- setIndex(-1);
- }
-
- public int getSeverity() {
- return (fIndex >= 0 && fSeverities != null && fIndex < fSeverities.length) ? fSeverities[fIndex] : -1;
- }
-
- boolean isChanged() {
- return fSeverities[fIndex] != originalSeverity;
- }
- }
-
- public AbstractValidationSettingsPage() {
- super();
- fCombos = new ArrayList();
- fExpandables = new ArrayList();
- fPreferencesService = Platform.getPreferencesService();
- fValidation = ValidationFramework.getDefault();
- }
-
- /**
- * Creates a Combo widget in the composite <code>parent</code>. The data
- * in the Combo is associated with <code>key</code>. The Combo data is
- * generated based on the integer <code>values</code> where the index
- * of <code>values</code> corresponds to the index of <code>valueLabels</code>
- *
- * @param parent the composite to create the combo box in
- * @param label the label to give the combo box
- * @param key the unique key to identify the combo box
- * @param values the values represented by the combo options
- * @param valueLabels the calues displayed in the combo box
- * @param indent how far to indent the combo box label
- *
- * @return the generated combo box
- */
- protected Combo addComboBox(Composite parent, String label, String key, int[] values, String[] valueLabels, int indent) {
- GridData gd = new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1);
- gd.horizontalIndent = indent;
-
- Label labelControl = new Label(parent, SWT.LEFT);
- labelControl.setFont(JFaceResources.getDialogFont());
- labelControl.setText(label);
- labelControl.setLayoutData(gd);
-
- Combo comboBox = newComboControl(parent, key, values, valueLabels);
- comboBox.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- return comboBox;
- }
-
- /**
- * Creates a combo box and associates the combo data with the
- * combo box.
- *
- * @param composite the composite to create the combo box in
- * @param key the unique key to identify the combo box
- * @param values the values represented by the combo options
- * @param valueLabels the values displayed in the combo box
- *
- * @return the generated combo box
- */
- protected Combo newComboControl(Composite composite, String key, int[] values, String[] valueLabels) {
- ComboData data = new ComboData(key, values, -1);
-
- Combo comboBox = new Combo(composite, SWT.READ_ONLY);
- comboBox.setItems(valueLabels);
- comboBox.setData(data);
- comboBox.addSelectionListener(getSelectionListener());
- comboBox.setFont(JFaceResources.getDialogFont());
-
- makeScrollableCompositeAware(comboBox);
-
- int severity = -1;
- if (key != null)
- severity = fPreferencesService.getInt(getPreferenceNodeQualifier(), key, ValidationMessage.WARNING, createPreferenceScopes());
-
- if (severity == ValidationMessage.ERROR || severity == ValidationMessage.WARNING || severity == ValidationMessage.IGNORE) {
- data.setSeverity(severity);
- data.originalSeverity = severity;
- }
-
- if (data.getIndex() >= 0)
- comboBox.select(data.getIndex());
-
- fCombos.add(comboBox);
- return comboBox;
- }
-
- protected SelectionListener getSelectionListener() {
- if (fSelectionListener == null) {
- fSelectionListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
-
- public void widgetSelected(SelectionEvent e) {
- controlChanged(e.widget);
- }
- };
- }
- return fSelectionListener;
- }
-
- protected void controlChanged(Widget widget) {
- ComboData data = (ComboData) widget.getData();
- if (widget instanceof Combo) {
- data.setIndex(((Combo) widget).getSelectionIndex());
- }
- else {
- return;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractSettingsPage#storeValues()
- */
- protected void storeValues() {
- if (fCombos == null || fCombos.size() == 0)
- return;
-
- Iterator it = fCombos.iterator();
-
- IScopeContext[] contexts = createPreferenceScopes();
-
- while (it.hasNext()) {
- ComboData data = (ComboData) ((Combo) it.next()).getData();
- if (data.getKey() != null) {
- contexts[0].getNode(getPreferenceNodeQualifier()).putInt(data.getKey(), data.getSeverity());
- }
- }
-
- for (int i = 0; i < contexts.length; i++) {
- try {
- contexts[i].getNode(getPreferenceNodeQualifier()).flush();
- }
- catch (BackingStoreException e) {
-
- }
- }
- }
-
- protected ExpandableComposite getParentExpandableComposite(Control control) {
- Control parent = control.getParent();
- while (!(parent instanceof ExpandableComposite) && parent != null) {
- parent = parent.getParent();
- }
- if (parent instanceof ExpandableComposite) {
- return (ExpandableComposite) parent;
- }
- return null;
- }
-
- protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
- ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
- excomposite.setText(label);
- excomposite.setExpanded(false);
- excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
- excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
- excomposite.addExpansionListener(new ExpansionAdapter() {
- public void expansionStateChanged(ExpansionEvent e) {
- expandedStateChanged((ExpandableComposite) e.getSource());
- }
- });
- fExpandables.add(excomposite);
- makeScrollableCompositeAware(excomposite);
- return excomposite;
- }
-
- protected Composite createStyleSectionWithContentComposite(Composite parent, String label, int nColumns) {
- ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
- excomposite.setText(label);
- excomposite.setExpanded(false);
- excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
- excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
- excomposite.addExpansionListener(new ExpansionAdapter() {
- public void expansionStateChanged(ExpansionEvent e) {
- expandedStateChanged((ExpandableComposite) e.getSource());
- }
- });
- fExpandables.add(excomposite);
- makeScrollableCompositeAware(excomposite);
-
- Composite inner = new Composite(excomposite, SWT.NONE);
- inner.setFont(excomposite.getFont());
- inner.setLayout(new GridLayout(nColumns, false));
- excomposite.setClient(inner);
- return inner;
- }
-
- protected final void expandedStateChanged(ExpandableComposite expandable) {
- ScrolledPageContent parentScrolledComposite = getParentScrolledComposite(expandable);
- if (parentScrolledComposite != null) {
- parentScrolledComposite.reflow(true);
- }
- }
-
- private void makeScrollableCompositeAware(Control control) {
- ScrolledPageContent parentScrolledComposite = getParentScrolledComposite(control);
- if (parentScrolledComposite != null) {
- parentScrolledComposite.adaptChild(control);
- }
- }
-
- protected ScrolledPageContent getParentScrolledComposite(Control control) {
- Control parent = control.getParent();
- while (!(parent instanceof ScrolledPageContent) && parent != null) {
- parent = parent.getParent();
- }
- if (parent instanceof ScrolledPageContent) {
- return (ScrolledPageContent) parent;
- }
- return null;
- }
-
- protected void storeSectionExpansionStates(IDialogSettings section) {
- for (int i = 0; i < fExpandables.size(); i++) {
- ExpandableComposite comp = (ExpandableComposite) fExpandables.get(i);
- section.put(SETTINGS_EXPANDED + String.valueOf(i), comp.isExpanded());
- }
- }
-
- protected void restoreSectionExpansionStates(IDialogSettings settings) {
- for (int i= 0; i < fExpandables.size(); i++) {
- ExpandableComposite excomposite= (ExpandableComposite) fExpandables.get(i);
- if (settings == null) {
- excomposite.setExpanded(i == 0); // only expand the first node by default
- } else {
- excomposite.setExpanded(settings.getBoolean(SETTINGS_EXPANDED + String.valueOf(i)));
- }
- }
- }
-
- protected void resetSeverities() {
- IEclipsePreferences defaultContext = new DefaultScope().getNode(getPreferenceNodeQualifier());
- for (int i = 0; i < fCombos.size(); i++) {
- ComboData data = (ComboData) ((Combo) fCombos.get(i)).getData();
- int severity = defaultContext.getInt(data.getKey(), ValidationMessage.WARNING);
- data.setSeverity(severity);
- ((Combo) fCombos.get(i)).select(data.getIndex());
- }
- }
-
- protected boolean shouldRevalidateOnSettingsChange() {
- Iterator it = fCombos.iterator();
-
- while (it.hasNext()) {
- ComboData data = (ComboData) ((Combo) it.next()).getData();
- if (data.isChanged())
- return true;
- }
- return false;
- }
-
- public boolean performOk() {
- if(super.performOk() && shouldRevalidateOnSettingsChange()) {
- MessageBox mb = new MessageBox(this.getShell(), SWT.APPLICATION_MODAL | SWT.YES | SWT.NO | SWT.CANCEL | SWT.ICON_INFORMATION | SWT.RIGHT);
- mb.setText(HTMLUIMessages.Validation_Title);
- /* Choose which message to use based on if its project or workspace settings */
- String msg = (getProject() == null) ? HTMLUIMessages.Validation_Workspace : HTMLUIMessages.Validation_Project;
- mb.setMessage(msg);
- switch(mb.open()) {
- case SWT.CANCEL:
- return false;
- case SWT.YES:
- ValidateJob job = new ValidateJob(HTMLUIMessages.Validation_jobName);
- job.schedule();
- case SWT.NO:
- default:
- return true;
- }
- }
- return true;
- }
-
- /**
- * Performs validation after validation preferences have been modified.
- */
- private class ValidateJob extends Job {
-
- public ValidateJob(String name) {
- super(name);
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- try {
- IProject[] projects = null;
- /* Changed preferences for a single project, only validate it */
- if (getProject() != null)
- projects = new IProject[]{getProject()};
- /* Workspace-wide preferences changed */
- else {
- /* Get all of the projects in the workspace */
- projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- IEclipsePreferences prefs = null;
- List projectList = new ArrayList();
-
- /* Filter out projects that use project-specific settings or have been closed */
- for (int i = 0; i < projects.length; i++) {
- prefs = new ProjectScope(projects[i]).getNode(getPreferenceNodeQualifier());
- if (projects[i].isAccessible() && !prefs.getBoolean(getProjectSettingsKey(), false))
- projectList.add(projects[i]);
- }
- projects = (IProject[]) projectList.toArray(new IProject[projectList.size()]);
- }
- fValidation.validate(projects, true, false, monitor);
- }
- catch (CoreException ce) {
- status = Status.CANCEL_STATUS;
- }
-
- return status;
- }
-
- }
-
-}
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/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 f8abc65e7d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java
+++ /dev/null
@@ -1,80 +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.JSPUIPlugin;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.html.ui.internal.preferences.ui.HTMLFilesPreferencePage;
-
-public class JSPFilesPreferencePage extends HTMLFilesPreferencePage {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.html.ui.preferences.ui.HTMLFilesPreferencePage#createContentsForLoadingGroup(org.eclipse.swt.widgets.Composite)
- */
- protected void createContentsForLoadingGroup(Composite parent) {
- // no loading preferences
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected void doSavePreferenceStore() {
- JSPCorePlugin.getDefault().savePluginPreferences(); // model
- }
-
- protected IContentType getContentType() {
- return Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- }
-
- protected Preferences getModelPreferences() {
- return JSPCorePlugin.getDefault().getPluginPreferences();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.html.ui.preferences.ui.HTMLFilesPreferencePage#initializeValuesForLoadingGroup()
- */
- protected void initializeValuesForLoadingGroup() {
- // no loading preferences
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.html.ui.preferences.ui.HTMLFilesPreferencePage#performDefaultsForLoadingGroup()
- */
- protected void performDefaultsForLoadingGroup() {
- // no loading preferences
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.html.ui.preferences.ui.HTMLFilesPreferencePage#storeValuesForLoadingGroup()
- */
- protected void storeValuesForLoadingGroup() {
- // no loading preferences
- }
-}
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 d7d8138bb8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSyntaxColoringPage.java
+++ /dev/null
@@ -1,854 +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.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.preference.PreferencePage;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.TextAttribute;
-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.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 PreferencePage 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;
-
-
- // 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);
-
- 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);
-
- 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:"
- SourceViewer viewer = new SourceViewer(sampleArea, null, SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY);
- fText = viewer.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());
- viewer.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;
- }
-
- 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_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_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_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 9d637a9d27..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);
- ((StructuredTextViewer) 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 9db2d84197..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTypingPreferencePage.java
+++ /dev/null
@@ -1,91 +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;
-
- protected Control createContents(Composite parent) {
- Composite composite = super.createComposite(parent, 1);
-
- createAutoComplete(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;
-
- fCloseScriptlets = createCheckBox(group, JSPUIMessages.JSPTyping_Complete_Scriptlets);
- ((GridData) fCloseScriptlets.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);
- }
-
- protected void performDefaults() {
- defaultCheckbox(fCloseBraces, JSPUIPreferenceNames.TYPING_COMPLETE_EL_BRACES);
- defaultCheckbox(fCloseScriptlets, JSPUIPreferenceNames.TYPING_COMPLETE_SCRIPTLETS);
- }
-
- private void initCheckbox(Button box, String key) {
- if(box != null && key != null)
- box.setSelection(getPreferenceStore().getBoolean(key));
- }
-
- private void defaultCheckbox(Button box, String key) {
- if(box != null && key != null)
- box.setSelection(getPreferenceStore().getDefaultBoolean(key));
- }
-
- 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);
- }
-
- 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 5181724be2..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPValidationPreferencePage.java
+++ /dev/null
@@ -1,280 +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 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.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.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.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.ScrolledPageContent;
-import org.eclipse.wst.sse.ui.internal.util.PixelConverter;
-
-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";
- // 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";
- // 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_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_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 {
- Map data = new HashMap();
- data.put(DATA_NO_LINK, Boolean.TRUE);
- 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);
- // 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();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractSettingsPage#performOk()
- */
- public boolean performOk() {
- boolean result = super.performOk();
- storeValues();
- return result;
- }
-
- 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/projection/ProjectionAnnotationModelChanges.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionAnnotationModelChanges.java
deleted file mode 100644
index f1a58f1ef2..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionAnnotationModelChanges.java
+++ /dev/null
@@ -1,54 +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.projection;
-
-import java.util.Map;
-
-import org.eclipse.jface.text.source.Annotation;
-import org.w3c.dom.Node;
-
-/**
- * Contains a set of projection model additions/deletions/modifications
- */
-class ProjectionAnnotationModelChanges {
- // copies of this class located in:
- // org.eclipse.wst.xml.ui.internal.projection
- // org.eclipse.wst.css.ui.internal.projection
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
- private Node fNode;
- private Annotation[] fDeletions;
- private Map fAdditions;
- private Annotation[] fModifications;
-
- public ProjectionAnnotationModelChanges(Node node, Annotation[] deletions, Map additions, Annotation[] modifications) {
- fNode = node;
- fDeletions = deletions;
- fAdditions = additions;
- fModifications = modifications;
- }
-
- public Map getAdditions() {
- return fAdditions;
- }
-
- public Annotation[] getDeletions() {
- return fDeletions;
- }
-
- public Annotation[] getModifications() {
- return fModifications;
- }
-
- public Node getNode() {
- return fNode;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java
deleted file mode 100644
index d632a8996e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java
+++ /dev/null
@@ -1,205 +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
- * Tom Turrell-Croft, left@ultrasis.com - [174307] Enable folding for div tags in JSP and HTML files
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.internal.projection;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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.w3c.dom.Node;
-
-public class ProjectionModelNodeAdapterFactoryHTML extends AbstractAdapterFactory {
- // copies of this class located in:
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
-
- /**
- * List of projection viewers currently associated with this projection
- * model node adapter factory.
- */
- private HashMap fProjectionViewers;
-
- public ProjectionModelNodeAdapterFactoryHTML(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
- public ProjectionModelNodeAdapterFactoryHTML(Object adapterKey) {
- super(adapterKey);
- }
-
- public ProjectionModelNodeAdapterFactoryHTML() {
- this(ProjectionModelNodeAdapterHTML.class);
- }
-
- /**
- * Actually creates an adapter for the parent of target if target is the
- * "adapt-able" node
- */
- protected INodeAdapter createAdapter(INodeNotifier target) {
- if ((isActive()) && (target instanceof Node) && ((Node) target).getNodeType() == Node.ELEMENT_NODE) {
- Node node = (Node) target;
- if (isNodeProjectable(node)) {
-
- // actually work with the parent node to listen for add,
- // delete events
- Node parent = node.getParentNode();
- if (parent instanceof INodeNotifier) {
- INodeNotifier parentNotifier = (INodeNotifier) parent;
- ProjectionModelNodeAdapterHTML parentAdapter = (ProjectionModelNodeAdapterHTML) parentNotifier.getExistingAdapter(ProjectionModelNodeAdapterHTML.class);
- if (parentAdapter == null) {
- // create a new adapter for parent
- parentAdapter = new ProjectionModelNodeAdapterHTML(this);
- parentNotifier.addAdapter(parentAdapter);
- }
- // call update on parent because a new node has just been
- // added
- parentAdapter.updateAdapter(parent);
- }
- }
- }
-
- return null;
- }
-
- /**
- * Returns true if node is a node type able to fold
- *
- * @param node
- * @return boolean true if node is projectable, false otherwise
- */
- boolean isNodeProjectable(Node node) {
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- String tagName = node.getNodeName();
- // node is only projectable if it is head, body, script, style,
- // table, ul, ol and div tags
- if (HTML40Namespace.ElementName.HEAD.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.BODY.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.SCRIPT.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.STYLE.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.TABLE.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.UL.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.OL.equalsIgnoreCase(tagName) || HTML40Namespace.ElementName.DIV.equalsIgnoreCase(tagName))
- return true;
- }
- return false;
- }
-
- /**
- * Return true if this factory is currently actively managing projection
- *
- * @return
- */
- boolean isActive() {
- return (fProjectionViewers != null && !fProjectionViewers.isEmpty());
- }
-
- /**
- * Updates projection annotation model if document is not in flux.
- * Otherwise, queues up the changes to be applied when document is ready.
- *
- * @param node
- * @param deletions
- * @param additions
- * @param modifications
- */
- void queueAnnotationModelChanges(Node node, Annotation[] deletions, Map additions, Annotation[] modifications) {
- queueAnnotationModelChanges(node, deletions, additions, modifications, null);
- }
-
- /**
- * Updates projection annotation model for a specific projection viewer if
- * document is not in flux. Otherwise, queues up the changes to be applied
- * when document is ready.
- *
- * @param node
- * @param deletions
- * @param additions
- * @param modifications
- * @param viewer
- */
- void queueAnnotationModelChanges(Node node, Annotation[] deletions, Map additions, Annotation[] modifications, ProjectionViewer viewer) {
- // create a change object for latest change and add to queue
- ProjectionAnnotationModelChanges newChange = new ProjectionAnnotationModelChanges(node, deletions, additions, modifications);
- if (fProjectionViewers != null) {
- if (viewer != null) {
- ProjectionViewerInformation info = (ProjectionViewerInformation) fProjectionViewers.get(viewer);
- if (info != null) {
- info.queueAnnotationModelChanges(newChange);
- }
- }
- else {
- Iterator infos = fProjectionViewers.values().iterator();
- while (infos.hasNext()) {
- ProjectionViewerInformation info = (ProjectionViewerInformation) infos.next();
- info.queueAnnotationModelChanges(newChange);
- }
- }
- }
- }
-
- public void release() {
- // go through every projectionviewer and call
- // removeProjectionViewer(viewer);
- if (fProjectionViewers != null) {
- Iterator infos = fProjectionViewers.values().iterator();
- while (infos.hasNext()) {
- ProjectionViewerInformation info = (ProjectionViewerInformation) infos.next();
- info.dispose();
- infos.remove();
- }
- fProjectionViewers = null;
- }
- super.release();
- }
-
- /**
- * Adds viewer to list of projection viewers this factory is associated
- * with
- *
- * @param viewer -
- * assumes viewer's document and projection annotation model
- * are not null
- */
- void addProjectionViewer(ProjectionViewer viewer) {
- // remove old entry if it exists
- removeProjectionViewer(viewer);
-
- if (fProjectionViewers == null) {
- fProjectionViewers = new HashMap();
- }
-
- // create new object containing projection viewer and its info
- ProjectionViewerInformation info = new ProjectionViewerInformation(viewer);
- fProjectionViewers.put(viewer, info);
- info.initialize();
- }
-
- /**
- * Removes the given viewer from the list of projection viewers this
- * factor is associated with
- *
- * @param viewer
- */
- void removeProjectionViewer(ProjectionViewer viewer) {
- if (fProjectionViewers != null) {
- // remove entry from list of viewers
- ProjectionViewerInformation info = (ProjectionViewerInformation) fProjectionViewers.remove(viewer);
- if (info != null) {
- info.dispose();
- }
- // if removing last projection viewer, clear out everything
- if (fProjectionViewers.isEmpty()) {
- fProjectionViewers = null;
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryJSP.java
deleted file mode 100644
index 322f89a449..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryJSP.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.ui.internal.projection;
-
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.w3c.dom.Node;
-
-public class ProjectionModelNodeAdapterFactoryJSP extends ProjectionModelNodeAdapterFactoryHTML {
- public ProjectionModelNodeAdapterFactoryJSP() {
- this(ProjectionModelNodeAdapterJSP.class);
- }
-
- public ProjectionModelNodeAdapterFactoryJSP(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
- public ProjectionModelNodeAdapterFactoryJSP(Object adapterKey) {
- super(adapterKey);
- }
-
- /**
- * Actually creates an adapter for the parent of target if target is the
- * "adapt-able" node
- */
- protected INodeAdapter createAdapter(INodeNotifier target) {
- if ((isActive()) && (target instanceof Node) && ((Node) target).getNodeType() == Node.ELEMENT_NODE) {
- Node node = (Node) target;
- if (isNodeProjectable(node)) {
-
- // actually work with the parent node to listen for add,
- // delete events
- Node parent = node.getParentNode();
- if (parent instanceof INodeNotifier) {
- INodeNotifier parentNotifier = (INodeNotifier) parent;
- ProjectionModelNodeAdapterJSP parentAdapter = (ProjectionModelNodeAdapterJSP) parentNotifier.getExistingAdapter(ProjectionModelNodeAdapterJSP.class);
- if (parentAdapter == null) {
- // create a new adapter for parent
- parentAdapter = new ProjectionModelNodeAdapterJSP(this);
- parentNotifier.addAdapter(parentAdapter);
- }
- // call update on parent because a new node has just been
- // added
- parentAdapter.updateAdapter(parent);
- }
- }
- }
-
- return null;
- }
-
- /**
- * Returns true if node is a node type able to fold
- *
- * @param node
- * @return boolean true if node is projectable, false otherwise
- */
- boolean isNodeProjectable(Node node) {
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- String tagName = node.getNodeName();
- // node is only projectable if it is jsp scriptlet tag
- if (JSP11Namespace.ElementName.SCRIPTLET.equalsIgnoreCase(tagName))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterHTML.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterHTML.java
deleted file mode 100644
index 8cf43ad284..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterHTML.java
+++ /dev/null
@@ -1,291 +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.projection;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.w3c.dom.Node;
-
-/**
- * Updates projection annotation model with projection annotations for this
- * adapter node's children
- */
-public class ProjectionModelNodeAdapterHTML implements INodeAdapter {
- // copies of this class located in:
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
- private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.html.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private class TagProjectionAnnotation extends ProjectionAnnotation {
- private boolean fIsVisible = false; /* workaround for BUG85874 */
- private Node fNode;
-
- public TagProjectionAnnotation(Node node, boolean isCollapsed) {
- super(isCollapsed);
- fNode = node;
- }
-
- public Node getNode() {
- return fNode;
- }
-
- public void setNode(Node node) {
- fNode = node;
- }
-
- /**
- * Does not paint hidden annotations. Annotations are hidden when they
- * only span one line.
- *
- * @see ProjectionAnnotation#paint(org.eclipse.swt.graphics.GC,
- * org.eclipse.swt.widgets.Canvas,
- * org.eclipse.swt.graphics.Rectangle)
- */
- public void paint(GC gc, Canvas canvas, Rectangle rectangle) {
- /* workaround for BUG85874 */
- /*
- * only need to check annotations that are expanded because hidden
- * annotations should never have been given the chance to
- * collapse.
- */
- if (!isCollapsed()) {
- // working with rectangle, so line height
- FontMetrics metrics = gc.getFontMetrics();
- if (metrics != null) {
- // do not draw annotations that only span one line and
- // mark them as not visible
- if ((rectangle.height / metrics.getHeight()) <= 1) {
- fIsVisible = false;
- return;
- }
- }
- }
- fIsVisible = true;
- super.paint(gc, canvas, rectangle);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.projection.ProjectionAnnotation#markCollapsed()
- */
- public void markCollapsed() {
- /* workaround for BUG85874 */
- // do not mark collapsed if annotation is not visible
- if (fIsVisible)
- super.markCollapsed();
- }
- }
-
- // copies of this class located in:
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
-
- ProjectionModelNodeAdapterFactoryHTML fAdapterFactory;
- private Map fTagAnnotations = new HashMap();
-
- public ProjectionModelNodeAdapterHTML(ProjectionModelNodeAdapterFactoryHTML factory) {
- fAdapterFactory = factory;
- }
-
- /**
- * Create a projection position from the given node. Able to get
- * projection position if node isNodeProjectable.
- *
- * @param node
- * @return null if no projection position possible, a Position otherwise
- */
- private Position createProjectionPosition(Node node) {
- Position pos = null;
- if (fAdapterFactory.isNodeProjectable(node) && node instanceof IndexedRegion) {
- // IDocument document =
- // fAdapterFactory.getProjectionViewer().getDocument();
- // if (document != null) {
- IndexedRegion inode = (IndexedRegion) node;
- int start = inode.getStartOffset();
- int end = inode.getEndOffset();
- if (start >= 0 && start < end) {
- // region-based
- // extra line when collapsed, but no region
- // increase when add newline
- pos = new Position(start, end - start);
- // try {
- // // line-based
- // // extra line when collapsed, but no region
- // // increase when add newline
- // IRegion startLineRegion =
- // document.getLineInformationOfOffset(start);
- // IRegion endLineRegion =
- // document.getLineInformationOfOffset(end);
- // int startOffset = startLineRegion.getOffset();
- // int endOffset = endLineRegion.getOffset() +
- // endLineRegion.getLength();
- // if (endOffset > startOffset) {
- // pos = new Position(startOffset, endOffset -
- // startOffset);
- // }
- //
- // // line-based
- // // no extra line when collapsed, but region increase
- // // when add newline
- // int startLine = document.getLineOfOffset(start);
- // int endLine = document.getLineOfOffset(end);
- // if (endLine + 1 < document.getNumberOfLines()) {
- // int offset = document.getLineOffset(startLine);
- // int endOffset = document.getLineOffset(endLine + 1);
- // pos = new Position(offset, endOffset - offset);
- // }
- // }
- // catch (BadLocationException x) {
- // Logger.log(Logger.WARNING_DEBUG, null, x);
- // }
- }
- }
- // }
- return pos;
- }
-
- /**
- * Find TagProjectionAnnotation for node in the current list of projection
- * annotations for this adapter
- *
- * @param node
- * @return TagProjectionAnnotation
- */
- private TagProjectionAnnotation getExistingAnnotation(Node node) {
- TagProjectionAnnotation anno = null;
-
- if ((node != null) && (!fTagAnnotations.isEmpty())) {
- Iterator it = fTagAnnotations.keySet().iterator();
- while (it.hasNext() && anno == null) {
- TagProjectionAnnotation a = (TagProjectionAnnotation) it.next();
- Node n = a.getNode();
- if (node.equals(n)) {
- anno = a;
- }
- }
- }
- return anno;
- }
-
- public boolean isAdapterForType(Object type) {
- return type == ProjectionModelNodeAdapterHTML.class;
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- // check if folding is even enabled, if not, just ignore notifyChanged
- // events
- if (!fAdapterFactory.isActive()) {
- return;
- }
-
- if ((eventType == INodeNotifier.STRUCTURE_CHANGED) && (notifier instanceof Node)) {
- updateAdapter((Node) notifier);
- }
- }
-
- /**
- * Update the projection annotation of all the nodes that are children of
- * node
- *
- * @param node
- */
- void updateAdapter(Node node) {
- updateAdapter(node, null);
- }
-
- /**
- * Update the projection annotation of all the nodes that are children of
- * node and adds all projection annotations to viewer (for newly added
- * viewers)
- *
- * @param node
- * @param viewer
- */
- void updateAdapter(Node node, ProjectionViewer viewer) {
- long start = System.currentTimeMillis();
-
- Map additions = new HashMap();
- Map projectionAnnotations = new HashMap();
-
- // go through immediate child nodes and figure out projection
- // model annotations
- if (node != null) {
- Node childNode = node.getFirstChild();
- while (childNode != null) {
- Position newPos = createProjectionPosition(childNode);
- if (newPos != null) {
- TagProjectionAnnotation newAnnotation = new TagProjectionAnnotation(childNode, false);
- TagProjectionAnnotation existing = getExistingAnnotation(childNode);
- if (existing == null) {
- // add to map containing all annotations for this
- // adapter
- projectionAnnotations.put(newAnnotation, newPos);
- // add to map containing annotations to add
- additions.put(newAnnotation, newPos);
- }
- else {
- // add to map containing all annotations for this
- // adapter
- projectionAnnotations.put(existing, newPos);
- // remove from map containing annotations to delete
- fTagAnnotations.remove(existing);
- }
- }
- childNode = childNode.getNextSibling();
- }
-
- // in the end, want to delete anything leftover in old list, add
- // everything in additions, and update everything in
- // projectionAnnotations
- ProjectionAnnotation[] oldList = null;
- if (!fTagAnnotations.isEmpty()) {
- oldList = (ProjectionAnnotation[]) fTagAnnotations.keySet().toArray(new ProjectionAnnotation[0]);
- }
- ProjectionAnnotation[] modifyList = null;
- if (!projectionAnnotations.isEmpty()) {
- modifyList = (ProjectionAnnotation[]) projectionAnnotations.keySet().toArray(new ProjectionAnnotation[0]);
- }
-
- // specifically add all annotations to viewer
- if (viewer != null && !projectionAnnotations.isEmpty()) {
- fAdapterFactory.queueAnnotationModelChanges(node, null, projectionAnnotations, null, viewer);
- }
-
- // only update when there is something to update
- if ((oldList != null && oldList.length > 0) || (!additions.isEmpty()) || (modifyList != null && modifyList.length > 0))
- fAdapterFactory.queueAnnotationModelChanges(node, oldList, additions, modifyList);
- }
-
- // save new list of annotations
- fTagAnnotations = projectionAnnotations;
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- String nodeName = node != null ? node.getNodeName() : "null"; //$NON-NLS-1$
- System.out.println("ProjectionModelNodeAdapterHTML.updateAdapter (" + nodeName + "):" + (end - start)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterJSP.java
deleted file mode 100644
index a195368688..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterJSP.java
+++ /dev/null
@@ -1,26 +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.projection;
-
-/**
- * Updates projection annotation model with projection annotations for this
- * adapter node's children
- */
-public class ProjectionModelNodeAdapterJSP extends ProjectionModelNodeAdapterHTML {
- public ProjectionModelNodeAdapterJSP(ProjectionModelNodeAdapterFactoryJSP factory) {
- super(factory);
- }
-
- public boolean isAdapterForType(Object type) {
- return type == ProjectionModelNodeAdapterJSP.class;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionViewerInformation.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionViewerInformation.java
deleted file mode 100644
index 5f84d1cc2e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionViewerInformation.java
+++ /dev/null
@@ -1,196 +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.projection;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentExtension;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-
-/**
- * Contains information about a projection viewer and also manages updating
- * the viewer's projection annotation model
- */
-class ProjectionViewerInformation {
- // copies of this class located in:
- // org.eclipse.wst.xml.ui.internal.projection
- // org.eclipse.wst.css.ui.internal.projection
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
-
- /**
- * Listens to document to be aware of when to update the projection
- * annotation model.
- */
- private class DocumentListener implements IDocumentListener {
- private ProjectionViewerInformation fInfo;
-
- public DocumentListener(ProjectionViewerInformation info) {
- fInfo = info;
- }
-
- public void documentAboutToBeChanged(DocumentEvent event) {
- IDocument document = event.getDocument();
- if (fInfo.getDocument() == document) {
- fInfo.setIsDocumentChanging(true);
- }
- }
-
- public void documentChanged(DocumentEvent event) {
- // register a post notification replace so that projection
- // annotation model will be updated after all documentChanged
- // listeners have been notified
- IDocument document = event.getDocument();
- if (document instanceof IDocumentExtension && fInfo.getDocument() == document) {
- if (fInfo.hasChangesQueued())
- ((IDocumentExtension) document).registerPostNotificationReplace(this, new PostDocumentChangedListener(fInfo));
- }
- }
- }
-
- /**
- * Essentially a post document changed listener because it is called after
- * documentchanged has been fired.
- */
- private class PostDocumentChangedListener implements IDocumentExtension.IReplace {
- private ProjectionViewerInformation fInfo;
-
- public PostDocumentChangedListener(ProjectionViewerInformation info) {
- fInfo = info;
- }
-
- public void perform(IDocument document, IDocumentListener owner) {
- fInfo.applyAnnotationModelChanges();
- fInfo.setIsDocumentChanging(false);
- }
- }
-
- /**
- * Projection annotation model current associated with this projection
- * viewer
- */
- private ProjectionAnnotationModel fProjectionAnnotationModel;
- /**
- * Document currently associated with this projection viewer
- */
- private IDocument fDocument;
- /**
- * Listener to fProjectionViewer's document
- */
- private IDocumentListener fDocumentListener;
- /**
- * Indicates whether or not document is in the middle of changing
- */
- private boolean fIsDocumentChanging = false;
- /**
- * List of projection annotation model changes that need to be applied
- */
- private List fQueuedAnnotationChanges;
-
- public ProjectionViewerInformation(ProjectionViewer viewer) {
- fDocument = viewer.getDocument();
- fProjectionAnnotationModel = viewer.getProjectionAnnotationModel();
- }
-
- IDocument getDocument() {
- return fDocument;
- }
-
- private List getQueuedAnnotationChanges() {
- if (fQueuedAnnotationChanges == null) {
- fQueuedAnnotationChanges = new ArrayList();
- }
- return fQueuedAnnotationChanges;
- }
-
- void setIsDocumentChanging(boolean changing) {
- fIsDocumentChanging = changing;
- }
-
- private boolean isDocumentChanging() {
- return fIsDocumentChanging;
- }
-
- /**
- * Applies the pending projection annotation model changes to the
- * projection annotation model.
- */
- void applyAnnotationModelChanges() {
- List queuedChanges = getQueuedAnnotationChanges();
- // go through all the pending annotation changes and apply
- // them to
- // the projection annotation model
- while (!queuedChanges.isEmpty()) {
- ProjectionAnnotationModelChanges changes = (ProjectionAnnotationModelChanges) queuedChanges.remove(0);
- try {
- fProjectionAnnotationModel.modifyAnnotations(changes.getDeletions(), changes.getAdditions(), changes.getModifications());
- }
- catch (Exception e) {
- // if anything goes wrong, log it be continue
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
-
- /**
- * Returns true if there are annotation changes queued up, false otherwise
- *
- * @return boolean
- */
- boolean hasChangesQueued() {
- return !getQueuedAnnotationChanges().isEmpty();
- }
-
- /**
- * Updates projection annotation model if document is not in flux.
- * Otherwise, queues up the changes to be applied when document is ready.
- */
- public void queueAnnotationModelChanges(ProjectionAnnotationModelChanges newChange) {
- /*
- * future_TODO: maybe improve by checking if annotation projection
- * model change already exists for node. if so, throw out old change.
- */
- getQueuedAnnotationChanges().add(newChange);
-
- // if document isn't changing, go ahead and apply it
- if (!isDocumentChanging()) {
- applyAnnotationModelChanges();
- }
- }
-
- public void initialize() {
- // add document listener
- if (fDocumentListener == null) {
- fDocumentListener = new DocumentListener(this);
- }
- getDocument().addDocumentListener(fDocumentListener);
- }
-
- public void dispose() {
- // remove document listener
- if (fDocumentListener != null) {
- getDocument().removeDocumentListener(fDocumentListener);
- }
-
- // clear out list of queued changes since it may no longer
- // be accurate
- if (fQueuedAnnotationChanges != null) {
- fQueuedAnnotationChanges.clear();
- fQueuedAnnotationChanges = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java
deleted file mode 100644
index d4208c3ac3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java
+++ /dev/null
@@ -1,423 +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.ui.internal.projection;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextInputListener;
-import org.eclipse.jface.text.source.projection.IProjectionListener;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
-import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-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.ui.internal.projection.IStructuredTextFoldingProvider;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * Updates the projection model of a structured model for JSP.
- */
-public class StructuredTextFoldingProviderJSP implements IStructuredTextFoldingProvider, IProjectionListener, ITextInputListener {
- private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private IDocument fDocument;
- private ProjectionViewer fViewer;
- private boolean fProjectionNeedsToBeEnabled = false;
- /**
- * Maximum number of child nodes to add adapters to (limit for performance
- * sake)
- */
- private final int MAX_CHILDREN = 10;
- /**
- * Maximum number of sibling nodes to add adapters to (limit for
- * performance sake)
- */
- private final int MAX_SIBLINGS = 1000;
-
- /**
- * Adds an adapter to node and its children
- *
- * @param node
- * @param childLevel
- */
- private void addAdapterToNodeAndChildren(Node node, int childLevel) {
- // stop adding initial adapters MAX_CHILDREN levels deep for
- // performance sake
- if (node instanceof INodeNotifier && childLevel < MAX_CHILDREN) {
- INodeNotifier notifier = (INodeNotifier) node;
-
- // try and get the adapter for the current node and update the
- // adapter with projection information
- ProjectionModelNodeAdapterJSP adapter = (ProjectionModelNodeAdapterJSP) notifier.getExistingAdapter(ProjectionModelNodeAdapterJSP.class);
- if (adapter != null) {
- adapter.updateAdapter(node, fViewer);
- }
- else {
- // just call getadapter so the adapter is created and
- // automatically initialized
- notifier.getAdapterFor(ProjectionModelNodeAdapterJSP.class);
- }
- ProjectionModelNodeAdapterHTML adapter2 = (ProjectionModelNodeAdapterHTML) notifier.getExistingAdapter(ProjectionModelNodeAdapterHTML.class);
- if (adapter2 != null) {
- adapter2.updateAdapter(node);
- }
- else {
- // just call getadapter so the adapter is created and
- // automatically initialized
- notifier.getAdapterFor(ProjectionModelNodeAdapterHTML.class);
- }
- int siblingLevel = 0;
- Node nextChild = node.getFirstChild();
- while (nextChild != null && siblingLevel < MAX_SIBLINGS) {
- Node childNode = nextChild;
- nextChild = childNode.getNextSibling();
-
- addAdapterToNodeAndChildren(childNode, childLevel + 1);
- ++siblingLevel;
- }
- }
- }
-
- /**
- * Goes through every node and adds an adapter onto each for tracking
- * purposes
- */
- private void addAllAdapters() {
- long start = System.currentTimeMillis();
-
- if (fDocument != null) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (sModel != null) {
- int startOffset = 0;
- IndexedRegion startNode = sModel.getIndexedRegion(startOffset);
- if (startNode instanceof Node) {
- int siblingLevel = 0;
- Node nextSibling = (Node) startNode;
- while (nextSibling != null && siblingLevel < MAX_SIBLINGS) {
- Node currentNode = nextSibling;
- nextSibling = currentNode.getNextSibling();
-
- addAdapterToNodeAndChildren(currentNode, 0);
- ++siblingLevel;
- }
- }
- }
- }
- finally {
- if (sModel != null) {
- sModel.releaseFromRead();
- }
- }
- }
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderJSP.addAllAdapters: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- /**
- * Get the ProjectionModelNodeAdapterFactoryHTML to use with this
- * provider.
- *
- * @return ProjectionModelNodeAdapterFactoryHTML
- */
- private ProjectionModelNodeAdapterFactoryHTML getAdapterFactoryHTML(boolean createIfNeeded) {
- long start = System.currentTimeMillis();
-
- ProjectionModelNodeAdapterFactoryHTML factory = null;
- if (fDocument != null) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (sModel != null) {
- FactoryRegistry factoryRegistry = sModel.getFactoryRegistry();
-
- // getting the projectionmodelnodeadapter for the first
- // time
- // so do some initializing
- if (!factoryRegistry.contains(ProjectionModelNodeAdapterHTML.class) && createIfNeeded) {
- ProjectionModelNodeAdapterFactoryHTML newFactory = new ProjectionModelNodeAdapterFactoryHTML();
-
- // add factory to factory registry
- factoryRegistry.addFactory(newFactory);
-
- // add factory to propogating adapter
- IDOMModel domModel = (IDOMModel) sModel;
- Document document = domModel.getDocument();
- PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
- if (propagatingAdapter != null) {
- propagatingAdapter.addAdaptOnCreateFactory(newFactory);
- }
- }
-
- // try and get the factory
- factory = (ProjectionModelNodeAdapterFactoryHTML) factoryRegistry.getFactoryFor(ProjectionModelNodeAdapterHTML.class);
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderJSP.getAdapterFactoryHTML: " + (end - start)); //$NON-NLS-1$
- }
- return factory;
- }
-
- /**
- * Get the ProjectionModelNodeAdapterFactoryJSP to use with this provider.
- *
- * @return ProjectionModelNodeAdapterFactoryJSP
- */
- private ProjectionModelNodeAdapterFactoryJSP getAdapterFactoryJSP(boolean createIfNeeded) {
- long start = System.currentTimeMillis();
-
- ProjectionModelNodeAdapterFactoryJSP factory = null;
- if (fDocument != null) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (sModel != null) {
- FactoryRegistry factoryRegistry = sModel.getFactoryRegistry();
-
- // getting the projectionmodelnodeadapter for the first
- // time
- // so do some initializing
- if (!factoryRegistry.contains(ProjectionModelNodeAdapterJSP.class) && createIfNeeded) {
- ProjectionModelNodeAdapterFactoryJSP newFactory = new ProjectionModelNodeAdapterFactoryJSP();
-
- // add factory to factory registry
- factoryRegistry.addFactory(newFactory);
-
- // add factory to propogating adapter
- IDOMModel domModel = (IDOMModel) sModel;
- Document document = domModel.getDocument();
- PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
- if (propagatingAdapter != null) {
- propagatingAdapter.addAdaptOnCreateFactory(newFactory);
- }
- }
-
- // try and get the factory
- factory = (ProjectionModelNodeAdapterFactoryJSP) factoryRegistry.getFactoryFor(ProjectionModelNodeAdapterJSP.class);
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderJSP.getAdapterFactoryJSP: " + (end - start)); //$NON-NLS-1$
- }
- return factory;
- }
-
- /**
- * Initialize this provider with the correct document. Assumes projection
- * is enabled. (otherwise, only install would have been called)
- */
- public void initialize() {
- if (!isInstalled())
- return;
-
- long start = System.currentTimeMillis();
- // clear out old info
- projectionDisabled();
-
- fDocument = fViewer.getDocument();
-
- // set projection viewer on new document's adapter factory
- if (fViewer.getProjectionAnnotationModel() != null) {
- ProjectionModelNodeAdapterFactoryJSP factory = getAdapterFactoryJSP(true);
- if (factory != null) {
- factory.addProjectionViewer(fViewer);
- }
- ProjectionModelNodeAdapterFactoryHTML factory2 = getAdapterFactoryHTML(true);
- if (factory2 != null) {
- factory2.addProjectionViewer(fViewer);
- }
-
- try {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=198304
- // disable redraw while adding all adapters
- fViewer.setRedraw(false);
- addAllAdapters();
- }
- finally {
- fViewer.setRedraw(true);
- }
- }
- fProjectionNeedsToBeEnabled = false;
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderJSP.initialize: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- /**
- * Associate a ProjectionViewer with this IStructuredTextFoldingProvider
- *
- * @param viewer -
- * assumes not null
- */
- public void install(ProjectionViewer viewer) {
- // uninstall before trying to install new viewer
- if (isInstalled()) {
- uninstall();
- }
- fViewer = viewer;
- fViewer.addProjectionListener(this);
- fViewer.addTextInputListener(this);
- }
-
- private boolean isInstalled() {
- return fViewer != null;
- }
-
- public void projectionDisabled() {
- ProjectionModelNodeAdapterFactoryJSP factory = getAdapterFactoryJSP(false);
- if (factory != null) {
- factory.removeProjectionViewer(fViewer);
- }
- ProjectionModelNodeAdapterFactoryHTML factory2 = getAdapterFactoryHTML(false);
- if (factory2 != null) {
- factory2.removeProjectionViewer(fViewer);
- }
-
- // clear out all annotations
- if (fViewer.getProjectionAnnotationModel() != null)
- fViewer.getProjectionAnnotationModel().removeAllAnnotations();
-
- removeAllAdapters();
-
- fDocument = null;
- fProjectionNeedsToBeEnabled = false;
- }
-
- public void projectionEnabled() {
- initialize();
- }
-
- /**
- * Removes an adapter from node and its children
- *
- * @param node
- * @param level
- */
- private void removeAdapterFromNodeAndChildren(Node node, int level) {
- if (node instanceof INodeNotifier) {
- INodeNotifier notifier = (INodeNotifier) node;
-
- // try and get the adapter for the current node and remove it
- INodeAdapter adapter = notifier.getExistingAdapter(ProjectionModelNodeAdapterJSP.class);
- if (adapter != null) {
- notifier.removeAdapter(adapter);
- }
-
- INodeAdapter adapter2 = notifier.getExistingAdapter(ProjectionModelNodeAdapterHTML.class);
- if (adapter2 != null) {
- notifier.removeAdapter(adapter2);
- }
-
- Node nextChild = node.getFirstChild();
- while (nextChild != null) {
- Node childNode = nextChild;
- nextChild = childNode.getNextSibling();
-
- removeAdapterFromNodeAndChildren(childNode, level + 1);
- }
- }
- }
-
- /**
- * Goes through every node and removes adapter from each for cleanup
- * purposes
- */
- private void removeAllAdapters() {
- long start = System.currentTimeMillis();
-
- if (fDocument != null) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (sModel != null) {
- int startOffset = 0;
- IndexedRegion startNode = sModel.getIndexedRegion(startOffset);
- if (startNode instanceof Node) {
- Node nextSibling = (Node) startNode;
- while (nextSibling != null) {
- Node currentNode = nextSibling;
- nextSibling = currentNode.getNextSibling();
-
- removeAdapterFromNodeAndChildren(currentNode, 0);
- }
- }
- }
- }
- finally {
- if (sModel != null) {
- sModel.releaseFromRead();
- }
- }
- }
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderJSP.addAllAdapters: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
- // if folding is enabled and new document is going to be a totally
- // different document, disable projection
- if (fDocument != null && fDocument != newInput) {
- // disable projection and disconnect everything
- projectionDisabled();
- fProjectionNeedsToBeEnabled = true;
- }
- }
-
- public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
- // if projection was previously enabled before input document changed
- // and new document is different than old document
- if (fProjectionNeedsToBeEnabled && fDocument == null && newInput != null) {
- projectionEnabled();
- fProjectionNeedsToBeEnabled = false;
- }
- }
-
- /**
- * Disconnect this IStructuredTextFoldingProvider from projection viewer
- */
- public void uninstall() {
- if (isInstalled()) {
- projectionDisabled();
-
- fViewer.removeProjectionListener(this);
- fViewer.removeTextInputListener(this);
- fViewer = null;
- }
- }
-}
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 d0418cfb41..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/LineStyleProviderForJSP.java
+++ /dev/null
@@ -1,224 +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;
-
-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)) {
- 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);
- }
- }
- // 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/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 6c95b1352d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaCodeScanner.java
+++ /dev/null
@@ -1,106 +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 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);
-
-
- 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 83aef1a27c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/LineStyleProviderForJava.java
+++ /dev/null
@@ -1,322 +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.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();
- }
-
- /**
- * 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 9798cba5e6..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;
-
- private 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 5b5109e875..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JavaWordFinder.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.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) {
-
- int start= -1;
- int end= -1;
-
-
- try {
-
- int pos= offset;
- char c;
-
- while (pos >= 0) {
- c= document.getChar(pos);
- if (!Character.isJavaIdentifierPart(c))
- break;
- --pos;
- }
-
- start= pos;
-
- pos= offset;
- int length= document.getLength();
-
- while (pos < length) {
- c= document.getChar(pos);
- if (!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/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 60e19e7a34..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeJSP.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.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-
-/**
- * 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());
- }
-}
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 113c418d60..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, 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.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/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/JavaPairMatcher.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaPairMatcher.java
deleted file mode 100644
index 106ffdb205..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaPairMatcher.java
+++ /dev/null
@@ -1,202 +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.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 (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(), true, 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, true, 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/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/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 9c362555ea..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPFileWizardPage.java
+++ /dev/null
@@ -1,257 +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.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.ui.dialogs.WizardNewFileCreationPage;
-
-class NewJSPFileWizardPage extends WizardNewFileCreationPage {
-
- private IContentType fContentType;
- private List fValidExtensions = null;
-
- public NewJSPFileWizardPage(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);
- 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 = 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;
- }
-
- /**
- * 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/NewJSPTemplatesWizardPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPTemplatesWizardPage.java
deleted file mode 100644
index edde79b2c1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPTemplatesWizardPage.java
+++ /dev/null
@@ -1,505 +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.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);
-
- // Create linked text to just to templates preference page
- Link link = new Link(innerParent, SWT.NONE);
- link.setText(JSPUIMessages.NewJSPTemplatesWizardPage_6);
- data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
- link.setLayoutData(data);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- linkClicked();
- }
- });
-
- // 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);
-
- 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);
- ((StructuredTextViewer) 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);
- 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() {
- String templateName = JSPUIPlugin.getDefault().getPreferenceStore().getString(JSPUIPreferenceNames.NEW_FILE_TEMPLATE_NAME);
- if (templateName == null || templateName.length() == 0) {
- fLastSelectedTemplateName = ""; //$NON-NLS-1$
- fUseTemplateButton.setSelection(false);
- }
- else {
- fLastSelectedTemplateName = templateName;
- fUseTemplateButton.setSelection(true);
- }
- 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 1fd2a2b880..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java
+++ /dev/null
@@ -1,146 +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.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 NewJSPWizard extends Wizard implements INewWizard {
- private NewJSPFileWizardPage fNewFilePage;
- private NewJSPTemplatesWizardPage fNewFileTemplatesPage;
- private IStructuredSelection fSelection;
-
- 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) {
- 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 JSP 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/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 0accc3332f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagTemplatesWizardPage.java
+++ /dev/null
@@ -1,505 +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 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);
-
- // Create linked text to just to templates preference page
- Link link = new Link(innerParent, SWT.NONE);
- link.setText(JSPUIMessages.NewTagTemplatesWizardPage_6);
- data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
- link.setLayoutData(data);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- linkClicked();
- }
- });
-
- // 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);
-
- 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);
- ((StructuredTextViewer) 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);
- 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() {
- String templateName = JSPUIPlugin.getDefault().getPreferenceStore().getString(JSPUIPreferenceNames.NEW_FILE_TEMPLATE_NAME);
- if (templateName == null || templateName.length() == 0) {
- fLastSelectedTemplateName = ""; //$NON-NLS-1$
- fUseTemplateButton.setSelection(false);
- }
- else {
- fLastSelectedTemplateName = templateName;
- fUseTemplateButton.setSelection(true);
- }
- 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/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 f9a15705b3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPContentOutlineConfiguration.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.views.contentoutline;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.wst.html.ui.views.contentoutline.HTMLContentOutlineConfiguration;
-
-/**
- * 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;
-
- /**
- * 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();
- }
-}
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 3146f83ebe..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.properties
+++ /dev/null
@@ -1,60 +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
-###############################################################################
-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="${cursor}" prefix="" %>
-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.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 d318d24bef..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.xml
+++ /dev/null
@@ -1,46 +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.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/.classpath b/bundles/org.eclipse.jst.standard.schemas/.classpath
deleted file mode 100644
index d9b88115ca..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry exported="true" kind="lib" path=""/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path=""/>
-</classpath>
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 1bce4bdb6c..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/.project
+++ /dev/null
@@ -1,28 +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.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jst.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 79ae132401..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sat Apr 28 03:39:56 EDT 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
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 8e3eddb451..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +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.0.0.qualifier
-Bundle-Vendor: %Bundle-Vendor.0
-Require-Bundle: org.eclipse.wst.xml.core
-Bundle-Localization: plugin
-Bundle-ClassPath: .
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 e3880bc548..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/about.html
+++ /dev/null
@@ -1,23 +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>Untitled Document</title>
-</head>
-
-<body>
-<p>June, 2008</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>
-</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 0d3a90095e..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- dtdsAndSchemas/,\
- plugin.properties,\
- about.html,\
- about_files/
-src.includes = dtdsAndSchemas/,\
- plugin.xml,\
- META-INF/,\
- plugin.properties,\
- about.html,\
- about_files/
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_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/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/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/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_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_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/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.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="include-coda"
- type="javaee: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:element name="deferred-syntax-allowed-as-literal"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The character sequence #{ is reserved for EL expressions.
- Consequently, a translation error occurs if the #{
- character sequence is used as a String literal, unless
- this element is enabled (true). Disabled (false) by
- default.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="trim-directive-whitespaces"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Indicates that template text containing only whitespaces
- must be removed from the response output. It has no
- effect on JSP documents (XML syntax). Disabled (false)
- by default.
-
- </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="javaee: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="javaee: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/orm_1_0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/orm_1_0.xsd
deleted file mode 100644
index bfd9c7540d..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/orm_1_0.xsd
+++ /dev/null
@@ -1,1562 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Java Persistence API object-relational mapping file schema -->
-<xsd:schema targetNamespace="http://java.sun.com/xml/ns/persistence/orm"
- xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.0">
-
- <xsd:annotation>
- <xsd:documentation>
- @(#)orm_1_0.xsd 1.0 Feb 14 2006
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2005-2007 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.
-
- The Eclipse Foundation elects to include this software in this
- distribution under the CDDL license.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation><![CDATA[
-
- This is the XML Schema for the persistence object-relational
- mapping file.
- The file may be named "META-INF/orm.xml" in the persistence
- archive or it may be named some other name which would be
- used to locate the file as resource on the classpath.
-
- ]]></xsd:documentation>
- </xsd:annotation>
-
- <xsd:complexType name="emptyType"/>
-
- <xsd:simpleType name="versionType">
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="[0-9]+(\.[0-9]+)*"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:element name="entity-mappings">
- <xsd:complexType>
- <xsd:annotation>
- <xsd:documentation>
-
- The entity-mappings element is the root element of an mapping
- file. It contains the following four types of elements:
-
- 1. The persistence-unit-metadata element contains metadata
- for the entire persistence unit. It is undefined if this element
- occurs in multiple mapping files within the same persistence unit.
-
- 2. The package, schema, catalog and access elements apply to all of
- the entity, mapped-superclass and embeddable elements defined in
- the same file in which they occur.
-
- 3. The sequence-generator, table-generator, named-query,
- named-native-query and sql-result-set-mapping elements are global
- to the persistence unit. It is undefined to have more than one
- sequence-generator or table-generator of the same name in the same
- or different mapping files in a persistence unit. It is also
- undefined to have more than one named-query or named-native-query
- of the same name in the same or different mapping files in a
- persistence unit.
-
- 4. The entity, mapped-superclass and embeddable elements each define
- the mapping information for a managed persistent class. The mapping
- information contained in these elements may be complete or it may
- be partial.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="xsd:string"
- minOccurs="0"/>
- <xsd:element name="persistence-unit-metadata"
- type="orm:persistence-unit-metadata"
- minOccurs="0"/>
- <xsd:element name="package" type="xsd:string"
- minOccurs="0"/>
- <xsd:element name="schema" type="xsd:string"
- minOccurs="0"/>
- <xsd:element name="catalog" type="xsd:string"
- minOccurs="0"/>
- <xsd:element name="access" type="orm:access-type"
- minOccurs="0"/>
- <xsd:element name="sequence-generator" type="orm:sequence-generator"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="table-generator" type="orm:table-generator"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="named-query" type="orm:named-query"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="named-native-query" type="orm:named-native-query"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="sql-result-set-mapping"
- type="orm:sql-result-set-mapping"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="mapped-superclass" type="orm:mapped-superclass"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="entity" type="orm:entity"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="embeddable" type="orm:embeddable"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="version" type="orm:versionType"
- fixed="1.0" use="required"/>
- </xsd:complexType>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="persistence-unit-metadata">
- <xsd:annotation>
- <xsd:documentation>
-
- Metadata that applies to the persistence unit and not just to
- the mapping file in which it is contained.
-
- If the xml-mapping-metadata-complete element is specified then
- the complete set of mapping metadata for the persistence unit
- is contained in the XML mapping files for the persistence unit.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="xml-mapping-metadata-complete" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="persistence-unit-defaults"
- type="orm:persistence-unit-defaults"
- minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="persistence-unit-defaults">
- <xsd:annotation>
- <xsd:documentation>
-
- These defaults are applied to the persistence unit as a whole
- unless they are overridden by local annotation or XML
- element settings.
-
- schema - Used as the schema for all tables or secondary tables
- that apply to the persistence unit
- catalog - Used as the catalog for all tables or secondary tables
- that apply to the persistence unit
- access - Used as the access type for all managed classes in
- the persistence unit
- cascade-persist - Adds cascade-persist to the set of cascade options
- in entity relationships of the persistence unit
- entity-listeners - List of default entity listeners to be invoked
- on each entity in the persistence unit.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="schema" type="xsd:string"
- minOccurs="0"/>
- <xsd:element name="catalog" type="xsd:string"
- minOccurs="0"/>
- <xsd:element name="access" type="orm:access-type"
- minOccurs="0"/>
- <xsd:element name="cascade-persist" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="entity-listeners" type="orm:entity-listeners"
- minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="entity">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the settings and mappings for an entity. Is allowed to be
- sparsely populated and used in conjunction with the annotations.
- Alternatively, the metadata-complete attribute can be used to
- indicate that no annotations on the entity class (and its fields
- or properties) are to be processed. If this is the case then
- the defaulting rules for the entity and its subelements will
- be recursively applied.
-
- @Target(TYPE) @Retention(RUNTIME)
- public @interface Entity {
- String name() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="xsd:string" minOccurs="0"/>
- <xsd:element name="table" type="orm:table"
- minOccurs="0"/>
- <xsd:element name="secondary-table" type="orm:secondary-table"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="primary-key-join-column"
- type="orm:primary-key-join-column"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="id-class" type="orm:id-class" minOccurs="0"/>
- <xsd:element name="inheritance" type="orm:inheritance" minOccurs="0"/>
- <xsd:element name="discriminator-value" type="orm:discriminator-value"
- minOccurs="0"/>
- <xsd:element name="discriminator-column"
- type="orm:discriminator-column"
- minOccurs="0"/>
- <xsd:element name="sequence-generator" type="orm:sequence-generator"
- minOccurs="0"/>
- <xsd:element name="table-generator" type="orm:table-generator"
- minOccurs="0"/>
- <xsd:element name="named-query" type="orm:named-query"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="named-native-query" type="orm:named-native-query"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="sql-result-set-mapping"
- type="orm:sql-result-set-mapping"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="exclude-default-listeners" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="exclude-superclass-listeners" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="entity-listeners" type="orm:entity-listeners"
- minOccurs="0"/>
- <xsd:element name="pre-persist" type="orm:pre-persist" minOccurs="0"/>
- <xsd:element name="post-persist" type="orm:post-persist"
- minOccurs="0"/>
- <xsd:element name="pre-remove" type="orm:pre-remove" minOccurs="0"/>
- <xsd:element name="post-remove" type="orm:post-remove" minOccurs="0"/>
- <xsd:element name="pre-update" type="orm:pre-update" minOccurs="0"/>
- <xsd:element name="post-update" type="orm:post-update" minOccurs="0"/>
- <xsd:element name="post-load" type="orm:post-load" minOccurs="0"/>
- <xsd:element name="attribute-override" type="orm:attribute-override"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="association-override"
- type="orm:association-override"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="attributes" type="orm:attributes" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="class" type="xsd:string" use="required"/>
- <xsd:attribute name="access" type="orm:access-type"/>
- <xsd:attribute name="metadata-complete" type="xsd:boolean"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="attributes">
- <xsd:annotation>
- <xsd:documentation>
-
- This element contains the entity field or property mappings.
- It may be sparsely populated to include only a subset of the
- fields or properties. If metadata-complete for the entity is true
- then the remainder of the attributes will be defaulted according
- to the default rules.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="id" type="orm:id"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="embedded-id" type="orm:embedded-id"
- minOccurs="0"/>
- </xsd:choice>
- <xsd:element name="basic" type="orm:basic"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="version" type="orm:version"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="many-to-one" type="orm:many-to-one"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="one-to-many" type="orm:one-to-many"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="one-to-one" type="orm:one-to-one"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="many-to-many" type="orm:many-to-many"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="embedded" type="orm:embedded"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="transient" type="orm:transient"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="access-type">
- <xsd:annotation>
- <xsd:documentation>
-
- This element determines how the persistence provider accesses the
- state of an entity or embedded object.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="PROPERTY"/>
- <xsd:enumeration value="FIELD"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="entity-listeners">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface EntityListeners {
- Class[] value();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="entity-listener" type="orm:entity-listener"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="entity-listener">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines an entity listener to be invoked at lifecycle events
- for the entities that list this listener.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="pre-persist" type="orm:pre-persist" minOccurs="0"/>
- <xsd:element name="post-persist" type="orm:post-persist"
- minOccurs="0"/>
- <xsd:element name="pre-remove" type="orm:pre-remove" minOccurs="0"/>
- <xsd:element name="post-remove" type="orm:post-remove" minOccurs="0"/>
- <xsd:element name="pre-update" type="orm:pre-update" minOccurs="0"/>
- <xsd:element name="post-update" type="orm:post-update" minOccurs="0"/>
- <xsd:element name="post-load" type="orm:post-load" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="class" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="pre-persist">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD}) @Retention(RUNTIME)
- public @interface PrePersist {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="method-name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="post-persist">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD}) @Retention(RUNTIME)
- public @interface PostPersist {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="method-name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="pre-remove">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD}) @Retention(RUNTIME)
- public @interface PreRemove {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="method-name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="post-remove">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD}) @Retention(RUNTIME)
- public @interface PostRemove {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="method-name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="pre-update">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD}) @Retention(RUNTIME)
- public @interface PreUpdate {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="method-name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="post-update">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD}) @Retention(RUNTIME)
- public @interface PostUpdate {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="method-name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="post-load">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD}) @Retention(RUNTIME)
- public @interface PostLoad {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="method-name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="query-hint">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({}) @Retention(RUNTIME)
- public @interface QueryHint {
- String name();
- String value();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="value" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="named-query">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface NamedQuery {
- String name();
- String query();
- QueryHint[] hints() default {};
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="query" type="xsd:string"/>
- <xsd:element name="hint" type="orm:query-hint"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="named-native-query">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface NamedNativeQuery {
- String name();
- String query();
- QueryHint[] hints() default {};
- Class resultClass() default void.class;
- String resultSetMapping() default ""; //named SqlResultSetMapping
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="query" type="xsd:string"/>
- <xsd:element name="hint" type="orm:query-hint"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="result-class" type="xsd:string"/>
- <xsd:attribute name="result-set-mapping" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="sql-result-set-mapping">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface SqlResultSetMapping {
- String name();
- EntityResult[] entities() default {};
- ColumnResult[] columns() default {};
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="entity-result" type="orm:entity-result"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="column-result" type="orm:column-result"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="entity-result">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({}) @Retention(RUNTIME)
- public @interface EntityResult {
- Class entityClass();
- FieldResult[] fields() default {};
- String discriminatorColumn() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="field-result" type="orm:field-result"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="entity-class" type="xsd:string" use="required"/>
- <xsd:attribute name="discriminator-column" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="field-result">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({}) @Retention(RUNTIME)
- public @interface FieldResult {
- String name();
- String column();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="column" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="column-result">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({}) @Retention(RUNTIME)
- public @interface ColumnResult {
- String name();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="table">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface Table {
- String name() default "";
- String catalog() default "";
- String schema() default "";
- UniqueConstraint[] uniqueConstraints() default {};
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="unique-constraint" type="orm:unique-constraint"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="catalog" type="xsd:string"/>
- <xsd:attribute name="schema" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="secondary-table">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface SecondaryTable {
- String name();
- String catalog() default "";
- String schema() default "";
- PrimaryKeyJoinColumn[] pkJoinColumns() default {};
- UniqueConstraint[] uniqueConstraints() default {};
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="primary-key-join-column"
- type="orm:primary-key-join-column"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="unique-constraint" type="orm:unique-constraint"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="catalog" type="xsd:string"/>
- <xsd:attribute name="schema" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="unique-constraint">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({}) @Retention(RUNTIME)
- public @interface UniqueConstraint {
- String[] columnNames();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="column-name" type="xsd:string"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="column">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Column {
- String name() default "";
- boolean unique() default false;
- boolean nullable() default true;
- boolean insertable() default true;
- boolean updatable() default true;
- String columnDefinition() default "";
- String table() default "";
- int length() default 255;
- int precision() default 0; // decimal precision
- int scale() default 0; // decimal scale
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="unique" type="xsd:boolean"/>
- <xsd:attribute name="nullable" type="xsd:boolean"/>
- <xsd:attribute name="insertable" type="xsd:boolean"/>
- <xsd:attribute name="updatable" type="xsd:boolean"/>
- <xsd:attribute name="column-definition" type="xsd:string"/>
- <xsd:attribute name="table" type="xsd:string"/>
- <xsd:attribute name="length" type="xsd:int"/>
- <xsd:attribute name="precision" type="xsd:int"/>
- <xsd:attribute name="scale" type="xsd:int"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="join-column">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface JoinColumn {
- String name() default "";
- String referencedColumnName() default "";
- boolean unique() default false;
- boolean nullable() default true;
- boolean insertable() default true;
- boolean updatable() default true;
- String columnDefinition() default "";
- String table() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="referenced-column-name" type="xsd:string"/>
- <xsd:attribute name="unique" type="xsd:boolean"/>
- <xsd:attribute name="nullable" type="xsd:boolean"/>
- <xsd:attribute name="insertable" type="xsd:boolean"/>
- <xsd:attribute name="updatable" type="xsd:boolean"/>
- <xsd:attribute name="column-definition" type="xsd:string"/>
- <xsd:attribute name="table" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="generation-type">
- <xsd:annotation>
- <xsd:documentation>
-
- public enum GenerationType { TABLE, SEQUENCE, IDENTITY, AUTO };
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="TABLE"/>
- <xsd:enumeration value="SEQUENCE"/>
- <xsd:enumeration value="IDENTITY"/>
- <xsd:enumeration value="AUTO"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="attribute-override">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
- public @interface AttributeOverride {
- String name();
- Column column();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="column" type="orm:column"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="association-override">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
- public @interface AssociationOverride {
- String name();
- JoinColumn[] joinColumns();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="join-column" type="orm:join-column"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="id-class">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface IdClass {
- Class value();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="class" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="id">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Id {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="column" type="orm:column"
- minOccurs="0"/>
- <xsd:element name="generated-value" type="orm:generated-value"
- minOccurs="0"/>
- <xsd:element name="temporal" type="orm:temporal"
- minOccurs="0"/>
- <xsd:element name="table-generator" type="orm:table-generator"
- minOccurs="0"/>
- <xsd:element name="sequence-generator" type="orm:sequence-generator"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="embedded-id">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface EmbeddedId {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="attribute-override" type="orm:attribute-override"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="transient">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Transient {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="version">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Version {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="column" type="orm:column" minOccurs="0"/>
- <xsd:element name="temporal" type="orm:temporal" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="basic">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Basic {
- FetchType fetch() default EAGER;
- boolean optional() default true;
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="column" type="orm:column" minOccurs="0"/>
- <xsd:choice>
- <xsd:element name="lob" type="orm:lob" minOccurs="0"/>
- <xsd:element name="temporal" type="orm:temporal" minOccurs="0"/>
- <xsd:element name="enumerated" type="orm:enumerated" minOccurs="0"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="fetch" type="orm:fetch-type"/>
- <xsd:attribute name="optional" type="xsd:boolean"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="fetch-type">
- <xsd:annotation>
- <xsd:documentation>
-
- public enum FetchType { LAZY, EAGER };
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="LAZY"/>
- <xsd:enumeration value="EAGER"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="lob">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Lob {}
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="temporal">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Temporal {
- TemporalType value();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="orm:temporal-type"/>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="temporal-type">
- <xsd:annotation>
- <xsd:documentation>
-
- public enum TemporalType {
- DATE, // java.sql.Date
- TIME, // java.sql.Time
- TIMESTAMP // java.sql.Timestamp
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="DATE"/>
- <xsd:enumeration value="TIME"/>
- <xsd:enumeration value="TIMESTAMP"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="enumerated">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Enumerated {
- EnumType value() default ORDINAL;
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="orm:enum-type"/>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="enum-type">
- <xsd:annotation>
- <xsd:documentation>
-
- public enum EnumType {
- ORDINAL,
- STRING
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="ORDINAL"/>
- <xsd:enumeration value="STRING"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="many-to-one">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface ManyToOne {
- Class targetEntity() default void.class;
- CascadeType[] cascade() default {};
- FetchType fetch() default EAGER;
- boolean optional() default true;
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="join-column" type="orm:join-column"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="join-table" type="orm:join-table"
- minOccurs="0"/>
- </xsd:choice>
- <xsd:element name="cascade" type="orm:cascade-type"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="target-entity" type="xsd:string"/>
- <xsd:attribute name="fetch" type="orm:fetch-type"/>
- <xsd:attribute name="optional" type="xsd:boolean"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="cascade-type">
- <xsd:annotation>
- <xsd:documentation>
-
- public enum CascadeType { ALL, PERSIST, MERGE, REMOVE, REFRESH};
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="cascade-all" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="cascade-persist" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="cascade-merge" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="cascade-remove" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="cascade-refresh" type="orm:emptyType"
- minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="one-to-one">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface OneToOne {
- Class targetEntity() default void.class;
- CascadeType[] cascade() default {};
- FetchType fetch() default EAGER;
- boolean optional() default true;
- String mappedBy() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="primary-key-join-column"
- type="orm:primary-key-join-column"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="join-column" type="orm:join-column"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="join-table" type="orm:join-table"
- minOccurs="0"/>
- </xsd:choice>
- <xsd:element name="cascade" type="orm:cascade-type"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="target-entity" type="xsd:string"/>
- <xsd:attribute name="fetch" type="orm:fetch-type"/>
- <xsd:attribute name="optional" type="xsd:boolean"/>
- <xsd:attribute name="mapped-by" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="one-to-many">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface OneToMany {
- Class targetEntity() default void.class;
- CascadeType[] cascade() default {};
- FetchType fetch() default LAZY;
- String mappedBy() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="order-by" type="orm:order-by"
- minOccurs="0"/>
- <xsd:element name="map-key" type="orm:map-key"
- minOccurs="0"/>
- <xsd:choice>
- <xsd:element name="join-table" type="orm:join-table"
- minOccurs="0"/>
- <xsd:element name="join-column" type="orm:join-column"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:choice>
- <xsd:element name="cascade" type="orm:cascade-type"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="target-entity" type="xsd:string"/>
- <xsd:attribute name="fetch" type="orm:fetch-type"/>
- <xsd:attribute name="mapped-by" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="join-table">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface JoinTable {
- String name() default "";
- String catalog() default "";
- String schema() default "";
- JoinColumn[] joinColumns() default {};
- JoinColumn[] inverseJoinColumns() default {};
- UniqueConstraint[] uniqueConstraints() default {};
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="join-column" type="orm:join-column"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="inverse-join-column" type="orm:join-column"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="unique-constraint" type="orm:unique-constraint"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="catalog" type="xsd:string"/>
- <xsd:attribute name="schema" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="many-to-many">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface ManyToMany {
- Class targetEntity() default void.class;
- CascadeType[] cascade() default {};
- FetchType fetch() default LAZY;
- String mappedBy() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="order-by" type="orm:order-by"
- minOccurs="0"/>
- <xsd:element name="map-key" type="orm:map-key"
- minOccurs="0"/>
- <xsd:element name="join-table" type="orm:join-table"
- minOccurs="0"/>
- <xsd:element name="cascade" type="orm:cascade-type"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="target-entity" type="xsd:string"/>
- <xsd:attribute name="fetch" type="orm:fetch-type"/>
- <xsd:attribute name="mapped-by" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="generated-value">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface GeneratedValue {
- GenerationType strategy() default AUTO;
- String generator() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="strategy" type="orm:generation-type"/>
- <xsd:attribute name="generator" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="map-key">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface MapKey {
- String name() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="order-by">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface OrderBy {
- String value() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:string"/>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="inheritance">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface Inheritance {
- InheritanceType strategy() default SINGLE_TABLE;
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="strategy" type="orm:inheritance-type"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="inheritance-type">
- <xsd:annotation>
- <xsd:documentation>
-
- public enum InheritanceType
- { SINGLE_TABLE, JOINED, TABLE_PER_CLASS};
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="SINGLE_TABLE"/>
- <xsd:enumeration value="JOINED"/>
- <xsd:enumeration value="TABLE_PER_CLASS"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="discriminator-value">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface DiscriminatorValue {
- String value();
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:string"/>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="discriminator-type">
- <xsd:annotation>
- <xsd:documentation>
-
- public enum DiscriminatorType { STRING, CHAR, INTEGER };
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="STRING"/>
- <xsd:enumeration value="CHAR"/>
- <xsd:enumeration value="INTEGER"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="primary-key-join-column">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
- public @interface PrimaryKeyJoinColumn {
- String name() default "";
- String referencedColumnName() default "";
- String columnDefinition() default "";
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="referenced-column-name" type="xsd:string"/>
- <xsd:attribute name="column-definition" type="xsd:string"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="discriminator-column">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface DiscriminatorColumn {
- String name() default "DTYPE";
- DiscriminatorType discriminatorType() default STRING;
- String columnDefinition() default "";
- int length() default 31;
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string"/>
- <xsd:attribute name="discriminator-type" type="orm:discriminator-type"/>
- <xsd:attribute name="column-definition" type="xsd:string"/>
- <xsd:attribute name="length" type="xsd:int"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="embeddable">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the settings and mappings for embeddable objects. Is
- allowed to be sparsely populated and used in conjunction with
- the annotations. Alternatively, the metadata-complete attribute
- can be used to indicate that no annotations are to be processed
- in the class. If this is the case then the defaulting rules will
- be recursively applied.
-
- @Target({TYPE}) @Retention(RUNTIME)
- public @interface Embeddable {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="xsd:string" minOccurs="0"/>
- <xsd:element name="attributes" type="orm:embeddable-attributes"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="class" type="xsd:string" use="required"/>
- <xsd:attribute name="access" type="orm:access-type"/>
- <xsd:attribute name="metadata-complete" type="xsd:boolean"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="embeddable-attributes">
- <xsd:sequence>
- <xsd:element name="basic" type="orm:basic"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="transient" type="orm:transient"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="embedded">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({METHOD, FIELD}) @Retention(RUNTIME)
- public @interface Embedded {}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="attribute-override" type="orm:attribute-override"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="mapped-superclass">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the settings and mappings for a mapped superclass. Is
- allowed to be sparsely populated and used in conjunction with
- the annotations. Alternatively, the metadata-complete attribute
- can be used to indicate that no annotations are to be processed
- If this is the case then the defaulting rules will be recursively
- applied.
-
- @Target(TYPE) @Retention(RUNTIME)
- public @interface MappedSuperclass{}
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description" type="xsd:string" minOccurs="0"/>
- <xsd:element name="id-class" type="orm:id-class" minOccurs="0"/>
- <xsd:element name="exclude-default-listeners" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="exclude-superclass-listeners" type="orm:emptyType"
- minOccurs="0"/>
- <xsd:element name="entity-listeners" type="orm:entity-listeners"
- minOccurs="0"/>
- <xsd:element name="pre-persist" type="orm:pre-persist" minOccurs="0"/>
- <xsd:element name="post-persist" type="orm:post-persist"
- minOccurs="0"/>
- <xsd:element name="pre-remove" type="orm:pre-remove" minOccurs="0"/>
- <xsd:element name="post-remove" type="orm:post-remove" minOccurs="0"/>
- <xsd:element name="pre-update" type="orm:pre-update" minOccurs="0"/>
- <xsd:element name="post-update" type="orm:post-update" minOccurs="0"/>
- <xsd:element name="post-load" type="orm:post-load" minOccurs="0"/>
- <xsd:element name="attributes" type="orm:attributes" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="class" type="xsd:string" use="required"/>
- <xsd:attribute name="access" type="orm:access-type"/>
- <xsd:attribute name="metadata-complete" type="xsd:boolean"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="sequence-generator">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
- public @interface SequenceGenerator {
- String name();
- String sequenceName() default "";
- int initialValue() default 1;
- int allocationSize() default 50;
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="sequence-name" type="xsd:string"/>
- <xsd:attribute name="initial-value" type="xsd:int"/>
- <xsd:attribute name="allocation-size" type="xsd:int"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="table-generator">
- <xsd:annotation>
- <xsd:documentation>
-
- @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
- public @interface TableGenerator {
- String name();
- String table() default "";
- String catalog() default "";
- String schema() default "";
- String pkColumnName() default "";
- String valueColumnName() default "";
- String pkColumnValue() default "";
- int initialValue() default 0;
- int allocationSize() default 50;
- UniqueConstraint[] uniqueConstraints() default {};
- }
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="unique-constraint" type="orm:unique-constraint"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="table" type="xsd:string"/>
- <xsd:attribute name="catalog" type="xsd:string"/>
- <xsd:attribute name="schema" type="xsd:string"/>
- <xsd:attribute name="pk-column-name" type="xsd:string"/>
- <xsd:attribute name="value-column-name" type="xsd:string"/>
- <xsd:attribute name="pk-column-value" type="xsd:string"/>
- <xsd:attribute name="initial-value" type="xsd:int"/>
- <xsd:attribute name="allocation-size" type="xsd:int"/>
- </xsd:complexType>
-
-</xsd:schema> \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/persistence_1_0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/persistence_1_0.xsd
deleted file mode 100644
index a3a157d96e..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/persistence_1_0.xsd
+++ /dev/null
@@ -1,307 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- persistence.xml schema -->
-<xsd:schema targetNamespace="http://java.sun.com/xml/ns/persistence"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:persistence="http://java.sun.com/xml/ns/persistence"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.0">
-
- <xsd:annotation>
- <xsd:documentation>
- @(#)persistence_1_0.xsd 1.0 Feb 9 2006
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2005-2007 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.
-
- The Eclipse Foundation elects to include this software in this
- distribution under the CDDL license.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation><![CDATA[
-
- This is the XML Schema for the persistence configuration file.
- The file must be named "META-INF/persistence.xml" in the
- persistence archive.
- Persistence configuration files must indicate
- the persistence schema by using the persistence namespace:
-
- http://java.sun.com/xml/ns/persistence
-
- and indicate the version of the schema by
- using the version element as shown below:
-
- <persistence xmlns="http://java.sun.com/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
- http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
- ...
- </persistence>
-
- ]]></xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleType name="versionType">
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="[0-9]+(\.[0-9]+)*"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:element name="persistence">
- <xsd:complexType>
- <xsd:sequence>
-
- <!-- **************************************************** -->
-
- <xsd:element name="persistence-unit"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:complexType>
- <xsd:annotation>
- <xsd:documentation>
-
- Configuration of a persistence unit.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
-
- <!-- **************************************************** -->
-
- <xsd:element name="description" type="xsd:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Textual description of this persistence unit.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:element name="provider" type="xsd:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Provider class that supplies EntityManagers for this
- persistence unit.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:element name="jta-data-source" type="xsd:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The container-specific name of the JTA datasource to use.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:element name="non-jta-data-source" type="xsd:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The container-specific name of a non-JTA datasource to use.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:element name="mapping-file" type="xsd:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- File containing mapping information. Loaded as a resource
- by the persistence provider.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:element name="jar-file" type="xsd:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Jar file that should be scanned for entities.
- Not applicable to Java SE persistence units.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:element name="class" type="xsd:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Class to scan for annotations. It should be annotated
- with either @Entity, @Embeddable or @MappedSuperclass.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:element name="exclude-unlisted-classes" type="xsd:boolean"
- default="false" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- When set to true then only listed classes and jars will
- be scanned for persistent classes, otherwise the enclosing
- jar or directory will also be scanned. Not applicable to
- Java SE persistence units.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:element name="properties" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- A list of vendor-specific properties.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="property"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- A name-value pair.
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:attribute name="name" type="xsd:string"
- use="required"/>
- <xsd:attribute name="value" type="xsd:string"
- use="required"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-
- </xsd:sequence>
-
- <!-- **************************************************** -->
-
- <xsd:attribute name="name" type="xsd:string" use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- Name used in code to reference this persistence unit.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
-
- <!-- **************************************************** -->
-
- <xsd:attribute name="transaction-type"
- type="persistence:persistence-unit-transaction-type">
- <xsd:annotation>
- <xsd:documentation>
-
- Type of transactions used by EntityManagers from this
- persistence unit.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
-
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version" type="persistence:versionType"
- fixed="1.0" use="required"/>
- </xsd:complexType>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="persistence-unit-transaction-type">
- <xsd:annotation>
- <xsd:documentation>
-
- public enum TransactionType { JTA, RESOURCE_LOCAL };
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="JTA"/>
- <xsd:enumeration value="RESOURCE_LOCAL"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_2.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_2.dtd
deleted file mode 100644
index 5f439f42cd..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_2.dtd
+++ /dev/null
@@ -1,639 +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 web-app element is the root of the deployment descriptor for
-a web application
--->
-
-<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
-context-param*, servlet*, servlet-mapping*, session-config?,
-mime-mapping*, welcome-file-list?, error-page*, taglib*,
-resource-ref*, security-constraint*, login-config?, security-role*,
-env-entry*, ejb-ref*)>
-
-<!--
-The icon element contains a small-icon and a large-icon element
-which specify the location within the web application for a small and
-large image used to represent the web application in a GUI tool. At a
-minimum, tools must accept GIF and JPEG format images.
--->
-
-<!ELEMENT icon (small-icon?, large-icon?)>
-
-<!--
-The small-icon element contains the location within the web
-application of a file containing a small (16x16 pixel) icon image.
--->
-
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
-The large-icon element contains the location within the web
-application of a file containing a large (32x32 pixel) icon image.
--->
-
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
-The display-name element contains a short name that is intended
-to be displayed by GUI tools
--->
-
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The description element is used to provide descriptive text about
-the parent element.
--->
-
-<!ELEMENT description (#PCDATA)>
-
-<!--
-The distributable element, by its presence in a web application
-deployment descriptor, indicates that this web application is
-programmed appropriately to be deployed into a distributed servlet
-container
--->
-
-<!ELEMENT distributable EMPTY>
-
-<!--
-The context-param element contains the declaration of a web
-application's servlet context initialization parameters.
--->
-
-<!ELEMENT context-param (param-name, param-value, description?)>
-
-<!--
-The param-name element contains the name of a parameter.
--->
-
-<!ELEMENT param-name (#PCDATA)>
-
-<!--
-The param-value element contains the value of a parameter.
--->
-
-<!ELEMENT param-value (#PCDATA)>
-
-<!--
-The servlet element contains the declarative data of a
-servlet. If a jsp-file is specified and the load-on-startup element is
-present, then the JSP should be precompiled and loaded.
--->
-
-<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
-(servlet-class|jsp-file), init-param*, load-on-startup?, security-role-ref*)>
-
-<!--
-The servlet-name element contains the canonical name of the
-servlet.
--->
-
-<!ELEMENT servlet-name (#PCDATA)>
-
-<!--
-The servlet-class element contains the fully qualified class name
-of the servlet.
--->
-
-<!ELEMENT servlet-class (#PCDATA)>
-
-<!--
-The jsp-file element contains the full path to a JSP file within
-the web application.
--->
-
-<!ELEMENT jsp-file (#PCDATA)>
-
-<!--
-The init-param element contains a name/value pair as an
-initialization param of the servlet
--->
-
-<!ELEMENT init-param (param-name, param-value, description?)>
-
-<!--
-The load-on-startup element indicates that this servlet should be
-loaded on the startup of the web application. The optional contents of
-these element must be a positive integer indicating the order in which
-the servlet should be loaded. Lower integers are loaded before higher
-integers. If no value is specified, or if the value specified is not a
-positive integer, the container is free to load it at any time in the
-startup sequence.
--->
-
-<!ELEMENT load-on-startup (#PCDATA)>
-
-<!--
-The servlet-mapping element defines a mapping between a servlet
-and a url pattern
--->
-
-<!ELEMENT servlet-mapping (servlet-name, url-pattern)>
-
-<!--
-The url-pattern element contains the url pattern of the
-mapping. Must follow the rules specified in Section 10 of the Servlet
-API Specification.
--->
-
-<!ELEMENT url-pattern (#PCDATA)>
-
-<!--
-The session-config element defines the session parameters for
-this web application.
--->
-
-<!ELEMENT session-config (session-timeout?)>
-
-<!--
-The session-timeout element defines the default session timeout
-interval for all sessions created in this web application. The
-specified timeout must be expressed in a whole number of minutes.
--->
-
-<!ELEMENT session-timeout (#PCDATA)>
-
-<!--
-The mime-mapping element defines a mapping between an extension
-and a mime type.
--->
-
-<!ELEMENT mime-mapping (extension, mime-type)>
-
-<!--
-The extension element contains a string describing an
-extension. example: "txt"
--->
-
-<!ELEMENT extension (#PCDATA)>
-
-<!--
-The mime-type element contains a defined mime type. example:
-"text/plain"
--->
-
-<!ELEMENT mime-type (#PCDATA)>
-
-<!--
-The welcome-file-list contains an ordered list of welcome files
-elements.
--->
-
-<!ELEMENT welcome-file-list (welcome-file+)>
-
-<!--
-The welcome-file element contains file name to use as a default
-welcome file, such as index.html
--->
-
-<!ELEMENT welcome-file (#PCDATA)>
-
-<!--
-The taglib element is used to describe a JSP tag library.
--->
-
-<!ELEMENT taglib (taglib-uri, taglib-location)>
-
-<!--
-The taglib-uri element describes a URI, relative to the location
-of the web.xml document, identifying a Tag Library used in the Web
-Application.
--->
-
-<!ELEMENT taglib-uri (#PCDATA)>
-
-<!--
-the taglib-location element contains the location (as a resource
-relative to the root of the web application) where to find the Tag
-Libary Description file for the tag library.
--->
-
-<!ELEMENT taglib-location (#PCDATA)>
-
-<!--
-The error-page element contains a mapping between an error code
-or exception type to the path of a resource in the web application
--->
-
-<!ELEMENT error-page ((error-code | exception-type), location)>
-
-<!--
-The error-code contains an HTTP error code, ex: 404
--->
-
-<!ELEMENT error-code (#PCDATA)>
-
-<!--
-The exception type contains a fully qualified class name of a
-Java exception type.
--->
-
-<!ELEMENT exception-type (#PCDATA)>
-
-<!--
-The location element contains the location of the resource in the
-web application
--->
-
-<!ELEMENT location (#PCDATA)>
-
-<!--
-The resource-ref element contains a declaration of a Web
-Application's reference to an external resource.
--->
-
-<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth)>
-
-<!--
-The res-ref-name element specifies the name of the resource
-factory reference name.
--->
-
-<!ELEMENT res-ref-name (#PCDATA)>
-
-<!--
-The res-type element specifies the (Java class) type of the data
-source.
--->
-
-<!ELEMENT res-type (#PCDATA)>
-
-<!--
-The res-auth element indicates whether the application component
-code performs resource signon programmatically or whether the
-container signs onto the resource based on the principle mapping
-information supplied by the deployer. Must be CONTAINER or SERVLET
--->
-
-<!ELEMENT res-auth (#PCDATA)>
-
-<!--
-The security-constraint element is used to associate security
-constraints with one or more web resource collections
--->
-
-<!ELEMENT security-constraint (web-resource-collection+,
-auth-constraint?, user-data-constraint?)>
-
-<!--
-The web-resource-collection element is used to identify a subset
-of the resources and HTTP methods on those resources within a web
-application to which a security constraint applies. If no HTTP methods
-are specified, then the security constraint applies to all HTTP
-methods.
--->
-
-<!ELEMENT web-resource-collection (web-resource-name, description?,
-url-pattern*, http-method*)>
-
-<!--
-The web-resource-name contains the name of this web resource
-collection
--->
-
-<!ELEMENT web-resource-name (#PCDATA)>
-
-<!--
-The http-method contains an HTTP method (GET | POST |...)
--->
-
-<!ELEMENT http-method (#PCDATA)>
-
-<!--
-The user-data-constraint element is used to indicate how data
-communicated between the client and container should be protected
--->
-
-<!ELEMENT user-data-constraint (description?, transport-guarantee)>
-
-<!--
-The transport-guarantee element specifies that the communication
-between client and server should be NONE, INTEGRAL, or
-CONFIDENTIAL. NONE means that the application does not require any
-transport guarantees. A value of INTEGRAL means that the application
-requires that the data sent between the client and server be sent in
-such a way that it can't be changed in transit. CONFIDENTIAL means
-that the application requires that the data be transmitted in a
-fashion that prevents other entities from observing the contents of
-the transmission. In most cases, the presence of the INTEGRAL or
-CONFIDENTIAL flag will indicate that the use of SSL is required.
--->
-
-<!ELEMENT transport-guarantee (#PCDATA)>
-
-<!--
-The auth-constraint element indicates the user roles that should
-be permitted access to this resource collection. The role used here
-must appear in a security-role-ref element.
--->
-
-<!ELEMENT auth-constraint (description?, role-name*)>
-
-<!--
-The role-name element contains the name of a security role.
--->
-
-<!ELEMENT role-name (#PCDATA)>
-
-<!--
-The login-config element is used to configure the authentication
-method that should be used, the realm name that should be used for
-this application, and the attributes that are needed by the form login
-mechanism.
--->
-
-<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
-
-<!--
-The realm name element specifies the realm name to use in HTTP
-Basic authorization
--->
-
-<!ELEMENT realm-name (#PCDATA)>
-
-<!--
-The form-login-config element specifies the login and error pages
-that should be used in form based login. If form based authentication
-is not used, these elements are ignored.
--->
-
-<!ELEMENT form-login-config (form-login-page, form-error-page)>
-
-<!--
-The form-login-page element defines the location in the web app
-where the page that can be used for login can be found
--->
-
-<!ELEMENT form-login-page (#PCDATA)>
-
-<!--
-The form-error-page element defines the location in the web app
-where the error page that is displayed when login is not successful
-can be found
--->
-
-<!ELEMENT form-error-page (#PCDATA)>
-
-<!--
-The auth-method element is used to configure the authentication
-mechanism for the web application. As a prerequisite to gaining access
-to any web resources which are protected by an authorization
-constraint, a user must have authenticated using the configured
-mechanism. Legal values for this element are "BASIC", "DIGEST",
-"FORM", or "CLIENT-CERT".
--->
-
-<!ELEMENT auth-method (#PCDATA)>
-
-<!--
-The security-role element contains the declaration of a security
-role which is used in the security-constraints placed on the web
-application.
--->
-
-<!ELEMENT security-role (description?, role-name)>
-
-<!--
-The role-name element contains the name of a role. This element
-must contain a non-empty string.
--->
-
-<!ELEMENT security-role-ref (description?, role-name, role-link)>
-
-<!--
-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.
--->
-
-<!ELEMENT role-link (#PCDATA)>
-
-<!--
-The env-entry element contains the declaration of an
-application's environment entry. This element is required to be
-honored on in J2EE compliant servlet containers.
--->
-
-<!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,
-env-entry-type)>
-
-<!--
-The env-entry-name contains the name of an application's
-environment entry
--->
-
-<!ELEMENT env-entry-name (#PCDATA)>
-
-<!--
-The env-entry-value element contains the value of an
-application's environment entry
--->
-
-<!ELEMENT env-entry-value (#PCDATA)>
-
-<!--
-The env-entry-type element contains the fully qualified Java type
-of the environment entry value that is expected by the application
-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.Float.
--->
-
-<!ELEMENT env-entry-type (#PCDATA)>
-
-<!--
-The ejb-ref element is used to declare a reference to an
-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. This is the JNDI name that the servlet code uses to get a
-reference to the enterprise bean.
--->
-
-<!ELEMENT ejb-ref-name (#PCDATA)>
-
-<!--
-The ejb-ref-type element contains the expected java class type of
-the referenced EJB.
--->
-
-<!ELEMENT ejb-ref-type (#PCDATA)>
-
-<!--
-The ejb-home element contains the fully qualified name of the
-EJB's home interface
--->
-
-<!ELEMENT home (#PCDATA)>
-
-<!--
-The ejb-remote element contains the fully qualified name of the
-EJB's remote interface
--->
-
-<!ELEMENT remote (#PCDATA)>
-
-<!--
-The ejb-link element is used in the ejb-ref element to specify
-that an EJB reference is linked to an EJB in an encompassing Java2
-Enterprise Edition (J2EE) application package. The value of the
-ejb-link element must be the ejb-name of and EJB in the J2EE
-application package.
--->
-
-<!ELEMENT ejb-link (#PCDATA)>
-
-<!--
-The ID mechanism is to allow tools to easily make tool-specific
-references to the elements of the deployment descriptor. This allows
-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 tools-specific files to the information in the standard web-app
-deployment descriptor.
--->
-
-<!ATTLIST web-app id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST distributable id ID #IMPLIED>
-<!ATTLIST context-param id ID #IMPLIED>
-<!ATTLIST param-name id ID #IMPLIED>
-<!ATTLIST param-value id ID #IMPLIED>
-<!ATTLIST servlet id ID #IMPLIED>
-<!ATTLIST servlet-name id ID #IMPLIED>
-<!ATTLIST servlet-class id ID #IMPLIED>
-<!ATTLIST jsp-file id ID #IMPLIED>
-<!ATTLIST init-param id ID #IMPLIED>
-<!ATTLIST load-on-startup id ID #IMPLIED>
-<!ATTLIST servlet-mapping id ID #IMPLIED>
-<!ATTLIST url-pattern id ID #IMPLIED>
-<!ATTLIST session-config id ID #IMPLIED>
-<!ATTLIST session-timeout id ID #IMPLIED>
-<!ATTLIST mime-mapping id ID #IMPLIED>
-<!ATTLIST extension id ID #IMPLIED>
-<!ATTLIST mime-type id ID #IMPLIED>
-<!ATTLIST welcome-file-list id ID #IMPLIED>
-<!ATTLIST welcome-file id ID #IMPLIED>
-<!ATTLIST taglib id ID #IMPLIED>
-<!ATTLIST taglib-uri id ID #IMPLIED>
-<!ATTLIST taglib-location id ID #IMPLIED>
-<!ATTLIST error-page id ID #IMPLIED>
-<!ATTLIST error-code id ID #IMPLIED>
-<!ATTLIST exception-type id ID #IMPLIED>
-<!ATTLIST location id ID #IMPLIED>
-<!ATTLIST resource-ref id ID #IMPLIED>
-<!ATTLIST res-ref-name id ID #IMPLIED>
-<!ATTLIST res-type id ID #IMPLIED>
-<!ATTLIST res-auth id ID #IMPLIED>
-<!ATTLIST security-constraint id ID #IMPLIED>
-<!ATTLIST web-resource-collection id ID #IMPLIED>
-<!ATTLIST web-resource-name id ID #IMPLIED>
-<!ATTLIST http-method id ID #IMPLIED>
-<!ATTLIST user-data-constraint id ID #IMPLIED>
-<!ATTLIST transport-guarantee id ID #IMPLIED>
-<!ATTLIST auth-constraint id ID #IMPLIED>
-<!ATTLIST role-name id ID #IMPLIED>
-<!ATTLIST login-config id ID #IMPLIED>
-<!ATTLIST realm-name id ID #IMPLIED>
-<!ATTLIST form-login-config id ID #IMPLIED>
-<!ATTLIST form-login-page id ID #IMPLIED>
-<!ATTLIST form-error-page id ID #IMPLIED>
-<!ATTLIST auth-method id ID #IMPLIED>
-<!ATTLIST security-role id ID #IMPLIED>
-<!ATTLIST security-role-ref id ID #IMPLIED>
-<!ATTLIST role-link id ID #IMPLIED>
-<!ATTLIST env-entry id ID #IMPLIED>
-<!ATTLIST env-entry-name id ID #IMPLIED>
-<!ATTLIST env-entry-value id ID #IMPLIED>
-<!ATTLIST env-entry-type id ID #IMPLIED>
-<!ATTLIST ejb-ref id ID #IMPLIED>
-<!ATTLIST ejb-ref-name id ID #IMPLIED>
-<!ATTLIST ejb-ref-type id ID #IMPLIED>
-<!ATTLIST home id ID #IMPLIED>
-<!ATTLIST remote id ID #IMPLIED>
-<!ATTLIST ejb-link id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_3.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_3.dtd
deleted file mode 100644
index 5e3ab01c0f..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_3.dtd
+++ /dev/null
@@ -1,1063 +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 Servlet 2.3 deployment descriptor.
-All Servlet 2.3 deployment descriptors must include a DOCTYPE
-of the following form:
-
- <!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_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 web-app element is the root of the deployment descriptor for
-a web application.
--->
-<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
-context-param*, filter*, filter-mapping*, listener*, servlet*,
-servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
-error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
-login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*)>
-
-<!--
-The auth-constraint element indicates the user roles that should
-be permitted access to this resource collection. The role-name
-used here must either correspond to the role-name of one of the
-security-role elements defined for this web application, or be
-the specially reserved role-name "*" that is a compact syntax for
-indicating all roles in the web application. If both "*" and
-rolenames appear, the container interprets this as all roles.
-If no roles are defined, no user is allowed access to the portion of
-the web application described by the containing security-constraint.
-The container matches role names case sensitively when determining
-access.
-
-
-Used in: security-constraint
--->
-<!ELEMENT auth-constraint (description?, role-name*)>
-
-<!--
-The auth-method element is used to configure the authentication
-mechanism for the web application. As a prerequisite to gaining access to any web resources which are protected by an authorization
-constraint, a user must have authenticated using the configured
-mechanism. Legal values for this element are "BASIC", "DIGEST",
-"FORM", or "CLIENT-CERT".
-
-Used in: login-config
--->
-<!ELEMENT auth-method (#PCDATA)>
-
-<!--
-The context-param element contains the declaration of a web
-application's servlet context initialization parameters.
-
-Used in: web-app
--->
-<!ELEMENT context-param (param-name, param-value, description?)>
-
-<!--
-The description element is used to provide text describing the parent
-element. The description element should include any information that
-the web application war file producer wants to provide to the consumer of
-the web application war file (i.e., to the Deployer). Typically, the tools
-used by the web application war file consumer will display the description
-when processing the parent element that contains the description.
-
-Used in: auth-constraint, context-param, ejb-local-ref, ejb-ref,
-env-entry, filter, init-param, resource-env-ref, resource-ref, run-as,
-security-role, security-role-ref, servlet, user-data-constraint,
-web-app, web-resource-collection
--->
-<!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: filter, security-constraint, servlet, web-app
-
-Example:
-
-<display-name>Employee Self Service</display-name>
--->
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The distributable element, by its presence in a web application
-deployment descriptor, indicates that this web application is
-programmed appropriately to be deployed into a distributed servlet
-container
-
-Used in: web-app
--->
-<!ELEMENT distributable EMPTY>
-
-<!--
-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 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 war file
-containing the web application 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 web application
- 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: web-app
--->
-<!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type,
- local-home, local, ejb-link?)>
-
-<!--
-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 web application 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: web-app
--->
-<!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 web application's environment and is
-relative to the java:comp/env context. The name must be unique
-within the web application.
-
-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 env-entry element contains the declaration of a web 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.
--->
-<!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,
-env-entry-type)>
-
-<!--
-The env-entry-name element contains the name of a web applications's
-environment entry. The name is a JNDI name relative to the
-java:comp/env context. The name must be unique within a web application.
-
-Example:
-
-<env-entry-name>minAmount</env-entry-name>
-
-Used in: env-entry
--->
-<!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 web application'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
--->
-<!ELEMENT env-entry-type (#PCDATA)>
-
-<!--
-The env-entry-value element contains the value of a web application'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>
-
-Used in: env-entry
--->
-<!ELEMENT env-entry-value (#PCDATA)>
-
-<!--
-The error-code contains an HTTP error code, ex: 404
-
-Used in: error-page
--->
-<!ELEMENT error-code (#PCDATA)>
-
-<!--
-The error-page element contains a mapping between an error code
-or exception type to the path of a resource in the web application
-
-Used in: web-app
--->
-<!ELEMENT error-page ((error-code | exception-type), location)>
-
-<!--
-The exception type contains a fully qualified class name of a
-Java exception type.
-
-Used in: error-page
--->
-<!ELEMENT exception-type (#PCDATA)>
-
-<!--
-The extension element contains a string describing an
-extension. example: "txt"
-
-Used in: mime-mapping
--->
-<!ELEMENT extension (#PCDATA)>
-
-<!--
-Declares a filter in the web application. The filter is mapped to
-either a servlet or a URL pattern in the filter-mapping element, using
-the filter-name value to reference. Filters can access the
-initialization parameters declared in the deployment descriptor at
-runtime via the FilterConfig interface.
-
-Used in: web-app
--->
-<!ELEMENT filter (icon?, filter-name, display-name?, description?,
-filter-class, init-param*)>
-
-<!--
-The fully qualified classname of the filter.
-
-Used in: filter
--->
-<!ELEMENT filter-class (#PCDATA)>
-
-<!--
-Declaration of the filter mappings in this web application. The
-container uses the filter-mapping declarations to decide which filters
-to apply to a request, and in what order. The container matches the
-request URI to a Servlet in the normal way. To determine which filters
-to apply it matches filter-mapping declarations either on servlet-name,
-or on url-pattern for each filter-mapping element, depending on which
-style is used. The order in which filters are invoked is the order in
-which filter-mapping declarations that match a request URI for a
-servlet appear in the list of filter-mapping elements.The filter-name
-value must be the value of the <filter-name> sub-elements of one of the
-<filter> declarations in the deployment descriptor.
-
-Used in: web-app
--->
-<!ELEMENT filter-mapping (filter-name, (url-pattern | servlet-name))>
-
-<!--
-The logical name of the filter. This name is used to map the filter.
-Each filter name is unique within the web application.
-
-Used in: filter, filter-mapping
--->
-<!ELEMENT filter-name (#PCDATA)>
-
-<!--
-The form-error-page element defines the location in the web app
-where the error page that is displayed when login is not successful
-can be found. The path begins with a leading / and is interpreted
-relative to the root of the WAR.
-
-Used in: form-login-config
--->
-<!ELEMENT form-error-page (#PCDATA)>
-
-<!--
-The form-login-config element specifies the login and error pages
-that should be used in form based login. If form based authentication
-is not used, these elements are ignored.
-
-Used in: login-config
--->
-<!ELEMENT form-login-config (form-login-page, form-error-page)>
-
-<!--
-The form-login-page element defines the location in the web app
-where the page that can be used for login can be found. The path
-begins with a leading / and is interpreted relative to the root of the WAR.
-
-Used in: form-login-config
--->
-<!ELEMENT form-login-page (#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 http-method contains an HTTP method (GET | POST |...).
-
-Used in: web-resource-collection
--->
-<!ELEMENT http-method (#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: filter, servlet, web-app
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-
-<!--
-The init-param element contains a name/value pair as an
-initialization param of the servlet
-
-Used in: filter, servlet
--->
-<!ELEMENT init-param (param-name, param-value, description?)>
-
-<!--
-The jsp-file element contains the full path to a JSP file within
-the web application beginning with a `/'.
-
-Used in: servlet
--->
-<!ELEMENT jsp-file (#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 web application's
-war 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 listener element indicates the deployment properties for a web
-application listener bean.
-
-Used in: web-app
--->
-<!ELEMENT listener (listener-class)>
-
-<!--
-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.
-
-
-Used in: listener
--->
-<!ELEMENT listener-class (#PCDATA)>
-
-<!--
-The load-on-startup element indicates that this servlet should be
-loaded (instantiated and have its init() called) on the startup
-of the web application. The optional contents of
-these element must be an integer indicating the order in which
-the servlet should be loaded. If the value is a negative integer,
-or the element is not present, the container is free to load the
-servlet whenever it chooses. If the value is a positive integer
-or 0, the container must load and initialize the servlet as the
-application is deployed. The container must guarantee that
-servlets marked with lower integers are loaded before servlets
-marked with higher integers. The container may choose the order
-of loading of servlets with the same load-on-start-up value.
-
-Used in: servlet
--->
-<!ELEMENT load-on-startup (#PCDATA)>
-
-<!--
-
-The local element contains the fully-qualified name of the
-enterprise bean's local interface.
-
-Used in: ejb-local-ref
-
--->
-<!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
--->
-<!ELEMENT local-home (#PCDATA)>
-
-<!--
-The location element contains the location of the resource in the web
-application relative to the root of the web application. The value of
-the location must have a leading `/'.
-
-Used in: error-page
--->
-<!ELEMENT location (#PCDATA)>
-
-<!--
-The login-config element is used to configure the authentication
-method that should be used, the realm name that should be used for
-this application, and the attributes that are needed by the form login
-mechanism.
-
-Used in: web-app
--->
-<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
-
-<!--
-The mime-mapping element defines a mapping between an extension
-and a mime type.
-
-Used in: web-app
--->
-<!ELEMENT mime-mapping (extension, mime-type)>
-
-<!--
-The mime-type element contains a defined mime type. example:
-"text/plain"
-
-Used in: mime-mapping
--->
-<!ELEMENT mime-type (#PCDATA)>
-
-<!--
-The param-name element contains the name of a parameter. Each parameter
-name must be unique in the web application.
-
-
-Used in: context-param, init-param
--->
-<!ELEMENT param-name (#PCDATA)>
-
-<!--
-The param-value element contains the value of a parameter.
-
-Used in: context-param, init-param
--->
-<!ELEMENT param-value (#PCDATA)>
-
-<!--
-The realm name element specifies the realm name to use in HTTP
-Basic authorization.
-
-Used in: login-config
--->
-<!ELEMENT realm-name (#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 web application code signs
-on programmatically to the resource manager, or whether the Container
-will sign on to the resource manager on behalf of the web application. 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 a web application.
-
-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 a web application's
-reference to an administered object associated with a resource
-in the web application'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 web application code.
-
-Used in: web-app
-
-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 web application code. The name is a JNDI name relative to the
-java:comp/env context and must be unique within a web application.
-
-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 a web application'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 web application 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: web-app
-
-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 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: auth-constraint, 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 web application. It contains an optional description, and
-the name of a security role.
-
-Used in: servlet
--->
-<!ELEMENT run-as (description?, role-name)>
-
-<!--
-The security-constraint element is used to associate security
-constraints with one or more web resource collections
-
-Used in: web-app
--->
-<!ELEMENT security-constraint (display-name?, web-resource-collection+,
-auth-constraint?, user-data-constraint?)>
-
-<!--
-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: web-app
-
-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 web application'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: servlet
-
--->
-<!ELEMENT security-role-ref (description?, role-name, role-link?)>
-
-<!--
-The servlet element contains the declarative data of a
-servlet. If a jsp-file is specified and the load-on-startup element is
-present, then the JSP should be precompiled and loaded.
-
-Used in: web-app
--->
-<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
-(servlet-class|jsp-file), init-param*, load-on-startup?, run-as?, security-role-ref*)>
-
-<!--
-The servlet-class element contains the fully qualified class name
-of the servlet.
-
-Used in: servlet
--->
-<!ELEMENT servlet-class (#PCDATA)>
-
-<!--
-The servlet-mapping element defines a mapping between a servlet
-and a url pattern
-
-Used in: web-app
--->
-<!ELEMENT servlet-mapping (servlet-name, url-pattern)>
-
-<!--
-The servlet-name element contains the canonical name of the
-servlet. Each servlet name is unique within the web application.
-
-Used in: filter-mapping, servlet, servlet-mapping
--->
-<!ELEMENT servlet-name (#PCDATA)>
-
-<!--
-The session-config element defines the session parameters for
-this web application.
-
-Used in: web-app
--->
-<!ELEMENT session-config (session-timeout?)>
-
-<!--
-The session-timeout element defines the default session timeout
-interval for all sessions created in this web application. The
-specified timeout must be expressed in a whole number of minutes.
-If the timeout is 0 or less, the container ensures the default
-behaviour of sessions is never to time out.
-
-Used in: session-config
--->
-<!ELEMENT session-timeout (#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 web application's
-war 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 taglib element is used to describe a JSP tag library.
-
-Used in: web-app
--->
-<!ELEMENT taglib (taglib-uri, taglib-location)>
-
-<!--
-the taglib-location element contains the location (as a resource
-relative to the root of the web application) where to find the Tag
-Libary Description file for the tag library.
-
-Used in: taglib
--->
-<!ELEMENT taglib-location (#PCDATA)>
-
-<!--
-The taglib-uri element describes a URI, relative to the location
-of the web.xml document, identifying a Tag Library used in the Web
-Application.
-
-Used in: taglib
--->
-<!ELEMENT taglib-uri (#PCDATA)>
-
-<!--
-The transport-guarantee element specifies that the communication
-between client and server should be NONE, INTEGRAL, or
-CONFIDENTIAL. NONE means that the application does not require any
-transport guarantees. A value of INTEGRAL means that the application
-requires that the data sent between the client and server be sent in
-such a way that it can't be changed in transit. CONFIDENTIAL means
-that the application requires that the data be transmitted in a
-fashion that prevents other entities from observing the contents of
-the transmission. In most cases, the presence of the INTEGRAL or
-CONFIDENTIAL flag will indicate that the use of SSL is required.
-
-Used in: user-data-constraint
--->
-<!ELEMENT transport-guarantee (#PCDATA)>
-
-<!--
-The url-pattern element contains the url pattern of the mapping. Must
-follow the rules specified in Section 11.2 of the Servlet API
-Specification.
-
-Used in: filter-mapping, servlet-mapping, web-resource-collection
--->
-<!ELEMENT url-pattern (#PCDATA)>
-
-<!--
-The user-data-constraint element is used to indicate how data
-communicated between the client and container should be protected.
-
-Used in: security-constraint
--->
-<!ELEMENT user-data-constraint (description?, transport-guarantee)>
-
-<!--
-The web-resource-collection element is used to identify a subset
-of the resources and HTTP methods on those resources within a web
-application to which a security constraint applies. If no HTTP methods
-are specified, then the security constraint applies to all HTTP
-methods.
-
-Used in: security-constraint
--->
-<!ELEMENT web-resource-collection (web-resource-name, description?,
-url-pattern*, http-method*)>
-
-<!--
-The web-resource-name contains the name of this web resource
-collection.
-
-Used in: web-resource-collection
--->
-<!ELEMENT web-resource-name (#PCDATA)>
-
-<!--
-The welcome-file element contains file name to use as a default
-welcome file, such as index.html
-
-Used in: welcome-file-list
--->
-<!ELEMENT welcome-file (#PCDATA)>
-
-<!--
-The welcome-file-list contains an ordered list of welcome files
-elements.
-
-Used in: web-app
--->
-<!ELEMENT welcome-file-list (welcome-file+)>
-
-<!--
-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 auth-constraint id ID #IMPLIED>
-<!ATTLIST auth-method id ID #IMPLIED>
-<!ATTLIST context-param id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST distributable id ID #IMPLIED>
-<!ATTLIST ejb-link id ID #IMPLIED>
-<!ATTLIST ejb-local-ref 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 error-code id ID #IMPLIED>
-<!ATTLIST error-page id ID #IMPLIED>
-<!ATTLIST exception-type id ID #IMPLIED>
-<!ATTLIST extension id ID #IMPLIED>
-<!ATTLIST filter id ID #IMPLIED>
-<!ATTLIST filter-class id ID #IMPLIED>
-<!ATTLIST filter-mapping id ID #IMPLIED>
-<!ATTLIST filter-name id ID #IMPLIED>
-<!ATTLIST form-error-page id ID #IMPLIED>
-<!ATTLIST form-login-config id ID #IMPLIED>
-<!ATTLIST form-login-page id ID #IMPLIED>
-<!ATTLIST home id ID #IMPLIED>
-<!ATTLIST http-method id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST init-param id ID #IMPLIED>
-<!ATTLIST jsp-file id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST listener id ID #IMPLIED>
-<!ATTLIST listener-class id ID #IMPLIED>
-<!ATTLIST load-on-startup id ID #IMPLIED>
-<!ATTLIST local id ID #IMPLIED>
-<!ATTLIST local-home id ID #IMPLIED>
-<!ATTLIST location id ID #IMPLIED>
-<!ATTLIST login-config id ID #IMPLIED>
-<!ATTLIST mime-mapping id ID #IMPLIED>
-<!ATTLIST mime-type id ID #IMPLIED>
-<!ATTLIST param-name id ID #IMPLIED>
-<!ATTLIST param-value id ID #IMPLIED>
-<!ATTLIST realm-name 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 role-link id ID #IMPLIED>
-<!ATTLIST role-name id ID #IMPLIED>
-<!ATTLIST run-as id ID #IMPLIED>
-<!ATTLIST security-constraint id ID #IMPLIED>
-<!ATTLIST security-role id ID #IMPLIED>
-<!ATTLIST security-role-ref id ID #IMPLIED>
-<!ATTLIST servlet id ID #IMPLIED>
-<!ATTLIST servlet-class id ID #IMPLIED>
-<!ATTLIST servlet-mapping id ID #IMPLIED>
-<!ATTLIST servlet-name id ID #IMPLIED>
-<!ATTLIST session-config id ID #IMPLIED>
-<!ATTLIST session-timeout id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST taglib id ID #IMPLIED>
-<!ATTLIST taglib-location id ID #IMPLIED>
-<!ATTLIST taglib-uri id ID #IMPLIED>
-<!ATTLIST transport-guarantee id ID #IMPLIED>
-<!ATTLIST url-pattern id ID #IMPLIED>
-<!ATTLIST user-data-constraint id ID #IMPLIED>
-<!ATTLIST web-app id ID #IMPLIED>
-<!ATTLIST web-resource-collection id ID #IMPLIED>
-<!ATTLIST web-resource-name id ID #IMPLIED>
-<!ATTLIST welcome-file id ID #IMPLIED>
-<!ATTLIST welcome-file-list id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_4.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_4.xsd
deleted file mode 100644
index 79a25138e4..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_4.xsd
+++ /dev/null
@@ -1,1234 +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.4">
- <xsd:annotation>
- <xsd:documentation>
- @(#)web-app_2_4.xsds 1.60 03/08/26
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2004 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 Servlet 2.4 deployment descriptor.
- The deployment descriptor must be named "WEB-INF/web.xml" in the
- web application's war file. All Servlet deployment descriptors
- must indicate the web application 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:
-
- <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="..."
- version="2.4">
- ...
- </web-app>
-
- 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/web-app_2_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:include schemaLocation="jsp_2_0.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="web-app" type="j2ee:web-appType">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-app element is the root of the deployment
- descriptor for a web application. Note that the sub-elements
- of this element can be in the arbitrary order. Because of
- that, the multiplicity of the elements of distributable,
- session-config, welcome-file-list, jsp-config, login-config,
- and locale-encoding-mapping-list was changed from "?" to "*"
- in this schema. However, the deployment descriptor instance
- file must not contain multiple elements of session-config,
- jsp-config, and login-config. When there are multiple elements of
- welcome-file-list or locale-encoding-mapping-list, the container
- must concatinate the element contents. The multiple occurance
- of the element distributable is redundant and the container
- treats that case exactly in the same way when there is only
- one distributable.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:unique name="web-app-servlet-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The servlet element contains the name of a servlet.
- The name must be unique within the web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:servlet"/>
- <xsd:field xpath="j2ee:servlet-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-filter-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The filter element contains the name of a filter.
- The name must be unique within the web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:filter"/>
- <xsd:field xpath="j2ee:filter-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-local-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the web
- application's environment and is relative to the
- java:comp/env context. The name must be unique within
- the web application.
-
- It is recommended that name is 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="web-app-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 web
- application's environment and is relative to the
- java:comp/env context. The name must be unique within
- the web application.
-
- 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="web-app-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 web application code.
- The name is a JNDI name relative to the java:comp/env
- context and must be unique within a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-env-ref"/>
- <xsd:field xpath="j2ee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-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
- environment entry name used in the web application code.
- The name is a JNDI name relative to the java:comp/env
- context and must be unique within a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:message-destination-ref"/>
- <xsd:field xpath="j2ee:message-destination-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-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 a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-ref"/>
- <xsd:field xpath="j2ee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a web
- application's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The name
- must be unique within a web application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="j2ee:env-entry"/>
- <xsd:field xpath="j2ee:env-entry-name"/>
- </xsd:unique>
-
- <xsd:key name="web-app-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:security-role"/>
- <xsd:field xpath="j2ee:role-name"/>
- </xsd:key>
-
- <xsd:keyref name="web-app-role-name-references"
- refer="j2ee:web-app-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:servlet/j2ee:security-role-ref"/>
- <xsd:field xpath="j2ee:role-link"/>
- </xsd:keyref>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="auth-constraintType">
- <xsd:annotation>
- <xsd:documentation>
-
- The auth-constraintType indicates the user roles that
- should be permitted access to this resource
- collection. The role-name used here must either correspond
- to the role-name of one of the security-role elements
- defined for this web application, or be the specially
- reserved role-name "*" that is a compact syntax for
- indicating all roles in the web application. If both "*"
- and rolenames appear, the container interprets this as all
- roles. If no roles are defined, no user is allowed access
- to the portion of the web application described by the
- containing security-constraint. The container matches
- role names case sensitively when determining access.
-
- </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"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="auth-methodType">
- <xsd:annotation>
- <xsd:documentation>
-
- The auth-methodType is used to configure the authentication
- mechanism for the web application. As a prerequisite to
- gaining access to any web resources which are protected by
- an authorization constraint, a user must have authenticated
- using the configured mechanism. Legal values are "BASIC",
- "DIGEST", "FORM", "CLIENT-CERT", or a vendor-specific
- authentication scheme.
-
- Used in: login-config
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="dispatcherType">
- <xsd:annotation>
- <xsd:documentation>
-
- The dispatcher has four legal values: FORWARD, REQUEST, INCLUDE,
- and ERROR. A value of FORWARD means the Filter will be applied
- under RequestDispatcher.forward() calls. A value of REQUEST
- means the Filter will be applied under ordinary client calls to
- the path or servlet. A value of INCLUDE means the Filter will be
- applied under RequestDispatcher.include() calls. A value of
- ERROR means the Filter will be applied under the error page
- mechanism. The absence of any dispatcher elements in a
- filter-mapping indicates a default of applying filters only under
- ordinary client calls to the path or servlet.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="FORWARD"/>
- <xsd:enumeration value="INCLUDE"/>
- <xsd:enumeration value="REQUEST"/>
- <xsd:enumeration value="ERROR"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="encodingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The encodingType defines IANA character sets.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="[^\s]+"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="error-codeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The error-code contains an HTTP error code, ex: 404
-
- Used in: error-page
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdPositiveIntegerType">
- <xsd:pattern value="\d{3}"/>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="error-pageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The error-pageType contains a mapping between an error code
- or exception type to the path of a resource in the web
- application.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="error-code"
- type="j2ee:error-codeType"/>
-
- <xsd:element name="exception-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exception-type contains a fully qualified class
- name of a Java exception type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
-
- <xsd:element name="location"
- type="j2ee:war-pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The location element contains the location of the
- resource in the web application relative to the root of
- the web application. The value of the location must have
- a leading `/'.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="filter-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declaration of the filter mappings in this web
- application is done by using filter-mappingType.
- The container uses the filter-mapping
- declarations to decide which filters to apply to a request,
- and in what order. The container matches the request URI to
- a Servlet in the normal way. To determine which filters to
- apply it matches filter-mapping declarations either on
- servlet-name, or on url-pattern for each filter-mapping
- element, depending on which style is used. The order in
- which filters are invoked is the order in which
- filter-mapping declarations that match a request URI for a
- servlet appear in the list of filter-mapping elements.The
- filter-name value must be the value of the filter-name
- sub-elements of one of the filter declarations in the
- deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="filter-name"
- type="j2ee:filter-nameType"/>
- <xsd:choice>
- <xsd:element name="url-pattern"
- type="j2ee:url-patternType"/>
- <xsd:element name="servlet-name"
- type="j2ee:servlet-nameType"/>
- </xsd:choice>
- <xsd:element name="dispatcher"
- type="j2ee:dispatcherType"
- minOccurs="0" maxOccurs="4"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="filter-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The logical name of the filter is declare
- by using filter-nameType. This name is used to map the
- filter. Each filter name is unique within the web
- application.
-
- Used in: filter, filter-mapping
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:extension base="j2ee:nonEmptyStringType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="filterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The filterType is used to declare a filter in the web
- application. The filter is mapped to either a servlet or a
- URL pattern in the filter-mapping element, using the
- filter-name value to reference. Filters can access the
- initialization parameters declared in the deployment
- descriptor at runtime via the FilterConfig interface.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="filter-name"
- type="j2ee:filter-nameType"/>
- <xsd:element name="filter-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The fully qualified classname of the filter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="init-param"
- type="j2ee:param-valueType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The init-param element contains a name/value pair as
- an initialization param of a servlet filter
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="form-login-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The form-login-configType specifies the login and error
- pages that should be used in form based login. If form based
- authentication is not used, these elements are ignored.
-
- Used in: login-config
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
-
- <xsd:element name="form-login-page"
- type="j2ee:war-pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The form-login-page element defines the location in the web
- app where the page that can be used for login can be
- found. The path begins with a leading / and is interpreted
- relative to the root of the WAR.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="form-error-page"
- type="j2ee:war-pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The form-error-page element defines the location in
- the web app where the error page that is displayed
- when login is not successful can be found.
- The path begins with a leading / and is interpreted
- relative to the root of the WAR.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="http-methodType">
- <xsd:annotation>
-
- <xsd:documentation>
-
- The http-method contains an HTTP method recognized by the
- web-app, for example GET, POST, ...
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="GET"/>
- <xsd:enumeration value="POST"/>
- <xsd:enumeration value="PUT"/>
- <xsd:enumeration value="DELETE"/>
- <xsd:enumeration value="HEAD"/>
- <xsd:enumeration value="OPTIONS"/>
- <xsd:enumeration value="TRACE"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="locale-encoding-mapping-listType">
- <xsd:annotation>
- <xsd:documentation>
-
- The locale-encoding-mapping-list contains one or more
- locale-encoding-mapping(s).
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="locale-encoding-mapping"
- type="j2ee:locale-encoding-mappingType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="locale-encoding-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The locale-encoding-mapping contains locale name and
- encoding name. The locale name must be either "Language-code",
- such as "ja", defined by ISO-639 or "Language-code_Country-code",
- such as "ja_JP". "Country code" is defined by ISO-3166.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="locale"
- type="j2ee:localeType"/>
- <xsd:element name="encoding"
- type="j2ee:encodingType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="localeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localeType defines valid locale defined by ISO-639-1
- and ISO-3166.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="[a-z]{2}(_|-)?([\p{L}\-\p{Nd}]{2})?"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="login-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The login-configType is used to configure the authentication
- method that should be used, the realm name that should be
- used for this application, and the attributes that are
- needed by the form login mechanism.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="auth-method"
- type="j2ee:auth-methodType"
- minOccurs="0"/>
- <xsd:element name="realm-name"
- type="j2ee:string" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The realm name element specifies the realm name to
- use in HTTP Basic authorization.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="form-login-config"
- type="j2ee:form-login-configType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="mime-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The mime-mappingType defines a mapping between an extension
- and a mime type.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:annotation>
- <xsd:documentation>
-
- The extension element contains a string describing an
- extension. example: "txt"
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:element name="extension"
- type="j2ee:string"/>
- <xsd:element name="mime-type"
- type="j2ee:mime-typeType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="mime-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The mime-typeType is used to indicate a defined mime type.
-
- Example:
- "text/plain"
-
- Used in: mime-mapping
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:pattern value="[^\p{Cc}^\s]+/[^\p{Cc}^\s]+"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="nonEmptyStringType">
- <xsd:annotation>
- <xsd:documentation>
- This type defines a string which contains at least one
- character.
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:minLength value="1"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-constraintType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-constraintType is used to associate
- security constraints with one or more web resource
- collections
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="display-name"
- type="j2ee:display-nameType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="web-resource-collection"
- type="j2ee:web-resource-collectionType"
- maxOccurs="unbounded"/>
- <xsd:element name="auth-constraint"
- type="j2ee:auth-constraintType"
- minOccurs="0"/>
- <xsd:element name="user-data-constraint"
- type="j2ee:user-data-constraintType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servlet-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The servlet-mappingType defines a mapping between a
- servlet and a url pattern.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="servlet-name"
- type="j2ee:servlet-nameType"/>
- <xsd:element name="url-pattern"
- type="j2ee:url-patternType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servlet-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The servlet-name element contains the canonical name of the
- servlet. Each servlet name is unique within the web
- application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:extension base="j2ee:nonEmptyStringType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servletType">
- <xsd:annotation>
- <xsd:documentation>
-
- The servletType is used to declare a servlet.
- It contains the declarative data of a
- servlet. If a jsp-file is specified and the load-on-startup
- element is present, then the JSP should be precompiled and
- loaded.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="servlet-name"
- type="j2ee:servlet-nameType"/>
- <xsd:choice>
- <xsd:element name="servlet-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The servlet-class element contains the fully
- qualified class name of the servlet.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="jsp-file"
- type="j2ee:jsp-fileType"/>
-
- </xsd:choice>
-
- <xsd:element name="init-param"
- type="j2ee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="load-on-startup"
- type="j2ee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The load-on-startup element indicates that this
- servlet should be loaded (instantiated and have
- its init() called) on the startup of the web
- application. The optional contents of these
- element must be an integer indicating the order in
- which the servlet should be loaded. If the value
- is a negative integer, or the element is not
- present, the container is free to load the servlet
- whenever it chooses. If the value is a positive
- integer or 0, the container must load and
- initialize the servlet as the application is
- deployed. The container must guarantee that
- servlets marked with lower integers are loaded
- before servlets marked with higher integers. The
- container may choose the order of loading of
- servlets with the same load-on-start-up value.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="run-as"
- type="j2ee:run-asType"
- minOccurs="0"/>
- <xsd:element name="security-role-ref"
- type="j2ee:security-role-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="session-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-configType defines the session parameters
- for this web application.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="session-timeout"
- type="j2ee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-timeout element defines the default
- session timeout interval for all sessions created
- in this web application. The specified timeout
- must be expressed in a whole number of minutes.
- If the timeout is 0 or less, the container ensures
- the default behaviour of sessions is never to time
- out. If this element is not specified, the container
- must set its default timeout period.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="transport-guaranteeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The transport-guaranteeType specifies that the communication
- between client and server should be NONE, INTEGRAL, or
- CONFIDENTIAL. NONE means that the application does not
- require any transport guarantees. A value of INTEGRAL means
- that the application requires that the data sent between the
- client and server be sent in such a way that it can't be
- changed in transit. CONFIDENTIAL means that the application
- requires that the data be transmitted in a fashion that
- prevents other entities from observing the contents of the
- transmission. In most cases, the presence of the INTEGRAL or
- CONFIDENTIAL flag will indicate that the use of SSL is
- required.
-
- Used in: user-data-constraint
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="NONE"/>
- <xsd:enumeration value="INTEGRAL"/>
- <xsd:enumeration value="CONFIDENTIAL"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="user-data-constraintType">
- <xsd:annotation>
- <xsd:documentation>
-
- The user-data-constraintType is used to indicate how
- data communicated between the client and container should be
- protected.
-
- Used in: security-constraint
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="transport-guarantee"
- type="j2ee:transport-guaranteeType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="war-pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate a path starting
- with a "/" and interpreted relative to the root of a WAR
- file.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:pattern value="/.*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="web-app-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type contains the recognized versions of
- web-application supported. It is used to designate the
- version of the web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="2.4"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="web-appType">
-
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="distributable"
- type="j2ee:emptyType"/>
- <xsd:element name="context-param"
- type="j2ee:param-valueType">
-
- <xsd:annotation>
- <xsd:documentation>
-
- The context-param element contains the declaration
- of a web application's servlet context
- initialization parameters.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="filter"
- type="j2ee:filterType"/>
- <xsd:element name="filter-mapping"
- type="j2ee:filter-mappingType"/>
- <xsd:element name="listener"
- type="j2ee:listenerType"/>
- <xsd:element name="servlet"
- type="j2ee:servletType"/>
- <xsd:element name="servlet-mapping"
- type="j2ee:servlet-mappingType"/>
- <xsd:element name="session-config"
- type="j2ee:session-configType"/>
- <xsd:element name="mime-mapping"
- type="j2ee:mime-mappingType"/>
- <xsd:element name="welcome-file-list"
- type="j2ee:welcome-file-listType"/>
- <xsd:element name="error-page"
- type="j2ee:error-pageType"/>
- <xsd:element name="jsp-config"
- type="j2ee:jsp-configType"/>
- <xsd:element name="security-constraint"
- type="j2ee:security-constraintType"/>
- <xsd:element name="login-config"
- type="j2ee:login-configType"/>
- <xsd:element name="security-role"
- type="j2ee:security-roleType"/>
- <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="message-destination"
- type="j2ee:message-destinationType"/>
- <xsd:element name="locale-encoding-mapping-list"
- type="j2ee:locale-encoding-mapping-listType"/>
- </xsd:choice>
-
- <xsd:attribute name="version"
- type="j2ee:web-app-versionType"
- use="required"/>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="web-resource-collectionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-resource-collectionType is used to identify a subset
- of the resources and HTTP methods on those resources within
- a web application to which a security constraint applies. If
- no HTTP methods are specified, then the security constraint
- applies to all HTTP methods.
-
- Used in: security-constraint
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="web-resource-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-resource-name contains the name of this web
- resource collection.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="url-pattern"
- type="j2ee:url-patternType"
- maxOccurs="unbounded"/>
- <xsd:element name="http-method"
- type="j2ee:http-methodType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="welcome-file-listType">
- <xsd:annotation>
- <xsd:documentation>
-
- The welcome-file-list contains an ordered list of welcome
- files elements.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="welcome-file"
- type="xsd:string"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The welcome-file element contains file name to use
- as a default welcome file, such as index.html
-
- </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/web-app_2_5.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_5.xsd
deleted file mode 100644
index 8c0902e129..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_5.xsd
+++ /dev/null
@@ -1,1271 +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.5">
- <xsd:annotation>
- <xsd:documentation>
- @(#)web-app_2_5.xsds 1.62 05/08/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 Servlet 2.5 deployment descriptor.
- The deployment descriptor must be named "WEB-INF/web.xml" in the
- web application's war file. All Servlet deployment descriptors
- must indicate the web application 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:
-
- <web-app xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="..."
- version="2.5">
- ...
- </web-app>
-
- 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/web-app_2_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:include schemaLocation="jsp_2_1.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="web-app" type="javaee:web-appType">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-app element is the root of the deployment
- descriptor for a web application. Note that the sub-elements
- of this element can be in the arbitrary order. Because of
- that, the multiplicity of the elements of distributable,
- session-config, welcome-file-list, jsp-config, login-config,
- and locale-encoding-mapping-list was changed from "?" to "*"
- in this schema. However, the deployment descriptor instance
- file must not contain multiple elements of session-config,
- jsp-config, and login-config. When there are multiple elements of
- welcome-file-list or locale-encoding-mapping-list, the container
- must concatenate the element contents. The multiple occurence
- of the element distributable is redundant and the container
- treats that case exactly in the same way when there is only
- one distributable.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:unique name="web-app-servlet-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The servlet element contains the name of a servlet.
- The name must be unique within the web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:servlet"/>
- <xsd:field xpath="javaee:servlet-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-filter-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The filter element contains the name of a filter.
- The name must be unique within the web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:filter"/>
- <xsd:field xpath="javaee:filter-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-local-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the web
- application's environment and is relative to the
- java:comp/env context. The name must be unique within
- the web application.
-
- It is recommended that name is 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="web-app-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 web
- application's environment and is relative to the
- java:comp/env context. The name must be unique within
- the web application.
-
- 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="web-app-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 web application code.
- The name is a JNDI name relative to the java:comp/env
- context and must be unique within a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-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
- environment entry name used in the web application code.
- The name is a JNDI name relative to the java:comp/env
- context and must be unique within a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-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 a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="web-app-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a web
- application's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The name
- must be unique within a web application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
-
- <xsd:key name="web-app-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:security-role"/>
- <xsd:field xpath="javaee:role-name"/>
- </xsd:key>
-
- <xsd:keyref name="web-app-role-name-references"
- refer="javaee:web-app-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:servlet/javaee:security-role-ref"/>
- <xsd:field xpath="javaee:role-link"/>
- </xsd:keyref>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="auth-constraintType">
- <xsd:annotation>
- <xsd:documentation>
-
- The auth-constraintType indicates the user roles that
- should be permitted access to this resource
- collection. The role-name used here must either correspond
- to the role-name of one of the security-role elements
- defined for this web application, or be the specially
- reserved role-name "*" that is a compact syntax for
- indicating all roles in the web application. If both "*"
- and rolenames appear, the container interprets this as all
- roles. If no roles are defined, no user is allowed access
- to the portion of the web application described by the
- containing security-constraint. The container matches
- role names case sensitively when determining access.
-
- </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"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="auth-methodType">
- <xsd:annotation>
- <xsd:documentation>
-
- The auth-methodType is used to configure the authentication
- mechanism for the web application. As a prerequisite to
- gaining access to any web resources which are protected by
- an authorization constraint, a user must have authenticated
- using the configured mechanism. Legal values are "BASIC",
- "DIGEST", "FORM", "CLIENT-CERT", or a vendor-specific
- authentication scheme.
-
- Used in: login-config
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="dispatcherType">
- <xsd:annotation>
- <xsd:documentation>
-
- The dispatcher has four legal values: FORWARD, REQUEST, INCLUDE,
- and ERROR. A value of FORWARD means the Filter will be applied
- under RequestDispatcher.forward() calls. A value of REQUEST
- means the Filter will be applied under ordinary client calls to
- the path or servlet. A value of INCLUDE means the Filter will be
- applied under RequestDispatcher.include() calls. A value of
- ERROR means the Filter will be applied under the error page
- mechanism. The absence of any dispatcher elements in a
- filter-mapping indicates a default of applying filters only under
- ordinary client calls to the path or servlet.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="FORWARD"/>
- <xsd:enumeration value="INCLUDE"/>
- <xsd:enumeration value="REQUEST"/>
- <xsd:enumeration value="ERROR"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="encodingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The encodingType defines IANA character sets.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="[^\s]+"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="error-codeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The error-code contains an HTTP error code, ex: 404
-
- Used in: error-page
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:xsdPositiveIntegerType">
- <xsd:pattern value="\d{3}"/>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="error-pageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The error-pageType contains a mapping between an error code
- or exception type to the path of a resource in the web
- application.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="error-code"
- type="javaee:error-codeType"/>
-
- <xsd:element name="exception-type"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exception-type contains a fully qualified class
- name of a Java exception type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
-
- <xsd:element name="location"
- type="javaee:war-pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The location element contains the location of the
- resource in the web application relative to the root of
- the web application. The value of the location must have
- a leading `/'.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="filter-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declaration of the filter mappings in this web
- application is done by using filter-mappingType.
- The container uses the filter-mapping
- declarations to decide which filters to apply to a request,
- and in what order. The container matches the request URI to
- a Servlet in the normal way. To determine which filters to
- apply it matches filter-mapping declarations either on
- servlet-name, or on url-pattern for each filter-mapping
- element, depending on which style is used. The order in
- which filters are invoked is the order in which
- filter-mapping declarations that match a request URI for a
- servlet appear in the list of filter-mapping elements.The
- filter-name value must be the value of the filter-name
- sub-elements of one of the filter declarations in the
- deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="filter-name"
- type="javaee:filter-nameType"/>
- <xsd:choice minOccurs="1" maxOccurs="unbounded">
- <xsd:element name="url-pattern"
- type="javaee:url-patternType"/>
- <xsd:element name="servlet-name"
- type="javaee:servlet-nameType"/>
- </xsd:choice>
- <xsd:element name="dispatcher"
- type="javaee:dispatcherType"
- minOccurs="0" maxOccurs="4"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="filter-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The logical name of the filter is declare
- by using filter-nameType. This name is used to map the
- filter. Each filter name is unique within the web
- application.
-
- Used in: filter, filter-mapping
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:extension base="javaee:nonEmptyStringType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="filterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The filterType is used to declare a filter in the web
- application. The filter is mapped to either a servlet or a
- URL pattern in the filter-mapping element, using the
- filter-name value to reference. Filters can access the
- initialization parameters declared in the deployment
- descriptor at runtime via the FilterConfig interface.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="filter-name"
- type="javaee:filter-nameType"/>
- <xsd:element name="filter-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The fully qualified classname of the filter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="init-param"
- type="javaee:param-valueType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The init-param element contains a name/value pair as
- an initialization param of a servlet filter
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="form-login-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The form-login-configType specifies the login and error
- pages that should be used in form based login. If form based
- authentication is not used, these elements are ignored.
-
- Used in: login-config
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
-
- <xsd:element name="form-login-page"
- type="javaee:war-pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The form-login-page element defines the location in the web
- app where the page that can be used for login can be
- found. The path begins with a leading / and is interpreted
- relative to the root of the WAR.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="form-error-page"
- type="javaee:war-pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The form-error-page element defines the location in
- the web app where the error page that is displayed
- when login is not successful can be found.
- The path begins with a leading / and is interpreted
- relative to the root of the WAR.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="http-methodType">
- <xsd:annotation>
-
- <xsd:documentation>
-
- A HTTP method type as defined in HTTP 1.1 section 2.2.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="[&#33;-&#126;-[\(\)&#60;&#62;@,;:&#34;/\[\]?=\{\}\\\p{Z}]]+"/>
- </xsd:restriction>
-
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="load-on-startupType">
- <xsd:union memberTypes="javaee:null-charType xsd:integer"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="locale-encoding-mapping-listType">
- <xsd:annotation>
- <xsd:documentation>
-
- The locale-encoding-mapping-list contains one or more
- locale-encoding-mapping(s).
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="locale-encoding-mapping"
- type="javaee:locale-encoding-mappingType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="locale-encoding-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The locale-encoding-mapping contains locale name and
- encoding name. The locale name must be either "Language-code",
- such as "ja", defined by ISO-639 or "Language-code_Country-code",
- such as "ja_JP". "Country code" is defined by ISO-3166.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="locale"
- type="javaee:localeType"/>
- <xsd:element name="encoding"
- type="javaee:encodingType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="localeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localeType defines valid locale defined by ISO-639-1
- and ISO-3166.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="[a-z]{2}(_|-)?([\p{L}\-\p{Nd}]{2})?"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="login-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The login-configType is used to configure the authentication
- method that should be used, the realm name that should be
- used for this application, and the attributes that are
- needed by the form login mechanism.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="auth-method"
- type="javaee:auth-methodType"
- minOccurs="0"/>
- <xsd:element name="realm-name"
- type="javaee:string" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The realm name element specifies the realm name to
- use in HTTP Basic authorization.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="form-login-config"
- type="javaee:form-login-configType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="mime-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The mime-mappingType defines a mapping between an extension
- and a mime type.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:annotation>
- <xsd:documentation>
-
- The extension element contains a string describing an
- extension. example: "txt"
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:element name="extension"
- type="javaee:string"/>
- <xsd:element name="mime-type"
- type="javaee:mime-typeType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="mime-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The mime-typeType is used to indicate a defined mime type.
-
- Example:
- "text/plain"
-
- Used in: mime-mapping
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="[^\p{Cc}^\s]+/[^\p{Cc}^\s]+"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="nonEmptyStringType">
- <xsd:annotation>
- <xsd:documentation>
- This type defines a string which contains at least one
- character.
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:minLength value="1"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="null-charType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value=""/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-constraintType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-constraintType is used to associate
- security constraints with one or more web resource
- collections
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="web-resource-collection"
- type="javaee:web-resource-collectionType"
- maxOccurs="unbounded"/>
- <xsd:element name="auth-constraint"
- type="javaee:auth-constraintType"
- minOccurs="0"/>
- <xsd:element name="user-data-constraint"
- type="javaee:user-data-constraintType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servlet-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The servlet-mappingType defines a mapping between a
- servlet and a url pattern.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="servlet-name"
- type="javaee:servlet-nameType"/>
- <xsd:element name="url-pattern"
- type="javaee:url-patternType"
- minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servlet-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The servlet-name element contains the canonical name of the
- servlet. Each servlet name is unique within the web
- application.
- The special servlet name of "*" may be used to reference all
- servlets.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:extension base="javaee:nonEmptyStringType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servletType">
- <xsd:annotation>
- <xsd:documentation>
-
- The servletType is used to declare a servlet.
- It contains the declarative data of a
- servlet. If a jsp-file is specified and the load-on-startup
- element is present, then the JSP should be precompiled and
- loaded.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="servlet-name"
- type="javaee:servlet-nameType"/>
- <xsd:choice>
- <xsd:element name="servlet-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The servlet-class element contains the fully
- qualified class name of the servlet.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="jsp-file"
- type="javaee:jsp-fileType"/>
-
- </xsd:choice>
-
- <xsd:element name="init-param"
- type="javaee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="load-on-startup"
- type="javaee:load-on-startupType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The load-on-startup element indicates that this
- servlet should be loaded (instantiated and have
- its init() called) on the startup of the web
- application. The optional contents of these
- element must be an integer indicating the order in
- which the servlet should be loaded. If the value
- is a negative integer, or the element is not
- present, the container is free to load the servlet
- whenever it chooses. If the value is a positive
- integer or 0, the container must load and
- initialize the servlet as the application is
- deployed. The container must guarantee that
- servlets marked with lower integers are loaded
- before servlets marked with higher integers. The
- container may choose the order of loading of
- servlets with the same load-on-start-up value.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="run-as"
- type="javaee:run-asType"
- minOccurs="0"/>
- <xsd:element name="security-role-ref"
- type="javaee:security-role-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="session-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-configType defines the session parameters
- for this web application.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="session-timeout"
- type="javaee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-timeout element defines the default
- session timeout interval for all sessions created
- in this web application. The specified timeout
- must be expressed in a whole number of minutes.
- If the timeout is 0 or less, the container ensures
- the default behaviour of sessions is never to time
- out. If this element is not specified, the container
- must set its default timeout period.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="transport-guaranteeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The transport-guaranteeType specifies that the communication
- between client and server should be NONE, INTEGRAL, or
- CONFIDENTIAL. NONE means that the application does not
- require any transport guarantees. A value of INTEGRAL means
- that the application requires that the data sent between the
- client and server be sent in such a way that it can't be
- changed in transit. CONFIDENTIAL means that the application
- requires that the data be transmitted in a fashion that
- prevents other entities from observing the contents of the
- transmission. In most cases, the presence of the INTEGRAL or
- CONFIDENTIAL flag will indicate that the use of SSL is
- required.
-
- Used in: user-data-constraint
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="NONE"/>
- <xsd:enumeration value="INTEGRAL"/>
- <xsd:enumeration value="CONFIDENTIAL"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="user-data-constraintType">
- <xsd:annotation>
- <xsd:documentation>
-
- The user-data-constraintType is used to indicate how
- data communicated between the client and container should be
- protected.
-
- Used in: security-constraint
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="transport-guarantee"
- type="javaee:transport-guaranteeType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="war-pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate a path starting
- with a "/" and interpreted relative to the root of a WAR
- file.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="/.*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="web-app-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type contains the recognized versions of
- web-application supported. It is used to designate the
- version of the web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="2.5"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="web-appType">
-
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="distributable"
- type="javaee:emptyType"/>
- <xsd:element name="context-param"
- type="javaee:param-valueType">
-
- <xsd:annotation>
- <xsd:documentation>
-
- The context-param element contains the declaration
- of a web application's servlet context
- initialization parameters.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="filter"
- type="javaee:filterType"/>
- <xsd:element name="filter-mapping"
- type="javaee:filter-mappingType"/>
- <xsd:element name="listener"
- type="javaee:listenerType"/>
- <xsd:element name="servlet"
- type="javaee:servletType"/>
- <xsd:element name="servlet-mapping"
- type="javaee:servlet-mappingType"/>
- <xsd:element name="session-config"
- type="javaee:session-configType"/>
- <xsd:element name="mime-mapping"
- type="javaee:mime-mappingType"/>
- <xsd:element name="welcome-file-list"
- type="javaee:welcome-file-listType"/>
- <xsd:element name="error-page"
- type="javaee:error-pageType"/>
- <xsd:element name="jsp-config"
- type="javaee:jsp-configType"/>
- <xsd:element name="security-constraint"
- type="javaee:security-constraintType"/>
- <xsd:element name="login-config"
- type="javaee:login-configType"/>
- <xsd:element name="security-role"
- type="javaee:security-roleType"/>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="message-destination"
- type="javaee:message-destinationType"/>
- <xsd:element name="locale-encoding-mapping-list"
- type="javaee:locale-encoding-mapping-listType"/>
- </xsd:choice>
-
- <xsd:attribute name="version"
- type="javaee:web-app-versionType"
- use="required"/>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- <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:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="web-resource-collectionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-resource-collectionType is used to identify a subset
- of the resources and HTTP methods on those resources within
- a web application to which a security constraint applies. If
- no HTTP methods are specified, then the security constraint
- applies to all HTTP methods.
-
- Used in: security-constraint
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="web-resource-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-resource-name contains the name of this web
- resource collection.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="url-pattern"
- type="javaee:url-patternType"
- maxOccurs="unbounded"/>
- <xsd:element name="http-method"
- type="javaee:http-methodType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="welcome-file-listType">
- <xsd:annotation>
- <xsd:documentation>
-
- The welcome-file-list contains an ordered list of welcome
- files elements.
-
- Used in: web-app
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="welcome-file"
- type="xsd:string"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The welcome-file element contains file name to use
- as a default welcome file, such as index.html
-
- </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/web-facesconfig_1_0.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_0.dtd
deleted file mode 100644
index 3e1c998e6c..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_0.dtd
+++ /dev/null
@@ -1,874 +0,0 @@
-<!--
- DTD for the JavaServer Faces Application Configuration File (Version 1.0)
-
- To support validation of your configuration file(s), include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
-
- $Id: web-facesconfig_1_0.dtd,v 1.1 2007/05/25 21:12:49 david_williams Exp $
-
--->
-
-
-<!-- ==================== Defined Types =================================== -->
-
-
-<!--
- An "Action" is a String that represents a method binding
- expression that points at a method with no arguments that returns a
- String. It must be bracketed with "#{}", for example,
- "#{cardemo.buyCar}".
--->
-<!ENTITY % Action "CDATA">
-
-
-<!--
- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!--
- An "Identifier" is a string of characters that conforms to the variable
- naming conventions of the Java programming language (JLS Section ?.?.?).
--->
-<!ENTITY % Identifier "CDATA">
-
-
-<!--
- A "JavaType" is either the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element, or
- the name of a Java primitive type (such as int or char). The class name
- or primitive type may optionally be followed by "[]" to indicate that
- the underlying data must be an array, rather than a scalar variable.
--->
-<!ENTITY % JavaType "CDATA">
-
-
-<!--
- A "Language" is a lower case two-letter code for a language as defined
- by ISL-639.
--->
-<!ENTITY % Language "CDATA">
-
-
-<!--
- A "ResourcePath" is the relative or absolute path to a resource file
- (such as a logo image).
--->
-<!ENTITY % ResourcePath "CDATA">
-
-
-<!--
- A "Scope" is the well-known name of a scope in which managed beans may
- optionally be defined to be created in.
--->
-<!ENTITY % Scope "(request|session|application)">
-
-
-
-<!--
- A "ScopeOrNone" element defines the legal values for the
- <managed-bean-scope> element's body content, which includes
- all of the scopes respresented by the "Scope" type, plus the
- "none" value indicating that a created bean should not be
- stored into any scope.
--->
-<!ENTITY % ScopeOrNone "(request|session|application|none)">
-
-
-<!--
- A "ViewIdPattern" is a pattern for matching view identifiers in
- order to determine whether a particular navigation rule should be
- fired. It must contain one of the following values:
-
- - The exact match for a view identifier that is recognized
- by the the ViewHandler implementation being used (such as
- "/index.jsp" if you are using the default ViewHandler).
-
- - A proper prefix of a view identifier, plus a trailing "*"
- character. This pattern indicates that all view identifiers that
- match the portion of the pattern up to the asterisk will match the
- surrounding rule. When more than one match exists, the match with
- the longest pattern is selected.
-
- - An "*" character, which means that this pattern applies to all
- view identifiers.
--->
-<!ENTITY % ViewIdPattern "CDATA">
-
-
-<!-- ==================== Top Level Elements ============================== -->
-
-
-<!--
- The "faces-config" element is the root of the configuration information
- hierarchy, and contains nested elements for all of the other configuration
- settings.
--->
-<!ELEMENT faces-config ((application|factory|component|converter|managed-bean|navigation-rule|referenced-bean|render-kit|lifecycle|validator)*)>
-<!ATTLIST faces-config
- xmlns CDATA #FIXED "http://java.sun.com/JSF/Configuration">
-
-
-
-<!-- ==================== Definition Elements ============================= -->
-
-
-<!--
- The "application" element provides a mechanism to define the various
- per-application-singleton implementation artifacts for a particular web
- application that is utilizing JavaServer Faces. For nested elements
- that are not specified, the JSF implementation must provide a suitable
- default.
--->
-<!ELEMENT application ((action-listener|default-render-kit-id|message-bundle|navigation-handler|view-handler|state-manager|property-resolver|variable-resolver|locale-config)*)>
-
-
-<!--
- The "factory" element provides a mechanism to define the various
- Factories that comprise parts of the implementation of JavaServer
- Faces. For nested elements that are not specified, the JSF
- implementation must provide a suitable default.
--->
-<!ELEMENT factory ((application-factory|faces-context-factory|lifecycle-factory|render-kit-factory)*)>
-
-
-<!--
- The "attribute" element represents a named, typed, value associated with
- the parent UIComponent via the generic attributes mechanism.
-
- Attribute names must be unique within the scope of the parent (or related)
- component.
--->
-<!ELEMENT attribute (description*, display-name*, icon*, attribute-name, attribute-class, default-value?, suggested-value?, attribute-extension*)>
-
-<!--
- Extension element for attribute. May contain implementation
- specific content.
--->
-<!ELEMENT attribute-extension ANY>
-
-
-<!--
- The "component" element represents a concrete UIComponent implementation
- class that should be registered under the specified type identifier,
- along with its associated properties and attributes. Component types must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that are recognized
- by the implementation logic of this component. Nested "property" elements
- identify JavaBeans properties of the component class that may be exposed
- for manipulation via tools.
--->
-<!ELEMENT component (description*, display-name*, icon*, component-type, component-class, attribute*, property*, component-extension*)>
-
-<!--
- Extension element for component. May contain implementation
- specific content.
--->
-<!ELEMENT component-extension ANY>
-
-
-
-<!--
- The "converter" element represents a concrete Converter implementation
- class that should be registered under the specified converter identifier.
- Converter identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Converter. Nested "property" elements identify JavaBeans
- properties of the Converter implementation class that may be configured
- to affect the operation of the Converter.
--->
-<!ELEMENT converter (description*, display-name*, icon*, (converter-id | converter-for-class), converter-class, attribute*, property*)>
-
-
-<!--
- The "icon" element contains "small-icon" and "large-icon" elements that
- specify the resoruce paths for small and large GIF or JPG icon images
- used to represent the parent element in a GUI tool.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon xml:lang %Language; #IMPLIED>
-
-<!--
- The "lifecycle" element provides a mechanism to specify
- modifications to the behaviour of the default Lifecycle
- implementation for this web application.
--->
-<!ELEMENT lifecycle (phase-listener*)>
-
-<!--
- The "locale-config" element allows the app developer to declare the
- supported locales for this application.
--->
-<!ELEMENT locale-config (default-locale?, supported-locale*)>
-
-<!--
- The "managed-bean" element represents a JavaBean, of a particular class,
- that will be dynamically instantiated at runtime (by the default
- VariableResolver implementation) if it is referenced as the first element
- of a value binding expression, and no corresponding bean can be
- identified in any scope. In addition to the creation of the managed bean,
- and the optional storing of it into the specified scope, the nested
- managed-property elements can be used to initialize the contents of
- settable JavaBeans properties of the created instance.
--->
-<!ELEMENT managed-bean (description*, display-name*, icon*, managed-bean-name, managed-bean-class, managed-bean-scope, (managed-property* | map-entries | list-entries))>
-
-
-<!--
- The "managed-property" element represents an individual property of a
- managed bean that will be configured to the specified value (or value set)
- if the corresponding managed bean is automatically created.
--->
-<!ELEMENT managed-property (description*, display-name*, icon*, property-name, property-class?, (map-entries|null-value|value|list-entries))>
-
-
-<!--
- The "map-entry" element reprsents a single key-entry pair that
- will be added to the computed value of a managed property of type
- java.util.Map.
--->
-<!ELEMENT map-entry (key, (null-value|value))>
-
-
-<!--
- The "map-entries' element represents a set of key-entry pairs that
- will be added to the computed value of a managed property of type
- java.util.Map. In addition, the Java class types of the key and entry
- values may be optionally declared.
--->
-<!ELEMENT map-entries (key-class?, value-class?, map-entry*)>
-
-
-<!--
- The base name of a resource bundle representing the message resources
- for this application. See the JavaDocs for the "java.util.ResourceBundle"
- class for more information on the syntax of resource bundle names.
--->
-
-<!ELEMENT message-bundle (#PCDATA)>
-
-
-<!--
- The "navigation-case" element describes a particular combination of
- conditions that must match for this case to be executed, and the
- view id of the component tree that should be selected next.
--->
-<!ELEMENT navigation-case (description*, display-name*, icon*, from-action?, from-outcome?, to-view-id, redirect?)>
-
-
-<!--
- The "navigation-rule" element represents an individual decision rule
- that will be utilized by the default NavigationHandler
- implementation to make decisions on what view should be displayed
- next, based on the view id being processed.
--->
-<!ELEMENT navigation-rule (description*, display-name*, icon*, from-view-id?, navigation-case*)>
-
-
-<!--
- The "property" element represents a JavaBean property of the Java class
- represented by our parent element.
-
- Property names must be unique within the scope of the Java class
- that is represented by the parent element, and must correspond to
- property names that will be recognized when performing introspection
- against that class via java.beans.Introspector.
--->
-<!ELEMENT property (description*, display-name*, icon*, property-name, property-class, default-value?, suggested-value?, property-extension*)>
-
-<!--
- Extension element for property. May contain implementation
- specific content.
--->
-<!ELEMENT property-extension ANY>
-
-<!--
- The "referenced-bean" element represents at design time the promise
- that a Java object of the specified type will exist at runtime in some
- scope, under the specified key. This can be used by design time tools
- to construct user interface dialogs based on the properties of the
- specified class. The presence or absence of a referenced bean
- element has no impact on the JavaServer Faces runtime environment
- inside a web application.
--->
-<!ELEMENT referenced-bean (description*, display-name*, icon*, referenced-bean-name, referenced-bean-class)>
-
-
-<!--
- The "render-kit" element represents a concrete RenderKit implementation
- that should be registered under the specified render-kit-id. If no
- render-kit-id is specified, the identifier of the default RenderKit
- (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
--->
-<!ELEMENT render-kit (description*, display-name*, icon*, render-kit-id?, render-kit-class?, renderer*)>
-
-
-<!--
- The "renderer" element represents a concrete Renderer implementation
- class that should be registered under the specified component family
- and renderer type identifiers, in the RenderKit associated with the
- parent "render-kit" element. Combinations of component family and renderer
- type must be unique within the RenderKit associated with the parent
- "render-kit" element.
-
- Nested "attribute" elements identify generic component attributes that
- are recognized by this renderer.
--->
-<!ELEMENT renderer (description*, display-name*, icon*, component-family, renderer-type, renderer-class, attribute*, renderer-extension*)>
-
-<!--
- Extension element for renderer. May contain implementation
- specific content.
--->
-<!ELEMENT renderer-extension ANY>
-
-<!--
- The "validator" element represents a concrete Validator implementation
- class that should be registered under the specified validator identifier.
- Validator identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Validator. Nested "property" elements identify JavaBeans
- properties of the Validator implementation class that may be configured
- to affect the operation of the Validator.
--->
-<!ELEMENT validator (description*, display-name*, icon*, validator-id, validator-class, attribute*, property*)>
-
-
-<!--
- The "list-entries" element represents a set of initialization
- elements for a managed property that is a java.util.List or an
- array. In the former case, the "value-class" element can optionally
- be used to declare the Java type to which each value should be
- converted before adding it to the Collection.
--->
-<!ELEMENT list-entries (value-class?, (null-value|value)*)>
-
-
-<!-- ==================== Subordinate Elements ============================ -->
-
-
-<!--
- The "action-listener" element contains the fully qualified class name
- of the concrete ActionListener implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle.
- It must be of type "ClassName".
--->
-<!ELEMENT action-listener (#PCDATA)>
-
-<!--
- The "application-factory" element contains the fully qualified class
- name of the concrete ApplicationFactory implementation class that
- will be called when FactoryFinder.getFactory(APPLICATION_FACTORY) is
- called. It must be of type "ClassName".
--->
-<!ELEMENT application-factory (#PCDATA)>
-
-<!--
- The "attribute-class" element represents the Java type of the value
- associated with this attribute name. It must be of type "ClassName".
--->
-<!ELEMENT attribute-class (#PCDATA)>
-
-
-<!--
- The "attribute-name" element represents the name under which the
- corresponding value will be stored, in the generic attributes of the
- UIComponent we are related to.
--->
-<!ELEMENT attribute-name (#PCDATA)>
-
-
-<!--
- The "component-class" element represents the fully qualified class name
- of a concrete UIComponent implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT component-class (#PCDATA)>
-
-
-<!--
- The "component-family" element represents the component family for
- which the Renderer represented by the parent "renderer" element will be
- used.
--->
-<!ELEMENT component-family (#PCDATA)>
-
-<!--
- The "component-type" element represents the name under which the
- corresponding UIComponent class should be registered.
--->
-<!ELEMENT component-type (#PCDATA)>
-
-
-<!--
- The "converter-class" element represents the fully qualified class name
- of a concrete Converter implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-class (#PCDATA)>
-
-
-<!--
- The "converter-for-class" element represents the fully qualified class name
- for which a Converter class will be registered. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-for-class (#PCDATA)>
-
-
-<!--
- The "converter-id" element represents the identifier under which the
- corresponding Converter class should be registered.
--->
-<!ELEMENT converter-id (#PCDATA)>
-
-<!--
- The "default-render-kit-id" element allows the application to define
- a renderkit to be used other than the standard one.
--->
-<!ELEMENT default-render-kit-id (#PCDATA)>
-
-<!--
- The "default-locale" element declares the default locale for this
- application instance. It must be specified as
- :language:[_:country:[_:variant:]] without the colons, for example
- "ja_JP_SJIS". The separators between the segments may be '-' or
- '_'.
--->
-<!ELEMENT default-locale (#PCDATA)>
-
-<!--
- The "default-value" contains the value for the property or attribute
- in which this element resides. This value differs from the
- "suggested-value" in that the property or attribute must take the
- value, whereas in "suggested-value" taking the value is optional.
--->
-<!ELEMENT default-value (#PCDATA)>
-
-<!--
- The "description" element contains a textual description of the element
- it is nested in, optionally flagged with a language code using the
- "xml:lang" attribute.
--->
-<!ELEMENT description ANY>
-<!ATTLIST description xml:lang %Language; #IMPLIED>
-
-
-<!--
- The "display-name" element is a short descriptive name describing the
- entity associated with the element it is nested in, intended to be
- displayed by tools, and optionally flagged with a language code using
- the "xml:lang" attribute.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name xml:lang %Language; #IMPLIED>
-
-<!--
- The "faces-context-factory" element contains the fully qualified
- class name of the concrete FacesContextFactory implementation class
- that will be called when
- FactoryFinder.getFactory(FACES_CONTEXT_FACTORY) is called. It must
- be of type "ClassName".
--->
-<!ELEMENT faces-context-factory (#PCDATA)>
-
-<!--
- The "from-action" element contains an action reference expression
- that must have been executed (by the default ActionListener for handling
- application level events) in order to select this navigation rule. If
- not specified, this rule will be relevant no matter which action reference
- was executed (or if no action reference was executed).
-
- This value must be of type "Action".
--->
-<!ELEMENT from-action (#PCDATA)>
-
-
-<!--
- The "from-outcome" element contains a logical outcome string returned
- by the execution of an application action method selected via an
- "actionRef" property (or a literal value specified by an "action"
- property) of a UICommand component. If specified, this rule will be
- relevant only if the outcome value matches this element's value. If
- not specified, this rule will be relevant no matter what the outcome
- value was.
--->
-<!ELEMENT from-outcome (#PCDATA)>
-
-
-<!--
- The "from-view-id" element contains the view identifier of the view
- for which the containing navigation rule is relevant. If no
- "from-view" element is specified, this rule applies to navigation
- decisions on all views. If this element is not specified, a value
- of "*" is assumed, meaning that this navigation rule applies to all
- views.
-
- This value must be of type "ViewIdPattern".
--->
-<!ELEMENT from-view-id (#PCDATA)>
-
-
-<!--
- The "key" element is the String representation of a map key that
- will be stored in a managed property of type java.util.Map.
--->
-<!ELEMENT key (#PCDATA)>
-
-
-<!--
- The "key-class" element defines the Java type to which each "key"
- element in a set of "map-entry" elements will be converted to. It
- must be of type "ClassName". If omitted, "java.lang.String"
- is assumed.
--->
-<!ELEMENT key-class (#PCDATA)>
-
-
-<!--
- The "large-icon" element contains the resource path to a large (32x32)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
- The "lifecycle-factory" element contains the fully qualified class name
- of the concrete LifecycleFactory implementation class that will be called
- when FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT lifecycle-factory (#PCDATA)>
-
-<!--
- The "managed-bean-class" element represents the fully qualified class
- name of the Java class that will be used to instantiate a new instance
- if creation of the specified managed bean is requested. It must be of
- type "ClassName".
-
- The specified class must conform to standard JavaBeans conventions.
- In particular, it must have a public zero-arguments constructor, and
- zero or more public property setters.
--->
-<!ELEMENT managed-bean-class (#PCDATA)>
-
-
-<!--
- The "managed-bean-name" element represents the attribute name under
- which a managed bean will be searched for, as well as stored (unless
- the "managed-bean-scope" value is "none"). It must be of type
- "Identifier".
--->
-<!ELEMENT managed-bean-name (#PCDATA)>
-
-
-<!--
- The "managed-bean-scope" element represents the scope into which a newly
- created instance of the specified managed bean will be stored (unless
- the value is "none"). It must be of type "ScopeOrNone".
--->
-<!ELEMENT managed-bean-scope (#PCDATA)>
-
-<!--
- The "navigation-handler" element contains the fully qualified class name
- of the concrete NavigationHandler implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle,
- if the default ActionListener (provided by the JSF implementation) is used.
- It must be of type "ClassName".
--->
-<!ELEMENT navigation-handler (#PCDATA)>
-
-<!--
-The "phase-listener" element contains the fully qualified class
-name of the concrete PhaseListener implementation class that will be
-registered on the Lifecycle. It must be of type "ClassName".
--->
-<!ELEMENT phase-listener (#PCDATA)>
-
-<!--
- The "redirect" element indicates that navigation to the specified
- "to-view-id" should be accomplished by performing an HTTP redirect
- rather than the usual ViewHandler mechanisms.
--->
-<!ELEMENT redirect EMPTY>
-
-<!--
- The "suggested-value" contains the value for the property or
- attribute in which this element resides. This value is advisory
- only and is intended for tools to use when populating pallettes.
--->
-<!ELEMENT suggested-value (#PCDATA)>
-
-
-<!--
-
- The "view-handler" element contains the fully qualified class name
- of the concrete ViewHandler implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT view-handler (#PCDATA)>
-
-<!--
-
- The "state-manager" element contains the fully qualified class name
- of the concrete StateManager implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT state-manager (#PCDATA)>
-
-<!--
- The "null-value" element indicates that the managed property in which we
- are nested will be explicitly set to null if our managed bean is
- automatically created. This is different from omitting the managed
- property element entirely, which will cause no property setter to be
- called for this property.
-
- The "null-value" element can only be used when the associated
- "property-class" identifies a Java class, not a Java primitive.
--->
-<!ELEMENT null-value EMPTY>
-
-
-<!--
- The "property-class" element represents the Java type of the value
- associated with this property name. It must be of type "JavaType".
- If not specified, it can be inferred from existing classes; however,
- this element should be specified if the configuration file is going
- to be the source for generating the corresponding classes.
--->
-<!ELEMENT property-class (#PCDATA)>
-
-
-<!--
- The "property-name" element represents the JavaBeans property name
- under which the corresponding value may be stored.
--->
-<!ELEMENT property-name (#PCDATA)>
-
-
-<!--
- The "property-resolver" element contains the fully qualified class name
- of the concrete PropertyResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT property-resolver (#PCDATA)>
-
-
-<!--
- The "referenced-bean-class" element represents the fully qualified class
- name of the Java class (either abstract or concrete) or Java interface
- implemented by the corresponding referenced bean. It must be of type
- "ClassName".
--->
-<!ELEMENT referenced-bean-class (#PCDATA)>
-
-
-<!--
- The "referenced-bean-name" element represents the attribute name under
- which the corresponding referenced bean may be assumed to be stored,
- in one of the scopes defined by the "Scope" type. It must be of type
- "Identifier".
--->
-<!ELEMENT referenced-bean-name (#PCDATA)>
-
-
-<!--
- The "render-kit-id" element represents an identifier for the
- RenderKit represented by the parent "render-kit" element.
--->
-<!ELEMENT render-kit-id (#PCDATA)>
-
-
-<!--
- The "render-kit-class" element represents the fully qualified class name
- of a concrete RenderKit implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT render-kit-class (#PCDATA)>
-
-
-<!--
- The "renderer-class" element represents the fully qualified class name
- of a concrete Renderer implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT renderer-class (#PCDATA)>
-
-<!--
- The "render-kit-factory" element contains the fully qualified class name
- of the concrete RenderKitFactory implementation class that will be called
- when FactoryFinder.getFactory(RENDER_KIT_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT render-kit-factory (#PCDATA)>
-
-<!--
- The "renderer-type" element represents a renderer type identifier for the
- Renderer represented by the parent "renderer" element.
--->
-<!ELEMENT renderer-type (#PCDATA)>
-
-<!--
- The "small-icon" element contains the resource path to a large (16x16)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
- The "supported-locale" element allows authors to declare which
- locales are supported in this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]] without
- the colons, for example "ja_JP_SJIS". The separators between the
- segments may be '-' or '_'.
--->
-<!ELEMENT supported-locale (#PCDATA)>
-
-<!--
- The "to-view" element contains the view identifier of the next view
- that should be displayed if this navigation rule is matched. It
- must be of type "ViewId".
--->
-<!ELEMENT to-view-id (#PCDATA)>
-
-
-<!--
- The "validator-class" element represents the fully qualified class name
- of a concrete Validator implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT validator-class (#PCDATA)>
-
-
-<!--
- The "validator-id" element represents the identifier under which the
- corresponding Validator class should be registered.
--->
-<!ELEMENT validator-id (#PCDATA)>
-
-
-<!--
- The "value" element is the String representation of a literal
- value to which a scalar managed property will be set, or a value
- binding expression ("#{...}") that will be used to calculate the
- required value. It will be converted as specified for the actual
- property type.
--->
-<!ELEMENT value (#PCDATA)>
-
-
-<!--
- The "value-class" element defines the Java type to which each
- "value" element's value will be converted to, prior to adding it to
- the "list-entries" list for a managed property that is a
- java.util.List, or a "map-entries" map for a managed property that
- is a java.util.Map. It must be of type "ClassName". If omitted,
- "java.lang.String" is assumed.
--->
-<!ELEMENT value-class (#PCDATA)>
-
-<!--
- The "variable-resolver" element contains the fully qualified class name
- of the concrete VariableResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT variable-resolver (#PCDATA)>
-
-
-<!-- ============================ Identifier Attributes ==================== -->
-
-
-<!ATTLIST action-listener id ID #IMPLIED>
-<!ATTLIST application id ID #IMPLIED>
-<!ATTLIST application-factory id ID #IMPLIED>
-<!ATTLIST attribute id ID #IMPLIED>
-<!ATTLIST attribute-class id ID #IMPLIED>
-<!ATTLIST attribute-extension id ID #IMPLIED>
-<!ATTLIST attribute-name id ID #IMPLIED>
-<!ATTLIST component id ID #IMPLIED>
-<!ATTLIST component-class id ID #IMPLIED>
-<!ATTLIST component-extension id ID #IMPLIED>
-<!ATTLIST component-family id ID #IMPLIED>
-<!ATTLIST component-type id ID #IMPLIED>
-<!ATTLIST converter id ID #IMPLIED>
-<!ATTLIST converter-class id ID #IMPLIED>
-<!ATTLIST converter-for-class id ID #IMPLIED>
-<!ATTLIST converter-id id ID #IMPLIED>
-<!ATTLIST default-locale id ID #IMPLIED>
-<!ATTLIST default-render-kit-id id ID #IMPLIED>
-<!ATTLIST default-value id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST faces-config id ID #IMPLIED>
-<!ATTLIST faces-context-factory id ID #IMPLIED>
-<!ATTLIST factory id ID #IMPLIED>
-<!ATTLIST from-action id ID #IMPLIED>
-<!ATTLIST from-outcome id ID #IMPLIED>
-<!ATTLIST from-view-id id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST key id ID #IMPLIED>
-<!ATTLIST key-class id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST lifecycle id ID #IMPLIED>
-<!ATTLIST lifecycle-factory id ID #IMPLIED>
-<!ATTLIST list-entries id ID #IMPLIED>
-<!ATTLIST locale-config id ID #IMPLIED>
-<!ATTLIST managed-bean id ID #IMPLIED>
-<!ATTLIST managed-bean-class id ID #IMPLIED>
-<!ATTLIST managed-bean-name id ID #IMPLIED>
-<!ATTLIST managed-bean-scope id ID #IMPLIED>
-<!ATTLIST managed-property id ID #IMPLIED>
-<!ATTLIST map-entries id ID #IMPLIED>
-<!ATTLIST map-entry id ID #IMPLIED>
-<!ATTLIST message-bundle id ID #IMPLIED>
-<!ATTLIST navigation-case id ID #IMPLIED>
-<!ATTLIST navigation-handler id ID #IMPLIED>
-<!ATTLIST navigation-rule id ID #IMPLIED>
-<!ATTLIST null-value id ID #IMPLIED>
-<!ATTLIST phase-listener id ID #IMPLIED>
-<!ATTLIST property id ID #IMPLIED>
-<!ATTLIST property-class id ID #IMPLIED>
-<!ATTLIST property-extension id ID #IMPLIED>
-<!ATTLIST property-name id ID #IMPLIED>
-<!ATTLIST property-resolver id ID #IMPLIED>
-<!ATTLIST redirect id ID #IMPLIED>
-<!ATTLIST referenced-bean id ID #IMPLIED>
-<!ATTLIST referenced-bean-class id ID #IMPLIED>
-<!ATTLIST referenced-bean-name id ID #IMPLIED>
-<!ATTLIST render-kit id ID #IMPLIED>
-<!ATTLIST render-kit-class id ID #IMPLIED>
-<!ATTLIST render-kit-factory id ID #IMPLIED>
-<!ATTLIST render-kit-id id ID #IMPLIED>
-<!ATTLIST renderer id ID #IMPLIED>
-<!ATTLIST renderer-class id ID #IMPLIED>
-<!ATTLIST renderer-extension id ID #IMPLIED>
-<!ATTLIST renderer-type id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST state-manager id ID #IMPLIED>
-<!ATTLIST suggested-value id ID #IMPLIED>
-<!ATTLIST supported-locale id ID #IMPLIED>
-<!ATTLIST to-view-id id ID #IMPLIED>
-<!ATTLIST validator id ID #IMPLIED>
-<!ATTLIST validator-class id ID #IMPLIED>
-<!ATTLIST validator-id id ID #IMPLIED>
-<!ATTLIST value id ID #IMPLIED>
-<!ATTLIST value-class id ID #IMPLIED>
-<!ATTLIST variable-resolver id ID #IMPLIED>
-<!ATTLIST view-handler id ID #IMPLIED>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_1.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_1.dtd
deleted file mode 100644
index 03dad8e2e6..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_1.dtd
+++ /dev/null
@@ -1,895 +0,0 @@
-<!--
- DTD for the JavaServer Faces Application Configuration File (Version 1.1)
-
- To support validation of your configuration file(s), include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
- $Id: web-facesconfig_1_1.dtd,v 1.1 2007/05/25 21:12:48 david_williams Exp $
-
--->
-
-
-<!-- ==================== Defined Types =================================== -->
-
-
-<!--
- An "Action" is a String that represents a method binding
- expression that points at a method with no arguments that returns a
- String. It must be bracketed with "#{}", for example,
- "#{cardemo.buyCar}".
--->
-<!ENTITY % Action "CDATA">
-
-
-<!--
- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!--
- An "Identifier" is a string of characters that conforms to the variable
- naming conventions of the Java programming language (JLS Section ?.?.?).
--->
-<!ENTITY % Identifier "CDATA">
-
-
-<!--
- A "JavaType" is either the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element, or
- the name of a Java primitive type (such as int or char). The class name
- or primitive type may optionally be followed by "[]" to indicate that
- the underlying data must be an array, rather than a scalar variable.
--->
-<!ENTITY % JavaType "CDATA">
-
-
-<!--
- A "Language" is a lower case two-letter code for a language as defined
- by ISL-639.
--->
-<!ENTITY % Language "CDATA">
-
-
-<!--
- A "ResourcePath" is the relative or absolute path to a resource file
- (such as a logo image).
--->
-<!ENTITY % ResourcePath "CDATA">
-
-
-<!--
- A "Scope" is the well-known name of a scope in which managed beans may
- optionally be defined to be created in.
--->
-<!ENTITY % Scope "(request|session|application)">
-
-
-
-<!--
- A "ScopeOrNone" element defines the legal values for the
- <managed-bean-scope> element's body content, which includes
- all of the scopes respresented by the "Scope" type, plus the
- "none" value indicating that a created bean should not be
- stored into any scope.
--->
-<!ENTITY % ScopeOrNone "(request|session|application|none)">
-
-
-<!--
- A "ViewIdPattern" is a pattern for matching view identifiers in
- order to determine whether a particular navigation rule should be
- fired. It must contain one of the following values:
-
- - The exact match for a view identifier that is recognized
- by the the ViewHandler implementation being used (such as
- "/index.jsp" if you are using the default ViewHandler).
-
- - A proper prefix of a view identifier, plus a trailing "*"
- character. This pattern indicates that all view identifiers that
- match the portion of the pattern up to the asterisk will match the
- surrounding rule. When more than one match exists, the match with
- the longest pattern is selected.
-
- - An "*" character, which means that this pattern applies to all
- view identifiers.
--->
-<!ENTITY % ViewIdPattern "CDATA">
-
-
-<!-- ==================== Top Level Elements ============================== -->
-
-
-<!--
- The "faces-config" element is the root of the configuration information
- hierarchy, and contains nested elements for all of the other configuration
- settings.
--->
-<!ELEMENT faces-config ((application|factory|component|converter|managed-bean|navigation-rule|referenced-bean|render-kit|lifecycle|validator)*)>
-<!ATTLIST faces-config
- xmlns CDATA #FIXED "http://java.sun.com/JSF/Configuration">
-
-
-
-<!-- ==================== Definition Elements ============================= -->
-
-
-<!--
- The "application" element provides a mechanism to define the various
- per-application-singleton implementation artifacts for a particular web
- application that is utilizing JavaServer Faces. For nested elements
- that are not specified, the JSF implementation must provide a suitable
- default.
--->
-<!ELEMENT application ((action-listener|default-render-kit-id|message-bundle|navigation-handler|view-handler|state-manager|property-resolver|variable-resolver|locale-config)*)>
-
-
-<!--
- The "factory" element provides a mechanism to define the various
- Factories that comprise parts of the implementation of JavaServer
- Faces. For nested elements that are not specified, the JSF
- implementation must provide a suitable default.
--->
-<!ELEMENT factory ((application-factory|faces-context-factory|lifecycle-factory|render-kit-factory)*)>
-
-
-<!--
- The "attribute" element represents a named, typed, value associated with
- the parent UIComponent via the generic attributes mechanism.
-
- Attribute names must be unique within the scope of the parent (or related)
- component.
--->
-<!ELEMENT attribute (description*, display-name*, icon*, attribute-name, attribute-class, default-value?, suggested-value?, attribute-extension*)>
-
-<!--
- Extension element for attribute. May contain implementation
- specific content.
--->
-<!ELEMENT attribute-extension ANY>
-
-
-<!--
- The "component" element represents a concrete UIComponent implementation
- class that should be registered under the specified type identifier,
- along with its associated properties and attributes. Component types must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that are recognized
- by the implementation logic of this component. Nested "property" elements
- identify JavaBeans properties of the component class that may be exposed
- for manipulation via tools.
--->
-<!ELEMENT component (description*, display-name*, icon*, component-type, component-class, facet*, attribute*, property*, component-extension*)>
-
-<!--
- Extension element for component. May contain implementation
- specific content.
--->
-<!ELEMENT component-extension ANY>
-
-<!--
- Define the name and other design-time information for a facet that is
- associated with a renderer or a component.
--->
-
-<!ELEMENT facet (description*, display-name*, icon*, facet-name, facet-extension*)>
-
-<!--
- Extension element for facet. May contain implementation
- specific content.
--->
-<!ELEMENT facet-extension ANY>
-
-<!--
- The "facet-name" element represents the facet name under which a
- UIComponent will be added to its parent. It must be of type
- "Identifier".
--->
-<!ELEMENT facet-name (#PCDATA)>
-
-<!--
- The "converter" element represents a concrete Converter implementation
- class that should be registered under the specified converter identifier.
- Converter identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Converter. Nested "property" elements identify JavaBeans
- properties of the Converter implementation class that may be configured
- to affect the operation of the Converter.
--->
-<!ELEMENT converter (description*, display-name*, icon*, (converter-id | converter-for-class), converter-class, attribute*, property*)>
-
-
-<!--
- The "icon" element contains "small-icon" and "large-icon" elements that
- specify the resoruce paths for small and large GIF or JPG icon images
- used to represent the parent element in a GUI tool.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon xml:lang %Language; #IMPLIED>
-
-<!--
- The "lifecycle" element provides a mechanism to specify
- modifications to the behaviour of the default Lifecycle
- implementation for this web application.
--->
-<!ELEMENT lifecycle (phase-listener*)>
-
-<!--
- The "locale-config" element allows the app developer to declare the
- supported locales for this application.
--->
-<!ELEMENT locale-config (default-locale?, supported-locale*)>
-
-<!--
- The "managed-bean" element represents a JavaBean, of a particular class,
- that will be dynamically instantiated at runtime (by the default
- VariableResolver implementation) if it is referenced as the first element
- of a value binding expression, and no corresponding bean can be
- identified in any scope. In addition to the creation of the managed bean,
- and the optional storing of it into the specified scope, the nested
- managed-property elements can be used to initialize the contents of
- settable JavaBeans properties of the created instance.
--->
-<!ELEMENT managed-bean (description*, display-name*, icon*, managed-bean-name, managed-bean-class, managed-bean-scope, (managed-property* | map-entries | list-entries))>
-
-
-<!--
- The "managed-property" element represents an individual property of a
- managed bean that will be configured to the specified value (or value set)
- if the corresponding managed bean is automatically created.
--->
-<!ELEMENT managed-property (description*, display-name*, icon*, property-name, property-class?, (map-entries|null-value|value|list-entries))>
-
-
-<!--
- The "map-entry" element reprsents a single key-entry pair that
- will be added to the computed value of a managed property of type
- java.util.Map.
--->
-<!ELEMENT map-entry (key, (null-value|value))>
-
-
-<!--
- The "map-entries' element represents a set of key-entry pairs that
- will be added to the computed value of a managed property of type
- java.util.Map. In addition, the Java class types of the key and entry
- values may be optionally declared.
--->
-<!ELEMENT map-entries (key-class?, value-class?, map-entry*)>
-
-
-<!--
- The base name of a resource bundle representing the message resources
- for this application. See the JavaDocs for the "java.util.ResourceBundle"
- class for more information on the syntax of resource bundle names.
--->
-
-<!ELEMENT message-bundle (#PCDATA)>
-
-
-<!--
- The "navigation-case" element describes a particular combination of
- conditions that must match for this case to be executed, and the
- view id of the component tree that should be selected next.
--->
-<!ELEMENT navigation-case (description*, display-name*, icon*, from-action?, from-outcome?, to-view-id, redirect?)>
-
-
-<!--
- The "navigation-rule" element represents an individual decision rule
- that will be utilized by the default NavigationHandler
- implementation to make decisions on what view should be displayed
- next, based on the view id being processed.
--->
-<!ELEMENT navigation-rule (description*, display-name*, icon*, from-view-id?, navigation-case*)>
-
-
-<!--
- The "property" element represents a JavaBean property of the Java class
- represented by our parent element.
-
- Property names must be unique within the scope of the Java class
- that is represented by the parent element, and must correspond to
- property names that will be recognized when performing introspection
- against that class via java.beans.Introspector.
--->
-<!ELEMENT property (description*, display-name*, icon*, property-name, property-class, default-value?, suggested-value?, property-extension*)>
-
-<!--
- Extension element for property. May contain implementation
- specific content.
--->
-<!ELEMENT property-extension ANY>
-
-<!--
- The "referenced-bean" element represents at design time the promise
- that a Java object of the specified type will exist at runtime in some
- scope, under the specified key. This can be used by design time tools
- to construct user interface dialogs based on the properties of the
- specified class. The presence or absence of a referenced bean
- element has no impact on the JavaServer Faces runtime environment
- inside a web application.
--->
-<!ELEMENT referenced-bean (description*, display-name*, icon*, referenced-bean-name, referenced-bean-class)>
-
-
-<!--
- The "render-kit" element represents a concrete RenderKit implementation
- that should be registered under the specified render-kit-id. If no
- render-kit-id is specified, the identifier of the default RenderKit
- (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
--->
-<!ELEMENT render-kit (description*, display-name*, icon*, render-kit-id?, render-kit-class?, renderer*)>
-
-
-<!--
- The "renderer" element represents a concrete Renderer implementation
- class that should be registered under the specified component family
- and renderer type identifiers, in the RenderKit associated with the
- parent "render-kit" element. Combinations of component family and renderer
- type must be unique within the RenderKit associated with the parent
- "render-kit" element.
-
- Nested "attribute" elements identify generic component attributes that
- are recognized by this renderer.
--->
-<!ELEMENT renderer (description*, display-name*, icon*, component-family, renderer-type, renderer-class, facet*, attribute*, renderer-extension*)>
-
-<!--
- Extension element for renderer. May contain implementation
- specific content.
--->
-<!ELEMENT renderer-extension ANY>
-
-<!--
- The "validator" element represents a concrete Validator implementation
- class that should be registered under the specified validator identifier.
- Validator identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Validator. Nested "property" elements identify JavaBeans
- properties of the Validator implementation class that may be configured
- to affect the operation of the Validator.
--->
-<!ELEMENT validator (description*, display-name*, icon*, validator-id, validator-class, attribute*, property*)>
-
-
-<!--
- The "list-entries" element represents a set of initialization
- elements for a managed property that is a java.util.List or an
- array. In the former case, the "value-class" element can optionally
- be used to declare the Java type to which each value should be
- converted before adding it to the Collection.
--->
-<!ELEMENT list-entries (value-class?, (null-value|value)*)>
-
-
-<!-- ==================== Subordinate Elements ============================ -->
-
-
-<!--
- The "action-listener" element contains the fully qualified class name
- of the concrete ActionListener implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle.
- It must be of type "ClassName".
--->
-<!ELEMENT action-listener (#PCDATA)>
-
-<!--
- The "application-factory" element contains the fully qualified class
- name of the concrete ApplicationFactory implementation class that
- will be called when FactoryFinder.getFactory(APPLICATION_FACTORY) is
- called. It must be of type "ClassName".
--->
-<!ELEMENT application-factory (#PCDATA)>
-
-<!--
- The "attribute-class" element represents the Java type of the value
- associated with this attribute name. It must be of type "ClassName".
--->
-<!ELEMENT attribute-class (#PCDATA)>
-
-
-<!--
- The "attribute-name" element represents the name under which the
- corresponding value will be stored, in the generic attributes of the
- UIComponent we are related to.
--->
-<!ELEMENT attribute-name (#PCDATA)>
-
-
-<!--
- The "component-class" element represents the fully qualified class name
- of a concrete UIComponent implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT component-class (#PCDATA)>
-
-
-<!--
- The "component-family" element represents the component family for
- which the Renderer represented by the parent "renderer" element will be
- used.
--->
-<!ELEMENT component-family (#PCDATA)>
-
-<!--
- The "component-type" element represents the name under which the
- corresponding UIComponent class should be registered.
--->
-<!ELEMENT component-type (#PCDATA)>
-
-
-<!--
- The "converter-class" element represents the fully qualified class name
- of a concrete Converter implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-class (#PCDATA)>
-
-
-<!--
- The "converter-for-class" element represents the fully qualified class name
- for which a Converter class will be registered. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-for-class (#PCDATA)>
-
-
-<!--
- The "converter-id" element represents the identifier under which the
- corresponding Converter class should be registered.
--->
-<!ELEMENT converter-id (#PCDATA)>
-
-<!--
- The "default-render-kit-id" element allows the application to define
- a renderkit to be used other than the standard one.
--->
-<!ELEMENT default-render-kit-id (#PCDATA)>
-
-<!--
- The "default-locale" element declares the default locale for this
- application instance. It must be specified as
- :language:[_:country:[_:variant:]] without the colons, for example
- "ja_JP_SJIS". The separators between the segments may be '-' or
- '_'.
--->
-<!ELEMENT default-locale (#PCDATA)>
-
-<!--
- The "default-value" contains the value for the property or attribute
- in which this element resides. This value differs from the
- "suggested-value" in that the property or attribute must take the
- value, whereas in "suggested-value" taking the value is optional.
--->
-<!ELEMENT default-value (#PCDATA)>
-
-<!--
- The "description" element contains a textual description of the element
- it is nested in, optionally flagged with a language code using the
- "xml:lang" attribute.
--->
-<!ELEMENT description ANY>
-<!ATTLIST description xml:lang %Language; #IMPLIED>
-
-
-<!--
- The "display-name" element is a short descriptive name describing the
- entity associated with the element it is nested in, intended to be
- displayed by tools, and optionally flagged with a language code using
- the "xml:lang" attribute.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name xml:lang %Language; #IMPLIED>
-
-<!--
- The "faces-context-factory" element contains the fully qualified
- class name of the concrete FacesContextFactory implementation class
- that will be called when
- FactoryFinder.getFactory(FACES_CONTEXT_FACTORY) is called. It must
- be of type "ClassName".
--->
-<!ELEMENT faces-context-factory (#PCDATA)>
-
-<!--
- The "from-action" element contains an action reference expression
- that must have been executed (by the default ActionListener for handling
- application level events) in order to select this navigation rule. If
- not specified, this rule will be relevant no matter which action reference
- was executed (or if no action reference was executed).
-
- This value must be of type "Action".
--->
-<!ELEMENT from-action (#PCDATA)>
-
-
-<!--
- The "from-outcome" element contains a logical outcome string returned
- by the execution of an application action method selected via an
- "actionRef" property (or a literal value specified by an "action"
- property) of a UICommand component. If specified, this rule will be
- relevant only if the outcome value matches this element's value. If
- not specified, this rule will be relevant no matter what the outcome
- value was.
--->
-<!ELEMENT from-outcome (#PCDATA)>
-
-
-<!--
- The "from-view-id" element contains the view identifier of the view
- for which the containing navigation rule is relevant. If no
- "from-view" element is specified, this rule applies to navigation
- decisions on all views. If this element is not specified, a value
- of "*" is assumed, meaning that this navigation rule applies to all
- views.
-
- This value must be of type "ViewIdPattern".
--->
-<!ELEMENT from-view-id (#PCDATA)>
-
-
-<!--
- The "key" element is the String representation of a map key that
- will be stored in a managed property of type java.util.Map.
--->
-<!ELEMENT key (#PCDATA)>
-
-
-<!--
- The "key-class" element defines the Java type to which each "key"
- element in a set of "map-entry" elements will be converted to. It
- must be of type "ClassName". If omitted, "java.lang.String"
- is assumed.
--->
-<!ELEMENT key-class (#PCDATA)>
-
-
-<!--
- The "large-icon" element contains the resource path to a large (32x32)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
- The "lifecycle-factory" element contains the fully qualified class name
- of the concrete LifecycleFactory implementation class that will be called
- when FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT lifecycle-factory (#PCDATA)>
-
-<!--
- The "managed-bean-class" element represents the fully qualified class
- name of the Java class that will be used to instantiate a new instance
- if creation of the specified managed bean is requested. It must be of
- type "ClassName".
-
- The specified class must conform to standard JavaBeans conventions.
- In particular, it must have a public zero-arguments constructor, and
- zero or more public property setters.
--->
-<!ELEMENT managed-bean-class (#PCDATA)>
-
-
-<!--
- The "managed-bean-name" element represents the attribute name under
- which a managed bean will be searched for, as well as stored (unless
- the "managed-bean-scope" value is "none"). It must be of type
- "Identifier".
--->
-<!ELEMENT managed-bean-name (#PCDATA)>
-
-
-<!--
- The "managed-bean-scope" element represents the scope into which a newly
- created instance of the specified managed bean will be stored (unless
- the value is "none"). It must be of type "ScopeOrNone".
--->
-<!ELEMENT managed-bean-scope (#PCDATA)>
-
-<!--
- The "navigation-handler" element contains the fully qualified class name
- of the concrete NavigationHandler implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle,
- if the default ActionListener (provided by the JSF implementation) is used.
- It must be of type "ClassName".
--->
-<!ELEMENT navigation-handler (#PCDATA)>
-
-<!--
-The "phase-listener" element contains the fully qualified class
-name of the concrete PhaseListener implementation class that will be
-registered on the Lifecycle. It must be of type "ClassName".
--->
-<!ELEMENT phase-listener (#PCDATA)>
-
-<!--
- The "redirect" element indicates that navigation to the specified
- "to-view-id" should be accomplished by performing an HTTP redirect
- rather than the usual ViewHandler mechanisms.
--->
-<!ELEMENT redirect EMPTY>
-
-<!--
- The "suggested-value" contains the value for the property or
- attribute in which this element resides. This value is advisory
- only and is intended for tools to use when populating pallettes.
--->
-<!ELEMENT suggested-value (#PCDATA)>
-
-
-<!--
-
- The "view-handler" element contains the fully qualified class name
- of the concrete ViewHandler implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT view-handler (#PCDATA)>
-
-<!--
-
- The "state-manager" element contains the fully qualified class name
- of the concrete StateManager implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT state-manager (#PCDATA)>
-
-<!--
- The "null-value" element indicates that the managed property in which we
- are nested will be explicitly set to null if our managed bean is
- automatically created. This is different from omitting the managed
- property element entirely, which will cause no property setter to be
- called for this property.
-
- The "null-value" element can only be used when the associated
- "property-class" identifies a Java class, not a Java primitive.
--->
-<!ELEMENT null-value EMPTY>
-
-
-<!--
- The "property-class" element represents the Java type of the value
- associated with this property name. It must be of type "JavaType".
- If not specified, it can be inferred from existing classes; however,
- this element should be specified if the configuration file is going
- to be the source for generating the corresponding classes.
--->
-<!ELEMENT property-class (#PCDATA)>
-
-
-<!--
- The "property-name" element represents the JavaBeans property name
- under which the corresponding value may be stored.
--->
-<!ELEMENT property-name (#PCDATA)>
-
-
-<!--
- The "property-resolver" element contains the fully qualified class name
- of the concrete PropertyResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT property-resolver (#PCDATA)>
-
-
-<!--
- The "referenced-bean-class" element represents the fully qualified class
- name of the Java class (either abstract or concrete) or Java interface
- implemented by the corresponding referenced bean. It must be of type
- "ClassName".
--->
-<!ELEMENT referenced-bean-class (#PCDATA)>
-
-
-<!--
- The "referenced-bean-name" element represents the attribute name under
- which the corresponding referenced bean may be assumed to be stored,
- in one of the scopes defined by the "Scope" type. It must be of type
- "Identifier".
--->
-<!ELEMENT referenced-bean-name (#PCDATA)>
-
-
-<!--
- The "render-kit-id" element represents an identifier for the
- RenderKit represented by the parent "render-kit" element.
--->
-<!ELEMENT render-kit-id (#PCDATA)>
-
-
-<!--
- The "render-kit-class" element represents the fully qualified class name
- of a concrete RenderKit implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT render-kit-class (#PCDATA)>
-
-
-<!--
- The "renderer-class" element represents the fully qualified class name
- of a concrete Renderer implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT renderer-class (#PCDATA)>
-
-<!--
- The "render-kit-factory" element contains the fully qualified class name
- of the concrete RenderKitFactory implementation class that will be called
- when FactoryFinder.getFactory(RENDER_KIT_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT render-kit-factory (#PCDATA)>
-
-<!--
- The "renderer-type" element represents a renderer type identifier for the
- Renderer represented by the parent "renderer" element.
--->
-<!ELEMENT renderer-type (#PCDATA)>
-
-<!--
- The "small-icon" element contains the resource path to a large (16x16)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
- The "supported-locale" element allows authors to declare which
- locales are supported in this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]] without
- the colons, for example "ja_JP_SJIS". The separators between the
- segments may be '-' or '_'.
--->
-<!ELEMENT supported-locale (#PCDATA)>
-
-<!--
- The "to-view" element contains the view identifier of the next view
- that should be displayed if this navigation rule is matched. It
- must be of type "ViewId".
--->
-<!ELEMENT to-view-id (#PCDATA)>
-
-
-<!--
- The "validator-class" element represents the fully qualified class name
- of a concrete Validator implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT validator-class (#PCDATA)>
-
-
-<!--
- The "validator-id" element represents the identifier under which the
- corresponding Validator class should be registered.
--->
-<!ELEMENT validator-id (#PCDATA)>
-
-
-<!--
- The "value" element is the String representation of a literal
- value to which a scalar managed property will be set, or a value
- binding expression ("#{...}") that will be used to calculate the
- required value. It will be converted as specified for the actual
- property type.
--->
-<!ELEMENT value (#PCDATA)>
-
-
-<!--
- The "value-class" element defines the Java type to which each
- "value" element's value will be converted to, prior to adding it to
- the "list-entries" list for a managed property that is a
- java.util.List, or a "map-entries" map for a managed property that
- is a java.util.Map. It must be of type "ClassName". If omitted,
- "java.lang.String" is assumed.
--->
-<!ELEMENT value-class (#PCDATA)>
-
-<!--
- The "variable-resolver" element contains the fully qualified class name
- of the concrete VariableResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT variable-resolver (#PCDATA)>
-
-
-<!-- ============================ Identifier Attributes ==================== -->
-
-
-<!ATTLIST action-listener id ID #IMPLIED>
-<!ATTLIST application id ID #IMPLIED>
-<!ATTLIST application-factory id ID #IMPLIED>
-<!ATTLIST attribute id ID #IMPLIED>
-<!ATTLIST attribute-class id ID #IMPLIED>
-<!ATTLIST attribute-extension id ID #IMPLIED>
-<!ATTLIST attribute-name id ID #IMPLIED>
-<!ATTLIST component id ID #IMPLIED>
-<!ATTLIST component-class id ID #IMPLIED>
-<!ATTLIST component-extension id ID #IMPLIED>
-<!ATTLIST component-family id ID #IMPLIED>
-<!ATTLIST component-type id ID #IMPLIED>
-<!ATTLIST converter id ID #IMPLIED>
-<!ATTLIST converter-class id ID #IMPLIED>
-<!ATTLIST converter-for-class id ID #IMPLIED>
-<!ATTLIST converter-id id ID #IMPLIED>
-<!ATTLIST default-locale id ID #IMPLIED>
-<!ATTLIST default-render-kit-id id ID #IMPLIED>
-<!ATTLIST default-value id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST faces-config id ID #IMPLIED>
-<!ATTLIST faces-context-factory id ID #IMPLIED>
-<!ATTLIST facet id ID #IMPLIED>
-<!ATTLIST facet-extension id ID #IMPLIED>
-<!ATTLIST facet-name id ID #IMPLIED>
-<!ATTLIST factory id ID #IMPLIED>
-<!ATTLIST from-action id ID #IMPLIED>
-<!ATTLIST from-outcome id ID #IMPLIED>
-<!ATTLIST from-view-id id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST key id ID #IMPLIED>
-<!ATTLIST key-class id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST lifecycle id ID #IMPLIED>
-<!ATTLIST lifecycle-factory id ID #IMPLIED>
-<!ATTLIST list-entries id ID #IMPLIED>
-<!ATTLIST locale-config id ID #IMPLIED>
-<!ATTLIST managed-bean id ID #IMPLIED>
-<!ATTLIST managed-bean-class id ID #IMPLIED>
-<!ATTLIST managed-bean-name id ID #IMPLIED>
-<!ATTLIST managed-bean-scope id ID #IMPLIED>
-<!ATTLIST managed-property id ID #IMPLIED>
-<!ATTLIST map-entries id ID #IMPLIED>
-<!ATTLIST map-entry id ID #IMPLIED>
-<!ATTLIST message-bundle id ID #IMPLIED>
-<!ATTLIST navigation-case id ID #IMPLIED>
-<!ATTLIST navigation-handler id ID #IMPLIED>
-<!ATTLIST navigation-rule id ID #IMPLIED>
-<!ATTLIST null-value id ID #IMPLIED>
-<!ATTLIST phase-listener id ID #IMPLIED>
-<!ATTLIST property id ID #IMPLIED>
-<!ATTLIST property-class id ID #IMPLIED>
-<!ATTLIST property-extension id ID #IMPLIED>
-<!ATTLIST property-name id ID #IMPLIED>
-<!ATTLIST property-resolver id ID #IMPLIED>
-<!ATTLIST redirect id ID #IMPLIED>
-<!ATTLIST referenced-bean id ID #IMPLIED>
-<!ATTLIST referenced-bean-class id ID #IMPLIED>
-<!ATTLIST referenced-bean-name id ID #IMPLIED>
-<!ATTLIST render-kit id ID #IMPLIED>
-<!ATTLIST render-kit-class id ID #IMPLIED>
-<!ATTLIST render-kit-factory id ID #IMPLIED>
-<!ATTLIST render-kit-id id ID #IMPLIED>
-<!ATTLIST renderer id ID #IMPLIED>
-<!ATTLIST renderer-class id ID #IMPLIED>
-<!ATTLIST renderer-extension id ID #IMPLIED>
-<!ATTLIST renderer-type id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST state-manager id ID #IMPLIED>
-<!ATTLIST suggested-value id ID #IMPLIED>
-<!ATTLIST supported-locale id ID #IMPLIED>
-<!ATTLIST to-view-id id ID #IMPLIED>
-<!ATTLIST validator id ID #IMPLIED>
-<!ATTLIST validator-class id ID #IMPLIED>
-<!ATTLIST validator-id id ID #IMPLIED>
-<!ATTLIST value id ID #IMPLIED>
-<!ATTLIST value-class id ID #IMPLIED>
-<!ATTLIST variable-resolver id ID #IMPLIED>
-<!ATTLIST view-handler id ID #IMPLIED>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_2.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_2.xsd
deleted file mode 100644
index de857f0f0c..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_2.xsd
+++ /dev/null
@@ -1,2071 +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"
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.2">
-
- <xsd:annotation>
- <xsd:documentation>
- $Id: web-facesconfig_1_2.xsd,v 1.1 2007/05/25 21:12:49 david_williams Exp $
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2005 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, Java EE,
- 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[
-
- The XML Schema for the JavaServer Faces Application
- Configuration File (Version 1.2).
-
- All JavaServer Faces configuration files must indicate
- the JavaServer Faces schema by indicating the JavaServer
- Faces namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="..."
- version="1.2">
- ...
- </faces-config>
-
- The instance documents may indicate the published
- version of the schema using xsi:schemaLocation attribute
- for javaee namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd
-
- ]]>
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
- <!-- **************************************************** -->
-
- <xsd:element name = "faces-config" type="javaee:faces-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "faces-config" element is the root of the configuration
- information hierarchy, and contains nested elements for all
- of the other configuration settings.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:unique name="faces-config-converter-ID-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- Converter IDs must be unique within a document.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:converter"/>
- <xsd:field xpath="javaee:converter-id"/>
- </xsd:unique>
-
- <xsd:unique name="faces-config-converter-for-class-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- 'converter-for-class' element values must be unique
- within a document.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:converter"/>
- <xsd:field xpath="javaee:converter-for-class"/>
- </xsd:unique>
-
- <xsd:unique name="faces-config-validator-ID-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- Validator IDs must be unique within a document.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:validator"/>
- <xsd:field xpath="javaee:validator-id"/>
- </xsd:unique>
-
- <xsd:unique name="faces-config-managed-bean-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- Managed bean names must be unique within a document.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:managed-bean"/>
- <xsd:field xpath="javaee:managed-bean-name"/>
- </xsd:unique>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "faces-config" element is the root of the configuration
- information hierarchy, and contains nested elements for all
- of the other configuration settings.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="application"
- type="javaee:faces-config-applicationType"/>
- <xsd:element name="factory"
- type="javaee:faces-config-factoryType"/>
- <xsd:element name="component"
- type="javaee:faces-config-componentType"/>
- <xsd:element name="converter"
- type="javaee:faces-config-converterType"/>
- <xsd:element name="managed-bean"
- type="javaee:faces-config-managed-beanType"/>
- <xsd:element name="navigation-rule"
- type="javaee:faces-config-navigation-ruleType"/>
- <xsd:element name="referenced-bean"
- type="javaee:faces-config-referenced-beanType"/>
- <xsd:element name="render-kit"
- type="javaee:faces-config-render-kitType"/>
- <xsd:element name="lifecycle"
- type="javaee:faces-config-lifecycleType"/>
- <xsd:element name="validator"
- type="javaee:faces-config-validatorType"/>
- <xsd:element name="faces-config-extension"
- type="javaee:faces-config-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:choice>
- <xsd:attribute name = "id" type = "xsd:ID"/>
- <xsd:attribute name="version"
- type="javaee:faces-config-versionType"
- use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for faces-config. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-applicationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "application" element provides a mechanism to define the
- various per-application-singleton implementation artifacts for
- a particular web application that is utilizing
- JavaServer Faces. For nested elements that are not specified,
- the JSF implementation must provide a suitable default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="action-listener"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "action-listener" element contains the fully
- qualified class name of the concrete
- ActionListener implementation class that will be
- called during the Invoke Application phase of the
- request processing lifecycle.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="default-render-kit-id"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "default-render-kit-id" element allows the
- application to define a renderkit to be used other
- than the standard one.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-bundle"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The base name of a resource bundle representing
- the message resources for this application. See
- the JavaDocs for the "java.util.ResourceBundle"
- class for more information on the syntax of
- resource bundle names.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="navigation-handler"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "navigation-handler" element contains the
- fully qualified class name of the concrete
- NavigationHandler implementation class that will
- be called during the Invoke Application phase
- of the request processing lifecycle, if the
- default ActionListener (provided by the JSF
- implementation) is used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="view-handler"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "view-handler" element contains the fully
- qualified class name of the concrete ViewHandler
- implementation class that will be called during
- the Restore View and Render Response phases of the
- request processing lifecycle. The faces
- implementation must provide a default
- implementation of this class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="state-manager"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "state-manager" element contains the fully
- qualified class name of the concrete StateManager
- implementation class that will be called during
- the Restore View and Render Response phases of the
- request processing lifecycle. The faces
- implementation must provide a default
- implementation of this class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="el-resolver"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "el-resolver" element contains the fully
- qualified class name of the concrete
- javax.el.ELResolver implementation class
- that will be used during the processing of
- EL expressions.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property-resolver"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-resolver" element contains the fully
- qualified class name of the concrete
- PropertyResolver implementation class that will
- be used during the processing of value binding
- expressions.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="variable-resolver"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "variable-resolver" element contains the fully
- qualified class name of the concrete
- VariableResolver implementation class that will
- be used during the processing of value binding
- expressions.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element
- name="locale-config"
- type="javaee:faces-config-locale-configType"/>
- <xsd:element
- name="resource-bundle"
- type="javaee:faces-config-application-resource-bundleType"/>
- <xsd:element name="application-extension"
- type="javaee:faces-config-application-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:choice>
- <xsd:attribute name = "id" type = "xsd:ID"/>
- </xsd:complexType>
-
- <xsd:complexType name="faces-config-application-resource-bundleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-bundle element inside the application element
- references a java.util.ResourceBundle instance by name
- using the var element. ResourceBundles referenced in this
- manner may be returned by a call to
- Application.getResourceBundle() passing the current
- FacesContext for this request and the value of the var
- element below.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="base-name"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The fully qualified class name of the
- java.util.ResourceBundle instance.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="var"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The name by which this ResourceBundle instance
- is retrieved by a call to
- Application.getResourceBundle().
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-application-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for application. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-factoryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "factory" element provides a mechanism to define the
- various Factories that comprise parts of the implementation
- of JavaServer Faces. For nested elements that are not
- specified, the JSF implementation must provide a suitable
- default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="application-factory"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "application-factory" element contains the
- fully qualified class name of the concrete
- ApplicationFactory implementation class that will
- be called when
- FactoryFinder.getFactory(APPLICATION_FACTORY) is
- called.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="faces-context-factory"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "faces-context-factory" element contains the
- fully qualified class name of the concrete
- FacesContextFactory implementation class that will
- be called when
- FactoryFinder.getFactory(FACES_CONTEXT_FACTORY)
- is called.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="lifecycle-factory"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "lifecycle-factory" element contains the fully
- qualified class name of the concrete LifecycleFactory
- implementation class that will be called when
- FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="render-kit-factory"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "render-kit-factory" element contains the fully
- qualified class name of the concrete RenderKitFactory
- implementation class that will be called when
- FactoryFinder.getFactory(RENDER_KIT_FACTORY) is
- called.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="factory-extension"
- type="javaee:faces-config-factory-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:choice>
- <xsd:attribute name = "id" type = "xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-factory-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for factory. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-attributeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "attribute" element represents a named, typed, value
- associated with the parent UIComponent via the generic
- attributes mechanism.
-
- Attribute names must be unique within the scope of the parent
- (or related) component.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="attribute-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "attribute-name" element represents the name under
- which the corresponding value will be stored, in the
- generic attributes of the UIComponent we are related
- to.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="attribute-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "attribute-class" element represents the Java type
- of the value associated with this attribute name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="default-value"
- type="javaee:faces-config-default-valueType"
- minOccurs="0"/>
- <xsd:element name="suggested-value"
- type="javaee:faces-config-suggested-valueType"
- minOccurs="0"/>
- <xsd:element name="attribute-extension"
- type="javaee:faces-config-attribute-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name = "id" type = "xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-attribute-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for attribute. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-componentType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "component" element represents a concrete UIComponent
- implementation class that should be registered under the
- specified type identifier, along with its associated
- properties and attributes. Component types must be unique
- within the entire web application.
-
- Nested "attribute" elements identify generic attributes that
- are recognized by the implementation logic of this component.
- Nested "property" elements identify JavaBeans properties of
- the component class that may be exposed for manipulation
- via tools.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="component-type"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "component-type" element represents the name under
- which the corresponding UIComponent class should be
- registered.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="component-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "component-class" element represents the fully
- qualified class name of a concrete UIComponent
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="facet"
- type="javaee:faces-config-facetType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="attribute"
- type="javaee:faces-config-attributeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="property"
- type="javaee:faces-config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="component-extension"
- type="javaee:faces-config-component-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-component-extensionType">
- <xsd:annotation>
- <xsd:documentation>
- Extension element for component. It may contain
- implementation specific content.
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-default-localeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "default-locale" element declares the default locale
- for this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]]
- without the colons, for example "ja_JP_SJIS". The
- separators between the segments may be '-' or '_'.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:faces-config-localeType">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
-
- <xsd:complexType name="faces-config-default-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "default-value" contains the value for the property or
- attribute in which this element resides. This value differs
- from the "suggested-value" in that the property or attribute
- must take the value, whereas in "suggested-value" taking the
- value is optional.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="faces-config-el-expressionType">
- <xsd:annotation>
- <xsd:documentation>
-
- EL expressions present within a faces config file
- must start with the character sequence of '#{' and
- end with '}'.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="#\{.*\}"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-facetType">
- <xsd:annotation>
- <xsd:documentation>
-
- Define the name and other design-time information for a facet
- that is associated with a renderer or a component.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="facet-name"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "facet-name" element represents the facet name
- under which a UIComponent will be added to its parent.
- It must be of type "Identifier".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="facet-extension"
- type="javaee:faces-config-facet-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-facet-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for facet. It may contain implementation
- specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-from-view-idType">
- <xsd:annotation>
- <xsd:documentation>
-
- The value of from-view-id must contain one of the following
- values:
-
- - The exact match for a view identifier that is recognized
- by the the ViewHandler implementation being used (such as
- "/index.jsp" if you are using the default ViewHandler).
-
- - A proper prefix of a view identifier, plus a trailing
- "*" character. This pattern indicates that all view
- identifiers that match the portion of the pattern up to
- the asterisk will match the surrounding rule. When more
- than one match exists, the match with the longest pattern
- is selected.
-
- - An "*" character, which means that this pattern applies
- to all view identifiers.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-from-actionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "from-action" element contains an action reference
- expression that must have been executed (by the default
- ActionListener for handling application level events)
- in order to select the navigation rule. If not specified,
- this rule will be relevant no matter which action reference
- was executed (or if no action reference was executed).
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:faces-config-el-expressionType">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-converterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "converter" element represents a concrete Converter
- implementation class that should be registered under the
- specified converter identifier. Converter identifiers must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that
- may be configured on the corresponding UIComponent in order
- to affect the operation of the Converter. Nested "property"
- elements identify JavaBeans properties of the Converter
- implementation class that may be configured to affect the
- operation of the Converter. "attribute" and "property"
- elements are intended to allow component developers to
- more completely describe their components to tools and users.
- These elements have no required runtime semantics.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:choice>
- <xsd:element name="converter-id"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "converter-id" element represents the
- identifier under which the corresponding
- Converter class should be registered.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="converter-for-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "converter-for-class" element represents the
- fully qualified class name for which a Converter
- class will be registered.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
-
- <xsd:element name="converter-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "converter-class" element represents the fully
- qualified class name of a concrete Converter
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="attribute"
- type="javaee:faces-config-attributeType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Nested "attribute" elements identify generic
- attributes that may be configured on the
- corresponding UIComponent in order to affect the
- operation of the Converter. This attribute is
- primarily for design-time tools and is not
- specified to have any meaning at runtime.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property"
- type="javaee:faces-config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Nested "property" elements identify JavaBeans
- properties of the Converter implementation class
- that may be configured to affect the operation of
- the Converter. This attribute is primarily for
- design-time tools and is not specified to have
- any meaning at runtime.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="converter-extension"
- type="javaee:faces-config-converter-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-converter-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for converter. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-lifecycleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "lifecycle" element provides a mechanism to specify
- modifications to the behaviour of the default Lifecycle
- implementation for this web application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="phase-listener"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded">
-
- <xsd:annotation>
- <xsd:documentation>
-
- The "phase-listener" element contains the fully
- qualified class name of the concrete PhaseListener
- implementation class that will be registered on
- the Lifecycle.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="lifecycle-extension"
- type="javaee:faces-config-lifecycle-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-lifecycle-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for lifecycle. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="faces-config-localeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localeType defines valid locale defined by ISO-639-1
- and ISO-3166.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="[a-z]{2}(_|-)?([\p{L}\-\p{Nd}]{2})?"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-locale-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "locale-config" element allows the app developer to
- declare the supported locales for this application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="default-locale"
- type="javaee:faces-config-default-localeType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="supported-locale"
- type="javaee:faces-config-supported-localeType"
- minOccurs="0"
- maxOccurs="unbounded">
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-managed-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-bean" element represents a JavaBean, of a
- particular class, that will be dynamically instantiated
- at runtime (by the default VariableResolver implementation)
- if it is referenced as the first element of a value binding
- expression, and no corresponding bean can be identified in
- any scope. In addition to the creation of the managed bean,
- and the optional storing of it into the specified scope,
- the nested managed-property elements can be used to
- initialize the contents of settable JavaBeans properties of
- the created instance.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="managed-bean-name"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-bean-name" element represents the
- attribute name under which a managed bean will
- be searched for, as well as stored (unless the
- "managed-bean-scope" value is "none").
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="managed-bean-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-bean-class" element represents the fully
- qualified class name of the Java class that will be
- used`to instantiate a new instance if creation of the
- specified`managed bean is requested.
-
- The specified class must conform to standard JavaBeans
- conventions. In particular, it must have a public
- zero-arguments constructor, and zero or more public
- property setters.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element
- name="managed-bean-scope"
- type="javaee:faces-config-managed-bean-scopeOrNoneType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-bean-scope" element represents the scope
- into which a newly created instance of the specified
- managed bean will be stored (unless the value is
- "none").
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="managed-property"
- type="javaee:faces-config-managed-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="map-entries"
- type="javaee:faces-config-map-entriesType"/>
- <xsd:element name="list-entries"
- type="javaee:faces-config-list-entriesType"/>
- </xsd:choice>
- <xsd:element name="managed-bean-extension"
- type="javaee:faces-config-managed-bean-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-managed-bean-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for managed-bean. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-managed-bean-scopeOrNoneType">
- <xsd:annotation>
- <xsd:documentation>
-
- <![CDATA[
- Defines the legal values for the <managed-bean-scope>
- element's body content, which includes all of the scopes
- normally used in a web application, plus the "none" value
- indicating that a created bean should not be stored into
- any scope.
- ]]>
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="request"/>
- <xsd:enumeration value="session"/>
- <xsd:enumeration value="application"/>
- <xsd:enumeration value="none"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-managed-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-property" element represents an individual
- property of a managed bean that will be configured to the
- specified value (or value set) if the corresponding
- managed bean is automatically created.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="property-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-name" element represents the JavaBeans
- property name under which the corresponding value may
- be stored.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property-class"
- type="javaee:java-typeType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-class" element represents the Java type
- of the value associated with this property name.
- If not specified, it can be inferred from existing
- classes; however, this element should be specified
- if the configuration file is going to be the source
- for generating the corresponding classes.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="map-entries"
- type="javaee:faces-config-map-entriesType"/>
- <xsd:element name="null-value"
- type="javaee:faces-config-null-valueType">
- </xsd:element>
- <xsd:element name="value"
- type="javaee:faces-config-valueType"/>
- <xsd:element name="list-entries"
- type="javaee:faces-config-list-entriesType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-map-entryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "map-entry" element reprsents a single key-entry pair
- that will be added to the computed value of a managed
- property of type java.util.Map.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="key"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "key" element is the String representation of a
- map key that will be stored in a managed property of
- type java.util.Map.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="null-value"
- type="javaee:faces-config-null-valueType"/>
- <xsd:element name="value"
- type="javaee:faces-config-valueType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-map-entriesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "map-entries' element represents a set of key-entry pairs
- that will be added to the computed value of a managed property
- of type java.util.Map. In addition, the Java class types
- of the key and entry values may be optionally declared.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="key-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "key-class" element defines the Java type to which
- each "key" element in a set of "map-entry" elements
- will be converted to. If omitted, "java.lang.String"
- is assumed.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="value-class"
- type="javaee:faces-config-value-classType"
- minOccurs="0"/>
- <xsd:element name="map-entry"
- type="javaee:faces-config-map-entryType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-navigation-caseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "navigation-case" element describes a particular
- combination of conditions that must match for this case to
- be executed, and the view id of the component tree that
- should be selected next.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="from-action"
- type="javaee:faces-config-from-actionType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="from-outcome"
- type="javaee:string" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "from-outcome" element contains a logical outcome
- string returned by the execution of an application
- action method selected via an "actionRef" property
- (or a literal value specified by an "action" property)
- of a UICommand component. If specified, this rule
- will be relevant only if the outcome value matches
- this element's value. If not specified, this rule
- will be relevant no matter what the outcome value was.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="to-view-id"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "to-view-id" element contains the view identifier
- of the next view that should be displayed if this
- navigation rule is matched.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element
- name="redirect"
- type="javaee:faces-config-redirectType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-navigation-ruleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "navigation-rule" element represents an individual
- decision rule that will be utilized by the default
- NavigationHandler implementation to make decisions on
- what view should be displayed next, based on the
- view id being processed.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="from-view-id"
- type="javaee:faces-config-from-view-idType"
- minOccurs="0"/>
- <xsd:element name="navigation-case"
- type="javaee:faces-config-navigation-caseType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element
- name="navigation-rule-extension"
- type="javaee:faces-config-navigation-rule-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-navigation-rule-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for navigation-rule. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-null-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "null-value" element indicates that the managed
- property in which we are nested will be explicitly
- set to null if our managed bean is automatically
- created. This is different from omitting the managed
- property element entirely, which will cause no
- property setter to be called for this property.
-
- The "null-value" element can only be used when the
- associated "property-class" identifies a Java class,
- not a Java primitive.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property" element represents a JavaBean property of the
- Java class represented by our parent element.
-
- Property names must be unique within the scope of the Java
- class that is represented by the parent element, and must
- correspond to property names that will be recognized when
- performing introspection against that class via
- java.beans.Introspector.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="property-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-name" element represents the JavaBeans
- property name under which the corresponding value
- may be stored.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property-class"
- type="javaee:java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-class" element represents the Java type
- of the value associated with this property name.
- If not specified, it can be inferred from existing
- classes; however, this element should be specified if
- the configuration file is going to be the source for
- generating the corresponding classes.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="default-value"
- type="javaee:faces-config-default-valueType"
- minOccurs="0"/>
- <xsd:element name="suggested-value"
- type="javaee:faces-config-suggested-valueType"
- minOccurs="0"/>
- <xsd:element name="property-extension"
- type="javaee:faces-config-property-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-property-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for property. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-redirectType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "redirect" element indicates that navigation to the
- specified "to-view-id" should be accomplished by
- performing an HTTP redirect rather than the usual
- ViewHandler mechanisms.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-referenced-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "referenced-bean" element represents at design time the
- promise that a Java object of the specified type will exist at
- runtime in some scope, under the specified key. This can be
- used by design time tools to construct user interface dialogs
- based on the properties of the specified class. The presence
- or absence of a referenced bean element has no impact on the
- JavaServer Faces runtime environment inside a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="referenced-bean-name"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "referenced-bean-name" element represents the
- attribute name under which the corresponding
- referenced bean may be assumed to be stored, in one
- of 'request', 'session', or 'application' scopes.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="referenced-bean-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "referenced-bean-class" element represents the
- fully qualified class name of the Java class
- (either abstract or concrete) or Java interface
- implemented by the corresponding referenced bean.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-render-kitType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "render-kit" element represents a concrete RenderKit
- implementation that should be registered under the specified
- render-kit-id. If no render-kit-id is specified, the
- identifier of the default RenderKit
- (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="render-kit-id"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "render-kit-id" element represents an identifier
- for the RenderKit represented by the parent
- "render-kit" element.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="render-kit-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "render-kit-class" element represents the fully
- qualified class name of a concrete RenderKit
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="renderer"
- type="javaee:faces-config-rendererType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="render-kit-extension"
- type="javaee:faces-config-render-kit-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-rendererType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "renderer" element represents a concrete Renderer
- implementation class that should be registered under the
- specified component family and renderer type identifiers,
- in the RenderKit associated with the parent "render-kit"
- element. Combinations of component family and
- renderer type must be unique within the RenderKit
- associated with the parent "render-kit" element.
-
- Nested "attribute" elements identify generic component
- attributes that are recognized by this renderer.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="component-family"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "component-family" element represents the
- component family for which the Renderer represented
- by the parent "renderer" element will be used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="renderer-type"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "renderer-type" element represents a renderer type
- identifier for the Renderer represented by the parent
- "renderer" element.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="renderer-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "renderer-class" element represents the fully
- qualified class name of a concrete Renderer
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="facet"
- type="javaee:faces-config-facetType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="attribute"
- type="javaee:faces-config-attributeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="renderer-extension"
- type="javaee:faces-config-renderer-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-renderer-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for renderer. It may contain implementation
- specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-render-kit-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for render-kit. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-suggested-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "suggested-value" contains the value for the property or
- attribute in which this element resides. This value is
- advisory only and is intended for tools to use when
- populating pallettes.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-supported-localeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "supported-locale" element allows authors to declare
- which locales are supported in this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]]
- without the colons, for example "ja_JP_SJIS". The
- separators between the segments may be '-' or '_'.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:faces-config-localeType">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-validatorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "validator" element represents a concrete Validator
- implementation class that should be registered under the
- specified validator identifier. Validator identifiers must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that
- may be configured on the corresponding UIComponent in order
- to affect the operation of the Validator. Nested "property"
- elements identify JavaBeans properties of the Validator
- implementation class that may be configured to affect the
- operation of the Validator. "attribute" and "property"
- elements are intended to allow component developers to
- more completely describe their components to tools and users.
- These elements have no required runtime semantics.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="validator-id"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "validator-id" element represents the identifier
- under which the corresponding Validator class should
- be registered.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="validator-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "validator-class" element represents the fully
- qualified class name of a concrete Validator
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="attribute"
- type="javaee:faces-config-attributeType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Nested "attribute" elements identify generic
- attributes that may be configured on the
- corresponding UIComponent in order to affect the
- operation of the Validator. This attribute is
- primarily for design-time tools and is not
- specified to have any meaning at runtime.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="property"
- type="javaee:faces-config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Nested "property" elements identify JavaBeans
- properties of the Validator implementation class
- that may be configured to affect the operation of
- the Validator. This attribute is primarily for
- design-time tools and is not specified to have
- any meaning at runtime.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="validator-extension"
- type="javaee:faces-config-validator-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-validator-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for validator. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="faces-config-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "value" element is the String representation of
- a literal value to which a scalar managed property
- will be set, or a value binding expression ("#{...}")
- that will be used to calculate the required value.
- It will be converted as specified for the actual
- property type.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:union
- memberTypes="javaee:faces-config-el-expressionType xsd:string"/>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-value-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "value-class" element defines the Java type to which each
- "value" element's value will be converted to, prior to adding
- it to the "list-entries" list for a managed property that is
- a java.util.List, or a "map-entries" map for a managed
- property that is a java.util.Map.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-list-entriesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "list-entries" element represents a set of initialization
- elements for a managed property that is a java.util.List or an
- array. In the former case, the "value-class" element can
- optionally be used to declare the Java type to which each
- value should be converted before adding it to the Collection.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="value-class"
- type="javaee:faces-config-value-classType"
- minOccurs="0"/>
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="null-value"
- type="javaee:faces-config-null-valueType"/>
- <xsd:element name="value"
- type="javaee:faces-config-valueType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="faces-config-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type contains the recognized versions of
- faces-config supported.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="1.2"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_1_1.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_1_1.dtd
deleted file mode 100644
index 25c8e87396..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_1_1.dtd
+++ /dev/null
@@ -1,265 +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 DTD defining the JavaServer Pages 1.1 Tag Library
- descriptor (.tld) (XML) file format/syntax.
-
- A Tag Library is a JAR file containing a valid instance of a Tag Library
- Descriptor (taglib.tld) file in the META-INF subdirectory, along with the
- appropriate implementing classes, and other resources required to
- implement the tags defined therein.
-
- -->
-
-<!--
-The taglib tag is the document root, it defines:
-
-tlibversion the version of the tag library implementation
-jspversion the version of JSP the tag library depends upon
-
-shortname a simple default short name that could be used by
- a JSP authoring tool to create names with a mnemonic
- value; for example, the it may be used as the prefered
- prefix value in taglib directives
-uri a uri uniquely identifying this taglib
-info a simple string describing the "use" of this taglib,
- should be user discernable
--->
-
-<!ELEMENT taglib (tlibversion, jspversion?, shortname, uri?, info?, tag+) >
-<!ATTLIST taglib id ID #IMPLIED
- xmlns CDATA #FIXED
- "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"
->
-
-<!--
-Describes this version (number) of the taglibrary (dewey decimal)
-
-#PCDATA ::= [0-9]*{ "."[0-9] }0..3
--->
-
-<!ELEMENT tlibversion (#PCDATA) >
-
-<!--
-Describes the JSP version (number) this taglibrary requires in
-order to function (dewey decimal)
-
-The default is 1.1
-
-#PCDATA ::= [0-9]*{ "."[0-9] }0..3
--->
-
-<!ELEMENT jspversion (#PCDATA) >
-
-<!--
-Defines a short (default) shortname to be used for tags and
-variable names used/created by this tag library. Do not use
-white space, and do not start with digits or underscore.
-
-#PCDATA ::= NMTOKEN
--->
-
-<!ELEMENT shortname (#PCDATA) >
-
-<!--
-Defines a public URI that uniquely identifies this version of
-the taglibrary Leave it empty if it does not apply.
--->
-
-<!ELEMENT uri (#PCDATA) >
-
-<!--
-Defines an arbitrary text string descirbing the tag library
--->
-
-<!ELEMENT info (#PCDATA) >
-
-<!--
-The tag defines a unique tag in this tag library, defining:
-
-- the unique tag/element name
-- the subclass of javax.servlet.jsp.tagext.Tag implementation class
-- an optional subclass of javax.servlet.jsp.tagext.TagExtraInfo
-- the body content type (hint)
-- optional tag-specific information
-- any attributes
--->
-
-<!ELEMENT tag (name, tagclass, teiclass?, bodycontent?, info?, attribute*) >
-
-<!--
-Defines the subclass of javax.serlvet.jsp.tagext.Tag that implements
-the request time semantics for this tag. (required)
-
-#PCDATA ::= fully qualified Java class name
--->
-
-<!ELEMENT tagclass (#PCDATA) >
-
-<!--
-Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo for
-this tag. (optional)
-
-If this is not given, the class is not consulted at translation time.
-
-#PCDATA ::= fully qualified Java class name
--->
-
-<!ELEMENT teiclass (#PCDATA) >
-
-<!--
-Provides a hint as to the content of the body of this tag. Primarily
-intended for use by page composition tools.
-
-There are currently three values specified:
-
-tagdependent The body of the tag is interpreted by the tag
- implementation itself, and is most likely in a
- different "langage", e.g embedded SQL statements.
-
-JSP The body of the tag contains nested JSP syntax
-
-empty The body must be empty
-
-The default (if not defined) is JSP
-
-#PCDATA ::= tagdependent | JSP | empty
-
--->
-
-<!ELEMENT bodycontent (#PCDATA) >
-
-<!--
-The attribute tag defines an attribute for the nesting tag
-
-An attribute definition is composed of:
-
-- the attributes name (required)
-- if the attribute is required or optional (optional)
-- if the attributes value may be dynamically calculated at runtime
- by a scriptlet expression (optional)
-
--->
-
-<!ELEMENT attribute (name, required? , rtexprvalue?) >
-
-<!--
-Defines the canonical name of a tag or attribute being defined
-
-#PCDATA ::= NMTOKEN
--->
-
-<!ELEMENT name (#PCDATA) >
-
-<!--
-Defines if the nesting attribute is required or optional.
-
-#PCDATA ::= true | false | yes | no
-
-If not present then the default is "false", i.e the attribute
-is optional.
--->
-
-<!ELEMENT required (#PCDATA) >
-
-<!--
-Defines if the nesting attribute can have scriptlet expressions as
-a value, i.e the value of the attribute may be dynamically calculated
-at request time, as opposed to a static value determined at translation
-time.
-
-#PCDATA ::= true | false | yes | no
-
-If not present then the default is "false", i.e the attribute
-has a static value
--->
-
-<!ELEMENT rtexprvalue (#PCDATA) >
-
-<!ATTLIST tlibversion id ID #IMPLIED>
-<!ATTLIST jspversion id ID #IMPLIED>
-<!ATTLIST shortname id ID #IMPLIED>
-<!ATTLIST uri id ID #IMPLIED>
-<!ATTLIST info id ID #IMPLIED>
-<!ATTLIST tag id ID #IMPLIED>
-<!ATTLIST tagclass id ID #IMPLIED>
-<!ATTLIST teiclass id ID #IMPLIED>
-<!ATTLIST bodycontent id ID #IMPLIED>
-<!ATTLIST attribute id ID #IMPLIED>
-<!ATTLIST name id ID #IMPLIED>
-<!ATTLIST required id ID #IMPLIED>
-<!ATTLIST rtexprvalue id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_1_2.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_1_2.dtd
deleted file mode 100644
index 602eb5c98e..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_1_2.dtd
+++ /dev/null
@@ -1,468 +0,0 @@
-
-<!--
- Copyright 2002 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
- -->
-
-<!--
-
- This is the DTD defining the JavaServer Pages 1.2 Tag Library
- descriptor (.tld) (XML) file format/syntax.
-
- A Tag Library is a JAR file containing a valid instance of a Tag Library
- Descriptor (taglib.tld) file in the META-INF subdirectory, along with the
- appropriate implementing classes, and other resources required to
- implement the tags defined therein.
-
- Use is subject to license terms.
- -->
-
-<!NOTATION WEB-JSPTAGLIB.1_2 PUBLIC
- "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN">
-
-<!--
-This is the XML DTD for the JSP 1.2 Tag Library Descriptor.
-All JSP 1.2 tag library descriptors must include a DOCTYPE
-of the following form:
-
- <!DOCTYPE taglib
- PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
- "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
-
--->
-
-<!--
-The taglib tag is the document root, it defines:
-
-tlib-version the version of the tag library implementation
-
-jsp-version the version of JSP the tag library depends upon
-
-short-name a simple default short name that could be used by
- a JSP authoring tool to create names with a mnemonic
- value; for example, the it may be used as the prefered
- prefix value in taglib directives
-
-uri a uri uniquely identifying this taglib
-
-display-name the display-name element contains a short name that
- is intended to be displayed by tools
-small-icon optional small-icon that can be used by tools
-
-large-icon optional large-icon that can be used by tools
-
-description a simple string describing the "use" of this taglib,
- should be user discernable
-
-validator optional TagLibraryValidator information
-
-listener optional event listener specification
-
-
--->
-
-<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?,
- display-name?, small-icon?, large-icon?, description?,
- validator?, listener*, tag+) >
-
-<!ATTLIST taglib id ID #IMPLIED
- xmlns CDATA #FIXED
- "http://java.sun.com/JSP/TagLibraryDescriptor"
->
-
-<!--
-Describes this version (number) of the taglibrary (dewey decimal)
-
-#PCDATA ::= [0-9]*{ "."[0-9] }0..3
--->
-
-<!ELEMENT tlib-version (#PCDATA) >
-
-<!--
-Describes the JSP version (number) this taglibrary requires in
-order to function (dewey decimal)
-
-The default is 1.2
-
-#PCDATA ::= [0-9]*{ "."[0-9] }0..3
--->
-
-<!ELEMENT jsp-version (#PCDATA) >
-
-<!--
-Defines a short (default) short-name to be used for tags and
-variable names used/created by this tag library. Do not use
-white space, and do not start with digits or underscore.
-
-#PCDATA ::= NMTOKEN
--->
-
-<!ELEMENT short-name (#PCDATA) >
-
-<!--
-Defines a public URI that uniquely identifies this version of
-the taglibrary. Leave it empty if it does not apply.
--->
-
-<!ELEMENT uri (#PCDATA) >
-
-<!--
-Defines an arbitrary text string descirbing the tag library
--->
-
-<!ELEMENT description (#PCDATA) >
-
-<!--
-
-Defines an optional validator that can be used to
-validate the conformance of a JSP page to using this tag library.
--->
-
-<!ELEMENT validator (validator-class, init-param*, description?) >
-
-
-<!--
-
-Defines the TagLibraryValidator class that can be used to
-validate the conformance of a JSP page to using this tag library.
--->
-
-<!ELEMENT validator-class (#PCDATA) >
-
-
-<!--
-
-The init-param element contains a name/value pair as an
-initialization param
--->
-
-<!ELEMENT init-param (param-name, param-value, description?)>
-
-<!--
-
-The param-name element contains the name of a parameter.
--->
-
-<!ELEMENT param-name (#PCDATA)>
-
-<!--
-
-The param-value element contains the value of a parameter.
--->
-
-<!ELEMENT param-value (#PCDATA)>
-
-
-<!--
-
-Defines an optional event listener object to be instantiated and
-registered automatically.
--->
-
-<!ELEMENT listener (listener-class) >
-
-<!--
-
-The listener-class element declares a class in the application that
-must be registered as a web application listener bean. See the
-Servlet 2.3 specification for details.
--->
-
-<!ELEMENT listener-class (#PCDATA) >
-
-
-<!--
-The tag defines a unique tag in this tag library. It has one
-attribute, id.
-
-The tag element may have several subelements defining:
-
-name The unique action name
-
-tag-class The tag handler class implementing
- javax.servlet.jsp.tagext.Tag
-
-tei-class An optional subclass of
- javax.servlet.jsp.tagext.TagExtraInfo
-
-body-content The body content type
-
-display-name A short name that is intended to be displayed
- by tools
-
-small-icon Optional small-icon that can be used by tools
-
-large-icon Optional large-icon that can be used by tools
-
-description Optional tag-specific information
-
-variable Optional scripting variable information
-
-attribute All attributes of this action
-
-example Optional informal description of an example of a
- use of this tag
-
--->
-
-<!ELEMENT tag (name, tag-class, tei-class?, body-content?, display-name?,
- small-icon?, large-icon?, description?, variable*, attribute*,
- example?) >
-
-<!--
-Defines the subclass of javax.serlvet.jsp.tagext.Tag that implements
-the request time semantics for this tag. (required)
-
-#PCDATA ::= fully qualified Java class name
--->
-
-<!ELEMENT tag-class (#PCDATA) >
-
-<!--
-Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo for
-this tag. (optional)
-
-If this is not given, the class is not consulted at translation time.
-
-#PCDATA ::= fully qualified Java class name
--->
-
-<!ELEMENT tei-class (#PCDATA) >
-
-<!--
-Provides a hint as to the content of the body of this tag. Primarily
-intended for use by page composition tools.
-
-There are currently three values specified:
-
-tagdependent The body of the tag is interpreted by the tag
- implementation itself, and is most likely in a
- different "langage", e.g embedded SQL statements.
-
-JSP The body of the tag contains nested JSP syntax
-
-empty The body must be empty
-
-The default (if not defined) is JSP
-
-#PCDATA ::= tagdependent | JSP | empty
-
--->
-
-<!ELEMENT body-content (#PCDATA) >
-
-<!--
-
-The display-name element contains a short name that is intended
-to be displayed by tools.
--->
-
-<!ELEMENT display-name (#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
-tag library. 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.
--->
-
-<!ELEMENT large-icon (#PCDATA) >
-
-<!--
-
-The small-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
-tag library. 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.
--->
-
-<!ELEMENT small-icon (#PCDATA) >
-
-<!--
-
-The example element contains an informal description of an example
-of the use of a tag.
--->
-
-<!ELEMENT example (#PCDATA) >
-
-<!--
-
-The variable tag provides information on the scripting variables
-defined by this tag. It is a (translation time) error for a tag
-that has one or more variable subelements to have a TagExtraInfo
-class that returns a non-null object.
-
-The subelements of variable are of the form:
-
-name-given The variable name as a constant
-
-name-from-attribute The name of an attribute whose (translation
- time) value will give the name of the
- variable. One of name-given or
- name-from-attribute is required.
-
-variable-class Name of the class of the variable.
- java.lang.String is default.
-
-declare Whether the variable is declared or not.
- True is the default.
-
-scope The scope of the scripting varaible
- defined. NESTED is default.
-
-description Optional description of this variable
-
--->
-
-<!ELEMENT variable ( (name-given | name-from-attribute), variable-class?,
- declare?, scope?, description?) >
-
-<!--
-
-The name for the scripting variable. One of name-given or
-name-from-attribute is required.
--->
-
-<!ELEMENT name-given (#PCDATA) >
-
-<!--
-
-The name of an attribute whose (translation-time) value will give
-the name of the variable. One of name-given or name-from-attribute
-is required.
--->
-
-<!ELEMENT name-from-attribute (#PCDATA) >
-
-<!--
-
-The optional name of the class for the scripting variable. The
-default is java.lang.String.
--->
-
-<!ELEMENT variable-class (#PCDATA) >
-
-<!--
-
-Whether the scripting variable is to be defined or not. See
-TagExtraInfo for details. This element is optional and "true"
-is the default.
--->
-
-<!ELEMENT declare (#PCDATA) >
-
-<!--
-
-The scope of the scripting variable. See TagExtraInfo for details.
-The element is optional and "NESTED" is the default. Other legal
-values are "AT_BEGIN" and "AT_END".
--->
-
-<!ELEMENT scope (#PCDATA) >
-
-<!--
-
-The attribute tag defines an attribute for the nesting tag
-
-An attribute definition is composed of:
-
-- the attributes name (required)
-- if the attribute is required or optional (optional)
-- if the attributes value may be dynamically calculated at runtime
- by a scriptlet expression (optional)
-- the type of the attributes value (optional)
-- an informal description of the meaning of the attribute (optional)
-
--->
-
-
-<!--
-The attribute tag defines an attribute for the nesting tag
-
-An attribute definition is composed of:
-
-- the attributes name (required)
-
-- if the attribute is required or optional (optional)
-
-- if the attributes value may be dynamically calculated at runtime
- by a scriptlet expression (optional)
-
-- the type of the attributes value (optional)
-
-- an informal description of the meaning of the attribute (optional)
--->
-
-<!ELEMENT attribute (name, required? , rtexprvalue?, type?, description?) >
-
-<!--
-Defines the canonical name of a tag or attribute being defined
-
-#PCDATA ::= NMTOKEN
--->
-
-<!ELEMENT name (#PCDATA) >
-
-<!--
-Defines if the nesting attribute is required or optional.
-
-#PCDATA ::= true | false | yes | no
-
-If not present then the default is "false", i.e the attribute
-is optional.
--->
-
-<!ELEMENT required (#PCDATA) >
-
-<!--
-Defines if the nesting attribute can have scriptlet expressions as
-a value, i.e the value of the attribute may be dynamically calculated
-at request time, as opposed to a static value determined at translation
-time.
-
-#PCDATA ::= true | false | yes | no
-
-If not present then the default is "false", i.e the attribute
-has a static value
--->
-
-<!ELEMENT rtexprvalue (#PCDATA) >
-
-
-<!--
-
-Defines the Java type of the attributes value. For static values
-(those determined at translation time) the type is always
-java.lang.String.
--->
-
-<!ELEMENT type (#PCDATA) >
-
-
-<!-- ID attributes -->
-
-<!ATTLIST tlib-version id ID #IMPLIED>
-<!ATTLIST jsp-version id ID #IMPLIED>
-<!ATTLIST short-name id ID #IMPLIED>
-<!ATTLIST uri id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST example id ID #IMPLIED>
-<!ATTLIST tag id ID #IMPLIED>
-<!ATTLIST tag-class id ID #IMPLIED>
-<!ATTLIST tei-class id ID #IMPLIED>
-<!ATTLIST body-content id ID #IMPLIED>
-<!ATTLIST attribute id ID #IMPLIED>
-<!ATTLIST name id ID #IMPLIED>
-<!ATTLIST required id ID #IMPLIED>
-<!ATTLIST rtexprvalue id ID #IMPLIED>
-
-
-<!ATTLIST param-name id ID #IMPLIED>
-<!ATTLIST param-value id ID #IMPLIED>
-<!ATTLIST listener id ID #IMPLIED>
-<!ATTLIST listener-class id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_2_0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_2_0.xsd
deleted file mode 100644
index eb5864190f..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_2_0.xsd
+++ /dev/null
@@ -1,1010 +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"
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="2.0">
-
- <xsd:annotation>
- <xsd:documentation>
- @(#)web-jsptaglibrary_2_0.xsds 1.36 08/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>
- <![CDATA[
-
- This is the XML Schema for the JSP Taglibrary
- descriptor. All Taglibrary descriptors must
- indicate the tag library schema by using the Taglibrary
- namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="..."
- version="2.0">
- ...
- </taglib>
-
- The instance documents may indicate the published
- version of the schema using xsi:schemaLocation attribute
- for J2EE namespace with the following location:
-
- http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="taglib" type="j2ee:tldTaglibType">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglib tag is the document root.
- The definition of taglib is provided
- by the tldTaglibType.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:unique name="tag-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglib element contains, among other things, tag and
- tag-file elements.
- The name subelements of these elements must each be unique.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:tag|j2ee:tag-file"/>
- <xsd:field xpath="j2ee:name"/>
- </xsd:unique>
-
- <xsd:unique name="function-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglib element contains function elements.
- The name subelements of these elements must each be unique.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:function"/>
- <xsd:field xpath="j2ee:name"/>
- </xsd:unique>
-
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="body-contentType">
- <xsd:annotation>
- <xsd:documentation>
-
- Specifies the type of body that is valid for a tag.
- This value is used by the JSP container to validate
- that a tag invocation has the correct body syntax and
- by page composition tools to assist the page author
- in providing a valid tag body.
-
- There are currently four values specified:
-
- tagdependent The body of the tag is interpreted by the tag
- implementation itself, and is most likely
- in a different "language", e.g embedded SQL
- statements.
-
- JSP The body of the tag contains nested JSP
- syntax.
-
- empty The body must be empty
-
- scriptless The body accepts only template text, EL
- Expressions, and JSP action elements. No
- scripting elements are allowed.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="tagdependent"/>
- <xsd:enumeration value="JSP"/>
- <xsd:enumeration value="empty"/>
- <xsd:enumeration value="scriptless"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="extensibleType" abstract="true">
- <xsd:annotation>
- <xsd:documentation>
-
- The extensibleType is an abstract base type that is used to
- define the type of extension-elements. Instance documents
- must substitute a known type to define the extension by
- using xsi:type attribute to define the actual type of
- extension-elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="functionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The function element is used to provide information on each
- function in the tag library that is to be exposed to the EL.
-
- The function element may have several subelements defining:
-
- description Optional tag-specific information
-
- display-name A short name that is intended to be
- displayed by tools
-
- icon Optional icon element that can be used
- by tools
-
- name A unique name for this function
-
- function-class Provides the name of the Java class that
- implements the function
-
- function-signature Provides the signature, as in the Java
- Language Specification, of the Java
- method that is to be used to implement
- the function.
-
- example Optional informal description of an
- example of a use of this function
-
- function-extension Zero or more extensions that provide extra
- information about this function, for tool
- consumption
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="name"
- type="j2ee:tld-canonical-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- A unique name for this function.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="function-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Provides the fully-qualified class name of the Java
- class containing the static method that implements
- the function.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="function-signature"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Provides the signature, of the static Java method that is
- to be used to implement the function. The syntax of the
- function-signature element is as follows:
-
- FunctionSignature ::= ReturnType S MethodName S?
- '(' S? Parameters? S? ')'
-
- ReturnType ::= Type
-
- MethodName ::= Identifier
-
- Parameters ::= Parameter
- | ( Parameter S? ',' S? Parameters )
-
- Parameter ::= Type
-
- Where:
-
- * Type is a basic type or a fully qualified Java class name
- (including package name), as per the 'Type' production
- in the Java Language Specification, Second Edition,
- Chapter 18.
-
- * Identifier is a Java identifier, as per the 'Identifier'
- production in the Java Language Specification, Second
- Edition, Chapter 18.
-
- Example:
-
- java.lang.String nickName( java.lang.String, int )
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="example"
- type="j2ee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The example element contains an informal description
- of an example of the use of this function.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="function-extension"
- type="j2ee:tld-extensionType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Function extensions are for tool use only and must not affect
- the behavior of a container.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tagFileType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines an action in this tag library that is implemented
- as a .tag file.
-
- The tag-file element has two required subelements:
-
- description Optional tag-specific information
-
- display-name A short name that is intended to be
- displayed by tools
-
- icon Optional icon element that can be used
- by tools
-
- name The unique action name
-
- path 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.
-
- example Optional informal description of an
- example of a use of this tag
-
- tag-extension Zero or more extensions that provide extra
- information about this tag, for tool
- consumption
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="name"
- type="j2ee:tld-canonical-nameType"/>
- <xsd:element name="path"
- type="j2ee:pathType"/>
- <xsd:element name="example"
- type="j2ee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The example element contains an informal description
- of an example of the use of a tag.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="tag-extension"
- type="j2ee:tld-extensionType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Tag extensions are for tool use only and must not affect
- the behavior of a container.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tagType">
- <xsd:annotation>
- <xsd:documentation>
-
- The tag defines a unique tag in this tag library. It has one
- attribute, id.
-
- The tag element may have several subelements defining:
-
- description Optional tag-specific information
-
- display-name A short name that is intended to be
- displayed by tools
-
- icon Optional icon element that can be used
- by tools
-
- name The unique action name
-
- tag-class The tag handler class implementing
- javax.servlet.jsp.tagext.JspTag
-
- tei-class An optional subclass of
- javax.servlet.jsp.tagext.TagExtraInfo
-
- body-content The body content type
-
- variable Optional scripting variable information
-
- attribute All attributes of this action that are
- evaluated prior to invocation.
-
- dynamic-attributes Whether this tag supports additional
- attributes with dynamic names. If
- true, the tag-class must implement the
- javax.servlet.jsp.tagext.DynamicAttributes
- interface. Defaults to false.
-
- example Optional informal description of an
- example of a use of this tag
-
- tag-extension Zero or more extensions that provide extra
- information about this tag, for tool
- consumption
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="name"
- type="j2ee:tld-canonical-nameType"/>
- <xsd:element name="tag-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the subclass of javax.serlvet.jsp.tagext.JspTag
- that implements the request time semantics for
- this tag. (required)
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="tei-class"
- type="j2ee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo
- for this tag. (optional)
-
- If this is not given, the class is not consulted at
- translation time.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="body-content"
- type="j2ee:body-contentType">
- <xsd:annotation>
- <xsd:documentation>
-
- Specifies the format for the body of this tag.
- The default in JSP 1.2 was "JSP" but because this
- is an invalid setting for simple tag handlers, there
- is no longer a default in JSP 2.0. A reasonable
- default for simple tag handlers is "scriptless" if
- the tag can have a body.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="variable"
- type="j2ee:variableType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="attribute"
- type="j2ee:tld-attributeType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="dynamic-attributes"
- type="j2ee:generic-booleanType"
- minOccurs="0"/>
- <xsd:element name="example"
- type="j2ee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The example element contains an informal description
- of an example of the use of a tag.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="tag-extension"
- type="j2ee:tld-extensionType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Tag extensions are for tool use only and must not affect
- the behavior of a container.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tld-attributeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The attribute element defines an attribute for the nesting
- tag. The attributre element may have several subelements
- defining:
-
- description a description of the attribute
-
- name the name of the attribute
-
- required whether the attribute is required or
- optional
-
- rtexprvalue whether the attribute is a runtime attribute
-
- type the type of the attributes
-
- fragment whether this attribute is a fragment
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="name"
- type="j2ee:java-identifierType"/>
- <xsd:element name="required"
- type="j2ee:generic-booleanType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines if the nesting attribute is required or
- optional.
-
- If not present then the default is "false", i.e
- the attribute is optional.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:choice>
- <xsd:sequence>
- <xsd:element name="rtexprvalue"
- type="j2ee:generic-booleanType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines if the nesting attribute can have scriptlet
- expressions as a value, i.e the value of the
- attribute may be dynamically calculated at request
- time, as opposed to a static value determined at
- translation time.
-
- If not present then the default is "false", i.e the
- attribute has a static value
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="type"
- type="j2ee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the Java type of the attributes value. For
- static values (those determined at translation time)
- the type is always java.lang.String.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:element name="fragment"
- type="j2ee:generic-booleanType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- "true" if this attribute is of type
- javax.jsp.tagext.JspFragment, representing dynamic
- content that can be re-evaluated as many times
- as needed by the tag handler. If omitted or "false",
- the default is still type="java.lang.String"
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tld-canonical-nameType">
-
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the canonical name of a tag or attribute being
- defined.
-
- The name must conform to the lexical rules for an NMTOKEN.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdNMTOKENType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tld-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The tld-extensionType is used to indicate
- extensions to a specific TLD element.
-
- It is used by elements to designate an extension block
- that is targeted to a specific extension designated by
- a set of extension elements that are declared by a
- namespace. The namespace identifies the extension to
- the tool that processes the extension.
-
- The type of the extension-element is abstract. Therefore,
- a concrete type must be specified by the TLD using
- xsi:type attribute for each extension-element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="extension-element"
- type="j2ee:extensibleType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="namespace"
- use="required"
- type="xsd:anyURI"/>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tldTaglibType">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglib tag is the document root, it defines:
-
- description a simple string describing the "use" of this taglib,
- should be user discernable
-
- display-name the display-name element contains a
- short name that is intended to be displayed
- by tools
-
- icon optional icon that can be used by tools
-
- tlib-version the version of the tag library implementation
-
- short-name a simple default short name that could be
- used by a JSP authoring tool to create
- names with a mnemonic value; for example,
- the it may be used as the prefered prefix
- value in taglib directives
-
- uri a uri uniquely identifying this taglib
-
- validator optional TagLibraryValidator information
-
- listener optional event listener specification
-
- tag tags in this tag library
-
- tag-file tag files in this tag library
-
- function zero or more EL functions defined in this
- tag library
-
- taglib-extension zero or more extensions that provide extra
- information about this taglib, for tool
- consumption
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="tlib-version"
- type="j2ee:dewey-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Describes this version (number) of the taglibrary.
- It is described as a dewey decimal.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
-
- <xsd:element name="short-name"
- type="j2ee:tld-canonical-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a simple default name that could be used by
- a JSP authoring tool to create names with a
- mnemonicvalue; for example, it may be used as the
- preferred prefix value in taglib directives. Do
- not use white space, and do not start with digits
- or underscore.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="uri"
- type="j2ee:xsdAnyURIType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a public URI that uniquely identifies this
- version of the taglibrary. Leave it empty if it
- does not apply.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="validator"
- type="j2ee:validatorType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="listener"
- type="j2ee:listenerType"
- minOccurs="0" maxOccurs="unbounded">
- </xsd:element>
- <xsd:element name="tag"
- type="j2ee:tagType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="tag-file"
- type="j2ee:tagFileType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="function"
- type="j2ee:functionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="taglib-extension"
- type="j2ee:tld-extensionType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Taglib extensions are for tool use only and must not affect
- the behavior of a container.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="2.0"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- Describes the JSP version (number) this taglibrary
- requires in order to function (dewey decimal)
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="validatorType">
- <xsd:annotation>
- <xsd:documentation>
-
- A validator that can be used to validate
- the conformance of a JSP page to using this tag library is
- defined by a validatorType.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="validator-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the TagLibraryValidator class that can be used
- to validate the conformance of a JSP page to using this
- tag library.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="j2ee:param-valueType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The init-param element contains a name/value pair as an
- initialization param.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="variable-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines scope of the scripting variable. See
- TagExtraInfo for details. The allowed values are,
- "NESTED", "AT_BEGIN" and "AT_END".
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="NESTED"/>
- <xsd:enumeration value="AT_BEGIN"/>
- <xsd:enumeration value="AT_END"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="variableType">
- <xsd:annotation>
- <xsd:documentation>
-
- The variableType provides information on the scripting
- variables defined by using this tag. It is a (translation
- time) error for a tag that has one or more variable
- subelements to have a TagExtraInfo class that returns a
- non-null value from a call to getVariableInfo().
-
- The subelements of variableType are of the form:
-
- description Optional description of this
- variable
-
- name-given The variable name as a constant
-
- name-from-attribute The name of an attribute whose
- (translation time) value will
- give the name of the
- variable. One of name-given or
- name-from-attribute is required.
-
- variable-class Name of the class of the variable.
- java.lang.String is default.
-
- declare Whether the variable is declared
- or not. True is the default.
-
- scope The scope of the scripting varaible
- defined. NESTED is default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="name-given"
- type="j2ee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The name for the scripting variable.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="name-from-attribute"
- type="j2ee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The name of an attribute whose
- (translation-time) value will give the name of
- the variable.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- <xsd:element name="variable-class"
- type="j2ee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The optional name of the class for the scripting
- variable. The default is java.lang.String.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
-
- <xsd:element name="declare"
- type="j2ee:generic-booleanType"
- minOccurs="0">
-
- <xsd:annotation>
- <xsd:documentation>
-
- Whether the scripting variable is to be defined
- or not. See TagExtraInfo for details. This
- element is optional and "true" is the default.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="scope"
- type="j2ee:variable-scopeType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element is optional and "NESTED" is the default.
-
- </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/web-jsptaglibrary_2_1.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_2_1.xsd
deleted file mode 100644
index bea8e9b1c9..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_2_1.xsd
+++ /dev/null
@@ -1,1144 +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="2.1">
-
- <xsd:annotation>
- <xsd:documentation>
- @(#)web-jsptaglibrary_2_1.xsds 1.1
- </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 JSP Taglibrary
- descriptor. All Taglibrary descriptors must
- indicate the tag library schema by using the Taglibrary
- namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <taglib xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="..."
- version="2.1">
- ...
- </taglib>
-
- The instance documents may indicate the published
- version of the schema using xsi:schemaLocation attribute
- for Java EE namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="taglib" type="javaee:tldTaglibType">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglib tag is the document root.
- The definition of taglib is provided
- by the tldTaglibType.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:unique name="tag-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglib element contains, among other things, tag and
- tag-file elements.
- The name subelements of these elements must each be unique.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:tag|javaee:tag-file"/>
- <xsd:field xpath="javaee:name"/>
- </xsd:unique>
-
- <xsd:unique name="function-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglib element contains function elements.
- The name subelements of these elements must each be unique.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:function"/>
- <xsd:field xpath="javaee:name"/>
- </xsd:unique>
-
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="body-contentType">
- <xsd:annotation>
- <xsd:documentation>
-
- Specifies the type of body that is valid for a tag.
- This value is used by the JSP container to validate
- that a tag invocation has the correct body syntax and
- by page composition tools to assist the page author
- in providing a valid tag body.
-
- There are currently four values specified:
-
- tagdependent The body of the tag is interpreted by the tag
- implementation itself, and is most likely
- in a different "language", e.g embedded SQL
- statements.
-
- JSP The body of the tag contains nested JSP
- syntax.
-
- empty The body must be empty
-
- scriptless The body accepts only template text, EL
- Expressions, and JSP action elements. No
- scripting elements are allowed.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="tagdependent"/>
- <xsd:enumeration value="JSP"/>
- <xsd:enumeration value="empty"/>
- <xsd:enumeration value="scriptless"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="extensibleType" abstract="true">
- <xsd:annotation>
- <xsd:documentation>
-
- The extensibleType is an abstract base type that is used to
- define the type of extension-elements. Instance documents
- must substitute a known type to define the extension by
- using xsi:type attribute to define the actual type of
- extension-elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="functionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The function element is used to provide information on each
- function in the tag library that is to be exposed to the EL.
-
- The function element may have several subelements defining:
-
- description Optional tag-specific information
-
- display-name A short name that is intended to be
- displayed by tools
-
- icon Optional icon element that can be used
- by tools
-
- name A unique name for this function
-
- function-class Provides the name of the Java class that
- implements the function
-
- function-signature Provides the signature, as in the Java
- Language Specification, of the Java
- method that is to be used to implement
- the function.
-
- example Optional informal description of an
- example of a use of this function
-
- function-extension Zero or more extensions that provide extra
- information about this function, for tool
- consumption
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="name"
- type="javaee:tld-canonical-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- A unique name for this function.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="function-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Provides the fully-qualified class name of the Java
- class containing the static method that implements
- the function.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="function-signature"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Provides the signature, of the static Java method that is
- to be used to implement the function. The syntax of the
- function-signature element is as follows:
-
- FunctionSignature ::= ReturnType S MethodName S?
- '(' S? Parameters? S? ')'
-
- ReturnType ::= Type
-
- MethodName ::= Identifier
-
- Parameters ::= Parameter
- | ( Parameter S? ',' S? Parameters )
-
- Parameter ::= Type
-
- Where:
-
- * Type is a basic type or a fully qualified
- Java class name (including package name),
- as per the 'Type' production in the Java
- Language Specification, Second Edition,
- Chapter 18.
-
- * Identifier is a Java identifier, as per
- the 'Identifier' production in the Java
- Language Specification, Second
- Edition, Chapter 18.
-
- Example:
-
- java.lang.String nickName( java.lang.String, int )
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="example"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The example element contains an informal description
- of an example of the use of this function.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="function-extension"
- type="javaee:tld-extensionType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Function extensions are for tool use only and must not
- affect the behavior of a container.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tagFileType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines an action in this tag library that is implemented
- as a .tag file.
-
- The tag-file element has two required subelements:
-
- description Optional tag-specific information
-
- display-name A short name that is intended to be
- displayed by tools
-
- icon Optional icon element that can be used
- by tools
-
- name The unique action name
-
- path 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.
-
- example Optional informal description of an
- example of a use of this tag
-
- tag-extension Zero or more extensions that provide extra
- information about this tag, for tool
- consumption
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="name"
- type="javaee:tld-canonical-nameType"/>
- <xsd:element name="path"
- type="javaee:pathType"/>
- <xsd:element name="example"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The example element contains an informal description
- of an example of the use of a tag.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="tag-extension"
- type="javaee:tld-extensionType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Tag extensions are for tool use only and must not affect
- the behavior of a container.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tagType">
- <xsd:annotation>
- <xsd:documentation>
-
- The tag defines a unique tag in this tag library. It has one
- attribute, id.
-
- The tag element may have several subelements defining:
-
- description Optional tag-specific information
-
- display-name A short name that is intended to be
- displayed by tools
-
- icon Optional icon element that can be used
- by tools
-
- name The unique action name
-
- tag-class The tag handler class implementing
- javax.servlet.jsp.tagext.JspTag
-
- tei-class An optional subclass of
- javax.servlet.jsp.tagext.TagExtraInfo
-
- body-content The body content type
-
- variable Optional scripting variable information
-
- attribute All attributes of this action that are
- evaluated prior to invocation.
-
- dynamic-attributes Whether this tag supports additional
- attributes with dynamic names. If
- true, the tag-class must implement the
- javax.servlet.jsp.tagext.DynamicAttributes
- interface. Defaults to false.
-
- example Optional informal description of an
- example of a use of this tag
-
- tag-extension Zero or more extensions that provide extra
- information about this tag, for tool
- consumption
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="name"
- type="javaee:tld-canonical-nameType"/>
- <xsd:element name="tag-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the subclass of javax.serlvet.jsp.tagext.JspTag
- that implements the request time semantics for
- this tag. (required)
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="tei-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo
- for this tag. (optional)
-
- If this is not given, the class is not consulted at
- translation time.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="body-content"
- type="javaee:body-contentType">
- <xsd:annotation>
- <xsd:documentation>
-
- Specifies the format for the body of this tag.
- The default in JSP 1.2 was "JSP" but because this
- is an invalid setting for simple tag handlers, there
- is no longer a default in JSP 2.0. A reasonable
- default for simple tag handlers is "scriptless" if
- the tag can have a body.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="variable"
- type="javaee:variableType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="attribute"
- type="javaee:tld-attributeType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="dynamic-attributes"
- type="javaee:generic-booleanType"
- minOccurs="0"/>
- <xsd:element name="example"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The example element contains an informal description
- of an example of the use of a tag.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="tag-extension"
- type="javaee:tld-extensionType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Tag extensions are for tool use only and must not affect
- the behavior of a container.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tld-attributeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The attribute element defines an attribute for the nesting
- tag. The attribute element may have several subelements
- defining:
-
- description a description of the attribute
-
- name the name of the attribute
-
- required whether the attribute is required or
- optional
-
- rtexprvalue whether the attribute is a runtime attribute
-
- type the type of the attributes
-
- fragment whether this attribute is a fragment
-
- deferred-value present if this attribute is to be parsed as a
- javax.el.ValueExpression
-
- deferred-method present if this attribute is to be parsed as a
- javax.el.MethodExpression
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="name"
- type="javaee:java-identifierType"/>
- <xsd:element name="required"
- type="javaee:generic-booleanType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines if the nesting attribute is required or
- optional.
-
- If not present then the default is "false", i.e
- the attribute is optional.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:sequence>
- <xsd:sequence minOccurs="0">
- <xsd:element name="rtexprvalue"
- type="javaee:generic-booleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines if the nesting attribute can have scriptlet
- expressions as a value, i.e the value of the
- attribute may be dynamically calculated at request
- time, as opposed to a static value determined at
- translation time.
- If not present then the default is "false", i.e the
- attribute has a static value
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the Java type of the attributes value.
- If this element is omitted, the expected type is
- assumed to be "java.lang.Object".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
-
- <xsd:choice>
- <xsd:element name="deferred-value"
- type="javaee:tld-deferred-valueType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Present if the value for this attribute is to be
- passed to the tag handler as a
- javax.el.ValueExpression. This allows for deferred
- evaluation of EL expressions. An optional subelement
- will contain the expected type that the value will
- be coerced to after evaluation of the expression.
- The type defaults to Object if one is not provided.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="deferred-method"
- type="javaee:tld-deferred-methodType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Present if the value for this attribute is to be
- passed to the tag handler as a
- javax.el.MethodExpression. This allows for deferred
- evaluation of an EL expression that identifies a
- method to be invoked on an Object. An optional
- subelement will contain the expected method
- signature. The signature defaults to "void method()"
- if one is not provided.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- </xsd:sequence>
-
- <xsd:element name="fragment"
- type="javaee:generic-booleanType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- "true" if this attribute is of type
- javax.jsp.tagext.JspFragment, representing dynamic
- content that can be re-evaluated as many times
- as needed by the tag handler. If omitted or "false",
- the default is still type="java.lang.String"
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tld-canonical-nameType">
-
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the canonical name of a tag or attribute being
- defined.
-
- The name must conform to the lexical rules for an NMTOKEN.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:xsdNMTOKENType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tld-deferred-methodType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines information about how to provide the value for a
- tag handler attribute that accepts a javax.el.MethodExpression.
-
- The deferred-method element has one optional subelement:
-
- method-signature Provides the signature, as in the Java
- Language Specifies, that is expected for
- the method being identified by the
- expression.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="method-signature"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Provides the expected signature of the method identified
- by the javax.el.MethodExpression.
-
- This disambiguates overloaded methods and ensures that
- the return value is of the expected type.
-
- The syntax of the method-signature element is identical
- to that of the function-signature element. See the
- documentation for function-signature for more details.
-
- The name of the method is for documentation purposes only
- and is ignored by the JSP container.
-
- Example:
-
- boolean validate(java.lang.String)
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tld-deferred-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines information about how to provide the value for a
- tag handler attribute that accepts a javax.el.ValueExpression.
-
- The deferred-value element has one optional subelement:
-
- type the expected type of the attribute
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The fully-qualified name of the Java type that is the
- expected type for this deferred expression. If this
- element is omitted, the expected type is assumed to be
- "java.lang.Object".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tld-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The tld-extensionType is used to indicate
- extensions to a specific TLD element.
-
- It is used by elements to designate an extension block
- that is targeted to a specific extension designated by
- a set of extension elements that are declared by a
- namespace. The namespace identifies the extension to
- the tool that processes the extension.
-
- The type of the extension-element is abstract. Therefore,
- a concrete type must be specified by the TLD using
- xsi:type attribute for each extension-element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="extension-element"
- type="javaee:extensibleType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="namespace"
- use="required"
- type="xsd:anyURI"/>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="tldTaglibType">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglib tag is the document root, it defines:
-
- description a simple string describing the "use" of this
- taglib, should be user discernable
-
- display-name the display-name element contains a
- short name that is intended to be displayed
- by tools
-
- icon optional icon that can be used by tools
-
- tlib-version the version of the tag library implementation
-
- short-name a simple default short name that could be
- used by a JSP authoring tool to create
- names with a mnemonic value; for example,
- the it may be used as the prefered prefix
- value in taglib directives
-
- uri a uri uniquely identifying this taglib
-
- validator optional TagLibraryValidator information
-
- listener optional event listener specification
-
- tag tags in this tag library
-
- tag-file tag files in this tag library
-
- function zero or more EL functions defined in this
- tag library
-
- taglib-extension zero or more extensions that provide extra
- information about this taglib, for tool
- consumption
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="tlib-version"
- type="javaee:dewey-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Describes this version (number) of the taglibrary.
- It is described as a dewey decimal.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
-
- <xsd:element name="short-name"
- type="javaee:tld-canonical-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a simple default name that could be used by
- a JSP authoring tool to create names with a
- mnemonicvalue; for example, it may be used as the
- preferred prefix value in taglib directives. Do
- not use white space, and do not start with digits
- or underscore.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="uri"
- type="javaee:xsdAnyURIType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a public URI that uniquely identifies this
- version of the taglibrary. Leave it empty if it
- does not apply.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="validator"
- type="javaee:validatorType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="listener"
- type="javaee:listenerType"
- minOccurs="0" maxOccurs="unbounded">
- </xsd:element>
- <xsd:element name="tag"
- type="javaee:tagType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="tag-file"
- type="javaee:tagFileType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="function"
- type="javaee:functionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="taglib-extension"
- type="javaee:tld-extensionType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Taglib extensions are for tool use only and must not
- affect the behavior of a container.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="2.1"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- Describes the JSP version (number) this taglibrary
- requires in order to function (dewey decimal)
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="validatorType">
- <xsd:annotation>
- <xsd:documentation>
-
- A validator that can be used to validate
- the conformance of a JSP page to using this tag library is
- defined by a validatorType.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="validator-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the TagLibraryValidator class that can be used
- to validate the conformance of a JSP page to using this
- tag library.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="javaee:param-valueType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The init-param element contains a name/value pair as an
- initialization param.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="variable-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines scope of the scripting variable. See
- TagExtraInfo for details. The allowed values are,
- "NESTED", "AT_BEGIN" and "AT_END".
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="NESTED"/>
- <xsd:enumeration value="AT_BEGIN"/>
- <xsd:enumeration value="AT_END"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="variableType">
- <xsd:annotation>
- <xsd:documentation>
-
- The variableType provides information on the scripting
- variables defined by using this tag. It is a (translation
- time) error for a tag that has one or more variable
- subelements to have a TagExtraInfo class that returns a
- non-null value from a call to getVariableInfo().
-
- The subelements of variableType are of the form:
-
- description Optional description of this
- variable
-
- name-given The variable name as a constant
-
- name-from-attribute The name of an attribute whose
- (translation time) value will
- give the name of the
- variable. One of name-given or
- name-from-attribute is required.
-
- variable-class Name of the class of the variable.
- java.lang.String is default.
-
- declare Whether the variable is declared
- or not. True is the default.
-
- scope The scope of the scripting varaible
- defined. NESTED is default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="name-given"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The name for the scripting variable.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="name-from-attribute"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The name of an attribute whose
- (translation-time) value will give the name of
- the variable.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- <xsd:element name="variable-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The optional name of the class for the scripting
- variable. The default is java.lang.String.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
-
- <xsd:element name="declare"
- type="javaee:generic-booleanType"
- minOccurs="0">
-
- <xsd:annotation>
- <xsd:documentation>
-
- Whether the scripting variable is to be defined
- or not. See TagExtraInfo for details. This
- element is optional and "true" is the default.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="scope"
- type="javaee:variable-scopeType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element is optional and "NESTED" is the default.
-
- </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/plugin.properties b/bundles/org.eclipse.jst.standard.schemas/plugin.properties
deleted file mode 100644
index 4d00680ec5..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-# properties file for org.eclipse.jst.standard.schemas
-Bundle-Name.0 = JEE Related Schemas
-Bundle-Vendor.0 = Eclipse.org \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.standard.schemas/plugin.xml b/bundles/org.eclipse.jst.standard.schemas/plugin.xml
deleted file mode 100644
index 01b8ed3d25..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/plugin.xml
+++ /dev/null
@@ -1,181 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
-
- <!--==========================================-->
- <!-- Catalog Contributions -->
- <!-- Register well known Web DTDs and XSDs -->
- <!--==========================================-->
-
- <extension point="org.eclipse.wst.xml.core.catalogContributions">
- <catalogContribution id="default">
-
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN"
- uri="dtdsAndSchemas/application_1_2.dtd"
- webURL="http://java.sun.com/j2ee/dtds/application_1_2.dtd" />
- <public
- publicId="-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
- uri="dtdsAndSchemas/application_1_3.dtd"
- webURL="http://java.sun.com/dtd/application_1_3.dtd" />
- <uri
- name="http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
- uri="dtdsAndSchemas/application_1_4.xsd" />
- <uri
- name="http://java.sun.com/xml/ns/javaee/application_5.xsd"
- uri="dtdsAndSchemas/application_5.xsd" />
-
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN"
- uri="dtdsAndSchemas/application-client_1_2.dtd"
- webURL="http://java.sun.com/j2ee/dtds/application-client_1_2.dtd" />
- <public
- publicId="-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN"
- uri="dtdsAndSchemas/application-client_1_3.dtd"
- webURL="http://java.sun.com/dtd/application-client_1_3.dtd" />
- <uri
- name="http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- uri="dtdsAndSchemas/application-client_1_4.xsd" />
- <uri
- name="http://java.sun.com/xml/ns/javaee/application-client_5.xsd"
- uri="dtdsAndSchemas/application-client_5.xsd" />
-
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD Connector 1.0//EN"
- uri="dtdsAndSchemas/connector_1_0.dtd"
- webURL="http://java.sun.com/dtd/connector_1_0.dtd" />
- <uri
- name="http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
- uri="dtdsAndSchemas/connector_1_5.xsd" />
-
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
- uri="dtdsAndSchemas/ejb-jar_1_1.dtd"
- webURL="http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd" />
- <public
- publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
- uri="dtdsAndSchemas/ejb-jar_2_0.dtd"
- webURL="http://java.sun.com/dtd/ejb-jar_2_0.dtd" />
- <uri
- name="http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
- uri="dtdsAndSchemas/ejb-jar_2_1.xsd" />
- <uri
- name="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
- uri="dtdsAndSchemas/ejb-jar_3_0.xsd" />
-
-
- <uri
- name="http://java.sun.com/xml/ns/j2ee/"
- uri="dtdsAndSchemas/j2ee_1_4.xsd" />
-
-
- <uri
- name="http://java.sun.com/xml/ns/j2ee/j2ee_jaxrpc_mapping_1_1.xsd"
- uri="dtdsAndSchemas/j2ee_jaxrpc_mapping_1_1.xsd" />
- <uri
- name="http://java.sun.com/xml/ns/j2ee/j2ee_web_services_1_1.xsd"
- uri="dtdsAndSchemas/j2ee_web_services_1_1.xsd" />
- <uri
- name="http://java.sun.com/xml/ns/j2ee/j2ee_web_services_client_1_1.xsd"
- uri="dtdsAndSchemas/j2ee_web_services_client_1_1.xsd" />
-
- <uri
- name="http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
- uri="dtdsAndSchemas/j2ee_jaxrpc_mapping_1_1.xsd" />
- <uri
- name="http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
- uri="dtdsAndSchemas/j2ee_web_services_1_1.xsd" />
- <uri
- name="http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd"
- uri="dtdsAndSchemas/j2ee_web_services_client_1_1.xsd" />
-
-
- <uri
- name="http://java.sun.com/xml/ns/javaee/javaee_5.xsd"
- uri="dtdsAndSchemas/javaee_5.xsd" />
-
-
- <uri
- name="http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd"
- uri="dtdsAndSchemas/javaee_web_services_1_2.xsd" />
- <uri
- name="http://java.sun.com/xml/ns/javaee/javaee_web_services_client_1_2.xsd"
- uri="dtdsAndSchemas/javaee_web_services_client_1_2.xsd" />
-
- <uri
- name="http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd"
- uri="dtdsAndSchemas/jsp_2_0.xsd" />
- <uri
- name="http://java.sun.com/xml/ns/j2ee/jsp_2_1.xsd"
- uri="dtdsAndSchemas/jsp_2_1.xsd" />
-
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
- uri="dtdsAndSchemas/web-app_2_2.dtd"
- webURL="http://java.sun.com/j2ee/dtds/web-app_2.2.dtd" />
- <public
- publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- uri="dtdsAndSchemas/web-app_2_3.dtd"
- webURL="http://java.sun.com/dtd/web-app_2_3.dtd" />
-
-
- <uri
- name="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- uri="dtdsAndSchemas/web-app_2_4.xsd" />
-
- <uri
- name="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- uri="dtdsAndSchemas/web-app_2_5.xsd" />
-
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
- uri="dtdsAndSchemas/web-jsptaglibrary_1_1.dtd"
- webURL="http://java.sun.com/dtd/web-jsptaglibrary_1_1.dtd" />
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
- uri="dtdsAndSchemas/web-jsptaglibrary_1_2.dtd"
- webURL="http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd" />
- <uri
- name="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
- uri="dtdsAndSchemas/web-jsptaglibrary_2_0.xsd" />
- <uri
- name="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
- uri="dtdsAndSchemas/web-jsptaglibrary_2_1.xsd" />
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
- uri="dtdsAndSchemas/web-facesconfig_1_0.dtd"
- webURL="http://java.sun.com/dtd/web-facesconfig_1_0.dtd" />
-
- <public
- publicId="-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- uri="dtdsAndSchemas/web-facesconfig_1_1.dtd"
- webURL="http://java.sun.com/dtd/web-facesconfig_1_1.dtd" />
-
-
- <uri
- name="http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
- uri="dtdsAndSchemas/web-facesconfig_1_2.xsd" />
-
- <uri
- name="http://java.sun.com/xml/ns/persistence/orm"
- uri="dtdsAndSchemas/orm_1_0.xsd" />
-
- <uri
- name="http://java.sun.com/xml/ns/persistence"
- uri="dtdsAndSchemas/persistence_1_0.xsd" />
-
- </catalogContribution>
-
- </extension>
-
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.css.core/.classpath b/bundles/org.eclipse.wst.css.core/.classpath
deleted file mode 100644
index c34f122f70..0000000000
--- a/bundles/org.eclipse.wst.css.core/.classpath
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/w3c/dom/css/**/*"/>
- <accessrule kind="accessible" pattern="org/eclipse/wst/sse/core/**"/>
- <accessrule kind="accessible" pattern="org/eclipse/wst/xml/core/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.css.core/.cvsignore b/bundles/org.eclipse.wst.css.core/.cvsignore
deleted file mode 100644
index eabf67a22a..0000000000
--- a/bundles/org.eclipse.wst.css.core/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-bin
-temp.folder
-cssmodel.jar
-build.xml
-dev.properties
-@dot
-src.zip
-javaCompiler...args
diff --git a/bundles/org.eclipse.wst.css.core/.options b/bundles/org.eclipse.wst.css.core/.options
deleted file mode 100644
index 490975b210..0000000000
--- a/bundles/org.eclipse.wst.css.core/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.wst.css.core/debug=true
-org.eclipse.wst.css.core/debug/tracefilter= \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/.project b/bundles/org.eclipse.wst.css.core/.project
deleted file mode 100644
index bb046e9d84..0000000000
--- a/bundles/org.eclipse.wst.css.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.css.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index afa5c91352..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.core/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 7ec5750225..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b9dc209ec9..0000000000
--- a/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,81 +0,0 @@
-#Wed Mar 28 03:13:52 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.fallthroughCase=ignore
-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=ignore
-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.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 301c7adde6..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index c59368c5e1..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.core/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.css.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fc522bba76..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 77f00f31d6..0000000000
--- a/bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,45 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.css.core; singleton:=true
-Bundle-Version: 1.1.200.qualifier
-Bundle-Activator: org.eclipse.wst.css.core.internal.CSSCorePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.css.core.internal;x-friends:="org.eclipse.wst.css.ui",
- org.eclipse.wst.css.core.internal.cleanup;x-internal:=true,
- org.eclipse.wst.css.core.internal.contentmodel;x-internal:=true,
- org.eclipse.wst.css.core.internal.contentproperties;x-internal:=true,
- org.eclipse.wst.css.core.internal.contenttype;x-internal:=true,
- org.eclipse.wst.css.core.internal.document;x-internal:=true,
- org.eclipse.wst.css.core.internal.encoding;x-internal:=true,
- org.eclipse.wst.css.core.internal.event;x-internal:=true,
- org.eclipse.wst.css.core.internal.eventimpl;x-internal:=true,
- org.eclipse.wst.css.core.internal.format;x-friends:="org.eclipse.wst.css.ui",
- org.eclipse.wst.css.core.internal.formatter;x-internal:=true,
- org.eclipse.wst.css.core.internal.metamodel;x-internal:=true,
- org.eclipse.wst.css.core.internal.metamodel.util;x-friends:="org.eclipse.wst.css.ui",
- org.eclipse.wst.css.core.internal.metamodelimpl;x-internal:=true,
- org.eclipse.wst.css.core.internal.modelhandler;x-internal:=true,
- org.eclipse.wst.css.core.internal.parser;x-internal:=true,
- org.eclipse.wst.css.core.internal.parser.regions;x-internal:=true,
- org.eclipse.wst.css.core.internal.parserz;x-friends:="org.eclipse.wst.css.ui",
- org.eclipse.wst.css.core.internal.preferences;x-internal:=true,
- org.eclipse.wst.css.core.internal.provisional.adapters;x-internal:=true,
- org.eclipse.wst.css.core.internal.provisional.contenttype;x-internal:=true,
- org.eclipse.wst.css.core.internal.provisional.document;x-internal:=true,
- org.eclipse.wst.css.core.internal.provisional.preferences;x-internal:=true,
- org.eclipse.wst.css.core.internal.provisional.text;x-internal:=true,
- org.eclipse.wst.css.core.internal.tasks;x-internal:=true,
- org.eclipse.wst.css.core.internal.text;x-internal:=true,
- org.eclipse.wst.css.core.internal.util;x-friends:="org.eclipse.wst.css.ui",
- org.eclipse.wst.css.core.internal.util.declaration;x-internal:=true,
- org.eclipse.wst.css.core.text
-Require-Bundle: org.apache.xerces;bundle-version="[2.9.0,3.0.0)";visibility:=reexport,
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- com.ibm.icu;bundle-version="[3.8.1,4.0.0)"
-Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.wst.css.core.internal.contenttype"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.wst.css.core/about.html b/bundles/org.eclipse.wst.css.core/about.html
deleted file mode 100644
index 2199df3f05..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.core/build.properties b/bundles/org.eclipse.wst.css.core/build.properties
deleted file mode 100644
index fba2831fb0..0000000000
--- a/bundles/org.eclipse.wst.css.core/build.properties
+++ /dev/null
@@ -1,24 +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
-###############################################################################
-bin.includes = plugin.xml,\
- cssprofile/,\
- .options,\
- plugin.properties,\
- META-INF/,\
- .,\
- about.html
-bin.excludes = bin/**,\
- @dot/**,\
- temp.folder/**
-src.includes = component.xml,\
- build.properties
-source.. = src/
-
diff --git a/bundles/org.eclipse.wst.css.core/component.xml b/bundles/org.eclipse.wst.css.core/component.xml
deleted file mode 100644
index 476033a362..0000000000
--- a/bundles/org.eclipse.wst.css.core/component.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.wst.css">
- <description url="http://eclipse.org/webtools/wst/components/css/overview.html"></description>
- <component-depends unrestricted="true"></component-depends>
- <plugin id="org.eclipse.wst.css.core" fragment="false" />
- <plugin id="org.eclipse.wst.css.ui" fragment="false" />
- <package name="org.eclipse.wst.css.ui.views.properties" api="false">
- <type name="CSSPropertySheetConfiguration" subclass="true" instantiate="true" />
- </package>
- <package name="org.eclipse.wst.css.ui" api="false">
- <type name="StructuredTextViewerConfigurationCSS" subclass="true" instantiate="true" />
- </package>
- <package name="org.eclipse.wst.css.ui.views.contentoutline" api="false">
- <type name="CSSContentOutlineConfiguration" subclass="true" instantiate="true" />
- </package>
-</component> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/css-profile.dtd b/bundles/org.eclipse.wst.css.core/cssprofile/css-profile.dtd
deleted file mode 100644
index feb3ef8d8d..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/css-profile.dtd
+++ /dev/null
@@ -1,143 +0,0 @@
-<!-- DTD for CSS Meta Model Profile -->
-<!--
-/*******************************************************************************
- * 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
- *******************************************************************************/
- -->
-<!-- Entities -->
-
-<!-- name-definition : In defining meta model object, object name -->
-<!-- is given by using this attribute. -->
-
-<!ENTITY % name-definition 'name CDATA #REQUIRED' >
-
-<!-- name-reference : used to refer meta model object that defined -->
-<!-- by name-definition -->
-
-<!ENTITY % name-reference 'name CDATA #REQUIRED' >
-
-<!-- availability : CSS Meta Model Profile permit importing -->
-<!-- other profile and describe difference for it. -->
-
-<!ENTITY % availability 'enabled (true | false) "true"' >
-<!ENTITY % overwrite 'overwrite (true | false) "false"' >
-
-<!-- ******************** -->
-<!-- elments/attributes -->
-<!-- ******************** -->
-
-<!ELEMENT css-profile (profile-import? , (stylesheet-def | charset-rule-def | import-rule-def | page-rule-def | media-rule-def | fontface-rule-def | style-rule-def | property-def | descriptor-def | container-def | function-def | number-def | unit-def | keyword-def | category-def | pseudo-element-def | pseudo-class-def)*) >
-
-<!-- a profile can include other profile -->
-
-<!ELEMENT profile-import EMPTY >
-<!ATTLIST profile-import name CDATA #REQUIRED >
-
-<!-- which type of rule can be used? -->
-
-<!ELEMENT stylesheet-def (description? , (charset-rule | import-rule | page-rule | media-rule | fontface-rule | style-rule)*) >
-<!ATTLIST stylesheet-def %overwrite; >
-
-<!ELEMENT charset-rule EMPTY >
-<!ATTLIST charset-rule %availability; >
-<!ELEMENT import-rule EMPTY >
-<!ATTLIST import-rule %availability; >
-<!ELEMENT page-rule EMPTY >
-<!ATTLIST page-rule %availability; >
-<!ELEMENT media-rule EMPTY >
-<!ATTLIST media-rule %availability; >
-<!ELEMENT fontface-rule EMPTY >
-<!ATTLIST fontface-rule %availability; >
-<!ELEMENT style-rule EMPTY >
-<!ATTLIST style-rule %availability; >
-
-<!ELEMENT charset-rule-def (description?) >
-<!ATTLIST charset-rule-def %overwrite; >
-
-<!ELEMENT import-rule-def (description?) >
-<!ATTLIST import-rule-def %overwrite; >
-
-<!ELEMENT page-rule-def (description? , (property | pseudo-class)*) >
-<!ATTLIST page-rule-def %overwrite; >
-
-<!ELEMENT media-rule-def (description?) >
-<!ATTLIST media-rule-def %overwrite; >
-
-<!ELEMENT fontface-rule-def (description? , descriptor*) >
-<!ATTLIST fontface-rule-def %overwrite; >
-
-<!ELEMENT style-rule-def (description? , (property | selector-expression | pseudo-class | pseudo-element)*) >
-<!ATTLIST style-rule-def %overwrite; >
-
-<!ELEMENT selector-expression EMPTY >
-<!ATTLIST selector-expression name (descendant | child | adjacent | universal | attribute) #REQUIRED %availability; >
-
-<!ELEMENT pseudo-class EMPTY >
-<!ATTLIST pseudo-class %name-reference; %availability; >
-
-<!ELEMENT pseudo-element EMPTY >
-<!ATTLIST pseudo-element %name-reference; %availability; >
-
-<!ELEMENT pseudo-class-def (description?, selector-value) >
-<!ATTLIST pseudo-class-def %name-definition; %overwrite; >
-<!ELEMENT selector-value (#PCDATA) >
-
-<!ELEMENT pseudo-element-def (description?, selector-value) >
-<!ATTLIST pseudo-element-def %name-definition; %overwrite; >
-
-<!ELEMENT keyword-def (description? , keyword-value) >
-<!ATTLIST keyword-def %name-definition; %overwrite; >
-<!ELEMENT keyword-value (#PCDATA) >
-<!ELEMENT description (#PCDATA) >
-
-<!ELEMENT function-def (description? , function-value) >
-<!ATTLIST function-def %name-definition; %overwrite; >
-<!ELEMENT function-value (#PCDATA) >
-
-<!ELEMENT number-def (description? , unit*) >
-<!ATTLIST number-def %name-definition; %overwrite; >
-<!ELEMENT unit EMPTY >
-<!ATTLIST unit %name-reference; %availability; >
-
-<!ELEMENT unit-def (description? , unit-value) >
-<!ATTLIST unit-def %name-definition; %overwrite; >
-<!ELEMENT unit-value (#PCDATA) >
-
-<!ELEMENT container-def (description? , (number | keyword | function | container)*) >
-<!ATTLIST container-def %name-definition; %overwrite; >
-
-<!ELEMENT category-def (description?, caption) >
-<!ATTLIST category-def %name-definition; %overwrite; >
-<!ELEMENT caption (#PCDATA) >
-
-<!ELEMENT property-def (description? , (number | keyword | function | container | string | separator | property)*) >
-<!ATTLIST property-def %name-definition; %overwrite;
- inherited (yes | no | na) "na"
- mediagroup CDATA #IMPLIED
- category CDATA #IMPLIED >
-<!ELEMENT descriptor-def (description?, (number | keyword | function | container | string | separator | property)*) >
-<!ATTLIST descriptor-def %name-definition; %overwrite; >
-
-<!ELEMENT number EMPTY >
-<!ATTLIST number %name-reference; %availability; >
-<!ELEMENT keyword EMPTY >
-<!ATTLIST keyword %name-reference; %availability; >
-<!ELEMENT function EMPTY >
-<!ATTLIST function %name-reference; %availability; >
-<!ELEMENT container EMPTY >
-<!ATTLIST container %name-reference; %availability; >
-<!ELEMENT string EMPTY >
-<!ATTLIST string %name-reference; %availability; >
-<!ELEMENT separator EMPTY >
-<!ATTLIST separator name (comma | slash) #REQUIRED %availability; >
-<!ELEMENT property EMPTY >
-<!ATTLIST property %name-reference; %availability; >
-<!ELEMENT descriptor EMPTY >
-<!ATTLIST descriptor %name-reference; %availability; >
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css1.xml b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css1.xml
deleted file mode 100644
index 20a0ee5287..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css1.xml
+++ /dev/null
@@ -1,838 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-/*******************************************************************************
- * 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
- *******************************************************************************/
- -->
-<!--<!DOCTYPE css-profile SYSTEM "css-profile.dtd" >-->
-<css-profile>
- <stylesheet-def>
- <description>%css1.stylesheet-def.description</description>
- <import-rule/>
- <style-rule/>
- </stylesheet-def>
-
- <import-rule-def>
- </import-rule-def>
-
- <style-rule-def>
- <selector-expression name="descendant"/>
- <pseudo-element name="first-line"/>
- <pseudo-element name="first-letter"/>
- <pseudo-class name="link"/>
- <pseudo-class name="visited"/>
- <pseudo-class name="active"/>
- <property name="background"/>
- <property name="background-attachment"/>
- <property name="background-color"/>
- <property name="background-image"/>
- <property name="background-position"/>
- <property name="background-repeat"/>
- <property name="border"/>
- <property name="border-bottom"/>
- <property name="border-bottom-width"/>
- <property name="border-color"/>
- <property name="border-left"/>
- <property name="border-left-width"/>
- <property name="border-right"/>
- <property name="border-right-width"/>
- <property name="border-style"/>
- <property name="border-top"/>
- <property name="border-top-width"/>
- <property name="border-width"/>
- <property name="clear"/>
- <property name="color"/>
- <property name="display"/>
- <property name="float"/>
- <property name="font"/>
- <property name="font-family"/>
- <property name="font-size"/>
- <property name="font-style"/>
- <property name="font-variant"/>
- <property name="font-weight"/>
- <property name="height"/>
- <property name="letter-spacing"/>
- <property name="line-height"/>
- <property name="list-style"/>
- <property name="list-style-image"/>
- <property name="list-style-position"/>
- <property name="list-style-type"/>
- <property name="margin"/>
- <property name="margin-bottom"/>
- <property name="margin-left"/>
- <property name="margin-right"/>
- <property name="margin-top"/>
- <property name="padding"/>
- <property name="padding-bottom"/>
- <property name="padding-left"/>
- <property name="padding-right"/>
- <property name="padding-top"/>
- <property name="text-align"/>
- <property name="text-decoration"/>
- <property name="text-indent"/>
- <property name="text-transform"/>
- <property name="vertical-align"/>
- <property name="white-space"/>
- <property name="width"/>
- <property name="word-spacing"/>
- </style-rule-def>
-
- <pseudo-class-def name="link">
- <selector-value>link</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="visited">
- <selector-value>visited</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="active">
- <selector-value>active</selector-value>
- </pseudo-class-def>
-
- <pseudo-element-def name="first-line">
- <selector-value>first-line</selector-value>
- </pseudo-element-def>
- <pseudo-element-def name="first-letter">
- <selector-value>first-letter</selector-value>
- </pseudo-element-def>
-
- <!-- property definition -->
-
- <property-def name="background" inherited="no" category="colorandbackground">
- <property name="background-color"/>
- <property name="background-image"/>
- <property name="background-repeat"/>
- <property name="background-attachment"/>
- <property name="background-position"/>
- </property-def>
- <property-def name="background-attachment" inherited="no" category="colorandbackground">
- <keyword name="scroll"/>
- <keyword name="fixed"/>
- </property-def>
- <property-def name="background-color" inherited="no" category="colorandbackground">
- <container name="color"/>
- <keyword name="transparent"/>
- </property-def>
- <property-def name="background-image" inherited="no" category="colorandbackground">
- <function name="uri"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="background-position" inherited="no" category="colorandbackground">
- <number name="percentage"/>
- <number name="length"/>
- <keyword name="top"/>
- <keyword name="center"/>
- <keyword name="bottom"/>
- <keyword name="left"/>
- <keyword name="right"/>
- </property-def>
- <property-def name="background-repeat" inherited="no" category="colorandbackground">
- <keyword name="repeat"/>
- <keyword name="repeat-x"/>
- <keyword name="repeat-y"/>
- <keyword name="no-repeat"/>
- </property-def>
- <property-def name="border" inherited="no" category="box">
- <property name="border-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-color" inherited="no" category="box">
- <container name="color"/>
- </property-def>
- <property-def name="border-style" inherited="no" category="box">
- <keyword name="none"/>
- <keyword name="dotted"/>
- <keyword name="dashed"/>
- <keyword name="solid"/>
- <keyword name="double"/>
- <keyword name="groove"/>
- <keyword name="ridge"/>
- <keyword name="inset"/>
- <keyword name="outset"/>
- </property-def>
- <property-def name="border-top" inherited="no" category="box">
- <property name="border-top-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-right" inherited="no" category="box">
- <property name="border-right-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-bottom" inherited="no" category="box">
- <property name="border-bottom-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-left" inherited="no" category="box">
- <property name="border-left-width"/>
- <property name="border-style"/>
- <container name="color"/>
- </property-def>
- <property-def name="border-top-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="border-right-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="border-bottom-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="border-left-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="border-width" inherited="no" category="box">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </property-def>
- <property-def name="clear" inherited="no" category="box">
- <keyword name="none"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="both"/>
- </property-def>
- <property-def name="color" inherited="yes" category="colorandbackground">
- <container name="color"/>
- </property-def>
- <property-def name="display" inherited="no" category="classification">
- <keyword name="block"/>
- <keyword name="inline"/>
- <keyword name="list-item"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="float" inherited="no" category="box">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="font"
- inherited="yes" category="font">
- <property name="font-style"/>
- <property name="font-variant"/>
- <property name="font-weight"/>
- <property name="font-size"/>
- <property name="line-height"/>
- <property name="font-family"/>
- <separator name="slash"/>
- </property-def>
- <property-def name="font-family" inherited="yes" category="font">
- <string name="family-name"/>
- <container name="generic-family"/>
- <separator name="comma"/>
- </property-def>
- <property-def name="font-size" inherited="yes" category="font">
- <container name="absolute-size"/>
- <container name="relative-size"/>
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="font-style" inherited="yes" category="font">
- <keyword name="normal"/>
- <keyword name="italic"/>
- <keyword name="oblique"/>
- </property-def>
- <property-def name="font-variant" inherited="yes" category="font">
- <keyword name="normal"/>
- <keyword name="small-caps"/>
- </property-def>
- <property-def name="font-weight" inherited="yes" category="font">
- <keyword name="normal"/>
- <keyword name="bold"/>
- <keyword name="bolder"/>
- <keyword name="lighter"/>
- <keyword name="100"/>
- <keyword name="200"/>
- <keyword name="300"/>
- <keyword name="400"/>
- <keyword name="500"/>
- <keyword name="600"/>
- <keyword name="700"/>
- <keyword name="800"/>
- <keyword name="900"/>
- </property-def>
- <property-def name="height" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="letter-spacing" inherited="yes" category="text">
- <keyword name="normal"/>
- <number name="length"/>
- </property-def>
- <property-def name="line-height" inherited="yes" category="text">
- <keyword name="normal"/>
- <number name="number"/>
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="list-style" inherited="yes" category="classification">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-alpha"/>
- <keyword name="upper-alpha"/>
- <keyword name="none"/>
- <keyword name="inside"/>
- <keyword name="outside"/>
- <function name="uri"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="list-style-image" inherited="yes" category="classification">
- <function name="uri"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="list-style-position" inherited="yes" category="classification">
- <keyword name="inside"/>
- <keyword name="outside"/>
- </property-def>
- <property-def name="list-style-type" inherited="yes" category="classification">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-alpha"/>
- <keyword name="upper-alpha"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="margin" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="margin-top" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="margin-right" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="margin-bottom" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="margin-left" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="padding" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="padding-top" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="padding-right" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="padding-bottom" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="padding-left" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="text-align" inherited="yes" category="text">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="center"/>
- <keyword name="justify"/>
- </property-def>
- <property-def name="text-decoration" inherited="no" category="text">
- <keyword name="none"/>
- <keyword name="underline"/>
- <keyword name="overline"/>
- <keyword name="line-through"/>
- <keyword name="blink"/>
- </property-def>
- <property-def name="text-indent" inherited="yes" category="text">
- <number name="length"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="text-transform" inherited="yes" category="text">
- <keyword name="capitalize"/>
- <keyword name="uppercase"/>
- <keyword name="lowercase"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="vertical-align" inherited="no" category="text">
- <keyword name="baseline"/>
- <keyword name="sub"/>
- <keyword name="super"/>
- <keyword name="top"/>
- <keyword name="text-top"/>
- <keyword name="middle"/>
- <keyword name="bottom"/>
- <keyword name="text-bottom"/>
- <number name="percentage"/>
- </property-def>
- <property-def name="white-space" inherited="yes" category="classification">
- <keyword name="normal"/>
- <keyword name="pre"/>
- <keyword name="nowrap"/>
- </property-def>
- <property-def name="width" inherited="no" category="box">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="word-spacing" inherited="yes" category="text">
- <keyword name="normal"/>
- <number name="length"/>
- </property-def>
-
- <!-- container definition : Container is the lump of values.
- It can be used like macros. -->
- <container-def name="absolute-size">
- <keyword name="xx-small"/>
- <keyword name="x-small"/>
- <keyword name="small"/>
- <keyword name="medium"/>
- <keyword name="large"/>
- <keyword name="x-large"/>
- <keyword name="xx-large"/>
- </container-def>
- <container-def name="color">
- <keyword name="aqua"/>
- <keyword name="black"/>
- <keyword name="blue"/>
- <keyword name="fuchsia"/>
- <keyword name="gray"/>
- <keyword name="green"/>
- <keyword name="lime"/>
- <keyword name="maroon"/>
- <keyword name="navy"/>
- <keyword name="olive"/>
- <keyword name="purple"/>
- <keyword name="red"/>
- <keyword name="silver"/>
- <keyword name="teal"/>
- <keyword name="white"/>
- <keyword name="yellow"/>
- <function name="rgb"/>
- <number name="hash"/>
- </container-def>
- <container-def name="generic-family">
- <keyword name="serif"/>
- <keyword name="sans-serif"/>
- <keyword name="cursive"/>
- <keyword name="fantasy"/>
- <keyword name="monospace"/>
- </container-def>
- <container-def name="relative-size">
- <keyword name="smaller"/>
- <keyword name="larger"/>
- </container-def>
-
- <!-- category definition : This is used to categorize properties
- in Properties View. -->
- <category-def name="box">
- <caption>%css1.category-def.box.caption</caption>
- </category-def>
- <category-def name="colorandbackground">
- <caption>%css1.category-def.colorandbackground.caption</caption>
- </category-def>
- <category-def name="classification">
- <caption>%css1.category-def.classification.caption</caption>
- </category-def>
- <category-def name="font">
- <caption>%css1.category-def.font.caption</caption>
- </category-def>
- <category-def name="text">
- <caption>%css1.category-def.text.caption</caption>
- </category-def>
-
- <function-def name="rgb">
- <function-value>rgb</function-value>
- </function-def>
- <function-def name="uri">
- <function-value>url</function-value>
- </function-def>
-
- <!-- number definition : What unit types be acceptable for each
- number type? -->
- <number-def name="hash">
- <unit name="hash"/>
- </number-def>
- <number-def name="length">
- <unit name="em"/>
- <unit name="ex"/>
- <unit name="px"/>
- <unit name="in"/>
- <unit name="cm"/>
- <unit name="mm"/>
- <unit name="pt"/>
- <unit name="pc"/>
- </number-def>
- <number-def name="number">
- </number-def>
- <number-def name="percentage">
- <unit name="percentage"/>
- </number-def>
-
- <unit-def name="cm">
- <unit-value>cm</unit-value>
- </unit-def>
- <unit-def name="em">
- <unit-value>em</unit-value>
- </unit-def>
- <unit-def name="ex">
- <unit-value>ex</unit-value>
- </unit-def>
- <unit-def name="hash">
- <unit-value>#</unit-value>
- </unit-def>
- <unit-def name="in">
- <unit-value>in</unit-value>
- </unit-def>
- <unit-def name="mm">
- <unit-value>mm</unit-value>
- </unit-def>
- <unit-def name="pc">
- <unit-value>pc</unit-value>
- </unit-def>
- <unit-def name="percentage">
- <unit-value>%</unit-value>
- </unit-def>
- <unit-def name="pt">
- <unit-value>pt</unit-value>
- </unit-def>
- <unit-def name="px">
- <unit-value>px</unit-value>
- </unit-def>
-
- <!-- keywords : string constants (this is last part..) -->
- <keyword-def name="100">
- <keyword-value>100</keyword-value>
- </keyword-def>
- <keyword-def name="200">
- <keyword-value>200</keyword-value>
- </keyword-def>
- <keyword-def name="300">
- <keyword-value>300</keyword-value>
- </keyword-def>
- <keyword-def name="400">
- <keyword-value>400</keyword-value>
- </keyword-def>
- <keyword-def name="500">
- <keyword-value>500</keyword-value>
- </keyword-def>
- <keyword-def name="600">
- <keyword-value>600</keyword-value>
- </keyword-def>
- <keyword-def name="700">
- <keyword-value>700</keyword-value>
- </keyword-def>
- <keyword-def name="800">
- <keyword-value>800</keyword-value>
- </keyword-def>
- <keyword-def name="900">
- <keyword-value>900</keyword-value>
- </keyword-def>
- <keyword-def name="aqua">
- <keyword-value>aqua</keyword-value>
- </keyword-def>
- <keyword-def name="auto">
- <keyword-value>auto</keyword-value>
- </keyword-def>
- <keyword-def name="baseline">
- <keyword-value>baseline</keyword-value>
- </keyword-def>
- <keyword-def name="black">
- <keyword-value>black</keyword-value>
- </keyword-def>
- <keyword-def name="blink">
- <keyword-value>blink</keyword-value>
- </keyword-def>
- <keyword-def name="block">
- <keyword-value>block</keyword-value>
- </keyword-def>
- <keyword-def name="blue">
- <keyword-value>blue</keyword-value>
- </keyword-def>
- <keyword-def name="bold">
- <keyword-value>bold</keyword-value>
- </keyword-def>
- <keyword-def name="bolder">
- <keyword-value>bolder</keyword-value>
- </keyword-def>
- <keyword-def name="both">
- <keyword-value>both</keyword-value>
- </keyword-def>
- <keyword-def name="bottom">
- <keyword-value>bottom</keyword-value>
- </keyword-def>
- <keyword-def name="capitalize">
- <keyword-value>capitalize</keyword-value>
- </keyword-def>
- <keyword-def name="center">
- <keyword-value>center</keyword-value>
- </keyword-def>
- <keyword-def name="circle">
- <keyword-value>circle</keyword-value>
- </keyword-def>
- <keyword-def name="cursive">
- <keyword-value>cursive</keyword-value>
- </keyword-def>
- <keyword-def name="dashed">
- <keyword-value>dashed</keyword-value>
- </keyword-def>
- <keyword-def name="decimal">
- <keyword-value>decimal</keyword-value>
- </keyword-def>
- <keyword-def name="disc">
- <keyword-value>disc</keyword-value>
- </keyword-def>
- <keyword-def name="dotted">
- <keyword-value>dotted</keyword-value>
- </keyword-def>
- <keyword-def name="double">
- <keyword-value>double</keyword-value>
- </keyword-def>
- <keyword-def name="fantasy">
- <keyword-value>fantasy</keyword-value>
- </keyword-def>
- <keyword-def name="fixed">
- <keyword-value>fixed</keyword-value>
- </keyword-def>
- <keyword-def name="fuchsia">
- <keyword-value>fuchsia</keyword-value>
- </keyword-def>
- <keyword-def name="gray">
- <keyword-value>gray</keyword-value>
- </keyword-def>
- <keyword-def name="green">
- <keyword-value>green</keyword-value>
- </keyword-def>
- <keyword-def name="groove">
- <keyword-value>groove</keyword-value>
- </keyword-def>
- <keyword-def name="inline">
- <keyword-value>inline</keyword-value>
- </keyword-def>
- <keyword-def name="inset">
- <keyword-value>inset</keyword-value>
- </keyword-def>
- <keyword-def name="inside">
- <keyword-value>inside</keyword-value>
- </keyword-def>
- <keyword-def name="italic">
- <keyword-value>italic</keyword-value>
- </keyword-def>
- <keyword-def name="justify">
- <keyword-value>justify</keyword-value>
- </keyword-def>
- <keyword-def name="large">
- <keyword-value>large</keyword-value>
- </keyword-def>
- <keyword-def name="larger">
- <keyword-value>larger</keyword-value>
- </keyword-def>
- <keyword-def name="left">
- <keyword-value>left</keyword-value>
- </keyword-def>
- <keyword-def name="lighter">
- <keyword-value>lighter</keyword-value>
- </keyword-def>
- <keyword-def name="lime">
- <keyword-value>lime</keyword-value>
- </keyword-def>
- <keyword-def name="line-through">
- <keyword-value>line-through</keyword-value>
- </keyword-def>
- <keyword-def name="list-item">
- <keyword-value>list-item</keyword-value>
- </keyword-def>
- <keyword-def name="lower-alpha">
- <keyword-value>lower-alpha</keyword-value>
- </keyword-def>
- <keyword-def name="lower-roman">
- <keyword-value>lower-roman</keyword-value>
- </keyword-def>
- <keyword-def name="lowercase">
- <keyword-value>lowercase</keyword-value>
- </keyword-def>
- <keyword-def name="maroon">
- <keyword-value>maroon</keyword-value>
- </keyword-def>
- <keyword-def name="medium">
- <keyword-value>medium</keyword-value>
- </keyword-def>
- <keyword-def name="middle">
- <keyword-value>middle</keyword-value>
- </keyword-def>
- <keyword-def name="monospace">
- <keyword-value>monospace</keyword-value>
- </keyword-def>
- <keyword-def name="navy">
- <keyword-value>navy</keyword-value>
- </keyword-def>
- <keyword-def name="no-repeat">
- <keyword-value>no-repeat</keyword-value>
- </keyword-def>
- <keyword-def name="none">
- <keyword-value>none</keyword-value>
- </keyword-def>
- <keyword-def name="normal">
- <keyword-value>normal</keyword-value>
- </keyword-def>
- <keyword-def name="nowrap">
- <keyword-value>nowrap</keyword-value>
- </keyword-def>
- <keyword-def name="oblique">
- <keyword-value>oblique</keyword-value>
- </keyword-def>
- <keyword-def name="olive">
- <keyword-value>olive</keyword-value>
- </keyword-def>
- <keyword-def name="outset">
- <keyword-value>outset</keyword-value>
- </keyword-def>
- <keyword-def name="outside">
- <keyword-value>outside</keyword-value>
- </keyword-def>
- <keyword-def name="overline">
- <keyword-value>overline</keyword-value>
- </keyword-def>
- <keyword-def name="pre">
- <keyword-value>pre</keyword-value>
- </keyword-def>
- <keyword-def name="purple">
- <keyword-value>purple</keyword-value>
- </keyword-def>
- <keyword-def name="red">
- <keyword-value>red</keyword-value>
- </keyword-def>
- <keyword-def name="repeat">
- <keyword-value>repeat</keyword-value>
- </keyword-def>
- <keyword-def name="repeat-x">
- <keyword-value>repeat-x</keyword-value>
- </keyword-def>
- <keyword-def name="repeat-y">
- <keyword-value>repeat-y</keyword-value>
- </keyword-def>
- <keyword-def name="ridge">
- <keyword-value>ridge</keyword-value>
- </keyword-def>
- <keyword-def name="right">
- <keyword-value>right</keyword-value>
- </keyword-def>
- <keyword-def name="sans-serif">
- <keyword-value>sans-serif</keyword-value>
- </keyword-def>
- <keyword-def name="scroll">
- <keyword-value>scroll</keyword-value>
- </keyword-def>
- <keyword-def name="serif">
- <keyword-value>serif</keyword-value>
- </keyword-def>
- <keyword-def name="silver">
- <keyword-value>silver</keyword-value>
- </keyword-def>
- <keyword-def name="small">
- <keyword-value>small</keyword-value>
- </keyword-def>
- <keyword-def name="small-caps">
- <keyword-value>small-caps</keyword-value>
- </keyword-def>
- <keyword-def name="smaller">
- <keyword-value>smaller</keyword-value>
- </keyword-def>
- <keyword-def name="solid">
- <keyword-value>solid</keyword-value>
- </keyword-def>
- <keyword-def name="square">
- <keyword-value>square</keyword-value>
- </keyword-def>
- <keyword-def name="sub">
- <keyword-value>sub</keyword-value>
- </keyword-def>
- <keyword-def name="super">
- <keyword-value>super</keyword-value>
- </keyword-def>
- <keyword-def name="teal">
- <keyword-value>teal</keyword-value>
- </keyword-def>
- <keyword-def name="text-top">
- <keyword-value>text-top</keyword-value>
- </keyword-def>
- <keyword-def name="text-bottom">
- <keyword-value>text-bottom</keyword-value>
- </keyword-def>
- <keyword-def name="thick">
- <keyword-value>thick</keyword-value>
- </keyword-def>
- <keyword-def name="thin">
- <keyword-value>thin</keyword-value>
- </keyword-def>
- <keyword-def name="top">
- <keyword-value>top</keyword-value>
- </keyword-def>
- <keyword-def name="transparent">
- <keyword-value>transparent</keyword-value>
- </keyword-def>
- <keyword-def name="underline">
- <keyword-value>underline</keyword-value>
- </keyword-def>
- <keyword-def name="upper-alpha">
- <keyword-value>upper-alpha</keyword-value>
- </keyword-def>
- <keyword-def name="upper-roman">
- <keyword-value>upper-roman</keyword-value>
- </keyword-def>
- <keyword-def name="uppercase">
- <keyword-value>uppercase</keyword-value>
- </keyword-def>
- <keyword-def name="white">
- <keyword-value>white</keyword-value>
- </keyword-def>
- <keyword-def name="x-large">
- <keyword-value>x-large</keyword-value>
- </keyword-def>
- <keyword-def name="x-small">
- <keyword-value>x-small</keyword-value>
- </keyword-def>
- <keyword-def name="xx-small">
- <keyword-value>xx-small</keyword-value>
- </keyword-def>
- <keyword-def name="xx-large">
- <keyword-value>xx-large</keyword-value>
- </keyword-def>
- <keyword-def name="yellow">
- <keyword-value>yellow</keyword-value>
- </keyword-def>
-</css-profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css2.xml b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css2.xml
deleted file mode 100644
index a81acbec11..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css2.xml
+++ /dev/null
@@ -1,2270 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-/*******************************************************************************
- * 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
- *******************************************************************************/
- -->
-<!--<!DOCTYPE css-profile SYSTEM "css-profile.dtd" >-->
-<css-profile>
- <stylesheet-def>
- <description>%css2.stylesheet-def.description</description>
- <charset-rule/>
- <import-rule/>
- <page-rule/>
- <media-rule/>
- <fontface-rule/>
- <style-rule/>
- </stylesheet-def>
-
- <charset-rule-def>
- </charset-rule-def>
- <import-rule-def>
- </import-rule-def>
- <media-rule-def>
- </media-rule-def>
-
- <page-rule-def>
- <pseudo-class name="left"/>
- <pseudo-class name="right"/>
- <pseudo-class name="first"/>
- <property name="size"/>
- <property name="marks"/>
- <property name="page-break-after"/>
- <property name="page-break-before"/>
- <property name="page-break-inside"/>
- <property name="orphans"/>
- <property name="widows"/>
- </page-rule-def>
-
- <fontface-rule-def>
- <descriptor name="ascent"/>
- <descriptor name="baseline"/>
- <descriptor name="bbox"/>
- <descriptor name="cap-height"/>
- <descriptor name="centerline"/>
- <descriptor name="definition-src"/>
- <descriptor name="descent"/>
- <descriptor name="font-family"/>
- <descriptor name="font-size"/>
- <descriptor name="font-stretch"/>
- <descriptor name="font-style"/>
- <descriptor name="font-variant"/>
- <descriptor name="font-weight"/>
- <descriptor name="mathline"/>
- <descriptor name="panose-1"/>
- <descriptor name="slope"/>
- <descriptor name="slope"/>
- <descriptor name="src"/>
- <descriptor name="stemh"/>
- <descriptor name="stemv"/>
- <descriptor name="topline"/>
- <descriptor name="unicode-range"/>
- <descriptor name="units-per-em"/>
- <descriptor name="widths"/>
- <descriptor name="x-height"/>
- </fontface-rule-def>
-
- <!-- Which properties can style rule include ? -->
-
- <style-rule-def>
- <selector-expression name="descendant"/>
- <selector-expression name="child"/>
- <selector-expression name="adjacent"/>
- <selector-expression name="universal"/>
- <selector-expression name="attribute"/>
- <pseudo-element name="first-line"/>
- <pseudo-element name="first-letter"/>
- <pseudo-element name="before"/>
- <pseudo-element name="after"/>
- <pseudo-class name="first-child"/>
- <pseudo-class name="link"/>
- <pseudo-class name="visited"/>
- <pseudo-class name="hover"/>
- <pseudo-class name="active"/>
- <pseudo-class name="focus"/>
- <pseudo-class name="lang"/>
- <property name="azimuth"/>
- <property name="background"/>
- <property name="background-attachment"/>
- <property name="background-color"/>
- <property name="background-image"/>
- <property name="background-position"/>
- <property name="background-repeat"/>
- <property name="border"/>
- <property name="border-collapse"/>
- <property name="border-color"/>
- <property name="border-spacing"/>
- <property name="border-style"/>
- <property name="border-top"/>
- <property name="border-right"/>
- <property name="border-bottom"/>
- <property name="border-left"/>
- <property name="border-top-color"/>
- <property name="border-right-color"/>
- <property name="border-bottom-color"/>
- <property name="border-left-color"/>
- <property name="border-top-style"/>
- <property name="border-right-style"/>
- <property name="border-bottom-style"/>
- <property name="border-left-style"/>
- <property name="border-top-width"/>
- <property name="border-right-width"/>
- <property name="border-bottom-width"/>
- <property name="border-left-width"/>
- <property name="border-width"/>
- <property name="bottom"/>
- <property name="caption-side"/>
- <property name="clear"/>
- <property name="clip"/>
- <property name="color"/>
- <property name="content"/>
- <property name="counter-increment"/>
- <property name="counter-reset"/>
- <property name="cue"/>
- <property name="cue-after"/>
- <property name="cue-before"/>
- <property name="cursor"/>
- <property name="direction"/>
- <property name="display"/>
- <property name="elevation"/>
- <property name="empty-cells"/>
- <property name="float"/>
- <property name="font"/>
- <property name="font-family"/>
- <property name="font-size"/>
- <property name="font-size-adjust"/>
- <property name="font-stretch"/>
- <property name="font-style"/>
- <property name="font-variant"/>
- <property name="font-weight"/>
- <property name="height"/>
- <property name="left"/>
- <property name="letter-spacing"/>
- <property name="line-height"/>
- <property name="list-style"/>
- <property name="list-style-image"/>
- <property name="list-style-position"/>
- <property name="list-style-type"/>
- <property name="margin"/>
- <property name="margin-top"/>
- <property name="margin-right"/>
- <property name="margin-bottom"/>
- <property name="margin-left"/>
- <property name="marker-offset"/>
- <property name="marks"/>
- <property name="max-height"/>
- <property name="max-width"/>
- <property name="min-height"/>
- <property name="min-width"/>
- <property name="orphans"/>
- <property name="outline"/>
- <property name="outline-color"/>
- <property name="outline-style"/>
- <property name="outline-width"/>
- <property name="overflow"/>
- <property name="padding"/>
- <property name="padding-top"/>
- <property name="padding-right"/>
- <property name="padding-bottom"/>
- <property name="padding-left"/>
- <property name="page"/>
- <property name="page-break-after"/>
- <property name="page-break-before"/>
- <property name="page-break-inside"/>
- <property name="pause"/>
- <property name="pause-after"/>
- <property name="pause-before"/>
- <property name="pitch"/>
- <property name="pitch-range"/>
- <property name="play-during"/>
- <property name="position"/>
- <property name="quotes"/>
- <property name="richness"/>
- <property name="right"/>
- <property name="size"/>
- <property name="speak"/>
- <property name="speak-header"/>
- <property name="speak-numeral"/>
- <property name="speak-punctuation"/>
- <property name="speech-rate"/>
- <property name="stress"/>
- <property name="table-layout"/>
- <property name="text-align"/>
- <property name="text-decoration"/>
- <property name="text-indent"/>
- <property name="text-shadow"/>
- <property name="text-transform"/>
- <property name="top"/>
- <property name="unicode-bidi"/>
- <property name="vertical-align"/>
- <property name="visibility"/>
- <property name="voice-family"/>
- <property name="volume"/>
- <property name="white-space"/>
- <property name="widows"/>
- <property name="width"/>
- <property name="word-spacing"/>
- <property name="z-index"/>
- </style-rule-def>
-
- <pseudo-class-def name="first-child">
- <selector-value>first-child</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="link">
- <selector-value>link</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="visited">
- <selector-value>visited</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="hover">
- <selector-value>hover</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="active">
- <selector-value>active</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="focus">
- <selector-value>focus</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="lang">
- <selector-value>lang</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="left">
- <selector-value>left</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="right">
- <selector-value>right</selector-value>
- </pseudo-class-def>
- <pseudo-class-def name="first">
- <selector-value>first</selector-value>
- </pseudo-class-def>
-
- <pseudo-element-def name="first-line">
- <selector-value>first-line</selector-value>
- </pseudo-element-def>
- <pseudo-element-def name="first-letter">
- <selector-value>first-letter</selector-value>
- </pseudo-element-def>
- <pseudo-element-def name="before">
- <selector-value>before</selector-value>
- </pseudo-element-def>
- <pseudo-element-def name="after">
- <selector-value>after</selector-value>
- </pseudo-element-def>
-
- <!-- property definition -->
-
- <property-def name="azimuth"
- inherited="yes" mediagroup="aural" category="aural">
- <description>This provides spatial audio property for aural
- presentation</description>
- <number name="angle"/>
- <keyword name="left-side"/>
- <keyword name="far-left"/>
- <keyword name="left"/>
- <keyword name="center-left"/>
- <keyword name="center"/>
- <keyword name="center-right"/>
- <keyword name="right"/>
- <keyword name="far-right"/>
- <keyword name="right-side"/>
- <keyword name="behind"/>
- <keyword name="leftwards"/>
- <keyword name="rightwards"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <property name="background-color"/>
- <property name="background-image"/>
- <property name="background-repeat"/>
- <property name="background-attachment"/>
- <property name="background-position"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-attachment"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <keyword name="scroll"/>
- <keyword name="fixed"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-color"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <container name="color"/>
- <keyword name="transparent"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-image"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <function name="uri"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-position"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <number name="percentage"/>
- <number name="length"/>
- <keyword name="top"/>
- <keyword name="center"/>
- <keyword name="bottom"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="background-repeat"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <keyword name="repeat"/>
- <keyword name="repeat-x"/>
- <keyword name="repeat-y"/>
- <keyword name="no-repeat"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-collapse"
- inherited="yes" mediagroup="visual" category="tables">
- <keyword name="collapse"/>
- <keyword name="separate"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="transparent"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-spacing"
- inherited="yes" mediagroup="visual" category="tables">
- <number name="length"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-top"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-top-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-right"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-right-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-bottom"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-bottom-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-left"
- inherited="no" mediagroup="visual" category="box">
- <property name="border-left-width"/>
- <property name="border-style"/>
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-top-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-right-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-bottom-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-left-color"
- inherited="no" mediagroup="visual" category="box">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-top-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-right-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-bottom-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-left-style"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-top-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-right-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-bottom-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-left-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="border-width"
- inherited="no" mediagroup="visual" category="box">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="bottom"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="caption-side"
- inherited="yes" mediagroup="visual" category="tables">
- <keyword name="top"/>
- <keyword name="bottom"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="clear"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="none"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="both"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="clip"
- inherited="no" mediagroup="visual" category="visual">
- <container name="shape"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="color"
- inherited="yes" mediagroup="visual" category="colorandbackground">
- <container name="color"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="content"
- inherited="no" mediagroup="all" category="content">
- <string name="any"/>
- <function name="uri"/>
- <function name="counter"/>
- <function name="attr"/>
- <keyword name="open-quote"/>
- <keyword name="close-quote"/>
- <keyword name="no-open-quote"/>
- <keyword name="no-close-quote"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="counter-increment"
- inherited="no" mediagroup="all" category="content">
- <string name="counter-identifier"/>
- <number name="integer"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="counter-reset"
- inherited="no" mediagroup="all" category="content">
- <string name="counter-identifier"/>
- <number name="integer"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="cue"
- inherited="no" mediagroup="aural" category="aural">
- <property name="cue-before"/>
- <property name="cue-after"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="cue-after"
- inherited="no" mediagroup="aural" category="aural">
- <function name="uri"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="cue-before"
- inherited="no" mediagroup="aural" category="aural">
- <function name="uri"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="cursor"
- inherited="yes" mediagroup="visual,interactive" category="ui">
- <function name="uri"/>
- <keyword name="auto"/>
- <keyword name="crosshair"/>
- <keyword name="default"/>
- <keyword name="pointer"/>
- <keyword name="move"/>
- <keyword name="e-resize"/>
- <keyword name="ne-resize"/>
- <keyword name="nw-resize"/>
- <keyword name="n-resize"/>
- <keyword name="se-resize"/>
- <keyword name="sw-resize"/>
- <keyword name="s-resize"/>
- <keyword name="w-resize"/>
- <keyword name="text"/>
- <keyword name="wait"/>
- <keyword name="help"/>
- <keyword name="inherit"/>
- <separator name="comma"/>
- </property-def>
- <property-def name="direction"
- inherited="yes" mediagroup="visual" category="visual">
- <keyword name="ltr"/>
- <keyword name="rtl"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="display"
- inherited="no" mediagroup="all" category="visual">
- <keyword name="inline"/>
- <keyword name="block"/>
- <keyword name="list-item"/>
- <keyword name="run-in"/>
- <keyword name="compact"/>
- <keyword name="marker"/>
- <keyword name="table"/>
- <keyword name="inline-table"/>
- <keyword name="table-row-group"/>
- <keyword name="table-header-group"/>
- <keyword name="table-footer-group"/>
- <keyword name="table-row"/>
- <keyword name="table-column-group"/>
- <keyword name="table-column"/>
- <keyword name="table-cell"/>
- <keyword name="table-caption"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="elevation"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="angle"/>
- <keyword name="below"/>
- <keyword name="level"/>
- <keyword name="above"/>
- <keyword name="higher"/>
- <keyword name="lower"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="empty-cells"
- inherited="yes" mediagroup="visual" category="tables">
- <keyword name="show"/>
- <keyword name="hide"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="float"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font"
- inherited="yes" mediagroup="visual" category="font">
- <property name="font-style"/>
- <property name="font-variant"/>
- <property name="font-weight"/>
- <property name="font-size"/>
- <property name="line-height"/>
- <property name="font-family"/>
- <keyword name="caption"/>
- <keyword name="icon"/>
- <keyword name="menu"/>
- <keyword name="message-box"/>
- <keyword name="small-caption"/>
- <keyword name="status-bar"/>
- <keyword name="inherit"/>
- <separator name="slash"/>
- </property-def>
- <property-def name="font-family"
- inherited="yes" mediagroup="visual" category="font">
- <string name="family-name"/>
- <container name="generic-family"/>
- <keyword name="inherit"/>
- <separator name="comma"/>
- </property-def>
- <property-def name="font-size"
- inherited="yes" mediagroup="visual" category="font">
- <container name="absolute-size"/>
- <container name="relative-size"/>
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-size-adjust"
- inherited="yes" mediagroup="visual" category="font">
- <number name="number"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-stretch"
- inherited="yes" mediagroup="visual" category="font">
- <keyword name="normal"/>
- <keyword name="wider"/>
- <keyword name="narrower"/>
- <keyword name="ultra-condensed"/>
- <keyword name="extra-condensed"/>
- <keyword name="condensed"/>
- <keyword name="semi-condensed"/>
- <keyword name="semi-expanded"/>
- <keyword name="expanded"/>
- <keyword name="extra-expanded"/>
- <keyword name="ultra-expanded"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-style"
- inherited="yes" mediagroup="visual" category="font">
- <keyword name="normal"/>
- <keyword name="italic"/>
- <keyword name="oblique"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-variant"
- inherited="yes" mediagroup="visual" category="font">
- <keyword name="normal"/>
- <keyword name="small-caps"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="font-weight"
- inherited="yes" mediagroup="visual" category="font">
- <keyword name="normal"/>
- <keyword name="bold"/>
- <keyword name="bolder"/>
- <keyword name="lighter"/>
- <keyword name="100"/>
- <keyword name="200"/>
- <keyword name="300"/>
- <keyword name="400"/>
- <keyword name="500"/>
- <keyword name="600"/>
- <keyword name="700"/>
- <keyword name="800"/>
- <keyword name="900"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="height"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="left"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="letter-spacing"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="normal"/>
- <number name="length"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="line-height"
- inherited="yes" mediagroup="visual" category="visual">
- <keyword name="normal"/>
- <number name="number"/>
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="list-style"
- inherited="yes" mediagroup="visual" category="content">
- <property name="list-style-type"/>
- <property name="list-style-position"/>
- <property name="list-style-image"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="list-style-image"
- inherited="yes" mediagroup="visual" category="content">
- <function name="uri"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="list-style-position"
- inherited="yes" mediagroup="visual" category="content">
- <keyword name="inside"/>
- <keyword name="outside"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="list-style-type"
- inherited="yes" mediagroup="visual" category="content">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="decimal-leading-zero"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-greek"/>
- <keyword name="lower-alpha"/>
- <keyword name="lower-latin"/>
- <keyword name="upper-alpha"/>
- <keyword name="upper-latin"/>
- <keyword name="hebrew"/>
- <keyword name="armenian"/>
- <keyword name="georgian"/>
- <keyword name="cjk-ideographic"/>
- <keyword name="hiragana"/>
- <keyword name="katakana"/>
- <keyword name="hiragana-iroha"/>
- <keyword name="katakana-iroha"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin-top"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin-right"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin-bottom"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="margin-left"
- inherited="no" mediagroup="visual" category="box">
- <container name="margin-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="marker-offset"
- inherited="no" mediagroup="visual" category="content">
- <number name="length"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="marks"
- inherited="na" mediagroup="visual,paged" category="page">
- <keyword name="crop"/>
- <keyword name="cross"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="max-height"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="max-width"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="min-height"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="min-width"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="orphans"
- inherited="yes" mediagroup="visual,paged" category="page">
- <number name="integer"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="outline"
- inherited="no" mediagroup="visual,interactive" category="ui">
- <property name="outline-color"/>
- <property name="outline-style"/>
- <property name="outline-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="outline-color"
- inherited="no" mediagroup="visual,interactive" category="ui">
- <container name="color"/>
- <keyword name="invert"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="outline-style"
- inherited="no" mediagroup="visual,interactive" category="ui">
- <container name="border-style"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="outline-width"
- inherited="no" mediagroup="visual,interactive" category="ui">
- <container name="border-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="overflow"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="visible"/>
- <keyword name="hidden"/>
- <keyword name="scroll"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding-top"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding-right"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding-bottom"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="padding-left"
- inherited="no" mediagroup="visual" category="box">
- <container name="padding-width"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="page"
- inherited="yes" mediagroup="visual,paged" category="page">
- <string name="page-identifier"/>
- <keyword name="auto"/>
- </property-def>
- <property-def name="page-break-after"
- inherited="no" mediagroup="visual,paged" category="page">
- <keyword name="auto"/>
- <keyword name="always"/>
- <keyword name="avoid"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="page-break-before"
- inherited="no" mediagroup="visual,paged" category="page">
- <keyword name="auto"/>
- <keyword name="always"/>
- <keyword name="avoid"/>
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="page-break-inside"
- inherited="yes" mediagroup="visual,paged" category="page">
- <keyword name="avoid"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pause"
- inherited="no" mediagroup="aural" category="aural">
- <number name="time"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pause-after"
- inherited="no" mediagroup="aural" category="aural">
- <number name="time"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pause-before"
- inherited="no" mediagroup="aural" category="aural">
- <number name="time"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pitch"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="frequency"/>
- <keyword name="x-low"/>
- <keyword name="low"/>
- <keyword name="medium"/>
- <keyword name="high"/>
- <keyword name="x-high"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="pitch-range"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="play-during"
- inherited="no" mediagroup="aural" category="aural">
- <function name="uri"/>
- <keyword name="mix"/>
- <keyword name="repeat"/>
- <keyword name="auto"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="position"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="static"/>
- <keyword name="relative"/>
- <keyword name="absolute"/>
- <keyword name="fixed"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="quotes"
- inherited="yes" mediagroup="visual" category="content">
- <string name="any"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="richness"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="right"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="size"
- inherited="na" mediagroup="visual,paged" category="page">
- <number name="length"/>
- <keyword name="auto"/>
- <keyword name="portrait"/>
- <keyword name="landscape"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speak"
- inherited="yes" mediagroup="aural" category="aural">
- <keyword name="normal"/>
- <keyword name="none"/>
- <keyword name="spell-out"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speak-header"
- inherited="yes" mediagroup="aural" category="tables">
- <keyword name="once"/>
- <keyword name="always"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speak-numeral"
- inherited="yes" mediagroup="aural" category="aural">
- <keyword name="digits"/>
- <keyword name="continuous"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speak-punctuation"
- inherited="yes" mediagroup="aural" category="aural">
- <keyword name="code"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="speech-rate"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <keyword name="x-slow"/>
- <keyword name="slow"/>
- <keyword name="medium"/>
- <keyword name="fast"/>
- <keyword name="x-fast"/>
- <keyword name="faster"/>
- <keyword name="slower"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="stress"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="table-layout"
- inherited="no" mediagroup="visual" category="tables">
- <keyword name="auto"/>
- <keyword name="fixed"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-align"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="center"/>
- <keyword name="justify"/>
- <string name="any"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-decoration"
- inherited="no" mediagroup="visual" category="text">
- <keyword name="none"/>
- <keyword name="underline"/>
- <keyword name="overline"/>
- <keyword name="line-through"/>
- <keyword name="blink"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-indent"
- inherited="yes" mediagroup="visual" category="text">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-shadow"
- inherited="no" mediagroup="visual" category="text">
- <keyword name="none"/>
- <container name="color"/>
- <number name="length"/>
- <keyword name="inherit"/>
- <separator name="comma"/>
- </property-def>
- <property-def name="text-transform"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="capitalize"/>
- <keyword name="uppercase"/>
- <keyword name="lowercase"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="top"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="unicode-bidi"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="normal"/>
- <keyword name="embed"/>
- <keyword name="bidi-override"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="vertical-align"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="baseline"/>
- <keyword name="sub"/>
- <keyword name="super"/>
- <keyword name="top"/>
- <keyword name="text-top"/>
- <keyword name="middle"/>
- <keyword name="bottom"/>
- <keyword name="text-bottom"/>
- <number name="percentage"/>
- <number name="length"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="visibility"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="visible"/>
- <keyword name="hidden"/>
- <keyword name="collapse"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="voice-family"
- inherited="yes" mediagroup="aural" category="aural">
- <string name="specific-voice"/>
- <container name="generic-voice"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="volume"
- inherited="yes" mediagroup="aural" category="aural">
- <number name="number"/>
- <number name="percentage"/>
- <keyword name="silent"/>
- <keyword name="x-soft"/>
- <keyword name="soft"/>
- <keyword name="medium"/>
- <keyword name="loud"/>
- <keyword name="x-loud"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="white-space"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="normal"/>
- <keyword name="pre"/>
- <keyword name="nowrap"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="widows"
- inherited="yes" mediagroup="visual,paged" category="page">
- <number name="integer"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="width"
- inherited="no" mediagroup="visual" category="visual">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="word-spacing"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="normal"/>
- <number name="length"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="z-index"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="auto"/>
- <number name="integer"/>
- <keyword name="inherit"/>
- </property-def>
-
- <!-- descriptor definition : These are for @font-face -->
-
- <descriptor-def name="ascent">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="baseline">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="bbox">
- <number name="number"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="cap-height">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="centerline">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="definition-src">
- <function name="uri"/>
- </descriptor-def>
- <descriptor-def name="descent">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="font-family">
- <string name="family-name"/>
- <container name="generic-family"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-size">
- <keyword name="all"/>
- <number name="length"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-stretch">
- <keyword name="all"/>
- <keyword name="normal"/>
- <keyword name="ultra-condensed"/>
- <keyword name="extra-condensed"/>
- <keyword name="condensed"/>
- <keyword name="semi-condensed"/>
- <keyword name="semi-expanded"/>
- <keyword name="expanded"/>
- <keyword name="extra-expanded"/>
- <keyword name="ultra-expanded"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-style">
- <keyword name="all"/>
- <keyword name="normal"/>
- <keyword name="italic"/>
- <keyword name="oblique"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-variant">
- <keyword name="normal"/>
- <keyword name="small-caps"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="font-weight">
- <keyword name="all"/>
- <keyword name="normal"/>
- <keyword name="bold"/>
- <keyword name="100"/>
- <keyword name="200"/>
- <keyword name="300"/>
- <keyword name="400"/>
- <keyword name="500"/>
- <keyword name="600"/>
- <keyword name="700"/>
- <keyword name="800"/>
- <keyword name="900"/>
- <separator name="comma"/>
- </descriptor-def>
- <descriptor-def name="mathline">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="panose-1">
- <number name="integer"/>
- </descriptor-def>
- <descriptor-def name="slope">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="src">
- <function name="uri"/>
- <function name="format"/>
- <container name="font-face-name"/>
- </descriptor-def>
- <descriptor-def name="stemh">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="stemv">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="topline">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="unicode-range">
- <string name="urange"/>
- </descriptor-def>
- <descriptor-def name="units-per-em">
- <number name="number"/>
- </descriptor-def>
- <descriptor-def name="widths">
- <string name="urange"/>
- <number name="length"/>
- </descriptor-def>
- <descriptor-def name="x-height">
- <number name="number"/>
- </descriptor-def>
-
- <!-- container definition : Container is the lump of values.
- It can be used like macros. -->
- <container-def name="absolute-size">
- <keyword name="xx-small"/>
- <keyword name="x-small"/>
- <keyword name="small"/>
- <keyword name="medium"/>
- <keyword name="large"/>
- <keyword name="x-large"/>
- <keyword name="xx-large"/>
- </container-def>
- <container-def name="border-style">
- <keyword name="none"/>
- <keyword name="hidden"/>
- <keyword name="dotted"/>
- <keyword name="dashed"/>
- <keyword name="solid"/>
- <keyword name="double"/>
- <keyword name="groove"/>
- <keyword name="ridge"/>
- <keyword name="inset"/>
- <keyword name="outset"/>
- </container-def>
- <container-def name="border-width">
- <keyword name="thin"/>
- <keyword name="medium"/>
- <keyword name="thick"/>
- <number name="length"/>
- </container-def>
- <container-def name="color">
- <keyword name="aqua"/>
- <keyword name="black"/>
- <keyword name="blue"/>
- <keyword name="fuchsia"/>
- <keyword name="gray"/>
- <keyword name="green"/>
- <keyword name="lime"/>
- <keyword name="maroon"/>
- <keyword name="navy"/>
- <keyword name="olive"/>
- <keyword name="purple"/>
- <keyword name="red"/>
- <keyword name="silver"/>
- <keyword name="teal"/>
- <keyword name="white"/>
- <keyword name="yellow"/>
- <container name="system-color"/>
- <function name="rgb"/>
- <number name="hash"/>
- </container-def>
- <container-def name="generic-family">
- <keyword name="serif"/>
- <keyword name="sans-serif"/>
- <keyword name="cursive"/>
- <keyword name="fantasy"/>
- <keyword name="monospace"/>
- </container-def>
- <container-def name="font-face-name">
- <function name="local"/>
- </container-def>
- <container-def name="generic-voice">
- <keyword name="male"/>
- <keyword name="female"/>
- <keyword name="child"/>
- </container-def>
- <container-def name="margin-width">
- <number name="length"/>
- <number name="percentage"/>
- <keyword name="auto"/>
- </container-def>
- <container-def name="padding-width">
- <number name="length"/>
- <number name="percentage"/>
- </container-def>
- <container-def name="relative-size">
- <keyword name="smaller"/>
- <keyword name="larger"/>
- </container-def>
- <container-def name="shape">
- <function name="rect"/>
- </container-def>
- <container-def name="system-color">
- <keyword name="ActiveBorder"/>
- <keyword name="ActiveCaption"/>
- <keyword name="AppWorkspace"/>
- <keyword name="Background"/>
- <keyword name="ButtonFace"/>
- <keyword name="ButtonHighlight"/>
- <keyword name="ButtonShadow"/>
- <keyword name="ButtonText"/>
- <keyword name="CaptionText"/>
- <keyword name="GrayText"/>
- <keyword name="Highlight"/>
- <keyword name="HighlightText"/>
- <keyword name="InactiveBorder"/>
- <keyword name="InactiveCaption"/>
- <keyword name="InactiveCaptionText"/>
- <keyword name="InfoBackground"/>
- <keyword name="InfoText"/>
- <keyword name="Menu"/>
- <keyword name="MenuText"/>
- <keyword name="Scrollbar"/>
- <keyword name="ThreeDDarkShadow"/>
- <keyword name="ThreeDFace"/>
- <keyword name="ThreeDHighlight"/>
- <keyword name="ThreeDLightShadow"/>
- <keyword name="ThreeDShadow"/>
- <keyword name="Window"/>
- <keyword name="WindowFrame"/>
- <keyword name="WindowText"/>
- </container-def>
-
- <!-- category definition : This is used to categorize properties
- in Properties View. -->
- <category-def name="aural">
- <caption>%css2.category-def.aural.caption</caption>
- </category-def>
- <category-def name="box">
- <caption>%css2.category-def.box.caption</caption>
- </category-def>
- <category-def name="colorandbackground">
- <caption>%css2.category-def.colorandbackground.caption</caption>
- </category-def>
- <category-def name="content">
- <caption>%css2.category-def.content.caption</caption>
- </category-def>
- <category-def name="font">
- <caption>%css2.category-def.font.caption</caption>
- </category-def>
- <category-def name="page">
- <caption>%css2.category-def.page.caption</caption>
- </category-def>
- <category-def name="tables">
- <caption>%css2.category-def.tables.caption</caption>
- </category-def>
- <category-def name="text">
- <caption>%css2.category-def.text.caption</caption>
- </category-def>
- <category-def name="ui">
- <caption>%css2.category-def.ui.caption</caption>
- </category-def>
- <category-def name="visual">
-<!-- <caption>%css2.category-def.visual.caption</caption>-->
- <caption>%css2.category-def.visual.caption</caption>
- </category-def>
-
- <!-- function definition -->
- <function-def name="attr">
- <function-value>attr</function-value>
- </function-def>
- <function-def name="counter">
- <function-value>counter</function-value>
- </function-def>
- <function-def name="rect">
- <function-value>rect</function-value>
- </function-def>
- <function-def name="rgb">
- <function-value>rgb</function-value>
- </function-def>
- <function-def name="uri">
- <function-value>url</function-value>
- </function-def>
- <function-def name="format">
- <function-value>format</function-value>
- </function-def>
- <function-def name="local">
- <function-value>local</function-value>
- </function-def>
-
- <!-- number definition : What unit types be acceptable for each
- number type? -->
- <number-def name="angle">
- <unit name="deg"/>
- <unit name="grad"/>
- <unit name="rad"/>
- </number-def>
- <number-def name="frequency">
- <unit name="hz"/>
- <unit name="khz"/>
- </number-def>
- <number-def name="hash">
- <unit name="hash"/>
- </number-def>
- <number-def name="integer">
- </number-def>
- <number-def name="length">
- <unit name="em"/>
- <unit name="ex"/>
- <unit name="px"/>
- <unit name="in"/>
- <unit name="cm"/>
- <unit name="mm"/>
- <unit name="pt"/>
- <unit name="pc"/>
- </number-def>
- <number-def name="number">
- </number-def>
- <number-def name="percentage">
- <unit name="percentage"/>
- </number-def>
- <number-def name="time">
- <unit name="ms"/>
- <unit name="s"/>
- </number-def>
-
- <unit-def name="cm">
- <unit-value>cm</unit-value>
- </unit-def>
- <unit-def name="deg">
- <unit-value>deg</unit-value>
- </unit-def>
- <unit-def name="em">
- <unit-value>em</unit-value>
- </unit-def>
- <unit-def name="ex">
- <unit-value>ex</unit-value>
- </unit-def>
- <unit-def name="grad">
- <unit-value>grad</unit-value>
- </unit-def>
- <unit-def name="hash">
- <unit-value>#</unit-value>
- </unit-def>
- <unit-def name="hz">
- <unit-value>Hz</unit-value>
- </unit-def>
- <unit-def name="in">
- <unit-value>in</unit-value>
- </unit-def>
- <unit-def name="khz">
- <unit-value>kHz</unit-value>
- </unit-def>
- <unit-def name="mm">
- <unit-value>mm</unit-value>
- </unit-def>
- <unit-def name="ms">
- <unit-value>ms</unit-value>
- </unit-def>
- <unit-def name="pc">
- <unit-value>pc</unit-value>
- </unit-def>
- <unit-def name="percentage">
- <unit-value>%</unit-value>
- </unit-def>
- <unit-def name="pt">
- <unit-value>pt</unit-value>
- </unit-def>
- <unit-def name="px">
- <unit-value>px</unit-value>
- </unit-def>
- <unit-def name="rad">
- <unit-value>rad</unit-value>
- </unit-def>
- <unit-def name="s">
- <unit-value>s</unit-value>
- </unit-def>
-
- <!-- keywords : string constants (this is last part..) -->
- <keyword-def name="100">
- <keyword-value>100</keyword-value>
- </keyword-def>
- <keyword-def name="200">
- <keyword-value>200</keyword-value>
- </keyword-def>
- <keyword-def name="300">
- <keyword-value>300</keyword-value>
- </keyword-def>
- <keyword-def name="400">
- <keyword-value>400</keyword-value>
- </keyword-def>
- <keyword-def name="500">
- <keyword-value>500</keyword-value>
- </keyword-def>
- <keyword-def name="600">
- <keyword-value>600</keyword-value>
- </keyword-def>
- <keyword-def name="700">
- <keyword-value>700</keyword-value>
- </keyword-def>
- <keyword-def name="800">
- <keyword-value>800</keyword-value>
- </keyword-def>
- <keyword-def name="900">
- <keyword-value>900</keyword-value>
- </keyword-def>
- <keyword-def name="above">
- <keyword-value>above</keyword-value>
- </keyword-def>
- <keyword-def name="absolute">
- <keyword-value>absolute</keyword-value>
- </keyword-def>
- <keyword-def name="ActiveBorder">
- <keyword-value>ActiveBorder</keyword-value>
- </keyword-def>
- <keyword-def name="ActiveCaption">
- <keyword-value>ActiveCaption</keyword-value>
- </keyword-def>
- <keyword-def name="all">
- <keyword-value>all</keyword-value>
- </keyword-def>
- <keyword-def name="always">
- <keyword-value>always</keyword-value>
- </keyword-def>
- <keyword-def name="AppWorkspace">
- <keyword-value>AppWorkspace</keyword-value>
- </keyword-def>
- <keyword-def name="aqua">
- <keyword-value>aqua</keyword-value>
- </keyword-def>
- <keyword-def name="armenian">
- <keyword-value>armenian</keyword-value>
- </keyword-def>
- <keyword-def name="auto">
- <keyword-value>auto</keyword-value>
- </keyword-def>
- <keyword-def name="avoid">
- <keyword-value>avoid</keyword-value>
- </keyword-def>
- <keyword-def name="Background">
- <keyword-value>Background</keyword-value>
- </keyword-def>
- <keyword-def name="baseline">
- <keyword-value>baseline</keyword-value>
- </keyword-def>
- <keyword-def name="behind">
- <keyword-value>behind</keyword-value>
- </keyword-def>
- <keyword-def name="below">
- <keyword-value>below</keyword-value>
- </keyword-def>
- <keyword-def name="bidi-override">
- <keyword-value>bidi-override</keyword-value>
- </keyword-def>
- <keyword-def name="black">
- <keyword-value>black</keyword-value>
- </keyword-def>
- <keyword-def name="blink">
- <keyword-value>blink</keyword-value>
- </keyword-def>
- <keyword-def name="block">
- <keyword-value>block</keyword-value>
- </keyword-def>
- <keyword-def name="blue">
- <keyword-value>blue</keyword-value>
- </keyword-def>
- <keyword-def name="bold">
- <keyword-value>bold</keyword-value>
- </keyword-def>
- <keyword-def name="bolder">
- <keyword-value>bolder</keyword-value>
- </keyword-def>
- <keyword-def name="both">
- <keyword-value>both</keyword-value>
- </keyword-def>
- <keyword-def name="bottom">
- <keyword-value>bottom</keyword-value>
- </keyword-def>
- <keyword-def name="ButtonFace">
- <keyword-value>ButtonFace</keyword-value>
- </keyword-def>
- <keyword-def name="ButtonHighlight">
- <keyword-value>ButtonHighlight</keyword-value>
- </keyword-def>
- <keyword-def name="ButtonShadow">
- <keyword-value>ButtonShadow</keyword-value>
- </keyword-def>
- <keyword-def name="ButtonText">
- <keyword-value>ButtonText</keyword-value>
- </keyword-def>
- <keyword-def name="capitalize">
- <keyword-value>capitalize</keyword-value>
- </keyword-def>
- <keyword-def name="caption">
- <keyword-value>caption</keyword-value>
- </keyword-def>
- <keyword-def name="CaptionText">
- <keyword-value>CaptionText</keyword-value>
- </keyword-def>
- <keyword-def name="center">
- <keyword-value>center</keyword-value>
- </keyword-def>
- <keyword-def name="center-left">
- <keyword-value>center-left</keyword-value>
- </keyword-def>
- <keyword-def name="center-right">
- <keyword-value>center-right</keyword-value>
- </keyword-def>
- <keyword-def name="child">
- <keyword-value>child</keyword-value>
- </keyword-def>
- <keyword-def name="circle">
- <keyword-value>circle</keyword-value>
- </keyword-def>
- <keyword-def name="cjk-ideographic">
- <keyword-value>cjk-ideographic</keyword-value>
- </keyword-def>
- <keyword-def name="close-quote">
- <keyword-value>close-quote</keyword-value>
- </keyword-def>
- <keyword-def name="code">
- <keyword-value>code</keyword-value>
- </keyword-def>
- <keyword-def name="condensed">
- <keyword-value>condensed</keyword-value>
- </keyword-def>
- <keyword-def name="collapse">
- <keyword-value>collapse</keyword-value>
- </keyword-def>
- <keyword-def name="compact">
- <keyword-value>compact</keyword-value>
- </keyword-def>
- <keyword-def name="continuous">
- <keyword-value>continuous</keyword-value>
- </keyword-def>
- <keyword-def name="crop">
- <keyword-value>crop</keyword-value>
- </keyword-def>
- <keyword-def name="cross">
- <keyword-value>cross</keyword-value>
- </keyword-def>
- <keyword-def name="crosshair">
- <keyword-value>crosshair</keyword-value>
- </keyword-def>
- <keyword-def name="cursive">
- <keyword-value>cursive</keyword-value>
- </keyword-def>
- <keyword-def name="dashed">
- <keyword-value>dashed</keyword-value>
- </keyword-def>
- <keyword-def name="decimal">
- <keyword-value>decimal</keyword-value>
- </keyword-def>
- <keyword-def name="decimal-leading-zero">
- <keyword-value>decimal-leading-zero</keyword-value>
- </keyword-def>
- <keyword-def name="default">
- <keyword-value>default</keyword-value>
- </keyword-def>
- <keyword-def name="digits">
- <keyword-value>digits</keyword-value>
- </keyword-def>
- <keyword-def name="disc">
- <keyword-value>disc</keyword-value>
- </keyword-def>
- <keyword-def name="dotted">
- <keyword-value>dotted</keyword-value>
- </keyword-def>
- <keyword-def name="double">
- <keyword-value>double</keyword-value>
- </keyword-def>
- <keyword-def name="e-resize">
- <keyword-value>e-resize</keyword-value>
- </keyword-def>
- <keyword-def name="embed">
- <keyword-value>embed</keyword-value>
- </keyword-def>
- <keyword-def name="expanded">
- <keyword-value>expanded</keyword-value>
- </keyword-def>
- <keyword-def name="extra-condensed">
- <keyword-value>extra-condensed</keyword-value>
- </keyword-def>
- <keyword-def name="extra-expanded">
- <keyword-value>extra-expanded</keyword-value>
- </keyword-def>
- <keyword-def name="fantasy">
- <keyword-value>fantasy</keyword-value>
- </keyword-def>
- <keyword-def name="far-left">
- <keyword-value>far-left</keyword-value>
- </keyword-def>
- <keyword-def name="far-right">
- <keyword-value>far-right</keyword-value>
- </keyword-def>
- <keyword-def name="fast">
- <keyword-value>fast</keyword-value>
- </keyword-def>
- <keyword-def name="faster">
- <keyword-value>faster</keyword-value>
- </keyword-def>
- <keyword-def name="female">
- <keyword-value>female</keyword-value>
- </keyword-def>
- <keyword-def name="fixed">
- <keyword-value>fixed</keyword-value>
- </keyword-def>
- <keyword-def name="fuchsia">
- <keyword-value>fuchsia</keyword-value>
- </keyword-def>
- <keyword-def name="georgian">
- <keyword-value>georgian</keyword-value>
- </keyword-def>
- <keyword-def name="gray">
- <keyword-value>gray</keyword-value>
- </keyword-def>
- <keyword-def name="GrayText">
- <keyword-value>GrayText</keyword-value>
- </keyword-def>
- <keyword-def name="green">
- <keyword-value>green</keyword-value>
- </keyword-def>
- <keyword-def name="groove">
- <keyword-value>groove</keyword-value>
- </keyword-def>
- <keyword-def name="hebrew">
- <keyword-value>hebrew</keyword-value>
- </keyword-def>
- <keyword-def name="help">
- <keyword-value>help</keyword-value>
- </keyword-def>
- <keyword-def name="hidden">
- <keyword-value>hidden</keyword-value>
- </keyword-def>
- <keyword-def name="hide">
- <keyword-value>hide</keyword-value>
- </keyword-def>
- <keyword-def name="high">
- <keyword-value>high</keyword-value>
- </keyword-def>
- <keyword-def name="Highlight">
- <keyword-value>Highlight</keyword-value>
- </keyword-def>
- <keyword-def name="HighlightText">
- <keyword-value>HighlightText</keyword-value>
- </keyword-def>
- <keyword-def name="higher">
- <keyword-value>higher</keyword-value>
- </keyword-def>
- <keyword-def name="hiragana">
- <keyword-value>hiragana</keyword-value>
- </keyword-def>
- <keyword-def name="hiragana-iroha">
- <keyword-value>hiragana-iroha</keyword-value>
- </keyword-def>
- <keyword-def name="icon">
- <keyword-value>icon</keyword-value>
- </keyword-def>
- <keyword-def name="InactiveBorder">
- <keyword-value>InactiveBorder</keyword-value>
- </keyword-def>
- <keyword-def name="InactiveCaption">
- <keyword-value>InactiveCaption</keyword-value>
- </keyword-def>
- <keyword-def name="InactiveCaptionText">
- <keyword-value>InactiveCaptionText</keyword-value>
- </keyword-def>
- <keyword-def name="InfoBackground">
- <keyword-value>InfoBackground</keyword-value>
- </keyword-def>
- <keyword-def name="InfoText">
- <keyword-value>InfoText</keyword-value>
- </keyword-def>
- <keyword-def name="inherit">
- <keyword-value>inherit</keyword-value>
- </keyword-def>
- <keyword-def name="inline">
- <keyword-value>inline</keyword-value>
- </keyword-def>
- <keyword-def name="inline-table">
- <keyword-value>inline-table</keyword-value>
- </keyword-def>
- <keyword-def name="inset">
- <keyword-value>inset</keyword-value>
- </keyword-def>
- <keyword-def name="inside">
- <keyword-value>inside</keyword-value>
- </keyword-def>
- <keyword-def name="invert">
- <keyword-value>invert</keyword-value>
- </keyword-def>
- <keyword-def name="italic">
- <keyword-value>italic</keyword-value>
- </keyword-def>
- <keyword-def name="justify">
- <keyword-value>justify</keyword-value>
- </keyword-def>
- <keyword-def name="katakana">
- <keyword-value>katakana</keyword-value>
- </keyword-def>
- <keyword-def name="katakana-iroha">
- <keyword-value>katakana-iroha</keyword-value>
- </keyword-def>
- <keyword-def name="landscape">
- <keyword-value>landscape</keyword-value>
- </keyword-def>
- <keyword-def name="large">
- <keyword-value>large</keyword-value>
- </keyword-def>
- <keyword-def name="larger">
- <keyword-value>larger</keyword-value>
- </keyword-def>
- <keyword-def name="left">
- <keyword-value>left</keyword-value>
- </keyword-def>
- <keyword-def name="left-side">
- <keyword-value>left-side</keyword-value>
- </keyword-def>
- <keyword-def name="leftwards">
- <keyword-value>leftwards</keyword-value>
- </keyword-def>
- <keyword-def name="level">
- <keyword-value>level</keyword-value>
- </keyword-def>
- <keyword-def name="lighter">
- <keyword-value>lighter</keyword-value>
- </keyword-def>
- <keyword-def name="lime">
- <keyword-value>lime</keyword-value>
- </keyword-def>
- <keyword-def name="line-through">
- <keyword-value>line-through</keyword-value>
- </keyword-def>
- <keyword-def name="list-item">
- <keyword-value>list-item</keyword-value>
- </keyword-def>
- <keyword-def name="loud">
- <keyword-value>loud</keyword-value>
- </keyword-def>
- <keyword-def name="low">
- <keyword-value>low</keyword-value>
- </keyword-def>
- <keyword-def name="lower">
- <keyword-value>lower</keyword-value>
- </keyword-def>
- <keyword-def name="lower-alpha">
- <keyword-value>lower-alpha</keyword-value>
- </keyword-def>
- <keyword-def name="lower-greek">
- <keyword-value>lower-greek</keyword-value>
- </keyword-def>
- <keyword-def name="lower-latin">
- <keyword-value>lower-latin</keyword-value>
- </keyword-def>
- <keyword-def name="lower-roman">
- <keyword-value>lower-roman</keyword-value>
- </keyword-def>
- <keyword-def name="lowercase">
- <keyword-value>lowercase</keyword-value>
- </keyword-def>
- <keyword-def name="ltr">
- <keyword-value>ltr</keyword-value>
- </keyword-def>
- <keyword-def name="male">
- <keyword-value>male</keyword-value>
- </keyword-def>
- <keyword-def name="marker">
- <keyword-value>marker</keyword-value>
- </keyword-def>
- <keyword-def name="maroon">
- <keyword-value>maroon</keyword-value>
- </keyword-def>
- <keyword-def name="medium">
- <keyword-value>medium</keyword-value>
- </keyword-def>
- <keyword-def name="Menu">
- <keyword-value>Menu</keyword-value>
- </keyword-def>
- <keyword-def name="MenuText">
- <keyword-value>MenuText</keyword-value>
- </keyword-def>
- <keyword-def name="message-box">
- <keyword-value>message-box</keyword-value>
- </keyword-def>
- <keyword-def name="middle">
- <keyword-value>middle</keyword-value>
- </keyword-def>
- <keyword-def name="mix">
- <keyword-value>mix</keyword-value>
- </keyword-def>
- <keyword-def name="monospace">
- <keyword-value>monospace</keyword-value>
- </keyword-def>
- <keyword-def name="move">
- <keyword-value>move</keyword-value>
- </keyword-def>
- <keyword-def name="n-resize">
- <keyword-value>n-resize</keyword-value>
- </keyword-def>
- <keyword-def name="narrower">
- <keyword-value>narrower</keyword-value>
- </keyword-def>
- <keyword-def name="navy">
- <keyword-value>navy</keyword-value>
- </keyword-def>
- <keyword-def name="ne-resize">
- <keyword-value>ne-resize</keyword-value>
- </keyword-def>
- <keyword-def name="no-close-quote">
- <keyword-value>no-close-quote</keyword-value>
- </keyword-def>
- <keyword-def name="no-open-quote">
- <keyword-value>no-open-quote</keyword-value>
- </keyword-def>
- <keyword-def name="no-repeat">
- <keyword-value>no-repeat</keyword-value>
- </keyword-def>
- <keyword-def name="none">
- <keyword-value>none</keyword-value>
- </keyword-def>
- <keyword-def name="normal">
- <keyword-value>normal</keyword-value>
- </keyword-def>
- <keyword-def name="nowrap">
- <keyword-value>nowrap</keyword-value>
- </keyword-def>
- <keyword-def name="nw-resize">
- <keyword-value>nw-resize</keyword-value>
- </keyword-def>
- <keyword-def name="oblique">
- <keyword-value>oblique</keyword-value>
- </keyword-def>
- <keyword-def name="olive">
- <keyword-value>olive</keyword-value>
- </keyword-def>
- <keyword-def name="once">
- <keyword-value>once</keyword-value>
- </keyword-def>
- <keyword-def name="open-quote">
- <keyword-value>open-quote</keyword-value>
- </keyword-def>
- <keyword-def name="outset">
- <keyword-value>outset</keyword-value>
- </keyword-def>
- <keyword-def name="outside">
- <keyword-value>outside</keyword-value>
- </keyword-def>
- <keyword-def name="overline">
- <keyword-value>overline</keyword-value>
- </keyword-def>
- <keyword-def name="pointer">
- <keyword-value>pointer</keyword-value>
- </keyword-def>
- <keyword-def name="portrait">
- <keyword-value>portrait</keyword-value>
- </keyword-def>
- <keyword-def name="pre">
- <keyword-value>pre</keyword-value>
- </keyword-def>
- <keyword-def name="purple">
- <keyword-value>purple</keyword-value>
- </keyword-def>
- <keyword-def name="red">
- <keyword-value>red</keyword-value>
- </keyword-def>
- <keyword-def name="relative">
- <keyword-value>relative</keyword-value>
- </keyword-def>
- <keyword-def name="repeat">
- <keyword-value>repeat</keyword-value>
- </keyword-def>
- <keyword-def name="repeat-x">
- <keyword-value>repeat-x</keyword-value>
- </keyword-def>
- <keyword-def name="repeat-y">
- <keyword-value>repeat-y</keyword-value>
- </keyword-def>
- <keyword-def name="ridge">
- <keyword-value>ridge</keyword-value>
- </keyword-def>
- <keyword-def name="right">
- <keyword-value>right</keyword-value>
- </keyword-def>
- <keyword-def name="right-side">
- <keyword-value>right-side</keyword-value>
- </keyword-def>
- <keyword-def name="rightwards">
- <keyword-value>rightwards</keyword-value>
- </keyword-def>
- <keyword-def name="rtl">
- <keyword-value>rtl</keyword-value>
- </keyword-def>
- <keyword-def name="run-in">
- <keyword-value>run-in</keyword-value>
- </keyword-def>
- <keyword-def name="s-resize">
- <keyword-value>s-resize</keyword-value>
- </keyword-def>
- <keyword-def name="sans-serif">
- <keyword-value>sans-serif</keyword-value>
- </keyword-def>
- <keyword-def name="scroll">
- <keyword-value>scroll</keyword-value>
- </keyword-def>
- <keyword-def name="Scrollbar">
- <keyword-value>Scrollbar</keyword-value>
- </keyword-def>
- <keyword-def name="se-resize">
- <keyword-value>se-resize</keyword-value>
- </keyword-def>
- <keyword-def name="semi-condensed">
- <keyword-value>semi-condensed</keyword-value>
- </keyword-def>
- <keyword-def name="semi-expanded">
- <keyword-value>semi-expanded</keyword-value>
- </keyword-def>
- <keyword-def name="separate">
- <keyword-value>separate</keyword-value>
- </keyword-def>
- <keyword-def name="serif">
- <keyword-value>serif</keyword-value>
- </keyword-def>
- <keyword-def name="show">
- <keyword-value>show</keyword-value>
- </keyword-def>
- <keyword-def name="silent">
- <keyword-value>silent</keyword-value>
- </keyword-def>
- <keyword-def name="silver">
- <keyword-value>silver</keyword-value>
- </keyword-def>
- <keyword-def name="slow">
- <keyword-value>slow</keyword-value>
- </keyword-def>
- <keyword-def name="slower">
- <keyword-value>slower</keyword-value>
- </keyword-def>
- <keyword-def name="small">
- <keyword-value>small</keyword-value>
- </keyword-def>
- <keyword-def name="small-caps">
- <keyword-value>small-caps</keyword-value>
- </keyword-def>
- <keyword-def name="small-caption">
- <keyword-value>small-caption</keyword-value>
- </keyword-def>
- <keyword-def name="smaller">
- <keyword-value>smaller</keyword-value>
- </keyword-def>
- <keyword-def name="soft">
- <keyword-value>soft</keyword-value>
- </keyword-def>
- <keyword-def name="solid">
- <keyword-value>solid</keyword-value>
- </keyword-def>
- <keyword-def name="spell-out">
- <keyword-value>spell-out</keyword-value>
- </keyword-def>
- <keyword-def name="square">
- <keyword-value>square</keyword-value>
- </keyword-def>
- <keyword-def name="static">
- <keyword-value>static</keyword-value>
- </keyword-def>
- <keyword-def name="status-bar">
- <keyword-value>status-bar</keyword-value>
- </keyword-def>
- <keyword-def name="sub">
- <keyword-value>sub</keyword-value>
- </keyword-def>
- <keyword-def name="super">
- <keyword-value>super</keyword-value>
- </keyword-def>
- <keyword-def name="sw-resize">
- <keyword-value>sw-resize</keyword-value>
- </keyword-def>
- <keyword-def name="table">
- <keyword-value>table</keyword-value>
- </keyword-def>
- <keyword-def name="table-caption">
- <keyword-value>table-caption</keyword-value>
- </keyword-def>
- <keyword-def name="table-cell">
- <keyword-value>table-cell</keyword-value>
- </keyword-def>
- <keyword-def name="table-column">
- <keyword-value>table-column</keyword-value>
- </keyword-def>
- <keyword-def name="table-column-group">
- <keyword-value>table-column-group</keyword-value>
- </keyword-def>
- <keyword-def name="table-footer-group">
- <keyword-value>table-footer-group</keyword-value>
- </keyword-def>
- <keyword-def name="table-header-group">
- <keyword-value>table-header-group</keyword-value>
- </keyword-def>
- <keyword-def name="table-row">
- <keyword-value>table-row</keyword-value>
- </keyword-def>
- <keyword-def name="table-row-group">
- <keyword-value>table-row-group</keyword-value>
- </keyword-def>
- <keyword-def name="teal">
- <keyword-value>teal</keyword-value>
- </keyword-def>
- <keyword-def name="text">
- <keyword-value>text</keyword-value>
- </keyword-def>
- <keyword-def name="text-top">
- <keyword-value>text-top</keyword-value>
- </keyword-def>
- <keyword-def name="text-bottom">
- <keyword-value>text-bottom</keyword-value>
- </keyword-def>
- <keyword-def name="thick">
- <keyword-value>thick</keyword-value>
- </keyword-def>
- <keyword-def name="thin">
- <keyword-value>thin</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDDarkShadow">
- <keyword-value>ThreeDDarkShadow</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDFace">
- <keyword-value>ThreeDFace</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDHighlight">
- <keyword-value>ThreeDHighlight</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDLightShadow">
- <keyword-value>ThreeDLightShadow</keyword-value>
- </keyword-def>
- <keyword-def name="ThreeDShadow">
- <keyword-value>ThreeDShadow</keyword-value>
- </keyword-def>
- <keyword-def name="top">
- <keyword-value>top</keyword-value>
- </keyword-def>
- <keyword-def name="transparent">
- <keyword-value>transparent</keyword-value>
- </keyword-def>
- <keyword-def name="ultra-condensed">
- <keyword-value>ultra-condensed</keyword-value>
- </keyword-def>
- <keyword-def name="ultra-expanded">
- <keyword-value>ultra-expanded</keyword-value>
- </keyword-def>
- <keyword-def name="underline">
- <keyword-value>underline</keyword-value>
- </keyword-def>
- <keyword-def name="upper-alpha">
- <keyword-value>upper-alpha</keyword-value>
- </keyword-def>
- <keyword-def name="upper-latin">
- <keyword-value>upper-latin</keyword-value>
- </keyword-def>
- <keyword-def name="upper-roman">
- <keyword-value>upper-roman</keyword-value>
- </keyword-def>
- <keyword-def name="uppercase">
- <keyword-value>uppercase</keyword-value>
- </keyword-def>
- <keyword-def name="visible">
- <keyword-value>visible</keyword-value>
- </keyword-def>
- <keyword-def name="w-resize">
- <keyword-value>w-resize</keyword-value>
- </keyword-def>
- <keyword-def name="wait">
- <keyword-value>wait</keyword-value>
- </keyword-def>
- <keyword-def name="white">
- <keyword-value>white</keyword-value>
- </keyword-def>
- <keyword-def name="wider">
- <keyword-value>wider</keyword-value>
- </keyword-def>
- <keyword-def name="Window">
- <keyword-value>Window</keyword-value>
- </keyword-def>
- <keyword-def name="WindowFrame">
- <keyword-value>WindowFrame</keyword-value>
- </keyword-def>
- <keyword-def name="WindowText">
- <keyword-value>WindowText</keyword-value>
- </keyword-def>
- <keyword-def name="x-fast">
- <keyword-value>x-fast</keyword-value>
- </keyword-def>
- <keyword-def name="x-high">
- <keyword-value>x-high</keyword-value>
- </keyword-def>
- <keyword-def name="x-large">
- <keyword-value>x-large</keyword-value>
- </keyword-def>
- <keyword-def name="x-loud">
- <keyword-value>x-loud</keyword-value>
- </keyword-def>
- <keyword-def name="x-low">
- <keyword-value>x-low</keyword-value>
- </keyword-def>
- <keyword-def name="x-slow">
- <keyword-value>x-slow</keyword-value>
- </keyword-def>
- <keyword-def name="x-small">
- <keyword-value>x-small</keyword-value>
- </keyword-def>
- <keyword-def name="x-soft">
- <keyword-value>x-soft</keyword-value>
- </keyword-def>
- <keyword-def name="xx-small">
- <keyword-value>xx-small</keyword-value>
- </keyword-def>
- <keyword-def name="xx-large">
- <keyword-value>xx-large</keyword-value>
- </keyword-def>
- <keyword-def name="yellow">
- <keyword-value>yellow</keyword-value>
- </keyword-def>
-</css-profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-mobile1_0.xml b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-mobile1_0.xml
deleted file mode 100644
index 2d5d761b9a..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-mobile1_0.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-/*******************************************************************************
- * 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
- *******************************************************************************/
- -->
-<!--<!DOCTYPE css-profile SYSTEM "css-profile.dtd" >-->
-<css-profile>
- <profile-import name="cssprofile-css2.xml"/>
- <stylesheet-def>
- <description>%mobile1_0.stylesheet-def.description</description>
- <charset-rule/>
- <import-rule/>
- <media-rule/>
- <style-rule/>
- </stylesheet-def>
-
- <!-- Which properties can style rule include ? -->
- <!-- using "overwrite" method: only disabled properties are written. -->
-
- <style-rule-def overwrite="true">
- <selector-expression name="child" enabled="false"/>
- <selector-expression name="adjacent" enabled="false"/>
- <selector-expression name="attribute" enabled="false"/>
- <pseudo-class name="first-child" enabled="false"/>
- <pseudo-class name="link" enabled="false"/>
- <pseudo-class name="active" enabled="false"/>
- <pseudo-class name="lang" enabled="false"/>
- <property name="azimuth" enabled="false"/>
- <property name="border-collapse" enabled="false"/>
- <property name="border-spacing" enabled="false"/>
- <property name="bottom" enabled="false"/>
- <property name="caption-side" enabled="false"/>
- <property name="clip" enabled="false"/>
- <property name="content" enabled="false"/>
- <property name="counter-increment" enabled="false"/>
- <property name="counter-reset" enabled="false"/>
- <property name="cue" enabled="false"/>
- <property name="cue-after" enabled="false"/>
- <property name="cue-before" enabled="false"/>
- <property name="cursor" enabled="false"/>
- <property name="direction" enabled="false"/>
- <property name="elevation" enabled="false"/>
- <property name="empty-cells" enabled="false"/>
- <property name="font-size-adjust" enabled="false"/>
- <property name="font-stretch" enabled="false"/>
- <property name="left" enabled="false"/>
- <property name="letter-spacing" enabled="false"/>
- <property name="line-height" enabled="false"/>
- <property name="marker-offset" enabled="false"/>
- <property name="marks" enabled="false"/>
- <property name="max-height" enabled="false"/>
- <property name="max-width" enabled="false"/>
- <property name="min-height" enabled="false"/>
- <property name="min-width" enabled="false"/>
- <property name="orphans" enabled="false"/>
- <property name="outline" enabled="false"/>
- <property name="outline-color" enabled="false"/>
- <property name="outline-style" enabled="false"/>
- <property name="outline-width" enabled="false"/>
- <property name="overflow" enabled="false"/>
- <property name="page" enabled="false"/>
- <property name="page-break-after" enabled="false"/>
- <property name="page-break-before" enabled="false"/>
- <property name="page-break-inside" enabled="false"/>
- <property name="pause" enabled="false"/>
- <property name="pause-after" enabled="false"/>
- <property name="pause-before" enabled="false"/>
- <property name="pitch" enabled="false"/>
- <property name="pitch-range" enabled="false"/>
- <property name="play-during" enabled="false"/>
- <property name="position" enabled="false"/>
- <property name="quotes" enabled="false"/>
- <property name="richness" enabled="false"/>
- <property name="right" enabled="false"/>
- <property name="size" enabled="false"/>
- <property name="speak" enabled="false"/>
- <property name="speak-header" enabled="false"/>
- <property name="speak-numeral" enabled="false"/>
- <property name="speak-punctuation" enabled="false"/>
- <property name="speech-rate" enabled="false"/>
- <property name="stress" enabled="false"/>
- <property name="table-layout" enabled="false"/>
- <property name="text-shadow" enabled="false"/>
- <property name="top" enabled="false"/>
- <property name="unicode-bidi" enabled="false"/>
- <property name="voice-family" enabled="false"/>
- <property name="volume" enabled="false"/>
- <property name="widows" enabled="false"/>
- <property name="word-spacing" enabled="false"/>
- <property name="z-index" enabled="false"/>
- </style-rule-def>
-
- <!-- property definition -->
- <!-- using "redifine" method: if "overwrite" attribute is set to
- "false" or not set, it means the node is cleanly redifined -->
-
- <property-def name="background-attachment"
- inherited="no" mediagroup="visual" category="colorandbackground">
- <keyword name="scroll"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="display"
- inherited="no" mediagroup="all" category="visual">
- <keyword name="inline"/>
- <keyword name="block"/>
- <keyword name="list-item"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="list-style-type"
- inherited="yes" mediagroup="visual" category="content">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-greek"/>
- <keyword name="lower-alpha"/>
- <keyword name="upper-alpha"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-align"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="center"/>
- <keyword name="justify"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-decoration"
- inherited="no" mediagroup="visual" category="text">
- <keyword name="none"/>
- <keyword name="underline"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="vertical-align"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="baseline"/>
- <keyword name="sub"/>
- <keyword name="super"/>
- <keyword name="inherit"/>
- </property-def>
-
- <!-- container definition : Container is the lump of values.
- It can be used like macros. -->
- <container-def name="color" overwrite="true">
- <container name="system-color" enabled="false"/>
- </container-def>
-</css-profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-wap.xml b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-wap.xml
deleted file mode 100644
index ad401c1c9d..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-wap.xml
+++ /dev/null
@@ -1,630 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-/*******************************************************************************
- * 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
- *******************************************************************************/
- -->
-<!--<!DOCTYPE css-profile SYSTEM "css-profile.dtd" >-->
-<css-profile>
- <profile-import name="cssprofile-css2.xml"/>
- <stylesheet-def>
- <description>%wap.stylesheet-def.description</description>
- <charset-rule/>
- <import-rule/>
- <media-rule/>
- <style-rule/>
- </stylesheet-def>
-
- <!-- Which properties can style rule include ? -->
- <!-- using "overwrite" method: only disabled properties are written. -->
-
- <style-rule-def overwrite="true">
- <property name="azimuth" enabled="false"/>
- <property name="border-collapse" enabled="false"/>
- <property name="border-spacing" enabled="false"/>
- <property name="bottom" enabled="false"/>
- <property name="caption-side" enabled="false"/>
- <property name="clip" enabled="false"/>
- <property name="content" enabled="false"/>
- <property name="cue" enabled="false"/>
- <property name="cue-after" enabled="false"/>
- <property name="cue-before" enabled="false"/>
- <property name="cursor" enabled="false"/>
- <property name="direction" enabled="false"/>
- <property name="elevation" enabled="false"/>
- <property name="empty-cells" enabled="false"/>
- <property name="font-size-adjust" enabled="false"/>
- <property name="font-stretch" enabled="false"/>
- <property name="left" enabled="false"/>
- <property name="letter-spacing" enabled="false"/>
- <property name="line-height" enabled="false"/>
- <property name="marker-offset" enabled="false"/>
- <property name="marks" enabled="false"/>
- <property name="max-height" enabled="false"/>
- <property name="max-width" enabled="false"/>
- <property name="min-height" enabled="false"/>
- <property name="min-width" enabled="false"/>
- <property name="orphans" enabled="false"/>
- <property name="outline" enabled="false"/>
- <property name="outline-color" enabled="false"/>
- <property name="outline-style" enabled="false"/>
- <property name="outline-width" enabled="false"/>
- <property name="overflow" enabled="false"/>
- <property name="page" enabled="false"/>
- <property name="page-break-after" enabled="false"/>
- <property name="page-break-before" enabled="false"/>
- <property name="page-break-inside" enabled="false"/>
- <property name="pause" enabled="false"/>
- <property name="pause-after" enabled="false"/>
- <property name="pause-before" enabled="false"/>
- <property name="pitch" enabled="false"/>
- <property name="pitch-range" enabled="false"/>
- <property name="play-during" enabled="false"/>
- <property name="position" enabled="false"/>
- <property name="quotes" enabled="false"/>
- <property name="richness" enabled="false"/>
- <property name="right" enabled="false"/>
- <property name="size" enabled="false"/>
- <property name="speak" enabled="false"/>
- <property name="speak-header" enabled="false"/>
- <property name="speak-numeral" enabled="false"/>
- <property name="speak-punctuation" enabled="false"/>
- <property name="speech-rate" enabled="false"/>
- <property name="stress" enabled="false"/>
- <property name="table-layout" enabled="false"/>
- <property name="text-shadow" enabled="false"/>
- <property name="top" enabled="false"/>
- <property name="unicode-bidi" enabled="false"/>
- <property name="voice-family" enabled="false"/>
- <property name="volume" enabled="false"/>
- <property name="widows" enabled="false"/>
- <property name="word-spacing" enabled="false"/>
- <property name="z-index" enabled="false"/>
- <property name="-wap-marquee-style"/>
- <property name="-wap-marquee-loop"/>
- <property name="-wap-marquee-dir"/>
- <property name="-wap-marquee-speed"/>
- <property name="-wap-accesskey"/>
- <property name="-wap-input-format"/>
- <property name="-wap-input-required"/>
- </style-rule-def>
-
- <!-- property definition -->
- <!-- using "redifine" method: if "overwrite" attribute is set to
- "false" or not set, it means the node is cleanly redifined -->
-
- <property-def name="display"
- inherited="no" mediagroup="all" category="visual">
- <keyword name="inline"/>
- <keyword name="block"/>
- <keyword name="list-item"/>
- <keyword name="-wap-marquee"/>
- <keyword name="none"/>
- </property-def>
- <property-def name="list-style-type"
- inherited="yes" mediagroup="visual" category="content">
- <keyword name="disc"/>
- <keyword name="circle"/>
- <keyword name="square"/>
- <keyword name="decimal"/>
- <keyword name="lower-roman"/>
- <keyword name="upper-roman"/>
- <keyword name="lower-alpha"/>
- <keyword name="upper-alpha"/>
- <keyword name="none"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-align"
- inherited="yes" mediagroup="visual" category="text">
- <keyword name="left"/>
- <keyword name="right"/>
- <keyword name="center"/>
- <keyword name="justify"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="text-decoration"
- inherited="no" mediagroup="visual" category="text">
- <keyword name="none"/>
- <keyword name="underline"/>
- <keyword name="blink"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="vertical-align"
- inherited="no" mediagroup="visual" category="visual">
- <keyword name="baseline"/>
- <keyword name="sub"/>
- <keyword name="super"/>
- <keyword name="top"/>
- <keyword name="middle"/>
- <keyword name="bottom"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-marquee-style"
- inherited="no" mediagroup="visual" category="wap">
- <keyword name="scroll"/>
- <keyword name="slide"/>
- <keyword name="alternate"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-marquee-loop"
- inherited="no" mediagroup="visual" category="wap">
- <number name="integer"/>
- <keyword name="infinite"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-marquee-dir"
- inherited="no" mediagroup="visual" category="wap">
- <keyword name="ltr"/>
- <keyword name="rtl"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-marquee-speed"
- inherited="no" mediagroup="visual" category="wap">
- <keyword name="slow"/>
- <keyword name="normal"/>
- <keyword name="fast"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-accesskey"
- inherited="no" mediagroup="interactive" category="wap">
- <container name="keycombination"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-input-format"
- inherited="no" mediagroup="interactive" category="wap">
- <container name="format"/>
- <keyword name="inherit"/>
- </property-def>
- <property-def name="-wap-input-required"
- inherited="no" mediagroup="interactive" category="wap">
- <keyword name="true"/>
- <keyword name="false"/>
- <keyword name="inherit"/>
- </property-def>
-
- <!-- container definition : Container is the lump of values.
- It can be used like macros. -->
- <container-def name="color" overwrite="true">
- <container name="system-color" enabled="false"/>
- </container-def>
- <container-def name="format">
- <string name="any"/>
- </container-def>
- <container-def name="keycombination">
- <container name="key"/>
- <keyword name="-"/>
- </container-def>
- <container-def name="key">
- <keyword name="space"/>
- <container name="specialkey"/>
- </container-def>
- <container-def name="specialkey">
- <container name="modifierkey"/>
- <container name="functionkey"/>
- <container name="navigationkey"/>
- <container name="editkey"/>
- <container name="misckey"/>
- <container name="volumecontrolkey"/>
- <container name="applicationkey"/>
- <container name="phonekey"/>
- <container name="vendorkey"/>
- </container-def>
- <container-def name="modifierkey">
- <keyword name="accesskey"/>
- <container name="cmdkey"/>
- <container name="optkey"/>
- <container name="ctrlkey"/>
- <container name="shiftkey"/>
- <container name="altkey"/>
- <container name="winkey"/>
- <container name="metakey"/>
- <keyword name="fn"/>
- <keyword name="fcn"/>
- <keyword name="caps"/>
- </container-def>
- <container-def name="cmdkey">
- <keyword name="cmd"/>
- <keyword name="rcmd"/>
- <keyword name="lcmd"/>
- </container-def>
- <container-def name="optkey">
- <keyword name="opt"/>
- <keyword name="ropt"/>
- <keyword name="lopt"/>
- </container-def>
- <container-def name="ctrlkey">
- <keyword name="ctrl"/>
- <keyword name="rctrl"/>
- <keyword name="lctrl"/>
- </container-def>
- <container-def name="shiftkey">
- <keyword name="shift"/>
- <keyword name="rshift"/>
- <keyword name="lshift"/>
- </container-def>
- <container-def name="altkey">
- <keyword name="alt"/>
- <keyword name="ralt"/>
- <keyword name="lalt"/>
- </container-def>
- <container-def name="winkey">
- <keyword name="win"/>
- <keyword name="rwin"/>
- <keyword name="lwin"/>
- </container-def>
- <container-def name="metakey">
- <keyword name="meta"/>
- <keyword name="rmeta"/>
- <keyword name="lmeta"/>
- </container-def>
- <container-def name="functionkey">
- <keyword name="f1"/>
- <keyword name="f2"/>
- <keyword name="f3"/>
- <keyword name="f4"/>
- <keyword name="f5"/>
- <keyword name="f6"/>
- <keyword name="f7"/>
- <keyword name="f8"/>
- <keyword name="f9"/>
- <keyword name="f10"/>
- <keyword name="f11"/>
- <keyword name="f12"/>
- <keyword name="f13"/>
- <keyword name="f14"/>
- <keyword name="f15"/>
- </container-def>
- <container-def name="navigationkey">
- <keyword name="tab"/>
- <keyword name="esc"/>
- <keyword name="enter"/>
- <keyword name="return"/>
- <keyword name="menu"/>
- <keyword name="help"/>
- <keyword name="namemenu"/>
- <keyword name="rcl"/>
- <keyword name="snd"/>
- <keyword name="arrowkey"/>
- <keyword name="pagekey"/>
- </container-def>
- <container-def name="arrowkey">
- <keyword name="up"/>
- <keyword name="down"/>
- <keyword name="left"/>
- <keyword name="right"/>
- </container-def>
- <container-def name="pagekey">
- <keyword name="home"/>
- <keyword name="end"/>
- <keyword name="pgup"/>
- <keyword name="pgdn"/>
- </container-def>
- <container-def name="editkey">
- <keyword name="bs"/>
- <keyword name="del"/>
- <keyword name="ins"/>
- <keyword name="undo"/>
- <keyword name="cut"/>
- <keyword name="copy"/>
- <keyword name="paste"/>
- <keyword name="clr"/>
- <keyword name="sto"/>
- </container-def>
- <container-def name="misckey">
- <keyword name="prtsc"/>
- <keyword name="sysrq"/>
- <keyword name="scrlock"/>
- <keyword name="pause"/>
- <keyword name="brk"/>
- <keyword name="numlock"/>
- <keyword name="pwr"/>
- </container-def>
- <container-def name="volumecontrolkey">
- <keyword name="volumeup"/>
- <keyword name="volumedown"/>
- </container-def>
- <container-def name="applicationkey">
- <keyword name="memo"/>
- <keyword name="todo"/>
- <keyword name="calendar"/>
- <keyword name="mail"/>
- <keyword name="address"/>
- </container-def>
- <container-def name="phonekey">
- <keyword name="phone-send"/>
- <keyword name="phone-end"/>
- <keyword name="phone-accept"/>
- </container-def>
- <container-def name="vendorkey">
- <keyword name="vnd."/>
- </container-def>
-
- <category-def name="wap">
- <caption>%wap.category-def.wap.caption</caption>
- </category-def>
-
- <number-def name="length">
- <unit name="em"/>
- <unit name="ex"/>
- <unit name="px"/>
- </number-def>
-
- <keyword-def name="-wap-marquee">
- <keyword-value>-wap-marquee</keyword-value>
- </keyword-def>
- <keyword-def name="slide">
- <keyword-value>slide</keyword-value>
- </keyword-def>
- <keyword-def name="alternate">
- <keyword-value>alternate</keyword-value>
- </keyword-def>
- <keyword-def name="infinite">
- <keyword-value>infinite</keyword-value>
- </keyword-def>
- <keyword-def name="-">
- <keyword-value>-</keyword-value>
- </keyword-def>
- <keyword-def name="space">
- <keyword-value>space</keyword-value>
- </keyword-def>
- <keyword-def name="accesskey">
- <keyword-value>accesskey</keyword-value>
- </keyword-def>
- <keyword-def name="fn">
- <keyword-value>fn</keyword-value>
- </keyword-def>
- <keyword-def name="fcn">
- <keyword-value>fcn</keyword-value>
- </keyword-def>
- <keyword-def name="caps">
- <keyword-value>caps</keyword-value>
- </keyword-def>
- <keyword-def name="cmd">
- <keyword-value>cmd</keyword-value>
- </keyword-def>
- <keyword-def name="rcmd">
- <keyword-value>rcmd</keyword-value>
- </keyword-def>
- <keyword-def name="lcmd">
- <keyword-value>lcmd</keyword-value>
- </keyword-def>
- <keyword-def name="opt">
- <keyword-value>opt</keyword-value>
- </keyword-def>
- <keyword-def name="ropt">
- <keyword-value>ropt</keyword-value>
- </keyword-def>
- <keyword-def name="lopt">
- <keyword-value>lopt</keyword-value>
- </keyword-def>
- <keyword-def name="ctrl">
- <keyword-value>ctrl</keyword-value>
- </keyword-def>
- <keyword-def name="rctrl">
- <keyword-value>rctrl</keyword-value>
- </keyword-def>
- <keyword-def name="lctrl">
- <keyword-value>lctrl</keyword-value>
- </keyword-def>
- <keyword-def name="shift">
- <keyword-value>shift</keyword-value>
- </keyword-def>
- <keyword-def name="rshift">
- <keyword-value>rshift</keyword-value>
- </keyword-def>
- <keyword-def name="lshift">
- <keyword-value>lshift</keyword-value>
- </keyword-def>
- <keyword-def name="alt">
- <keyword-value>alt</keyword-value>
- </keyword-def>
- <keyword-def name="ralt">
- <keyword-value>ralt</keyword-value>
- </keyword-def>
- <keyword-def name="lalt">
- <keyword-value>lalt</keyword-value>
- </keyword-def>
- <keyword-def name="win">
- <keyword-value>win</keyword-value>
- </keyword-def>
- <keyword-def name="rwin">
- <keyword-value>rwin</keyword-value>
- </keyword-def>
- <keyword-def name="lwin">
- <keyword-value>lwin</keyword-value>
- </keyword-def>
- <keyword-def name="meta">
- <keyword-value>meta</keyword-value>
- </keyword-def>
- <keyword-def name="rmeta">
- <keyword-value>rmeta</keyword-value>
- </keyword-def>
- <keyword-def name="lmeta">
- <keyword-value>lmeta</keyword-value>
- </keyword-def>
- <keyword-def name="f1">
- <keyword-value>f1</keyword-value>
- </keyword-def>
- <keyword-def name="f2">
- <keyword-value>f2</keyword-value>
- </keyword-def>
- <keyword-def name="f3">
- <keyword-value>f3</keyword-value>
- </keyword-def>
- <keyword-def name="f4">
- <keyword-value>f4</keyword-value>
- </keyword-def>
- <keyword-def name="f5">
- <keyword-value>f5</keyword-value>
- </keyword-def>
- <keyword-def name="f6">
- <keyword-value>f6</keyword-value>
- </keyword-def>
- <keyword-def name="f7">
- <keyword-value>f7</keyword-value>
- </keyword-def>
- <keyword-def name="f8">
- <keyword-value>f8</keyword-value>
- </keyword-def>
- <keyword-def name="f9">
- <keyword-value>f9</keyword-value>
- </keyword-def>
- <keyword-def name="f10">
- <keyword-value>f10</keyword-value>
- </keyword-def>
- <keyword-def name="f11">
- <keyword-value>f11</keyword-value>
- </keyword-def>
- <keyword-def name="f12">
- <keyword-value>f12</keyword-value>
- </keyword-def>
- <keyword-def name="f13">
- <keyword-value>f13</keyword-value>
- </keyword-def>
- <keyword-def name="f14">
- <keyword-value>f14</keyword-value>
- </keyword-def>
- <keyword-def name="f15">
- <keyword-value>f15</keyword-value>
- </keyword-def>
- <keyword-def name="tab">
- <keyword-value>tab</keyword-value>
- </keyword-def>
- <keyword-def name="esc">
- <keyword-value>esc</keyword-value>
- </keyword-def>
- <keyword-def name="enter">
- <keyword-value>enter</keyword-value>
- </keyword-def>
- <keyword-def name="return">
- <keyword-value>return</keyword-value>
- </keyword-def>
- <keyword-def name="namemenu">
- <keyword-value>namemenu</keyword-value>
- </keyword-def>
- <keyword-def name="rcl">
- <keyword-value>rcl</keyword-value>
- </keyword-def>
- <keyword-def name="snd">
- <keyword-value>snd</keyword-value>
- </keyword-def>
- <keyword-def name="arrowkey">
- <keyword-value>arrowkey</keyword-value>
- </keyword-def>
- <keyword-def name="pagekey">
- <keyword-value>pagekey</keyword-value>
- </keyword-def>
- <keyword-def name="up">
- <keyword-value>up</keyword-value>
- </keyword-def>
- <keyword-def name="down">
- <keyword-value>down</keyword-value>
- </keyword-def>
- <keyword-def name="home">
- <keyword-value>home</keyword-value>
- </keyword-def>
- <keyword-def name="end">
- <keyword-value>end</keyword-value>
- </keyword-def>
- <keyword-def name="pgup">
- <keyword-value>pgup</keyword-value>
- </keyword-def>
- <keyword-def name="pgdn">
- <keyword-value>pgdn</keyword-value>
- </keyword-def>
- <keyword-def name="bs">
- <keyword-value>bs</keyword-value>
- </keyword-def>
- <keyword-def name="del">
- <keyword-value>del</keyword-value>
- </keyword-def>
- <keyword-def name="ins">
- <keyword-value>ins</keyword-value>
- </keyword-def>
- <keyword-def name="undo">
- <keyword-value>undo</keyword-value>
- </keyword-def>
- <keyword-def name="cut">
- <keyword-value>cut</keyword-value>
- </keyword-def>
- <keyword-def name="copy">
- <keyword-value>copy</keyword-value>
- </keyword-def>
- <keyword-def name="paste">
- <keyword-value>paste</keyword-value>
- </keyword-def>
- <keyword-def name="clr">
- <keyword-value>clr</keyword-value>
- </keyword-def>
- <keyword-def name="sto">
- <keyword-value>sto</keyword-value>
- </keyword-def>
- <keyword-def name="prtsc">
- <keyword-value>prtsc</keyword-value>
- </keyword-def>
- <keyword-def name="sysrq">
- <keyword-value>sysrq</keyword-value>
- </keyword-def>
- <keyword-def name="scrlock">
- <keyword-value>scrlock</keyword-value>
- </keyword-def>
- <keyword-def name="brk">
- <keyword-value>brk</keyword-value>
- </keyword-def>
- <keyword-def name="numlock">
- <keyword-value>numlock</keyword-value>
- </keyword-def>
- <keyword-def name="pwr">
- <keyword-value>pwr</keyword-value>
- </keyword-def>
- <keyword-def name="volumeup">
- <keyword-value>volumeup</keyword-value>
- </keyword-def>
- <keyword-def name="volumedown">
- <keyword-value>volumedown</keyword-value>
- </keyword-def>
- <keyword-def name="memo">
- <keyword-value>memo</keyword-value>
- </keyword-def>
- <keyword-def name="todo">
- <keyword-value>todo</keyword-value>
- </keyword-def>
- <keyword-def name="calendar">
- <keyword-value>calendar</keyword-value>
- </keyword-def>
- <keyword-def name="mail">
- <keyword-value>mail</keyword-value>
- </keyword-def>
- <keyword-def name="address">
- <keyword-value>address</keyword-value>
- </keyword-def>
- <keyword-def name="phone-send">
- <keyword-value>phone-send</keyword-value>
- </keyword-def>
- <keyword-def name="phone-end">
- <keyword-value>phone-end</keyword-value>
- </keyword-def>
- <keyword-def name="phone-accept">
- <keyword-value>phone-accept</keyword-value>
- </keyword-def>
- <keyword-def name="vnd.">
- <keyword-value>vnd.</keyword-value>
- </keyword-def>
- <keyword-def name="true">
- <keyword-value>true</keyword-value>
- </keyword-def>
- <keyword-def name="false">
- <keyword-value>false</keyword-value>
- </keyword-def>
- <keyword-def name="pause">
- <keyword-value>pause</keyword-value>
- </keyword-def>
-
-</css-profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile.properties b/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile.properties
deleted file mode 100644
index dd7e399c94..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/cssprofile.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# cssprofile-css1.xml
-css1.stylesheet-def.description=Cascading Style Sheets, level 1
-css1.category-def.box.caption=Box model
-css1.category-def.colorandbackground.caption=Colors and Backgrounds
-css1.category-def.classification.caption=Classification
-css1.category-def.font.caption=Font
-css1.category-def.text.caption=Text
-# cssprofile-css2.xml
-css2.stylesheet-def.description=Cascading Style Sheets, level 2
-css2.category-def.aural.caption=Aural
-css2.category-def.box.caption=Box model
-css2.category-def.colorandbackground.caption=Colors and Backgrounds
-css2.category-def.content.caption=Generated content/List
-css2.category-def.font.caption=Fonts
-css2.category-def.page.caption=Paged media
-css2.category-def.tables.caption=Tables
-css2.category-def.text.caption=Text
-css2.category-def.visual.caption=Visual
-css2.category-def.ui.caption=User interface
-# cssprofile-mobile1_0.xml
-mobile1_0.stylesheet-def.description=CSS Mobile Profile 1.0
-# cssprofile-wap.xml
-wap.stylesheet-def.description=WCSS 1.0
-wap.category-def.wap.caption=WCSS Extensions
diff --git a/bundles/org.eclipse.wst.css.core/cssprofile/description.txt b/bundles/org.eclipse.wst.css.core/cssprofile/description.txt
deleted file mode 100644
index 3f31f198ec..0000000000
--- a/bundles/org.eclipse.wst.css.core/cssprofile/description.txt
+++ /dev/null
@@ -1,15 +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
-
- * None of the files in this directory
- * need to be translated
- * except for cssprofile.properties
- *******************************************************************************/
- \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/plugin.properties b/bundles/org.eclipse.wst.css.core/plugin.properties
deleted file mode 100644
index 67fcec088c..0000000000
--- a/bundles/org.eclipse.wst.css.core/plugin.properties
+++ /dev/null
@@ -1,19 +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
-###############################################################################
-providerName=Eclipse.org
-pluginName=Structured Source CSS Model
-cssprofile_css2.name=CSS2: Cascading Style Sheets, level 2
-cssprofile_css1.name=CSS1: Cascading Style Sheets, level 1
-cssprofile_mobile1_0.name=CSS Mobile Profile 1.0
-cssprofile_wap.name=WCSS 1.0
-Structured_CSS_Document_Factory_Extension.name=Structured CSS Document Factory Extension
-CSS_Content_Type_Extension_Element.name=CSS
-_taskMarker.name=CSS Task \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/plugin.xml b/bundles/org.eclipse.wst.css.core/plugin.xml
deleted file mode 100644
index c1b7b69509..0000000000
--- a/bundles/org.eclipse.wst.css.core/plugin.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.wst.sse.core.cssprofile">
- <profile
- name="%cssprofile_css2.name"
- default="true"
- uri="cssprofile/cssprofile-css2.xml"
- id="org.eclipse.wst.css.core.cssprofile.css2">
- </profile>
- <profile
- name="%cssprofile_css1.name"
- uri="cssprofile/cssprofile-css1.xml"
- id="org.eclipse.wst.css.core.cssprofile.css1">
- </profile>
- <profile
- name="%cssprofile_mobile1_0.name"
- uri="cssprofile/cssprofile-mobile1_0.xml"
- id="org.eclipse.wst.css.core.cssprofile.mobile1_0">
- </profile>
- <profile
- name="%cssprofile_wap.name"
- uri="cssprofile/cssprofile-wap.xml"
- id="org.eclipse.wst.css.core.cssprofile.wap">
- </profile>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- class="org.eclipse.wst.css.core.internal.modelhandler.ModelHandlerForCSS"
- associatedContentTypeId="org.eclipse.wst.css.core.csssource"
- id="org.eclipse.wst.css.core.internal.modelhandler">
- </modelHandler>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.taskscanner">
- <scanner
- id="org.eclipse.wst.css.core.internal.tasks.CSSFileTaskScanner"
- class="org.eclipse.wst.css.core.internal.tasks.CSSFileTaskScanner:org.eclipse.wst.css.core.taskMarker"
- contentTypeIds="org.eclipse.wst.css.core.csssource" />
- </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
- point="org.eclipse.core.filebuffers.documentCreation"
- id="org.eclipse.wst.css.core.documentfactories"
- name="%Structured_CSS_Document_Factory_Extension.name">
- <factory
- contentTypeId="org.eclipse.wst.css.core.csssource"
- class="org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory" />
- </extension>
-
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="css">
- </fileTypes>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.formatProcessors">
- <processor
- class="org.eclipse.wst.css.core.internal.format.FormatProcessorCSS"
- contentTypeId="org.eclipse.wst.css.core.csssource">
- </processor>
- </extension>
-
- <extension point="org.eclipse.core.runtime.contentTypes">
- <content-type
- file-extensions="css"
- priority="high"
- name="%CSS_Content_Type_Extension_Element.name"
- id="csssource"
- base-type="org.eclipse.core.runtime.text">
- <describer
- class="org.eclipse.wst.css.core.internal.contenttype.ContentDescriberForCSS" />
- </content-type>
- </extension>
-
- <!-- initialize css core preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceInitializer" />
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCoreMessages.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCoreMessages.java
deleted file mode 100644
index 8d79a982fc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCoreMessages.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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by CSS Core
- *
- * @plannedfor 1.0
- */
-public class CSSCoreMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.wst.css.core.internal.CSSCorePluginResources";//$NON-NLS-1$
-
- public static String You_cannot_use_CSSStyleShe_UI_;
- public static String _1concat_ERROR_;
- public static String _2concat_ERROR_;
- public static String _3concat_ERROR_;
- public static String _4concat_ERROR_;
- public static String _25concat_ERROR_;
- public static String _26concat_ERROR_;
- public static String _27concat_ERROR_;
- public static String _28concat_ERROR_;
- public static String _5concat_ERROR_;
- public static String _6concat_ERROR_;
- public static String _7concat_ERROR_;
- public static String _8concat_ERROR_;
- public static String CSSContentPropertiesManager_Updating;
- public static String CSSContentPropertiesManager_Problems_Updating;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, CSSCoreMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java
deleted file mode 100644
index f992edfaca..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java
+++ /dev/null
@@ -1,62 +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.wst.css.core.internal;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.wst.css.core.internal.contentproperties.CSSContentPropertiesManager;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class CSSCorePlugin extends Plugin {
- // The shared instance.
- private static CSSCorePlugin plugin;
-
- /**
- * The constructor.
- */
- public CSSCorePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static CSSCorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- // listen for resource changes to update content properties keys
- CSSContentPropertiesManager.startup();
- }
-
- public void stop(BundleContext context) throws Exception {
- // stop listenning for resource changes to update content properties
- // keys
- CSSContentPropertiesManager.shutdown();
-
- super.stop(context);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties
deleted file mode 100644
index c971cd65b4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties
+++ /dev/null
@@ -1,26 +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
-###############################################################################
-You_cannot_use_CSSStyleShe_UI_=You cannot use CSSStyleSheet.getOwnerRule() because of many referencers of this rule\nPlease use getOnwerRules()
-_1concat_ERROR_={0}first flat node is null.
-_2concat_ERROR_={0}first flat node is not in model.
-_3concat_ERROR_={0}last flat node is null.
-_4concat_ERROR_={0}last flat node is not in model.
-_25concat_ERROR_={0}first region is null.
-_26concat_ERROR_={0}first region is not in model.
-_27concat_ERROR_={0}last region is null.
-_28concat_ERROR_={0}last region is not in model.
-_5concat_ERROR_={0}first region is null.
-_6concat_ERROR_={0}first region is not in model.
-_7concat_ERROR_={0}last region is null.
-_8concat_ERROR_={0}last region is not in model.
-#
-CSSContentPropertiesManager_Updating=Updating CSS Content Settings
-CSSContentPropertiesManager_Problems_Updating=Problem saving CSS Content Settings for {0}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/Logger.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/Logger.java
deleted file mode 100644
index ebffda092d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/Logger.java
+++ /dev/null
@@ -1,156 +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.wst.css.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.wst.css.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.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategy.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategy.java
deleted file mode 100644
index eb6d86e67b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategy.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.cleanup;
-
-
-
-public interface CSSCleanupStrategy {
-
- static final short ASIS = 0;
- static final short LOWER = 1;
- static final short UPPER = 2;
-
- /**
- *
- * @return short
- */
- short getIdentCase();
-
- /**
- *
- * @return short
- */
- short getPropNameCase();
-
- /**
- *
- * @return short
- */
- short getPropValueCase();
-
- /**
- *
- * @return short
- */
- short getSelectorTagCase();
-
- /**
- *
- * @return boolean
- */
- boolean isFormatSource();
-
- /**
- *
- * @return boolean
- */
- boolean isQuoteValues();
-
- /**
- *
- * @param formatSource
- * boolean
- */
- void setFormatSource(boolean formatSource);
-
- /**
- *
- * @param identCase
- * short
- */
- void setIdentCase(short identCase);
-
- /**
- *
- * @param propNameCase
- * short
- */
- void setPropNameCase(short propNameCase);
-
- /**
- *
- * @param propValueCase
- * short
- */
- void setPropValueCase(short propValueCase);
-
- /**
- *
- * @param quoteValues
- * boolean
- */
- void setQuoteValues(boolean quoteValues);
-
- /**
- *
- * @param selectorTagCase
- * short
- */
- void setSelectorTagCase(short selectorTagCase);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategyImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategyImpl.java
deleted file mode 100644
index 5b190f4ebc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategyImpl.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.cleanup;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-
-
-
-public class CSSCleanupStrategyImpl implements CSSCleanupStrategy {
-
- static private CSSCleanupStrategy instance = null;
- // initialize with defaults
- protected short fIdentCase = ASIS;
- protected short fPropNameCase = ASIS;
- protected short fPropValueCase = ASIS;
- protected short fSelectorTagCase = UPPER;
- protected boolean fQuoteValues = true;
- protected boolean fFormatSource = true;
-
- /**
- * CSSCleanupStrategyImpl constructor comment.
- */
- protected CSSCleanupStrategyImpl() {
- super();
- initialize();
- }
-
- /**
- *
- * @return short
- */
- public short getIdentCase() {
- return fIdentCase;
- }
-
- /**
- *
- * @return org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy
- */
- public synchronized static CSSCleanupStrategy getInstance() {
- if (instance == null)
- instance = new CSSCleanupStrategyImpl();
- return instance;
- }
-
- /**
- *
- * @return short
- */
- public short getPropNameCase() {
- return fPropNameCase;
- }
-
- /**
- *
- * @return short
- */
- public short getPropValueCase() {
- return fPropValueCase;
- }
-
- /**
- *
- * @return short
- */
- public short getSelectorTagCase() {
- return fSelectorTagCase;
- }
-
- /**
- *
- */
- private void initialize() {
- Preferences prefs = CSSCorePlugin.getDefault().getPluginPreferences();
- fIdentCase = getCleanupCaseValue(prefs.getInt(CSSCorePreferenceNames.CLEANUP_CASE_IDENTIFIER));
- fPropNameCase = getCleanupCaseValue(prefs.getInt(CSSCorePreferenceNames.CLEANUP_CASE_PROPERTY_NAME));
- fPropValueCase = getCleanupCaseValue(prefs.getInt(CSSCorePreferenceNames.CLEANUP_CASE_PROPERTY_VALUE));
- fSelectorTagCase = getCleanupCaseValue(prefs.getInt(CSSCorePreferenceNames.CLEANUP_CASE_SELECTOR));
- fQuoteValues = prefs.getBoolean(CSSCorePreferenceNames.QUOTE_ATTR_VALUES);
- fFormatSource = prefs.getBoolean(CSSCorePreferenceNames.FORMAT_SOURCE);
- }
-
- /**
- * Return the CSSCleanupStrategy equivalent case short value when given an
- * int
- *
- * @param value
- * @return equivalent case short or ASIS if cannot be determined
- */
- private short getCleanupCaseValue(int value) {
- switch (value) {
- case CSSCorePreferenceNames.LOWER :
- return LOWER;
- case CSSCorePreferenceNames.UPPER :
- return UPPER;
- }
- return ASIS;
- }
-
- /**
- *
- * @return boolean
- */
- public boolean isFormatSource() {
- return fFormatSource;
- }
-
- /**
- *
- * @return boolean
- */
- public boolean isQuoteValues() {
- return fQuoteValues;
- }
-
- /**
- *
- * @param formatSource
- * boolean
- */
- public void setFormatSource(boolean formatSource) {
- fFormatSource = formatSource;
- }
-
- /**
- *
- * @param identCase
- * short
- */
- public void setIdentCase(short identCase) {
- fIdentCase = identCase;
- }
-
- /**
- *
- * @param propNameCase
- * short
- */
- public void setPropNameCase(short propNameCase) {
- fPropNameCase = propNameCase;
- }
-
- /**
- *
- * @param propValueCase
- * short
- */
- public void setPropValueCase(short propValueCase) {
- fPropValueCase = propValueCase;
- }
-
- /**
- *
- * @param quoteValues
- * boolean
- */
- public void setQuoteValues(boolean quoteValues) {
- fQuoteValues = quoteValues;
- }
-
- /**
- *
- * @param selectorTagCase
- * short
- */
- public void setSelectorTagCase(short selectorTagCase) {
- fSelectorTagCase = selectorTagCase;
- }
-
- // TODO: a saveOptions should be added to CSSCleanupStrategy interface
- public void saveOptions() {
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSCorePreferenceNames.CLEANUP_CASE_IDENTIFIER, fIdentCase);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSCorePreferenceNames.CLEANUP_CASE_PROPERTY_NAME, fPropNameCase);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSCorePreferenceNames.CLEANUP_CASE_PROPERTY_VALUE, fPropValueCase);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSCorePreferenceNames.CLEANUP_CASE_SELECTOR, fSelectorTagCase);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSCorePreferenceNames.QUOTE_ATTR_VALUES, fQuoteValues);
- CSSCorePlugin.getDefault().getPluginPreferences().setValue(CSSCorePreferenceNames.FORMAT_SOURCE, fFormatSource);
- CSSCorePlugin.getDefault().savePluginPreferences();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java
deleted file mode 100644
index 1fadf348c8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.cleanup;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.css.core.internal.formatter.CSSFormatUtil;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatter;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.cleanup.AbstractStructuredCleanupProcessor;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-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.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Node;
-
-
-public class CleanupProcessorCSS extends AbstractStructuredCleanupProcessor {
-
- public void cleanupModel(IStructuredModel structuredModel, int start, int length) {
- CSSFormatUtil formatUtil = CSSFormatUtil.getInstance();
- if (structuredModel instanceof ICSSModel) {
- ICSSDocument doc = ((ICSSModel) structuredModel).getDocument();
- CSSSourceFormatter formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) doc);
- StringBuffer buf = formatter.cleanup(doc);
- if (buf != null) {
- int startOffset = ((IndexedRegion) doc).getStartOffset();
- int endOffset = ((IndexedRegion) doc).getEndOffset();
- formatUtil.replaceSource(doc.getModel(), startOffset, endOffset - startOffset, buf.toString());
- }
- }
- else if (structuredModel instanceof IDOMModel) {
- List cssnodes = formatUtil.collectCSSNodes(structuredModel, start, length);
- if (cssnodes != null && !cssnodes.isEmpty()) {
- ICSSModel model = null;
- for (int i = 0; i < cssnodes.size(); i++) {
- ICSSNode node = (ICSSNode) cssnodes.get(i);
- CSSSourceFormatter formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) node);
- StringBuffer buf = formatter.cleanup(node);
- if (buf != null) {
- int startOffset = ((IndexedRegion) node).getStartOffset();
- int endOffset = ((IndexedRegion) node).getEndOffset();
- if (model == null) {
- model = node.getOwnerDocument().getModel();
- }
- formatUtil.replaceSource(model, startOffset, endOffset - startOffset, buf.toString());
- }
- }
- }
- }
- }
-
- protected String getContentType() {
- return ContentTypeIdForCSS.ContentTypeID_CSS;
- }
-
- public void cleanupModel(IStructuredModel structuredModel) {
- int start = 0;
- int length = structuredModel.getStructuredDocument().getLength();
-
- cleanupModel(structuredModel, start, length);
- }
-
- public void cleanupDocument(IDocument document) throws IOException, CoreException {
- // TODO should implement, or delete?
-
- }
-
- public void cleanupDocument(IDocument document, int start, int length) throws IOException, CoreException {
- // TODO should implement, or delete?
-
- }
-
- protected IStructuredCleanupHandler getCleanupHandler(Node node) {
- return null;
- }
-
- protected IStructuredFormatProcessor getFormatProcessor() {
- return null;
- }
-
- protected void refreshCleanupPreferences() {
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IMediaGroupID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IMediaGroupID.java
deleted file mode 100644
index 8d02ac886b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IMediaGroupID.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.contentmodel;
-
-
-
-/**
- *
- */
-public interface IMediaGroupID {
-
- public final static String M_CONTINUOUS = "continuous"; //$NON-NLS-1$
- public final static String M_PAGED = "paged"; //$NON-NLS-1$
-
- public final static String M_VISUAL = "visual"; //$NON-NLS-1$
- public final static String M_AURAL = "aural"; //$NON-NLS-1$
- public final static String M_TACTILE = "tactile"; //$NON-NLS-1$
-
- public final static String M_GRID = "grid"; //$NON-NLS-1$
- public final static String M_BITMAP = "bitmap"; //$NON-NLS-1$
-
- public final static String M_INTERACTIVE = "interactive"; //$NON-NLS-1$
- public final static String M_STATIC = "static"; //$NON-NLS-1$
-
- public final static String M_ALL = "all"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IValID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IValID.java
deleted file mode 100644
index f49c1a113e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IValID.java
+++ /dev/null
@@ -1,266 +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.css.core.internal.contentmodel;
-
-
-
-/**
- *
- */
-public interface IValID {
-
- public final static String V_100 = "100"; //$NON-NLS-1$
- public final static String V_200 = "200"; //$NON-NLS-1$
- public final static String V_300 = "300"; //$NON-NLS-1$
- public final static String V_400 = "400"; //$NON-NLS-1$
- public final static String V_500 = "500"; //$NON-NLS-1$
- public final static String V_600 = "600"; //$NON-NLS-1$
- public final static String V_700 = "700"; //$NON-NLS-1$
- public final static String V_800 = "800"; //$NON-NLS-1$
- public final static String V_900 = "900"; //$NON-NLS-1$
- public final static String V_ABOVE = "above"; //$NON-NLS-1$
- public final static String V_ABSOLUTE = "absolute"; //$NON-NLS-1$
- public final static String V_ACTIVEBORDER = "ActiveBorder"; //$NON-NLS-1$
- public final static String V_ACTIVECAPTION = "ActiveCaption"; //$NON-NLS-1$
- public final static String V_ALL = "all"; //$NON-NLS-1$
- public final static String V_ALWAYS = "always"; //$NON-NLS-1$
- public final static String V_APPWORKSPACE = "AppWorkspace"; //$NON-NLS-1$
- public final static String V_AQUA = "aqua"; //$NON-NLS-1$
- public final static String V_ARMENIAN = "armenian"; //$NON-NLS-1$
- public final static String V_AUTO = "auto"; //$NON-NLS-1$
- public final static String V_AVOID = "avoid"; //$NON-NLS-1$
- public final static String V_BACKGROUND = "Background"; //$NON-NLS-1$
- public final static String V_BASELINE = "baseline"; //$NON-NLS-1$
- public final static String V_BEHIND = "behind"; //$NON-NLS-1$
- public final static String V_BELOW = "below"; //$NON-NLS-1$
- public final static String V_BIDI_OVERRIDE = "bidi-override"; //$NON-NLS-1$
- public final static String V_BLACK = "black"; //$NON-NLS-1$
- public final static String V_BLINK = "blink"; //$NON-NLS-1$
- public final static String V_BLOCK = "block"; //$NON-NLS-1$
- public final static String V_BLUE = "blue"; //$NON-NLS-1$
- public final static String V_BOLD = "bold"; //$NON-NLS-1$
- public final static String V_BOLDER = "bolder"; //$NON-NLS-1$
- public final static String V_BOTH = "both"; //$NON-NLS-1$
- public final static String V_BOTTOM = "bottom"; //$NON-NLS-1$
- public final static String V_BUTTONFACE = "ButtonFace"; //$NON-NLS-1$
- public final static String V_BUTTONHIGHLIGHT = "ButtonHighlight"; //$NON-NLS-1$
- public final static String V_BUTTONSHADOW = "ButtonShadow"; //$NON-NLS-1$
- public final static String V_BUTTONTEXT = "ButtonText"; //$NON-NLS-1$
- public final static String V_CAPITALIZE = "capitalize"; //$NON-NLS-1$
- public final static String V_CAPTION = "caption"; //$NON-NLS-1$
- public final static String V_CAPTIONTEXT = "CaptionText"; //$NON-NLS-1$
- public final static String V_CENTER = "center"; //$NON-NLS-1$
- public final static String V_CENTER_LEFT = "center-left"; //$NON-NLS-1$
- public final static String V_CENTER_RIGHT = "center-right"; //$NON-NLS-1$
- public final static String V_CHILD = "child"; //$NON-NLS-1$
- public final static String V_CIRCLE = "circle"; //$NON-NLS-1$
- public final static String V_CJK_IDEOGRAPHIC = "cjk-ideographic"; //$NON-NLS-1$
- public final static String V_CLOSE_QUOTE = "close-quote"; //$NON-NLS-1$
- public final static String V_CODE = "code"; //$NON-NLS-1$
- public final static String V_CONDENSED = "condensed"; //$NON-NLS-1$
- public final static String V_COLLAPSE = "collapse"; //$NON-NLS-1$
- public final static String V_COMPACT = "compact"; //$NON-NLS-1$
- public final static String V_CONTINUOUS = "continuous"; //$NON-NLS-1$
- public final static String V_CROP = "crop"; //$NON-NLS-1$
- public final static String V_CROSS = "cross"; //$NON-NLS-1$
- public final static String V_CROSSHAIR = "crosshair"; //$NON-NLS-1$
- public final static String V_CURSIVE = "cursive"; //$NON-NLS-1$
- public final static String V_DASHED = "dashed"; //$NON-NLS-1$
- public final static String V_DECIMAL = "decimal"; //$NON-NLS-1$
- public final static String V_DECIMAL_LEADING_ZERO = "decimal-leading-zero"; //$NON-NLS-1$
- public final static String V_DEFAULT = "default"; //$NON-NLS-1$
- public final static String V_DIGITS = "digits"; //$NON-NLS-1$
- public final static String V_DISC = "disc"; //$NON-NLS-1$
- public final static String V_DOTTED = "dotted"; //$NON-NLS-1$
- public final static String V_DOUBLE = "double"; //$NON-NLS-1$
- public final static String V_E_RESIZE = "e-resize"; //$NON-NLS-1$
- public final static String V_EMBED = "embed"; //$NON-NLS-1$
- public final static String V_EXPANDED = "expanded"; //$NON-NLS-1$
- public final static String V_EXTRA_CONDENSED = "extra-condensed"; //$NON-NLS-1$
- public final static String V_EXTRA_EXPANDED = "extra-expanded"; //$NON-NLS-1$
- public final static String V_FANTASY = "fantasy"; //$NON-NLS-1$
- public final static String V_FAR_LEFT = "far-left"; //$NON-NLS-1$
- public final static String V_FAR_RIGHT = "far-right"; //$NON-NLS-1$
- public final static String V_FAST = "fast"; //$NON-NLS-1$
- public final static String V_FASTER = "faster"; //$NON-NLS-1$
- public final static String V_FEMALE = "female"; //$NON-NLS-1$
- public final static String V_FIXED = "fixed"; //$NON-NLS-1$
- public final static String V_FUCHSIA = "fuchsia"; //$NON-NLS-1$
- public final static String V_GEORGIAN = "georgian"; //$NON-NLS-1$
- public final static String V_GRAY = "gray"; //$NON-NLS-1$
- public final static String V_GRAYTEXT = "GrayText"; //$NON-NLS-1$
- public final static String V_GREEN = "green"; //$NON-NLS-1$
- public final static String V_GROOVE = "groove"; //$NON-NLS-1$
- public final static String V_HEBREW = "hebrew"; //$NON-NLS-1$
- public final static String V_HELP = "help"; //$NON-NLS-1$
- public final static String V_HIDDEN = "hidden"; //$NON-NLS-1$
- public final static String V_HIDE = "hide"; //$NON-NLS-1$
- public final static String V_HIGH = "high"; //$NON-NLS-1$
- public final static String V_HIGHLIGHT = "Highlight"; //$NON-NLS-1$
- public final static String V_HIGHLIGHTTEXT = "HighlightText"; //$NON-NLS-1$
- public final static String V_HIGHER = "higher"; //$NON-NLS-1$
- public final static String V_HIRAGANA = "hiragana"; //$NON-NLS-1$
- public final static String V_HIRAGANA_IROHA = "hiragana-iroha"; //$NON-NLS-1$
- public final static String V_ICON = "icon"; //$NON-NLS-1$
- public final static String V_INACTIVEBORDER = "InactiveBorder"; //$NON-NLS-1$
- public final static String V_INACTIVECAPTION = "InactiveCaption"; //$NON-NLS-1$
- public final static String V_INACTIVECAPTIONTEXT = "InactiveCaptionText"; //$NON-NLS-1$
- public final static String V_INFOBACKGROUND = "InfoBackground"; //$NON-NLS-1$
- public final static String V_INFOTEXT = "InfoText"; //$NON-NLS-1$
- public final static String V_INLINE = "inline"; //$NON-NLS-1$
- public final static String V_INLINE_TABLE = "inline-table"; //$NON-NLS-1$
- public final static String V_INSET = "inset"; //$NON-NLS-1$
- public final static String V_INSIDE = "inside"; //$NON-NLS-1$
- public final static String V_INVERT = "invert"; //$NON-NLS-1$
- public final static String V_ITALIC = "italic"; //$NON-NLS-1$
- public final static String V_JUSTIFY = "justify"; //$NON-NLS-1$
- public final static String V_KATAKANA = "katakana"; //$NON-NLS-1$
- public final static String V_KATAKANA_IROHA = "katakana-iroha"; //$NON-NLS-1$
- public final static String V_LANDSCAPE = "landscape"; //$NON-NLS-1$
- public final static String V_LARGE = "large"; //$NON-NLS-1$
- public final static String V_LARGER = "larger"; //$NON-NLS-1$
- public final static String V_LEFT = "left"; //$NON-NLS-1$
- public final static String V_LEFT_SIDE = "left-side"; //$NON-NLS-1$
- public final static String V_LEFTWARDS = "leftwards"; //$NON-NLS-1$
- public final static String V_LEVEL = "level"; //$NON-NLS-1$
- public final static String V_LIGHTER = "lighter"; //$NON-NLS-1$
- public final static String V_LIME = "lime"; //$NON-NLS-1$
- public final static String V_LINE_THROUGH = "line-through"; //$NON-NLS-1$
- public final static String V_LIST_ITEM = "list-item"; //$NON-NLS-1$
- public final static String V_LOUD = "loud"; //$NON-NLS-1$
- public final static String V_LOW = "low"; //$NON-NLS-1$
- public final static String V_LOWER = "lower"; //$NON-NLS-1$
- public final static String V_LOWER_ALPHA = "lower-alpha"; //$NON-NLS-1$
- public final static String V_LOWER_GREEK = "lower-greek"; //$NON-NLS-1$
- public final static String V_LOWER_LATIN = "lower-latin"; //$NON-NLS-1$
- public final static String V_LOWER_ROMAN = "lower-roman"; //$NON-NLS-1$
- public final static String V_LOWERCASE = "lowercase"; //$NON-NLS-1$
- public final static String V_LTR = "ltr"; //$NON-NLS-1$
- public final static String V_MALE = "male"; //$NON-NLS-1$
- public final static String V_MARKER = "marker"; //$NON-NLS-1$
- public final static String V_MAROON = "maroon"; //$NON-NLS-1$
- public final static String V_MEDIUM = "medium"; //$NON-NLS-1$
- public final static String V_MENU = "menu"; //$NON-NLS-1$
- public final static String V_MENUTEXT = "MenuText"; //$NON-NLS-1$
- public final static String V_MESSAGE_BOX = "message-box"; //$NON-NLS-1$
- public final static String V_MIDDLE = "middle"; //$NON-NLS-1$
- public final static String V_MIX = "mix"; //$NON-NLS-1$
- public final static String V_MONOSPACE = "monospace"; //$NON-NLS-1$
- public final static String V_MOVE = "move"; //$NON-NLS-1$
- public final static String V_N_RESIZE = "n-resize"; //$NON-NLS-1$
- public final static String V_NARROWER = "narrower"; //$NON-NLS-1$
- public final static String V_NAVY = "navy"; //$NON-NLS-1$
- public final static String V_NE_RESIZE = "ne-resize"; //$NON-NLS-1$
- public final static String V_NO_CLOSE_QUOTE = "no-close-quote"; //$NON-NLS-1$
- public final static String V_NO_OPEN_QUOTE = "no-open-quote"; //$NON-NLS-1$
- public final static String V_NO_REPEAT = "no-repeat"; //$NON-NLS-1$
- public final static String V_NONE = "none"; //$NON-NLS-1$
- public final static String V_NORMAL = "normal"; //$NON-NLS-1$
- public final static String V_NOWRAP = "nowrap"; //$NON-NLS-1$
- public final static String V_NW_RESIZE = "nw-resize"; //$NON-NLS-1$
- public final static String V_OBLIQUE = "oblique"; //$NON-NLS-1$
- public final static String V_OLIVE = "olive"; //$NON-NLS-1$
- public final static String V_ONCE = "once"; //$NON-NLS-1$
- public final static String V_OPEN_QUOTE = "open-quote"; //$NON-NLS-1$
- public final static String V_OUTSET = "outset"; //$NON-NLS-1$
- public final static String V_OUTSIDE = "outside"; //$NON-NLS-1$
- public final static String V_OVERLINE = "overline"; //$NON-NLS-1$
- public final static String V_POINTER = "pointer"; //$NON-NLS-1$
- public final static String V_PORTRAIT = "portrait"; //$NON-NLS-1$
- public final static String V_PRE = "pre"; //$NON-NLS-1$
- public final static String V_PURPLE = "purple"; //$NON-NLS-1$
- public final static String V_RED = "red"; //$NON-NLS-1$
- public final static String V_RELATIVE = "relative"; //$NON-NLS-1$
- public final static String V_REPEAT = "repeat"; //$NON-NLS-1$
- public final static String V_REPEAT_X = "repeat-x"; //$NON-NLS-1$
- public final static String V_REPEAT_Y = "repeat-y"; //$NON-NLS-1$
- public final static String V_RIDGE = "ridge"; //$NON-NLS-1$
- public final static String V_RIGHT = "right"; //$NON-NLS-1$
- public final static String V_RIGHT_SIDE = "right-side"; //$NON-NLS-1$
- public final static String V_RIGHTWARDS = "rightwards"; //$NON-NLS-1$
- public final static String V_RTL = "rtl"; //$NON-NLS-1$
- public final static String V_RUN_IN = "run-in"; //$NON-NLS-1$
- public final static String V_S_RESIZE = "s-resize"; //$NON-NLS-1$
- public final static String V_SANS_SERIF = "sans-serif"; //$NON-NLS-1$
- public final static String V_SCROLL = "scroll"; //$NON-NLS-1$
- public final static String V_SCROLLBAR = "Scrollbar"; //$NON-NLS-1$
- public final static String V_SE_RESIZE = "se-resize"; //$NON-NLS-1$
- public final static String V_SEMI_CONDENSED = "semi-condensed"; //$NON-NLS-1$
- public final static String V_SEMI_EXPANDED = "semi-expanded"; //$NON-NLS-1$
- public final static String V_SEPARATE = "separate"; //$NON-NLS-1$
- public final static String V_SERIF = "serif"; //$NON-NLS-1$
- public final static String V_SHOW = "show"; //$NON-NLS-1$
- public final static String V_SILENT = "silent"; //$NON-NLS-1$
- public final static String V_SILVER = "silver"; //$NON-NLS-1$
- public final static String V_SLOW = "slow"; //$NON-NLS-1$
- public final static String V_SLOWER = "slower"; //$NON-NLS-1$
- public final static String V_SMALL = "small"; //$NON-NLS-1$
- public final static String V_SMALL_CAPS = "small-caps"; //$NON-NLS-1$
- public final static String V_SMALL_CAPTION = "small-caption"; //$NON-NLS-1$
- public final static String V_SMALLER = "smaller"; //$NON-NLS-1$
- public final static String V_SOFT = "soft"; //$NON-NLS-1$
- public final static String V_SOLID = "solid"; //$NON-NLS-1$
- public final static String V_SPELL_OUT = "spell-out"; //$NON-NLS-1$
- public final static String V_SQUARE = "square"; //$NON-NLS-1$
- public final static String V_STATIC = "static"; //$NON-NLS-1$
- public final static String V_STATUS_BAR = "status-bar"; //$NON-NLS-1$
- public final static String V_SUB = "sub"; //$NON-NLS-1$
- public final static String V_SUPER = "super"; //$NON-NLS-1$
- public final static String V_SW_RESIZE = "sw-resize"; //$NON-NLS-1$
- public final static String V_TABLE = "table"; //$NON-NLS-1$
- public final static String V_TABLE_CAPTION = "table-caption"; //$NON-NLS-1$
- public final static String V_TABLE_CELL = "table-cell"; //$NON-NLS-1$
- public final static String V_TABLE_COLUMN = "table-column"; //$NON-NLS-1$
- public final static String V_TABLE_COLUMN_GROUP = "table-column-group"; //$NON-NLS-1$
- public final static String V_TABLE_FOOTER_GROUP = "table-footer-group"; //$NON-NLS-1$
- public final static String V_TABLE_HEADER_GROUP = "table-header-group"; //$NON-NLS-1$
- public final static String V_TABLE_ROW = "table-row"; //$NON-NLS-1$
- public final static String V_TABLE_ROW_GROUP = "table-row-group"; //$NON-NLS-1$
- public final static String V_TEAL = "teal"; //$NON-NLS-1$
- public final static String V_TEXT = "text"; //$NON-NLS-1$
- public final static String V_TEXT_TOP = "text-top"; //$NON-NLS-1$
- public final static String V_TEXT_BOTTOM = "text-bottom"; //$NON-NLS-1$
- public final static String V_THICK = "thick"; //$NON-NLS-1$
- public final static String V_THIN = "thin"; //$NON-NLS-1$
- public final static String V_THREEDDARKSHADOW = "ThreeDDarkShadow"; //$NON-NLS-1$
- public final static String V_THREEDFACE = "ThreeDFace"; //$NON-NLS-1$
- public final static String V_THREEDHIGHLIGHT = "ThreeDHighlight"; //$NON-NLS-1$
- public final static String V_THREEDLIGHTSHADOW = "ThreeDLightShadow"; //$NON-NLS-1$
- public final static String V_THREEDSHADOW = "ThreeDShadow"; //$NON-NLS-1$
- public final static String V_TOP = "top"; //$NON-NLS-1$
- public final static String V_TRANSPARENT = "transparent"; //$NON-NLS-1$
- public final static String V_ULTRA_CONDENSED = "ultra-condensed"; //$NON-NLS-1$
- public final static String V_ULTRA_EXPANDED = "ultra-expanded"; //$NON-NLS-1$
- public final static String V_UNDERLINE = "underline"; //$NON-NLS-1$
- public final static String V_UPPER_ALPHA = "upper-alpha"; //$NON-NLS-1$
- public final static String V_UPPER_LATIN = "upper-latin"; //$NON-NLS-1$
- public final static String V_UPPER_ROMAN = "upper-roman"; //$NON-NLS-1$
- public final static String V_UPPERCASE = "uppercase"; //$NON-NLS-1$
- public final static String V_VISIBLE = "visible"; //$NON-NLS-1$
- public final static String V_W_RESIZE = "w-resize"; //$NON-NLS-1$
- public final static String V_WAIT = "wait"; //$NON-NLS-1$
- public final static String V_WHITE = "white"; //$NON-NLS-1$
- public final static String V_WIDER = "wider"; //$NON-NLS-1$
- public final static String V_WINDOW = "Window"; //$NON-NLS-1$
- public final static String V_WINDOWFRAME = "WindowFrame"; //$NON-NLS-1$
- public final static String V_WINDOWTEXT = "WindowText"; //$NON-NLS-1$
- public final static String V_X_FAST = "x-fast"; //$NON-NLS-1$
- public final static String V_X_HIGH = "x-high"; //$NON-NLS-1$
- public final static String V_X_LARGE = "x-large"; //$NON-NLS-1$
- public final static String V_X_LOUD = "x-loud"; //$NON-NLS-1$
- public final static String V_X_LOW = "x-low"; //$NON-NLS-1$
- public final static String V_X_SLOW = "x-slow"; //$NON-NLS-1$
- public final static String V_X_SMALL = "x-small"; //$NON-NLS-1$
- public final static String V_X_SOFT = "x-soft"; //$NON-NLS-1$
- public final static String V_XX_SMALL = "xx-small"; //$NON-NLS-1$
- public final static String V_XX_LARGE = "xx-large"; //$NON-NLS-1$
- public final static String V_YELLOW = "yellow"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMContainer.java
deleted file mode 100644
index d013f7ca6e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMContainer.java
+++ /dev/null
@@ -1,164 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Set;
-import java.util.Vector;
-
-/**
- *
- */
-public class PropCMContainer extends PropCMNode {
-
- private java.util.Vector nodes = new Vector();
- private static java.util.Hashtable instances = null;
- public final static String VAL_ABSOLUTE_SIZE = "absolute-size";//$NON-NLS-1$
- public final static String VAL_BORDER_STYLE = "border-style";//$NON-NLS-1$
- public final static String VAL_BORDER_WIDTH = "border-width";//$NON-NLS-1$
- public final static String VAL_COLOR = "color";//$NON-NLS-1$
- public final static String VAL_SYSTEM_COLOR = "system-color";//$NON-NLS-1$
- public final static String VAL_GENERIC_FAMILY = "generic-family";//$NON-NLS-1$
- public final static String VAL_GENERIC_VOICE = "generic-voice";//$NON-NLS-1$
- public final static String VAL_MARGIN_WIDTH = "margin-width";//$NON-NLS-1$
- public final static String VAL_PADDING_WIDTH = "padding-width";//$NON-NLS-1$
- public final static String VAL_RELATIVE_SIZE = "relative-size";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMContainer(String name) {
- super(name);
- }
-
- /**
- *
- */
- Object appendChild(Object node) {
- if (!nodes.contains(node))
- nodes.add(node);
- return node;
- }
-
- /**
- *
- */
- public boolean canHave(String identifier) {
- int nChild = getNumChild();
- for (int i = 0; i < nChild; i++) {
- Object child = getChildAt(i);
- if (child instanceof String && identifier.equalsIgnoreCase((String) child))
- return true;
- if (child instanceof PropCMContainer && ((PropCMContainer) child).canHave(identifier))
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- public Object getChildAt(int index) {
- if (nodes == null || index < 0 || nodes.size() <= index)
- return null;
- return nodes.elementAt(index);
- }
-
- /**
- *
- */
- static PropCMContainer getContInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(20);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMContainer) node;
-
- if (PropCMNode.isLoading()) {
- // register
- node = new PropCMContainer(name);
- instances.put(name, node);
- }
-
- return (PropCMContainer) node;
- }
-
- /**
- *
- */
- void getIdentifiers(Set idents) {
- if (idents == null)
- return;
- int nChildren = nodes.size();
- for (int i = 0; i < nChildren; i++) {
- Object node = nodes.elementAt(i);
- if (node instanceof PropCMNode)
- ((PropCMNode) node).getIdentifiers(idents);
- else if (node instanceof String)
- idents.add(node);
- }
- }
-
- /**
- *
- */
- public int getNumChild() {
- if (nodes == null)
- return 0;
- return nodes.size();
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_CONTAINER;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values == null)
- return;
- int nChildren = nodes.size();
- for (int i = 0; i < nChildren; i++) {
- Object node = nodes.elementAt(i);
- if (node instanceof PropCMNode)
- ((PropCMNode) node).getValues(values);
- else if (node instanceof String) {
- if (!values.contains(node))
- values.add(node);
- }
- }
- }
-
- /**
- *
- */
- Object removeChild(Object node) {
- nodes.remove(node);
- return node;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFontProperty.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFontProperty.java
deleted file mode 100644
index a28e21da9f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFontProperty.java
+++ /dev/null
@@ -1,198 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-/**
- *
- */
-public class PropCMFontProperty extends PropCMProperty {
-
- // static fields
- private static java.util.Hashtable instances = null;
- private static java.util.Hashtable cachedIdMap = null;
- // selecting properties
- public final static String PF_FONT_FAMILY = "font-family";//$NON-NLS-1$
- public final static String PF_FONT_STYLE = "font-style";//$NON-NLS-1$
- public final static String PF_FONT_VARIANT = "font-variant";//$NON-NLS-1$
- public final static String PF_FONT_WEIGHT = "font-weight";//$NON-NLS-1$
- public final static String PF_FONT_STRETCH = "font-stretch";//$NON-NLS-1$
- public final static String PF_FONT_SIZE = "font-size";//$NON-NLS-1$
- // qualification properties
- public final static String PF_UNICODE_RANGE = "unicode-range";//$NON-NLS-1$
- // numeric properties
- public final static String PF_UNITS_PER_EM = "units-per-em";//$NON-NLS-1$
- // referencing properties
- public final static String PF_SRC = "src";//$NON-NLS-1$
- // matching properties
- public final static String PF_PANOSE_1 = "panose-1";//$NON-NLS-1$
- public final static String PF_STEMV = "stemv";//$NON-NLS-1$
- public final static String PF_STEMH = "stemh";//$NON-NLS-1$
- public final static String PF_SLOPE = "slope";//$NON-NLS-1$
- public final static String PF_CAP_HEIGHT = "cap-height";//$NON-NLS-1$
- public final static String PF_X_HEIGHT = "x-height";//$NON-NLS-1$
- public final static String PF_ASCENT = "ascent";//$NON-NLS-1$
- public final static String PF_DESCENT = "descent";//$NON-NLS-1$
- // synthesis properties
- public final static String PF_WIDTHS = "widths";//$NON-NLS-1$
- public final static String PF_BBOX = "bbox";//$NON-NLS-1$
- public final static String PF_DEFINITION_SRC = "definition-src";//$NON-NLS-1$
- // alignment properties
- public final static String PF_BASELINE = "baseline";//$NON-NLS-1$
- public final static String PF_CENTERLINE = "centerline";//$NON-NLS-1$
- public final static String PF_MATHLINE = "mathline";//$NON-NLS-1$
- public final static String PF_TOPLINE = "topline";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMFontProperty(String name) {
- super(name);
- }
-
- /**
- *
- */
- public static PropCMProperty getInstanceOf(String name) {
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMProperty) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMFontProperty(name);
- instances.put(name, node);
- }
-
- return (PropCMProperty) node;
- }
-
- /**
- *
- */
- public static Enumeration getNameEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.keys();
- }
-
- /**
- *
- */
- public static Enumeration getPropertyEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.elements();
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_FONTPROPERTY;
- }
-
- /**
- *
- */
- public static Vector names() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return new Vector(instances.keySet());
- }
-
- /**
- *
- */
- public static List names(Object mediaGroup) {
- if (mediaGroup == null)
- return names();
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- Vector properties = new Vector();
-
- Iterator it = instances.values().iterator();
- while (it.hasNext()) {
- PropCMProperty prop = (PropCMProperty) it.next();
- if (prop.getMediaGroups().contains(mediaGroup))
- properties.add(prop.getName());
- }
-
- return properties;
- }
-
- /**
- * If itentifier is null, get all properties
- */
- public static Vector propertiesFor(String identifier, boolean shorthands) {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // if identifier is null, get all properties
- if (identifier == null)
- return new Vector(instances.values());
-
- if (cachedIdMap == null) {
- // start cacheing
- cachedIdMap = new Hashtable();
- }
- else {
- // search cached
- Object ret = cachedIdMap.get(identifier + String.valueOf(shorthands));
- if (ret != null)
- return new Vector((Collection) ret);
- }
-
- // create
- Enumeration properties = getPropertyEnum();
- HashSet set = new HashSet();
- while (properties.hasMoreElements()) {
- PropCMProperty prop = (PropCMProperty) properties.nextElement();
- if (!shorthands && prop.isShorthand())
- continue;
- if (prop.canHave(identifier))
- set.add(prop);
- }
-
- // cache
- cachedIdMap.put(identifier + String.valueOf(shorthands), set);
-
- return new Vector(set);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFunction.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFunction.java
deleted file mode 100644
index 03efc91c06..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFunction.java
+++ /dev/null
@@ -1,89 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Set;
-
-/**
- *
- */
-public class PropCMFunction extends PropCMNode {
-
- private static java.util.Hashtable instances = null;
- public final static String VAL_ATTR = "attr";//$NON-NLS-1$
- public final static String VAL_COUNTER = "counter";//$NON-NLS-1$
- public final static String VAL_RGB = "rgb";//$NON-NLS-1$
- public final static String VAL_SHAPE = "rect";//$NON-NLS-1$
- public final static String VAL_URI = "url";//$NON-NLS-1$
- public final static String VAL_FORMAT = "format";//$NON-NLS-1$
- public final static String VAL_LOCAL = "local";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMFunction(String name) {
- super(name);
- }
-
- /**
- *
- */
- void getIdentifiers(Set indents) {
- }
-
- /**
- *
- */
- static public PropCMFunction getInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMFunction) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMFunction(name);
- instances.put(name, node);
- }
-
- return (PropCMFunction) node;
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_FUNC;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values != null && !values.contains(this))
- values.add(this);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNode.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNode.java
deleted file mode 100644
index 52a84df134..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNode.java
+++ /dev/null
@@ -1,1369 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Vector;
-
-/**
- *
- */
-public abstract class PropCMNode {
-
- public final static short VAL_IDENTIFIER = 0;
- public final static short VAL_PROPERTY = 1;
- public final static short VAL_NUMBER = 2;
- public final static short VAL_STRING = 3;
- public final static short VAL_FUNC = 4;
- public final static short VAL_CONTAINER = 5;
- public final static short VAL_SUBPROPERTY = 6;
- public final static short VAL_FONTPROPERTY = 7;
- public final static short VAL_UNICODE_RANGE = 8;
- protected java.lang.String name = null;
- private static short LOADING = 0; // 0 : not initialized, 1 : under
- // initializing, 2 : initialize-done
- // and fix DB
-
- /**
- *
- */
- public PropCMNode(String name) {
- super();
- this.name = name;
- }
-
- /**
- *
- */
- public Set getIdentifiers() {
- HashSet ids = new HashSet();
- getIdentifiers(ids);
- return ids;
- }
-
- /**
- *
- */
- abstract void getIdentifiers(Set indents);
-
- /**
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- *
- */
- public abstract short getType();
-
- /**
- *
- */
- public Collection getValues() {
- Vector vals = new Vector();
- getValues(vals);
- return vals;
- }
-
- /**
- *
- */
- abstract void getValues(Collection values);
-
- /**
- *
- */
- protected static void initPropertyCM() {
- if (!isNeedInitialize())
- return;
- LOADING = 1;
-
- PropCMNumber.initNumberCMDim();
-
- // azimuth
- PropCMProperty prop = PropCMProperty.getInstanceOf(PropCMProperty.P_AZIMUTH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_ANGLE));
- prop.appendChild(IValID.V_LEFT_SIDE);
- prop.appendChild(IValID.V_FAR_LEFT);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_CENTER_LEFT);
- prop.appendChild(IValID.V_CENTER);
- prop.appendChild(IValID.V_CENTER_RIGHT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendChild(IValID.V_FAR_RIGHT);
- prop.appendChild(IValID.V_RIGHT_SIDE);
- prop.appendChild(IValID.V_BEHIND);
- prop.appendChild(IValID.V_LEFTWARDS);
- prop.appendChild(IValID.V_RIGHTWARDS);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
- prop.setMaxValueCount(2);
-
- // background
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.setMaxValueCount(6);
-
- // background-attachment
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT);
- prop.appendChild(IValID.V_SCROLL);
- prop.appendChild(IValID.V_FIXED);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(IValID.V_TRANSPARENT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-image
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-position ---- sub-properties horizontal
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_CENTER);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-position ---- sub-properties vertical
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_TOP);
- prop.appendChild(IValID.V_CENTER);
- prop.appendChild(IValID.V_BOTTOM);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-position
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION);
- prop.appendChild(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X));
- prop.appendChild(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y));
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // background-repeat
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT);
- prop.appendChild(IValID.V_REPEAT);
- prop.appendChild(IValID.V_REPEAT_X);
- prop.appendChild(IValID.V_REPEAT_Y);
- prop.appendChild(IValID.V_NO_REPEAT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE));
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR));
- prop.setMaxValueCount(9);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-collapse
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLLAPSE);
- prop.appendChild(IValID.V_COLLAPSE);
- prop.appendChild(IValID.V_SEPARATE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR));
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(IValID.V_TRANSPARENT);
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-spacing
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_SPACING);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE));
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-top
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-right
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-bottom
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-left
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-top-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-top-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-top-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-right-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-right-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-right-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-bottom-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-bottom-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-bottom-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-left-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-left-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-left-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // border-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH);
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH));
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // bottom
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_BOTTOM);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // caption-side
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CAPTION_SIDE);
- prop.appendChild(IValID.V_TOP);
- prop.appendChild(IValID.V_BOTTOM);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clear
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CLEAR);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendChild(IValID.V_BOTH);
- prop.appendChild(IValID.V_STATIC);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip ---- sub-properties top
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- ((PropCMSubProperty) prop).setContainer(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip ---- sub-properties right
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- ((PropCMSubProperty) prop).setContainer(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip ---- sub-properties bottom
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- ((PropCMSubProperty) prop).setContainer(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip ---- sub-properties left
- prop = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- ((PropCMSubProperty) prop).setContainer(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // clip
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_SHAPE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // content
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CONTENT);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_ANY));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_COUNTER));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_ATTR));
- prop.appendChild(IValID.V_OPEN_QUOTE);
- prop.appendChild(IValID.V_CLOSE_QUOTE);
- prop.appendChild(IValID.V_NO_OPEN_QUOTE);
- prop.appendChild(IValID.V_NO_CLOSE_QUOTE);
- prop.setMaxValueCount(-1); // infinite
- prop.appendMediaGroup(IMediaGroupID.M_ALL);
-
- // counter-increment
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_INCREMENT);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_COUNTER_ID));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_ALL);
-
- // counter-reset
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_RESET);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_COUNTER_ID));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_ALL);
-
- // cue
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CUE);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_BEFORE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_AFTER));
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // cue-after
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_AFTER);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // cue-before
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_BEFORE);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // cursor
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_CURSOR);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_CROSSHAIR);
- prop.appendChild(IValID.V_DEFAULT);
- prop.appendChild(IValID.V_POINTER);
- prop.appendChild(IValID.V_MOVE);
- prop.appendChild(IValID.V_E_RESIZE);
- prop.appendChild(IValID.V_NE_RESIZE);
- prop.appendChild(IValID.V_NW_RESIZE);
- prop.appendChild(IValID.V_N_RESIZE);
- prop.appendChild(IValID.V_SE_RESIZE);
- prop.appendChild(IValID.V_SW_RESIZE);
- prop.appendChild(IValID.V_S_RESIZE);
- prop.appendChild(IValID.V_W_RESIZE);
- prop.appendChild(IValID.V_TEXT);
- prop.appendChild(IValID.V_WAIT);
- prop.appendChild(IValID.V_HELP);
- prop.setMaxValueCount(-1); // infinite
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // direction
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_DIRECTION);
- prop.appendChild(IValID.V_LTR);
- prop.appendChild(IValID.V_RTL);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // display
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_DISPLAY);
- prop.appendChild(IValID.V_INLINE);
- prop.appendChild(IValID.V_BLOCK);
- prop.appendChild(IValID.V_LIST_ITEM);
- prop.appendChild(IValID.V_RUN_IN);
- prop.appendChild(IValID.V_COMPACT);
- prop.appendChild(IValID.V_MARKER);
- prop.appendChild(IValID.V_TABLE);
- prop.appendChild(IValID.V_INLINE_TABLE);
- prop.appendChild(IValID.V_TABLE_ROW_GROUP);
- prop.appendChild(IValID.V_TABLE_HEADER_GROUP);
- prop.appendChild(IValID.V_TABLE_FOOTER_GROUP);
- prop.appendChild(IValID.V_TABLE_ROW);
- prop.appendChild(IValID.V_TABLE_COLUMN_GROUP);
- prop.appendChild(IValID.V_TABLE_COLUMN);
- prop.appendChild(IValID.V_TABLE_CELL);
- prop.appendChild(IValID.V_TABLE_CAPTION);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_ALL);
-
- // elevation
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_ELEVATION);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_ANGLE));
- prop.appendChild(IValID.V_BELOW);
- prop.appendChild(IValID.V_LEVEL);
- prop.appendChild(IValID.V_ABOVE);
- prop.appendChild(IValID.V_HIGHER);
- prop.appendChild(IValID.V_LOWER);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // empty-cells
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_EMPTY_CELLS);
- prop.appendChild(IValID.V_SHOW);
- prop.appendChild(IValID.V_HIDE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // float
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FLOAT);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY));
- prop.appendChild(IValID.V_CAPTION);
- prop.appendChild(IValID.V_ICON);
- prop.appendChild(IValID.V_MENU);
- prop.appendChild(IValID.V_MESSAGE_BOX);
- prop.appendChild(IValID.V_SMALL_CAPTION);
- prop.appendChild(IValID.V_STATUS_BAR);
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-family
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_FONT));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_FAMILY));
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-size
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_ABSOLUTE_SIZE));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_RELATIVE_SIZE));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-size-adjust
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE_ADJUST);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-stretch
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STRETCH);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_WIDER);
- prop.appendChild(IValID.V_NARROWER);
- prop.appendChild(IValID.V_ULTRA_CONDENSED);
- prop.appendChild(IValID.V_EXTRA_CONDENSED);
- prop.appendChild(IValID.V_CONDENSED);
- prop.appendChild(IValID.V_SEMI_CONDENSED);
- prop.appendChild(IValID.V_SEMI_EXPANDED);
- prop.appendChild(IValID.V_EXPANDED);
- prop.appendChild(IValID.V_EXTRA_EXPANDED);
- prop.appendChild(IValID.V_ULTRA_EXPANDED);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE);
- prop.appendChild(IValID.V_ITALIC);
- prop.appendChild(IValID.V_OBLIQUE);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-variant
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT);
- prop.appendChild(IValID.V_SMALL_CAPS);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // font-weight
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT);
- prop.appendChild(IValID.V_BOLD);
- prop.appendChild(IValID.V_100);
- prop.appendChild(IValID.V_200);
- prop.appendChild(IValID.V_300);
- prop.appendChild(IValID.V_400);
- prop.appendChild(IValID.V_500);
- prop.appendChild(IValID.V_600);
- prop.appendChild(IValID.V_700);
- prop.appendChild(IValID.V_800);
- prop.appendChild(IValID.V_900);
- prop.appendChild(IValID.V_LIGHTER);
- prop.appendChild(IValID.V_BOLDER);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // height
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // leftt
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LEFT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // letter-spacing
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LETTER_SPACING);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // line-height
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // list-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // list-style-image
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // list-style-position
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION);
- prop.appendChild(IValID.V_INSIDE);
- prop.appendChild(IValID.V_OUTSIDE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // list-style-type
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE);
- prop.appendChild(IValID.V_DISC);
- prop.appendChild(IValID.V_CIRCLE);
- prop.appendChild(IValID.V_SQUARE);
- prop.appendChild(IValID.V_DECIMAL);
- prop.appendChild(IValID.V_DECIMAL_LEADING_ZERO);
- prop.appendChild(IValID.V_LOWER_ROMAN);
- prop.appendChild(IValID.V_UPPER_ROMAN);
- prop.appendChild(IValID.V_LOWER_GREEK);
- prop.appendChild(IValID.V_LOWER_ALPHA);
- prop.appendChild(IValID.V_LOWER_LATIN);
- prop.appendChild(IValID.V_UPPER_ALPHA);
- prop.appendChild(IValID.V_UPPER_LATIN);
- prop.appendChild(IValID.V_HEBREW);
- prop.appendChild(IValID.V_ARMENIAN);
- prop.appendChild(IValID.V_GEORGIAN);
- prop.appendChild(IValID.V_CJK_IDEOGRAPHIC);
- prop.appendChild(IValID.V_HIRAGANA);
- prop.appendChild(IValID.V_KATAKANA);
- prop.appendChild(IValID.V_HIRAGANA_IROHA);
- prop.appendChild(IValID.V_KATAKANA_IROHA);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN);
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_TOP));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_RIGHT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_BOTTOM));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_LEFT));
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin-top
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_TOP);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin-right
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_RIGHT);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin-bottom
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_BOTTOM);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // margin-left
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_LEFT);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // marker-offset
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARKER_OFFSET);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // marks
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MARKS);
- prop.appendChild(IValID.V_CROP);
- prop.appendChild(IValID.V_CROSS);
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // max-height
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // max-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_WIDTH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // min-height
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // min-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_WIDTH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // orphans
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_ORPHANS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // outline
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE);
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_COLOR));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_STYLE));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_WIDTH));
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // outline-color
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_COLOR);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(IValID.V_INVERT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // outline-style
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_STYLE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // outline-width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_WIDTH);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_INTERACTIVE);
-
- // overflow
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_OVERFLOW);
- prop.appendChild(IValID.V_VISIBLE);
- prop.appendChild(IValID.V_HIDDEN);
- prop.appendChild(IValID.V_SCROLL);
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING);
- // prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_TOP));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_RIGHT));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_BOTTOM));
- prop.appendChild(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_LEFT));
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding-top
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_TOP);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding-right
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_RIGHT);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding-bottom
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_BOTTOM);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // padding-left
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_LEFT);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // page
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_PAGE_ID));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // page-break-after
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_AFTER);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_ALWAYS);
- prop.appendChild(IValID.V_AVOID);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // page-break-before
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_BEFORE);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_ALWAYS);
- prop.appendChild(IValID.V_AVOID);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // page-break-inside
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_INSIDE);
- prop.appendChild(IValID.V_AVOID);
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // pause
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_TIME));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // pause-after
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_AFTER);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_TIME));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // pause-before
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_BEFORE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_TIME));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // pitch
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_FREQUENCY));
- prop.appendChild(IValID.V_X_LOW);
- prop.appendChild(IValID.V_LOW);
- prop.appendChild(IValID.V_MEDIUM);
- prop.appendChild(IValID.V_HIGH);
- prop.appendChild(IValID.V_X_HIGH);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // pitch-range
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH_RANGE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // play-during
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_PLAY_DURING);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(IValID.V_MIX);
- prop.appendChild(IValID.V_REPEAT);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(3);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // position
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_POSITION);
- prop.appendChild(IValID.V_ABSOLUTE);
- prop.appendChild(IValID.V_RELATIVE);
- prop.appendChild(IValID.V_FIXED);
- prop.appendChild(IValID.V_STATIC);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // quotes
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_QUOTES);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_ANY));
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // richness
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_RICHNESS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // right
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_RIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // size
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SIZE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_PORTRAIT);
- prop.appendChild(IValID.V_LANDSCAPE);
- prop.setMaxValueCount(2);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // speak
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_NONE);
- prop.appendChild(IValID.V_SPELL_OUT);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // speak-header
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_HEADER);
- prop.appendChild(IValID.V_ONCE);
- prop.appendChild(IValID.V_ALWAYS);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // speak-numeral
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_NUMERAL);
- prop.appendChild(IValID.V_DIGITS);
- prop.appendChild(IValID.V_CONTINUOUS);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // speak-punctuation
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_PUNCTUATION);
- prop.appendChild(IValID.V_CODE);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // speech-rate
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_SPEECH_RATE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(IValID.V_X_SLOW);
- prop.appendChild(IValID.V_SLOW);
- prop.appendChild(IValID.V_MEDIUM);
- prop.appendChild(IValID.V_FAST);
- prop.appendChild(IValID.V_X_FAST);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // stress
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_STRESS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // table-layout
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TABLE_LAYOUT);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(IValID.V_FIXED);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-align
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_ALIGN);
- prop.appendChild(IValID.V_LEFT);
- prop.appendChild(IValID.V_CENTER);
- prop.appendChild(IValID.V_RIGHT);
- prop.appendChild(IValID.V_JUSTIFY);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_ANY));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-decoration
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_DECORATION);
- prop.appendChild(IValID.V_UNDERLINE);
- prop.appendChild(IValID.V_OVERLINE);
- prop.appendChild(IValID.V_LINE_THROUGH);
- prop.appendChild(IValID.V_BLINK);
- prop.appendChild(IValID.V_NONE);
- prop.setMaxValueCount(4);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-indent
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_INDENT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-shadow
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_SHADOW);
- prop.appendChild(IValID.V_NONE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // text-transform
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_TRANSFORM);
- prop.appendChild(IValID.V_CAPITALIZE);
- prop.appendChild(IValID.V_UPPERCASE);
- prop.appendChild(IValID.V_LOWERCASE);
- prop.appendChild(IValID.V_NONE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // top
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_TOP);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // unicode-bidi
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_UNICODE_BIDI);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_EMBED);
- prop.appendChild(IValID.V_BIDI_OVERRIDE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // vertical-align
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_VERTICAL_ALIGN);
- prop.appendChild(IValID.V_BOTTOM);
- prop.appendChild(IValID.V_TEXT_BOTTOM);
- prop.appendChild(IValID.V_SUB);
- prop.appendChild(IValID.V_BASELINE);
- prop.appendChild(IValID.V_MIDDLE);
- prop.appendChild(IValID.V_SUPER);
- prop.appendChild(IValID.V_TEXT_TOP);
- prop.appendChild(IValID.V_TOP);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // visibility
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_VISIBILITY);
- prop.appendChild(IValID.V_VISIBLE);
- prop.appendChild(IValID.V_HIDDEN);
- prop.appendChild(IValID.V_COLLAPSE);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // voice-family
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_VOICE_FAMILY);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_VOICE));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_VOICE));
- prop.setMaxValueCount(-1);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // volume
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_VOLUME);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_SILENT);
- prop.appendChild(IValID.V_X_SOFT);
- prop.appendChild(IValID.V_SOFT);
- prop.appendChild(IValID.V_MEDIUM);
- prop.appendChild(IValID.V_LOUD);
- prop.appendChild(IValID.V_X_LOUD);
- prop.appendMediaGroup(IMediaGroupID.M_AURAL);
-
- // white-space
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_WHITE_SPACE);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_PRE);
- prop.appendChild(IValID.V_NOWRAP);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // widows
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_WIDOWS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
- prop.appendMediaGroup(IMediaGroupID.M_PAGED);
-
- // width
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_WIDTH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_AUTO);
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // word-spacing
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_WORD_SPACING);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- // z-index
- prop = PropCMProperty.getInstanceOf(PropCMProperty.P_Z_INDEX);
- prop.appendChild(IValID.V_AUTO);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.appendMediaGroup(IMediaGroupID.M_VISUAL);
-
- /** ******** font properties ********* */
- // font-family
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_FAMILY);
- prop.appendChild(PropCMString.getInstanceOf(PropCMString.VAL_FONT));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_FAMILY));
- prop.setMaxValueCount(-1);
-
- // font-style
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_STYLE);
- prop.appendChild(IValID.V_ITALIC);
- prop.appendChild(IValID.V_OBLIQUE);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_ALL);
- prop.setMaxValueCount(-1);
-
- // font-variant
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_VARIANT);
- prop.appendChild(IValID.V_SMALL_CAPS);
- prop.appendChild(IValID.V_NORMAL);
- prop.setMaxValueCount(-1);
-
- // font-weight
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_WEIGHT);
- prop.appendChild(IValID.V_BOLD);
- prop.appendChild(IValID.V_100);
- prop.appendChild(IValID.V_200);
- prop.appendChild(IValID.V_300);
- prop.appendChild(IValID.V_400);
- prop.appendChild(IValID.V_500);
- prop.appendChild(IValID.V_600);
- prop.appendChild(IValID.V_700);
- prop.appendChild(IValID.V_800);
- prop.appendChild(IValID.V_900);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_ALL);
- prop.setMaxValueCount(-1);
-
- // font-stretch
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_STRETCH);
- prop.appendChild(IValID.V_NORMAL);
- prop.appendChild(IValID.V_ULTRA_CONDENSED);
- prop.appendChild(IValID.V_EXTRA_CONDENSED);
- prop.appendChild(IValID.V_CONDENSED);
- prop.appendChild(IValID.V_SEMI_CONDENSED);
- prop.appendChild(IValID.V_SEMI_EXPANDED);
- prop.appendChild(IValID.V_EXPANDED);
- prop.appendChild(IValID.V_EXTRA_EXPANDED);
- prop.appendChild(IValID.V_ULTRA_EXPANDED);
- prop.appendChild(IValID.V_ALL);
- prop.setMaxValueCount(-1);
-
- // font-size
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_FONT_SIZE);
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_ABSOLUTE_SIZE));
- prop.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_RELATIVE_SIZE));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- prop.appendChild(IValID.V_ALL);
- prop.setMaxValueCount(-1);
-
- // unicode-range
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_UNICODE_RANGE);
- prop.appendChild(PropCMURange.getInstanceOf(PropCMURange.VAL_URANGE));
- prop.setMaxValueCount(-1);
-
- // units-per-em
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_UNITS_PER_EM);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // src
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_SRC);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_FORMAT));
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_LOCAL));
- prop.setMaxValueCount(-1);
-
- // panose-1
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_PANOSE_1);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_INTEGER));
- prop.setMaxValueCount(10);
-
- // stemv
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_STEMV);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // stemh
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_STEMH);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // slope
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_SLOPE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // cap-height
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_CAP_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // x-height
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_X_HEIGHT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // ascent
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_ASCENT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // descent
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_DESCENT);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // widths
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_WIDTHS);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.appendChild(PropCMURange.getInstanceOf(PropCMURange.VAL_URANGE));
- prop.setMaxValueCount(-1);
-
- // bbox
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_BBOX);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
- prop.setMaxValueCount(4);
- prop.setMaxValueCount(4);
-
- // definition-src
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_DEFINITION_SRC);
- prop.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_URI));
-
- // baseline
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_BASELINE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // centerline
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_CENTERLINE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // mathline
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_MATHLINE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- // topline
- prop = PropCMFontProperty.getInstanceOf(PropCMFontProperty.PF_TOPLINE);
- prop.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_NUM));
-
- /** ******** containers ********* */
-
- // absolute-size
- PropCMContainer cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_ABSOLUTE_SIZE);
- cont.appendChild(IValID.V_XX_SMALL);
- cont.appendChild(IValID.V_X_SMALL);
- cont.appendChild(IValID.V_SMALL);
- cont.appendChild(IValID.V_MEDIUM);
- cont.appendChild(IValID.V_LARGE);
- cont.appendChild(IValID.V_X_LARGE);
- cont.appendChild(IValID.V_XX_LARGE);
-
- // border-style
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_STYLE);
- cont.appendChild(IValID.V_SOLID);
- cont.appendChild(IValID.V_DASHED);
- cont.appendChild(IValID.V_DOTTED);
- cont.appendChild(IValID.V_DOUBLE);
- cont.appendChild(IValID.V_GROOVE);
- cont.appendChild(IValID.V_RIDGE);
- cont.appendChild(IValID.V_INSET);
- cont.appendChild(IValID.V_OUTSET);
- cont.appendChild(IValID.V_HIDDEN);
- cont.appendChild(IValID.V_NONE);
-
- // border-width
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_BORDER_WIDTH);
- cont.appendChild(IValID.V_THIN);
- cont.appendChild(IValID.V_MEDIUM);
- cont.appendChild(IValID.V_THICK);
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
-
- // color
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_COLOR);
- cont.appendChild(IValID.V_AQUA);
- cont.appendChild(IValID.V_BLACK);
- cont.appendChild(IValID.V_BLUE);
- cont.appendChild(IValID.V_FUCHSIA);
- cont.appendChild(IValID.V_GRAY);
- cont.appendChild(IValID.V_GREEN);
- cont.appendChild(IValID.V_LIME);
- cont.appendChild(IValID.V_MAROON);
- cont.appendChild(IValID.V_NAVY);
- cont.appendChild(IValID.V_OLIVE);
- cont.appendChild(IValID.V_PURPLE);
- cont.appendChild(IValID.V_RED);
- cont.appendChild(IValID.V_SILVER);
- cont.appendChild(IValID.V_TEAL);
- cont.appendChild(IValID.V_WHITE);
- cont.appendChild(IValID.V_YELLOW);
- cont.appendChild(PropCMContainer.getContInstanceOf(PropCMContainer.VAL_SYSTEM_COLOR));
- cont.appendChild(PropCMFunction.getInstanceOf(PropCMFunction.VAL_RGB));
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_HASH));
-
- // system color
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_SYSTEM_COLOR);
- cont.appendChild(IValID.V_ACTIVEBORDER);
- cont.appendChild(IValID.V_ACTIVECAPTION);
- cont.appendChild(IValID.V_APPWORKSPACE);
- cont.appendChild(IValID.V_BACKGROUND);
- cont.appendChild(IValID.V_BUTTONFACE);
- cont.appendChild(IValID.V_BUTTONHIGHLIGHT);
- cont.appendChild(IValID.V_BUTTONSHADOW);
- cont.appendChild(IValID.V_BUTTONTEXT);
- cont.appendChild(IValID.V_CAPTIONTEXT);
- cont.appendChild(IValID.V_GRAYTEXT);
- cont.appendChild(IValID.V_HIGHLIGHT);
- cont.appendChild(IValID.V_HIGHLIGHTTEXT);
- cont.appendChild(IValID.V_INACTIVEBORDER);
- cont.appendChild(IValID.V_INACTIVECAPTION);
- cont.appendChild(IValID.V_INACTIVECAPTIONTEXT);
- cont.appendChild(IValID.V_INFOBACKGROUND);
- cont.appendChild(IValID.V_INFOTEXT);
- cont.appendChild(IValID.V_MENU);
- cont.appendChild(IValID.V_MENUTEXT);
- cont.appendChild(IValID.V_SCROLLBAR);
- cont.appendChild(IValID.V_THREEDDARKSHADOW);
- cont.appendChild(IValID.V_THREEDFACE);
- cont.appendChild(IValID.V_THREEDHIGHLIGHT);
- cont.appendChild(IValID.V_THREEDLIGHTSHADOW);
- cont.appendChild(IValID.V_THREEDSHADOW);
- cont.appendChild(IValID.V_WINDOW);
- cont.appendChild(IValID.V_WINDOWFRAME);
- cont.appendChild(IValID.V_WINDOWTEXT);
-
- // generic-family
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_FAMILY);
- cont.appendChild(IValID.V_SERIF);
- cont.appendChild(IValID.V_SANS_SERIF);
- cont.appendChild(IValID.V_CURSIVE);
- cont.appendChild(IValID.V_FANTASY);
- cont.appendChild(IValID.V_MONOSPACE);
-
- // generic-voice
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_GENERIC_VOICE);
- cont.appendChild(IValID.V_MALE);
- cont.appendChild(IValID.V_FEMALE);
- cont.appendChild(IValID.V_CHILD);
-
- // margin-width
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_MARGIN_WIDTH);
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
- cont.appendChild(IValID.V_AUTO);
-
- // padding-width
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_PADDING_WIDTH);
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_LENGTH));
- cont.appendChild(PropCMNumber.getInstanceOf(PropCMNumber.VAL_PERCENTAGE));
-
- // relative-size
- cont = PropCMContainer.getContInstanceOf(PropCMContainer.VAL_RELATIVE_SIZE);
- cont.appendChild(IValID.V_SMALLER);
- cont.appendChild(IValID.V_LARGER);
-
- LOADING = 2;
- }
-
- /**
- *
- */
- protected static boolean isLoading() {
- return LOADING == 1;
- }
-
- /**
- *
- */
- protected static boolean isNeedInitialize() {
- return LOADING == 0;
- }
-
- /**
- *
- */
- public String toString() {
- return getName();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNumber.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNumber.java
deleted file mode 100644
index 3896bb53c7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNumber.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-
-/**
- *
- */
-public class PropCMNumber extends PropCMNode {
-
- private static java.util.Hashtable instances = null;
- public final static java.lang.String VAL_ANGLE = "angle";//$NON-NLS-1$
- public final static java.lang.String VAL_FREQUENCY = "frequency";//$NON-NLS-1$
- public final static java.lang.String VAL_INTEGER = "integer";//$NON-NLS-1$
- public final static java.lang.String VAL_LENGTH = "length";//$NON-NLS-1$
- public final static java.lang.String VAL_PERCENTAGE = "percentage";//$NON-NLS-1$
- public final static java.lang.String VAL_TIME = "time";//$NON-NLS-1$
- public final static java.lang.String VAL_HASH = "hash"; //$NON-NLS-1$
- public final static java.lang.String VAL_NUM = "number";//$NON-NLS-1$
- public final static String DIM_CM = "cm";//$NON-NLS-1$
- public final static String DIM_DEG = "deg";//$NON-NLS-1$
- public final static String DIM_EMS = "em";//$NON-NLS-1$
- public final static String DIM_EXS = "ex";//$NON-NLS-1$
- public final static String DIM_GRAD = "grad";//$NON-NLS-1$
- public final static String DIM_HASH = "#";//$NON-NLS-1$
- public final static String DIM_HZ = "Hz";//$NON-NLS-1$
- public final static String DIM_IN = "in";//$NON-NLS-1$
- public final static String DIM_INTEGER = "INTEGER";//$NON-NLS-1$
- public final static String DIM_KHZ = "kHz";//$NON-NLS-1$
- public final static String DIM_MM = "mm";//$NON-NLS-1$
- public final static String DIM_MS = "ms";//$NON-NLS-1$
- public final static String DIM_NUMBER = "NUMBER";//$NON-NLS-1$
- public final static String DIM_PC = "pc";//$NON-NLS-1$
- public final static String DIM_PERCENTAGE = "%";//$NON-NLS-1$
- public final static String DIM_PT = "pt";//$NON-NLS-1$
- public final static String DIM_PX = "px";//$NON-NLS-1$
- public final static String DIM_RAD = "rad";//$NON-NLS-1$
- public final static String DIM_S = "s";//$NON-NLS-1$
- private java.util.Vector fDims = new Vector();
-
- /**
- *
- */
- protected PropCMNumber(String name) {
- super(name);
- }
-
- /**
- *
- */
- public static String getDimension(short primitiveType) {
- switch (primitiveType) {
- case CSSPrimitiveValue.CSS_CM :
- return DIM_CM;
- case CSSPrimitiveValue.CSS_DEG :
- return DIM_DEG;
- case CSSPrimitiveValue.CSS_EMS :
- return DIM_EMS;
- case CSSPrimitiveValue.CSS_EXS :
- return DIM_EXS;
- case CSSPrimitiveValue.CSS_GRAD :
- return DIM_GRAD;
- case ICSSPrimitiveValue.CSS_HASH :
- return DIM_HASH; // prefix dimension ....
- case CSSPrimitiveValue.CSS_HZ :
- return DIM_HZ;
- case CSSPrimitiveValue.CSS_IN :
- return DIM_IN;
- case ICSSPrimitiveValue.CSS_INTEGER :
- return "";//$NON-NLS-1$
- case CSSPrimitiveValue.CSS_KHZ :
- return DIM_KHZ;
- case CSSPrimitiveValue.CSS_MM :
- return DIM_MM;
- case CSSPrimitiveValue.CSS_MS :
- return DIM_MS;
- case CSSPrimitiveValue.CSS_NUMBER :
- return "";//$NON-NLS-1$
- case CSSPrimitiveValue.CSS_PC :
- return DIM_PC;
- case CSSPrimitiveValue.CSS_PERCENTAGE :
- return DIM_PERCENTAGE;
- case CSSPrimitiveValue.CSS_PT :
- return DIM_PT;
- case CSSPrimitiveValue.CSS_PX :
- return DIM_PX;
- case CSSPrimitiveValue.CSS_RAD :
- return DIM_RAD;
- case CSSPrimitiveValue.CSS_S :
- return DIM_S;
- }
-
- return null;
- }
-
- /**
- *
- */
- public Set getDimensions() {
- HashSet vals = new HashSet();
- Iterator it = fDims.iterator();
- while (it.hasNext()) {
- vals.add(it.next());
- }
-
- return vals;
- }
-
- /**
- *
- */
- void getIdentifiers(Set indents) {
- }
-
- /**
- *
- */
- static public PropCMNumber getInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(20);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMNumber) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMNumber(name);
- instances.put(name, node);
- }
-
- return (PropCMNumber) node;
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_NUMBER;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values != null && !values.contains(this))
- values.add(this);
- }
-
- /**
- *
- */
- static void initNumberCMDim() {
- PropCMNumber num = getInstanceOf(VAL_ANGLE);
- num.fDims.add(DIM_DEG);
- num.fDims.add(DIM_GRAD);
- num.fDims.add(DIM_RAD);
-
- num = getInstanceOf(VAL_FREQUENCY);
- num.fDims.add(DIM_HZ);
- num.fDims.add(DIM_KHZ);
-
- num = getInstanceOf(VAL_HASH);
- num.fDims.add(DIM_HASH);
-
- // num = getInstanceOf(VAL_INTEGER);
- // num.fDims.add(DIM_INTEGER);
-
- num = getInstanceOf(VAL_LENGTH);
- num.fDims.add(DIM_CM);
- num.fDims.add(DIM_EMS);
- num.fDims.add(DIM_EXS);
- num.fDims.add(DIM_IN);
- num.fDims.add(DIM_MM);
- num.fDims.add(DIM_PC);
- num.fDims.add(DIM_PT);
- num.fDims.add(DIM_PX);
-
- // num = getInstanceOf(VAL_NUMBER);
- // num.fDims.add(DIM_NUMBER);
-
- num = getInstanceOf(VAL_PERCENTAGE);
- num.fDims.add(DIM_PERCENTAGE);
-
- num = getInstanceOf(VAL_TIME);
- num.fDims.add(DIM_MS);
- num.fDims.add(DIM_S);
-
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMProperty.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMProperty.java
deleted file mode 100644
index bbab38f642..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMProperty.java
+++ /dev/null
@@ -1,417 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-/**
- *
- */
-public class PropCMProperty extends PropCMContainer {
-
- // static fields
- private static java.util.Hashtable instances = null;
- private static java.util.Hashtable cachedIdMap = null;
- public final static String P_AZIMUTH = "azimuth";//$NON-NLS-1$
- public final static String P_BG = "background";//$NON-NLS-1$
- public final static String P_BG_ATTACHMENT = "background-attachment";//$NON-NLS-1$
- public final static String P_BG_COLOR = "background-color";//$NON-NLS-1$
- public final static String P_BG_IMAGE = "background-image";//$NON-NLS-1$
- public final static String P_BG_POSITION = "background-position";//$NON-NLS-1$
- public final static String P_BG_REPEAT = "background-repeat";//$NON-NLS-1$
- public final static String P_BORDER = "border";//$NON-NLS-1$
- public final static String P_BORDER_COLLAPSE = "border-collapse";//$NON-NLS-1$
- public final static String P_BORDER_COLOR = "border-color";//$NON-NLS-1$
- public final static String P_BORDER_SPACING = "border-spacing";//$NON-NLS-1$
- public final static String P_BORDER_STYLE = "border-style";//$NON-NLS-1$
- public final static String P_BORDER_TOP = "border-top";//$NON-NLS-1$
- public final static String P_BORDER_RIGHT = "border-right";//$NON-NLS-1$
- public final static String P_BORDER_BOTTOM = "border-bottom";//$NON-NLS-1$
- public final static String P_BORDER_LEFT = "border-left";//$NON-NLS-1$
- public final static String P_BORDER_TOP_COLOR = "border-top-color";//$NON-NLS-1$
- public final static String P_BORDER_RIGHT_COLOR = "border-right-color";//$NON-NLS-1$
- public final static String P_BORDER_BOTTOM_COLOR = "border-bottom-color";//$NON-NLS-1$
- public final static String P_BORDER_LEFT_COLOR = "border-left-color";//$NON-NLS-1$
- public final static String P_BORDER_TOP_STYLE = "border-top-style";//$NON-NLS-1$
- public final static String P_BORDER_RIGHT_STYLE = "border-right-style";//$NON-NLS-1$
- public final static String P_BORDER_BOTTOM_STYLE = "border-bottom-style";//$NON-NLS-1$
- public final static String P_BORDER_LEFT_STYLE = "border-left-style";//$NON-NLS-1$
- public final static String P_BORDER_TOP_WIDTH = "border-top-width";//$NON-NLS-1$
- public final static String P_BORDER_RIGHT_WIDTH = "border-right-width";//$NON-NLS-1$
- public final static String P_BORDER_BOTTOM_WIDTH = "border-bottom-width";//$NON-NLS-1$
- public final static String P_BORDER_LEFT_WIDTH = "border-left-width";//$NON-NLS-1$
- public final static String P_BORDER_WIDTH = "border-width";//$NON-NLS-1$
- public final static String P_BOTTOM = "bottom";//$NON-NLS-1$
- public final static String P_CAPTION_SIDE = "caption-side";//$NON-NLS-1$
- public final static String P_CLEAR = "clear";//$NON-NLS-1$
- public final static String P_CLIP = "clip";//$NON-NLS-1$
- public final static String P_COLOR = "color";//$NON-NLS-1$
- public final static String P_CONTENT = "content";//$NON-NLS-1$
- public final static String P_COUNTER_INCREMENT = "counter-increment";//$NON-NLS-1$
- public final static String P_COUNTER_RESET = "counter-reset";//$NON-NLS-1$
- public final static String P_CUE = "cue";//$NON-NLS-1$
- public final static String P_CUE_AFTER = "cue-after";//$NON-NLS-1$
- public final static String P_CUE_BEFORE = "cue-before";//$NON-NLS-1$
- public final static String P_CURSOR = "cursor";//$NON-NLS-1$
- public final static String P_DIRECTION = "direction";//$NON-NLS-1$
- public final static String P_DISPLAY = "display";//$NON-NLS-1$
- public final static String P_ELEVATION = "elevation";//$NON-NLS-1$
- public final static String P_EMPTY_CELLS = "empty-cells";//$NON-NLS-1$
- public final static String P_FLOAT = "float";//$NON-NLS-1$
- public final static String P_FONT = "font";//$NON-NLS-1$
- public final static String P_FONT_FAMILY = "font-family";//$NON-NLS-1$
- public final static String P_FONT_SIZE = "font-size";//$NON-NLS-1$
- public final static String P_FONT_SIZE_ADJUST = "font-size-adjust";//$NON-NLS-1$
- public final static String P_FONT_STRETCH = "font-stretch";//$NON-NLS-1$
- public final static String P_FONT_STYLE = "font-style";//$NON-NLS-1$
- public final static String P_FONT_VARIANT = "font-variant";//$NON-NLS-1$
- public final static String P_FONT_WEIGHT = "font-weight";//$NON-NLS-1$
- public final static String P_HEIGHT = "height";//$NON-NLS-1$
- public final static String P_LEFT = "left";//$NON-NLS-1$
- public final static String P_LETTER_SPACING = "letter-spacing";//$NON-NLS-1$
- public final static String P_LINE_HEIGHT = "line-height";//$NON-NLS-1$
- public final static String P_LIST_STYLE = "list-style";//$NON-NLS-1$
- public final static String P_LIST_STYLE_IMAGE = "list-style-image";//$NON-NLS-1$
- public final static String P_LIST_STYLE_POSITION = "list-style-position";//$NON-NLS-1$
- public final static String P_LIST_STYLE_TYPE = "list-style-type";//$NON-NLS-1$
- public final static String P_MARGIN = "margin";//$NON-NLS-1$
- public final static String P_MARGIN_TOP = "margin-top";//$NON-NLS-1$
- public final static String P_MARGIN_RIGHT = "margin-right";//$NON-NLS-1$
- public final static String P_MARGIN_BOTTOM = "margin-bottom";//$NON-NLS-1$
- public final static String P_MARGIN_LEFT = "margin-left";//$NON-NLS-1$
- public final static String P_MARKER_OFFSET = "marker-offset";//$NON-NLS-1$
- public final static String P_MARKS = "marks";//$NON-NLS-1$
- public final static String P_MAX_HEIGHT = "max-height";//$NON-NLS-1$
- public final static String P_MAX_WIDTH = "max-width";//$NON-NLS-1$
- public final static String P_MIN_HEIGHT = "min-height";//$NON-NLS-1$
- public final static String P_MIN_WIDTH = "min-width";//$NON-NLS-1$
- public final static String P_ORPHANS = "orphans";//$NON-NLS-1$
- public final static String P_OUTLINE = "outline";//$NON-NLS-1$
- public final static String P_OUTLINE_COLOR = "outline-color";//$NON-NLS-1$
- public final static String P_OUTLINE_STYLE = "outline-style";//$NON-NLS-1$
- public final static String P_OUTLINE_WIDTH = "outline-width";//$NON-NLS-1$
- public final static String P_OVERFLOW = "overflow";//$NON-NLS-1$
- public final static String P_PADDING = "padding";//$NON-NLS-1$
- public final static String P_PADDING_TOP = "padding-top";//$NON-NLS-1$
- public final static String P_PADDING_RIGHT = "padding-right";//$NON-NLS-1$
- public final static String P_PADDING_BOTTOM = "padding-bottom";//$NON-NLS-1$
- public final static String P_PADDING_LEFT = "padding-left";//$NON-NLS-1$
- public final static String P_PAGE = "page";//$NON-NLS-1$
- public final static String P_PAGE_BREAK_AFTER = "page-break-after";//$NON-NLS-1$
- public final static String P_PAGE_BREAK_BEFORE = "page-break-before";//$NON-NLS-1$
- public final static String P_PAGE_BREAK_INSIDE = "page-break-inside";//$NON-NLS-1$
- public final static String P_PAUSE = "pause";//$NON-NLS-1$
- public final static String P_PAUSE_AFTER = "pause-after";//$NON-NLS-1$
- public final static String P_PAUSE_BEFORE = "pause-before";//$NON-NLS-1$
- public final static String P_PITCH = "pitch";//$NON-NLS-1$
- public final static String P_PITCH_RANGE = "pitch-range";//$NON-NLS-1$
- public final static String P_PLAY_DURING = "play-during";//$NON-NLS-1$
- public final static String P_POSITION = "position";//$NON-NLS-1$
- public final static String P_QUOTES = "quotes";//$NON-NLS-1$
- public final static String P_RICHNESS = "richness";//$NON-NLS-1$
- public final static String P_RIGHT = "right";//$NON-NLS-1$
- public final static String P_SIZE = "size";//$NON-NLS-1$
- public final static String P_SPEAK = "speak";//$NON-NLS-1$
- public final static String P_SPEAK_HEADER = "speak-header";//$NON-NLS-1$
- public final static String P_SPEAK_NUMERAL = "speak-numeral";//$NON-NLS-1$
- public final static String P_SPEAK_PUNCTUATION = "speak-punctuation";//$NON-NLS-1$
- public final static String P_SPEECH_RATE = "speech-rate";//$NON-NLS-1$
- public final static String P_STRESS = "stress";//$NON-NLS-1$
- public final static String P_TABLE_LAYOUT = "table-layout";//$NON-NLS-1$
- public final static String P_TEXT_ALIGN = "text-align";//$NON-NLS-1$
- public final static String P_TEXT_DECORATION = "text-decoration";//$NON-NLS-1$
- public final static String P_TEXT_INDENT = "text-indent";//$NON-NLS-1$
- public final static String P_TEXT_SHADOW = "text-shadow";//$NON-NLS-1$
- public final static String P_TEXT_TRANSFORM = "text-transform";//$NON-NLS-1$
- public final static String P_TOP = "top";//$NON-NLS-1$
- public final static String P_UNICODE_BIDI = "unicode-bidi";//$NON-NLS-1$
- public final static String P_VERTICAL_ALIGN = "vertical-align";//$NON-NLS-1$
- public final static String P_VISIBILITY = "visibility";//$NON-NLS-1$
- public final static String P_VOICE_FAMILY = "voice-family";//$NON-NLS-1$
- public final static String P_VOLUME = "volume";//$NON-NLS-1$
- public final static String P_WHITE_SPACE = "white-space";//$NON-NLS-1$
- public final static String P_WIDOWS = "widows";//$NON-NLS-1$
- public final static String P_WIDTH = "width";//$NON-NLS-1$
- public final static String P_WORD_SPACING = "word-spacing";//$NON-NLS-1$
- public final static String P_Z_INDEX = "z-index";//$NON-NLS-1$
- // instance fields
- private int fMinValueCount = 1;
- private int fMaxValueCount = 1;
- private Object[] mediaGroups;
- protected List containers;
-
- /**
- *
- */
- protected PropCMProperty(String name) {
- super(name);
- }
-
- /**
- *
- */
- Object appendChild(Object node) {
- Object ret = super.appendChild(node);
- if (node instanceof PropCMProperty) {
- // register shorthand container
- PropCMProperty cm = (PropCMProperty) node;
- if (cm.containers == null)
- cm.containers = new Vector();
- if (!cm.containers.contains(this))
- cm.containers.add(this);
- }
- return ret;
- }
-
- /**
- *
- */
- void appendMediaGroup(Object mg) {
- if (mediaGroups == null)
- mediaGroups = new Object[1];
- else {
- Object[] oldMediaGroups = mediaGroups;
- mediaGroups = new Object[oldMediaGroups.length + 1];
- System.arraycopy(oldMediaGroups, 0, mediaGroups, 0, oldMediaGroups.length);
- }
- mediaGroups[mediaGroups.length - 1] = mg;
- }
-
- /**
- *
- */
- public static PropCMProperty getInstanceOf(String name) {
- // initialize
- if (instances == null)
- instances = new Hashtable(200);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMProperty) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMProperty(name);
- instances.put(name, node);
- }
-
- return (PropCMProperty) node;
- }
-
- /**
- *
- */
- public int getMaxValueCount() {
- return fMaxValueCount;
- }
-
- /**
- *
- */
- public List getMediaGroups() {
- if (mediaGroups != null)
- return Arrays.asList(mediaGroups);
- else
- return new ArrayList();
- }
-
- /**
- *
- */
- public int getMinValueCount() {
- return fMinValueCount;
- }
-
- /**
- *
- */
- public static Enumeration getNameEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.keys();
- }
-
- /**
- *
- */
- public static Enumeration getPropertyEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.elements();
- }
-
- /**
- *
- */
- public int getShorthandContainerCount() {
- return (containers == null) ? 0 : containers.size();
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_PROPERTY;
- }
-
- /**
- *
- */
- public boolean isShorthand() {
- int nChild = getNumChild();
- for (int i = 0; i < nChild; i++) {
- Object obj = getChildAt(i);
- if (obj instanceof PropCMProperty && !(obj instanceof PropCMSubProperty))
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- public static Vector names() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return new Vector(instances.keySet());
- }
-
- /**
- *
- */
- public static List names(Object mediaGroup) {
- if (mediaGroup == null)
- return names();
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- Vector properties = new Vector();
-
- Iterator it = instances.values().iterator();
- while (it.hasNext()) {
- PropCMProperty prop = (PropCMProperty) it.next();
- if (prop.getMediaGroups().contains(mediaGroup))
- properties.add(prop.getName());
- }
-
- return properties;
- }
-
- /**
- * If identifier is null, get all properties
- */
- public static Vector propertiesFor(String identifier, boolean shorthands) {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // if identifier is null, get all properties
- if (identifier == null)
- return new Vector(instances.values());
-
- if (cachedIdMap == null) {
- // start cacheing
- cachedIdMap = new Hashtable();
- }
- else {
- // search cached
- Object ret = cachedIdMap.get(identifier + String.valueOf(shorthands));
- if (ret != null)
- return new Vector((Collection) ret);
- }
-
- // create
- Enumeration propertyEnum = getPropertyEnum();
- HashSet set = new HashSet();
- while (propertyEnum.hasMoreElements()) {
- PropCMProperty prop = (PropCMProperty) propertyEnum.nextElement();
- if (!shorthands && prop.isShorthand())
- continue;
- if (prop.canHave(identifier))
- set.add(prop);
- }
-
- // cache
- cachedIdMap.put(identifier + String.valueOf(shorthands), set);
-
- return new Vector(set);
- }
-
- /**
- *
- */
- protected void setMaxValueCount(int newMaxValueCount) {
- fMaxValueCount = newMaxValueCount;
- }
-
- /**
- *
- */
- protected void setMinValueCount(int newMinValueCount) {
- fMinValueCount = newMinValueCount;
- }
-
- /**
- *
- */
- public PropCMProperty shorthandContainerAt(int i) {
- if (containers == null)
- return null;
- if (i < 0 || containers.size() <= i)
- return null;
- return (PropCMProperty) containers.get(i);
- }
-
- /**
- *
- */
- public Iterator shorthandContainerIterator() {
- if (containers == null) {
- return new Iterator() {
- public boolean hasNext() {
- return false;
- }
-
- public Object next() {
- return null;
- }
-
- public void remove() {
- }
- };
- }
- else
- return containers.iterator();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMString.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMString.java
deleted file mode 100644
index 00a1e82008..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMString.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.wst.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Set;
-
-/**
- *
- */
-public class PropCMString extends PropCMNode {
-
- private static java.util.Hashtable instances = null;
- public final static java.lang.String VAL_FONT = "font";//$NON-NLS-1$
- public final static java.lang.String VAL_COUNTER_ID = "counterId";//$NON-NLS-1$
- public final static java.lang.String VAL_PAGE_ID = "pageId";//$NON-NLS-1$
- public final static java.lang.String VAL_VOICE = "voice";//$NON-NLS-1$
- public final static java.lang.String VAL_ANY = "any"; //$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMString(String name) {
- super(name);
- }
-
- /**
- *
- */
- void getIdentifiers(Set indents) {
- }
-
- /**
- *
- */
- static public PropCMString getInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMString) node;
-
- // register
- node = new PropCMString(name);
- instances.put(name, node);
-
- return (PropCMString) node;
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_STRING;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values != null && !values.contains(this))
- values.add(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMSubProperty.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMSubProperty.java
deleted file mode 100644
index 81ebb3733d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMSubProperty.java
+++ /dev/null
@@ -1,122 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-/**
- *
- */
-public class PropCMSubProperty extends PropCMProperty {
-
- // static fields
- private static java.util.Hashtable instances = null;
- public final static String PSUB_BG_POSITION_X = "background-positionH";//$NON-NLS-1$
- public final static String PSUB_BG_POSITION_Y = "background-positionV";//$NON-NLS-1$
- public final static String PSUB_CLIP_TOP = "clipTop";//$NON-NLS-1$
- public final static String PSUB_CLIP_RIGHT = "clipRight";//$NON-NLS-1$
- public final static String PSUB_CLIP_BOTTOM = "clipBottom";//$NON-NLS-1$
- public final static String PSUB_CLIP_LEFT = "clipLeft";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMSubProperty(String name) {
- super(name);
- }
-
- /**
- *
- */
- public PropCMProperty getContainer() {
- return shorthandContainerAt(0);
- }
-
- /**
- *
- */
- public static PropCMProperty getInstanceOf(String name) {
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMProperty) node;
-
- // register
- if (PropCMNode.isLoading()) {
- node = new PropCMSubProperty(name);
- instances.put(name, node);
- }
-
- return (PropCMProperty) node;
- }
-
- /**
- *
- */
- public static Enumeration getNameEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.keys();
- }
-
- /**
- *
- */
- public static Enumeration getPropertyEnum() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return instances.elements();
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_SUBPROPERTY;
- }
-
- /**
- *
- */
- public static Vector names() {
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- return new Vector(instances.keySet());
- }
-
- /**
- *
- */
- public void setContainer(PropCMProperty prop) {
- if (containers == null)
- containers = new Vector();
- containers.clear();
- containers.add(prop);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMURange.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMURange.java
deleted file mode 100644
index 3375715d5e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMURange.java
+++ /dev/null
@@ -1,81 +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.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Set;
-
-/**
- *
- */
-public class PropCMURange extends PropCMNode {
-
- private static java.util.Hashtable instances = null;
- public final static String VAL_URANGE = "urange";//$NON-NLS-1$
-
- /**
- *
- */
- protected PropCMURange(String name) {
- super(name);
- }
-
- /**
- *
- */
- void getIdentifiers(Set indents) {
- }
-
- /**
- *
- */
- public static PropCMURange getInstanceOf(String name) {
- if (name == null)
- return null;
-
- // initialize
- if (instances == null)
- instances = new Hashtable(10);
-
- // Initialize of DB
- if (isNeedInitialize())
- PropCMNode.initPropertyCM();
-
- // query
- Object node = instances.get(name);
- if (node != null)
- return (PropCMURange) node;
-
- // register
- node = new PropCMURange(name);
- instances.put(name, node);
-
- return (PropCMURange) node;
- }
-
- /**
- *
- */
- public short getType() {
- return VAL_UNICODE_RANGE;
- }
-
- /**
- *
- */
- void getValues(Collection values) {
- if (values != null && !values.contains(this))
- values.add(this);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMUtil.java
deleted file mode 100644
index 816ba377c6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMUtil.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-
-/**
- *
- */
-public class PropCMUtil {
-
- /**
- *
- */
- public static void minus(Collection src, Collection ref) {
- Iterator it = ref.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (src.contains(obj))
- src.remove(obj);
- }
- return;
- }
-
- /**
- *
- */
- public static void plus(Collection src, Collection ref) {
- Iterator it = ref.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (!src.contains(obj))
- src.add(obj);
- }
- return;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentproperties/CSSContentProperties.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentproperties/CSSContentProperties.java
deleted file mode 100644
index 3bbc582ac6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentproperties/CSSContentProperties.java
+++ /dev/null
@@ -1,194 +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.wst.css.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.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Properties constants used by CSS. Clients should only read and modify the
- * CSS properties programmatically using this class.
- *
- * @since 1.1
- */
-public class CSSContentProperties {
- static final String CSSCORE_ID = CSSCorePlugin.getDefault().getBundle().getSymbolicName();
- private static final String PROJECT_KEY = "<project>"; //$NON-NLS-1$
-
- /**
- * The default css profile to use when none is specified.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String CSS_PROFILE = "css-profile"; //$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(CSSCORE_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(CSSCORE_ID))
- return null;
- node = node.node(CSSCORE_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;
- // boolean preferenceFound = false;
- if (resource != null) {
- IProject project = resource.getProject();
- if (project != null) {
- Preferences preferences = getPreferences(project, key, false);
- if (preferences != null) {
- val = internalGetProperty(resource, recurse, preferences);
- // preferenceFound = true;
- }
- }
- }
- // Workbench preference may not be needed so leave out for now
- // // no preferences found - for performance reasons,
- // // short-circuit
- // // lookup by falling back to workspace's default
- // // setting
- // if (!preferenceFound)
- // val = getWorkbenchPreference(key);
- return val;
- }
-
- 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);
- }
-
- // Workbench preference may not be needed so leave out for now
- // // ensure we default to the workspace preference if none is found
- // return value == null ? getWorkbenchPreference(key) : value;
- 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, CSSCORE_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.wst.css.core/src/org/eclipse/wst/css/core/internal/contentproperties/CSSContentPropertiesManager.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentproperties/CSSContentPropertiesManager.java
deleted file mode 100644
index 25a4b8d9a8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentproperties/CSSContentPropertiesManager.java
+++ /dev/null
@@ -1,239 +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.wst.css.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.osgi.util.NLS;
-import org.eclipse.wst.css.core.internal.CSSCoreMessages;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.osgi.framework.Bundle;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-public class CSSContentPropertiesManager {
- public CSSContentPropertiesManager() {
- super();
- fResourceChangeListener = new ResourceChangeListener();
- fJob = new ContentPropertiesManagerJob();
- }
-
- private static CSSContentPropertiesManager _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(CSSCoreMessages.CSSContentPropertiesManager_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(CSSContentProperties.CSSCORE_ID, IResourceStatus.FAILED_SETTING_CHARSET, CSSCoreMessages.CSSContentPropertiesManager_Updating, null);
- monitor = monitor == null ? new NullProgressMonitor() : monitor;
- try {
- monitor.beginTask(CSSCoreMessages.CSSContentPropertiesManager_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 css profile preferences
- Preferences projectPrefs = CSSContentProperties.getPreferences(next, CSSContentProperties.CSS_PROFILE, false);
- if (projectPrefs != null)
- projectPrefs.flush();
-
- }
- }
- catch (BackingStoreException e) {
- // we got an error saving
- String detailMessage = NLS.bind(CSSCoreMessages.CSSContentPropertiesManager_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 css content setting to see if it has
- // been moved/deleted
- boolean resourceChanges = false;
-
- // project affected
- IProject currentProject = (IProject) projectDelta.getResource();
-
- resourceChanges = processPreferences(currentProject, CSSContentProperties.CSS_PROFILE, projectDelta, projectsToSave);
-
- // if there was a preference key change, need to save preferences
- if (resourceChanges)
- 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 = CSSContentProperties.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 = CSSContentProperties.getPreferences(targetProject, key, true);
- targetPrefs.put(CSSContentProperties.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 CSSContentPropertiesManager();
- 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.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/ByteReader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/ByteReader.java
deleted file mode 100644
index 72b876bdd8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/ByteReader.java
+++ /dev/null
@@ -1,109 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.css.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 no 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.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizer.java
deleted file mode 100644
index 02c5eaf7e9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizer.java
+++ /dev/null
@@ -1,1355 +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
- *******************************************************************************/
-/* The following code was generated by JFlex 1.2.2 on 1/27/04 6:42 PM */
-
-/*nlsXXX*/
-package org.eclipse.wst.css.core.internal.contenttype;
-
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-
-/**
- * This class is a scanner generated by <a
- * href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex </a> 1.2.2
- * on 1/27/04 6:42 PM from the specification file
- * <tt>file:/D:/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jflex</tt>
- */
-public class CSSHeadTokenizer {
-
- /** this character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** lexical states */
- final public static int YYINITIAL = 0;
- final public static int UnDelimitedString = 12;
- final public static int DQ_STRING = 8;
- final public static int SQ_STRING = 10;
- final public static int ST_XMLDecl = 2;
- final public static int QuotedAttributeValue = 6;
- final public static int CHARSET_RULE = 4;
-
- /**
- * YY_LEXSTATE[l] is the state in the DFA for the lexical state l
- * YY_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 final static int YY_LEXSTATE[] = {0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7};
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed = "\11\0\1\6\1\11\2\0\1\10\22\0\1\6\1\0\1\36\2\0" + "\1\41\1\0\1\37\7\0\1\40\13\0\1\35\1\12\1\7\1\34" + "\1\13\1\17\1\22\1\0\1\20\1\31\1\25\1\0\1\33\1\21" + "\1\32\2\0\1\16\1\15\1\27\1\30\2\0\1\23\1\24\1\26" + "\3\0\1\14\10\0\1\22\1\0\1\20\1\31\1\25\1\0\1\33" + "\1\21\1\32\2\0\1\16\1\15\1\27\1\30\2\0\1\23\1\24" + "\1\26\3\0\1\14\102\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
- */
- final private static char[] yycmap = yy_unpack_cmap(yycmap_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", "Internal error: unknown state", "Error: could not match input", "Error: pushback value was too large"};
-
- /** 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;
-
-
- /** the number of characters up to the start of the matched text */
- private int yychar;
-
-
- /**
- * 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 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;
-
-
-
- public CSSHeadTokenizer() {
- super();
- }
-
- public void reset(Reader in) {
- /* 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;
-
-
- /* the number of characters up to the start of the matched text */
- yychar = 0;
-
-
- /**
- * yy_atBOL == true <=>the scanner is currently at the beginning of a
- * line
- */
- yy_atBOL = false;
-
- /* 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;
-
-
- fStateStack.clear();
-
- hasMore = true;
-
- // its a little wasteful to "throw away" first char array generated
- // by class init (via auto generated code), but we really do want
- // a small buffer for our head parsers.
- if (yy_buffer.length != MAX_TO_SCAN) {
- yy_buffer = new char[MAX_TO_SCAN];
- }
-
-
- }
-
-
- public final HeadParserToken getNextToken() throws IOException {
- String context = null;
- context = primGetNextToken();
- HeadParserToken result = null;
- if (valueText != null) {
- result = createToken(context, yychar, valueText);
- valueText = null;
- }
- else {
- result = createToken(context, yychar, yytext());
- }
- return result;
- }
-
- public final boolean hasMoreTokens() {
- return hasMore && yychar < MAX_TO_SCAN;
- }
-
- private void pushCurrentState() {
- fStateStack.push(yystate());
-
- }
-
- private void popState() {
- yybegin(fStateStack.pop());
- }
-
- private HeadParserToken createToken(String context, int start, String text) {
- return new HeadParserToken(context, start, text);
- }
-
-
-
- /**
- * 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 CSSHeadTokenizer(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 CSSHeadTokenizer(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[] 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 < 158) {
- 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.
- *
- * @param errorCode
- * the code of the errormessage to display
- */
- private void yy_ScanError(int errorCode) {
- try {
- System.out.println(YY_ERROR_MSG[errorCode]);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println(YY_ERROR_MSG[YY_UNKNOWN_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()!
- */
- private void yypushback(int number) {
- if (number > yylength())
- yy_ScanError(YY_PUSHBACK_2BIG);
-
- yy_markedPos -= number;
- }
-
-
- /**
- * 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;
- 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 IOException
- * if any I/O-Error occurs
- */
- public String primGetNextToken() throws java.io.IOException {
- int yy_input;
- int yy_action;
-
-
- while (true) {
-
- yychar += yylength();
-
- yy_atBOL = yy_markedPos <= 0 || yy_buffer[yy_markedPos - 1] == '\n';
- if (!yy_atBOL && yy_buffer[yy_markedPos - 1] == '\r') {
- yy_atBOL = yy_advance() != '\n';
- if (!yy_atEOF)
- yy_currentPos--;
- }
-
- yy_action = -1;
-
- yy_currentPos = yy_startRead = yy_markedPos;
-
- if (yy_atBOL)
- yy_state = YY_LEXSTATE[yy_lexical_state + 1];
- else
- yy_state = YY_LEXSTATE[yy_lexical_state];
-
-
- yy_forAction : {
- while (true) {
-
- yy_input = yy_advance();
-
- if (yy_input == YYEOF)
- break yy_forAction;
-
- yy_input = yycmap[yy_input];
-
- boolean yy_isFinal = false;
- boolean yy_noLookAhead = false;
-
- yy_forNext : {
- switch (yy_state) {
- case 0 :
- switch (yy_input) {
- case 1 :
- yy_isFinal = true;
- yy_state = 9;
- break yy_forNext;
- case 2 :
- yy_isFinal = true;
- yy_state = 10;
- break yy_forNext;
- case 3 :
- yy_isFinal = true;
- yy_state = 11;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 8;
- break yy_forNext;
- }
-
- case 1 :
- switch (yy_input) {
- case 1 :
- yy_isFinal = true;
- yy_state = 9;
- break yy_forNext;
- case 2 :
- yy_isFinal = true;
- yy_state = 10;
- break yy_forNext;
- case 3 :
- yy_isFinal = true;
- yy_state = 11;
- break yy_forNext;
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 12;
- break yy_forNext;
- case 10 :
- yy_isFinal = true;
- yy_state = 13;
- break yy_forNext;
- case 15 :
- yy_isFinal = true;
- yy_state = 14;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 8;
- break yy_forNext;
- }
-
- case 2 :
- switch (yy_input) {
- case 11 :
- yy_isFinal = true;
- yy_state = 15;
- break yy_forNext;
- case 21 :
- yy_isFinal = true;
- yy_state = 16;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 8;
- break yy_forNext;
- }
-
- case 3 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 17;
- break yy_forNext;
- case 29 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 18;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 8;
- break yy_forNext;
- }
-
- case 4 :
- switch (yy_input) {
- case 6 :
- case 8 :
- yy_isFinal = true;
- yy_state = 20;
- break yy_forNext;
- case 9 :
- yy_isFinal = true;
- yy_state = 21;
- break yy_forNext;
- case 30 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 22;
- break yy_forNext;
- case 31 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 23;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 19;
- break yy_forNext;
- }
-
- case 5 :
- switch (yy_input) {
- case 8 :
- case 9 :
- case 10 :
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 25;
- break yy_forNext;
- case 11 :
- case 32 :
- yy_isFinal = true;
- yy_state = 26;
- break yy_forNext;
- case 29 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 27;
- break yy_forNext;
- case 30 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 28;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 24;
- break yy_forNext;
- }
-
- case 6 :
- switch (yy_input) {
- case 8 :
- case 9 :
- case 10 :
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 25;
- break yy_forNext;
- case 32 :
- yy_isFinal = true;
- yy_state = 26;
- break yy_forNext;
- case 29 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 27;
- break yy_forNext;
- case 31 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 28;
- break yy_forNext;
- case 33 :
- yy_isFinal = true;
- yy_state = 29;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 24;
- break yy_forNext;
- }
-
- case 7 :
- switch (yy_input) {
- case 10 :
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 25;
- break yy_forNext;
- case 32 :
- yy_isFinal = true;
- yy_state = 26;
- break yy_forNext;
- case 11 :
- yy_isFinal = true;
- yy_state = 29;
- break yy_forNext;
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 30;
- break yy_forNext;
- case 29 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 31;
- break yy_forNext;
- case 30 :
- case 31 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 32;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 24;
- break yy_forNext;
- }
-
- case 9 :
- switch (yy_input) {
- case 2 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 33;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 10 :
- switch (yy_input) {
- case 1 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 34;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 11 :
- switch (yy_input) {
- case 4 :
- yy_state = 35;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 12 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_state = 36;
- break yy_forNext;
- case 10 :
- yy_state = 37;
- break yy_forNext;
- case 15 :
- yy_state = 38;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 13 :
- switch (yy_input) {
- case 11 :
- yy_state = 39;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 14 :
- switch (yy_input) {
- case 16 :
- yy_state = 40;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 15 :
- switch (yy_input) {
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 41;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 16 :
- switch (yy_input) {
- case 23 :
- yy_state = 42;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 17 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 17;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 20 :
- switch (yy_input) {
- case 6 :
- case 8 :
- yy_isFinal = true;
- yy_state = 20;
- break yy_forNext;
- case 9 :
- yy_state = 43;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 19;
- break yy_forNext;
- }
-
- case 21 :
- switch (yy_input) {
- case 6 :
- case 8 :
- yy_isFinal = true;
- yy_state = 20;
- break yy_forNext;
- case 9 :
- yy_state = 43;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 19;
- break yy_forNext;
- }
-
- case 26 :
- switch (yy_input) {
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 44;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 29 :
- switch (yy_input) {
- case 28 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 45;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 35 :
- switch (yy_input) {
- case 5 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 46;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 36 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_state = 36;
- break yy_forNext;
- case 10 :
- yy_state = 37;
- break yy_forNext;
- case 15 :
- yy_state = 38;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 37 :
- switch (yy_input) {
- case 11 :
- yy_state = 39;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 38 :
- switch (yy_input) {
- case 16 :
- yy_state = 40;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 39 :
- switch (yy_input) {
- case 12 :
- yy_state = 47;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 40 :
- switch (yy_input) {
- case 17 :
- yy_state = 48;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 42 :
- switch (yy_input) {
- case 16 :
- yy_state = 49;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 43 :
- switch (yy_input) {
- case 6 :
- case 8 :
- yy_isFinal = true;
- yy_state = 20;
- break yy_forNext;
- case 9 :
- yy_state = 43;
- break yy_forNext;
- default :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 19;
- break yy_forNext;
- }
-
- case 47 :
- switch (yy_input) {
- case 13 :
- yy_state = 50;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 48 :
- switch (yy_input) {
- case 18 :
- yy_state = 51;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 49 :
- switch (yy_input) {
- case 24 :
- yy_state = 52;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 50 :
- switch (yy_input) {
- case 14 :
- yy_state = 53;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 51 :
- switch (yy_input) {
- case 19 :
- yy_state = 54;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 52 :
- switch (yy_input) {
- case 25 :
- yy_state = 55;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 53 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 56;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 54 :
- switch (yy_input) {
- case 20 :
- yy_state = 57;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 55 :
- switch (yy_input) {
- case 26 :
- yy_state = 58;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 56 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 56;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 57 :
- switch (yy_input) {
- case 21 :
- yy_state = 59;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 58 :
- switch (yy_input) {
- case 23 :
- yy_state = 60;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 59 :
- switch (yy_input) {
- case 22 :
- yy_isFinal = true;
- yy_noLookAhead = true;
- yy_state = 61;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 60 :
- switch (yy_input) {
- case 27 :
- yy_state = 62;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 62 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_state = 62;
- break yy_forNext;
- case 7 :
- yy_isFinal = true;
- yy_state = 63;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- case 63 :
- switch (yy_input) {
- case 6 :
- case 8 :
- case 9 :
- yy_isFinal = true;
- yy_state = 63;
- break yy_forNext;
- default :
- break yy_forAction;
- }
-
- default :
- yy_ScanError(YY_ILLEGAL_STATE);
- break;
- }
- }
-
- if (yy_isFinal) {
- yy_action = yy_state;
- yy_markedPos = yy_currentPos;
- if (yy_noLookAhead)
- break yy_forAction;
- }
-
- }
- }
-
-
- switch (yy_action) {
-
- case 45 : {
- yypushback(2);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 65 :
- break;
- case 25 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 66 :
- break;
- case 19 :
- case 20 : {
- yypushback(1);
- yybegin(UnDelimitedString);
- string.setLength(0);
- }
- case 67 :
- break;
- case 18 : {
- yybegin(YYINITIAL);
- hasMore = false;
- return CSSHeadTokenizerConstants.RuleEnd;
- }
- case 68 :
- break;
- case 32 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;
- }
- case 69 :
- break;
- case 44 : {
- yypushback(2);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 70 :
- break;
- case 61 : {
- if (yychar == 0) {
- yybegin(CHARSET_RULE);
- return CSSHeadTokenizerConstants.CHARSET_RULE;
- }
- }
- case 71 :
- break;
- case 56 : {
- if (yychar == 0) {
- yybegin(ST_XMLDecl);
- return XMLHeadTokenizerConstants.XMLDeclStart;
- }
- }
- case 72 :
- break;
- case 8 :
- case 9 :
- case 10 :
- case 11 :
- case 12 :
- case 13 :
- case 14 :
- case 15 :
- case 16 :
- case 21 : {
- if (yychar > MAX_TO_SCAN) {
- hasMore = false;
- return EncodingParserConstants.MAX_CHARS_REACHED;
- }
- }
- case 73 :
- break;
- case 41 : {
- yybegin(YYINITIAL);
- return XMLHeadTokenizerConstants.XMLDeclEnd;
- }
- case 74 :
- break;
- case 63 : {
- pushCurrentState();
- yybegin(QuotedAttributeValue);
- return XMLHeadTokenizerConstants.XMLDelEncoding;
- }
- case 75 :
- break;
- case 3 :
- case 17 : {
- pushCurrentState();
- yybegin(QuotedAttributeValue);
- }
- case 76 :
- break;
- case 46 : {
- hasMore = false;
- return EncodingParserConstants.UTF83ByteBOM;
- }
- case 77 :
- break;
- case 33 : {
- hasMore = false;
- return EncodingParserConstants.UTF16BE;
- }
- case 78 :
- break;
- case 34 : {
- hasMore = false;
- return EncodingParserConstants.UTF16LE;
- }
- case 79 :
- break;
- case 24 :
- case 26 :
- case 29 : {
- string.append(yytext());
- }
- case 80 :
- break;
- case 23 : {
- yybegin(SQ_STRING);
- string.setLength(0);
- }
- case 81 :
- break;
- case 22 : {
- yybegin(DQ_STRING);
- string.setLength(0);
- }
- case 82 :
- break;
- case 27 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 83 :
- break;
- case 28 : {
- popState();
- valueText = string.toString();
- return EncodingParserConstants.StringValue;
- }
- case 84 :
- break;
- case 30 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.UnDelimitedStringValue;
- }
- case 85 :
- break;
- case 31 : {
- yypushback(1);
- popState();
- valueText = string.toString();
- return EncodingParserConstants.UnDelimitedStringValue;
- }
- case 86 :
- break;
- default :
- if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
- yy_atEOF = true;
- yy_do_eof();
- {
- hasMore = false;
- return EncodingParserConstants.EOF;
- }
- }
- else {
- yy_ScanError(YY_NO_MATCH);
- }
- }
- }
- }
-
- /**
- * Runs the scanner on input files.
- *
- * This main method is the debugging routine for the scanner. It prints
- * each returned token to System.out until the end of file is reached, or
- * an error occured.
- *
- * @param argv
- * the command line, contains the filenames to run the scanner
- * on.
- */
- public static void main(String argv[]) {
- for (int i = 0; i < argv.length; i++) {
- CSSHeadTokenizer scanner = null;
- try {
- scanner = new CSSHeadTokenizer(new java.io.FileReader(argv[i]));
- }
- catch (java.io.FileNotFoundException e) {
- System.out.println("File not found : \"" + argv[i] + "\"");
- System.exit(1);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println("Usage : java CSSHeadTokenizer <inputfile>");
- System.exit(1);
- }
-
- try {
- do {
- System.out.println(scanner.primGetNextToken());
- }
- while (!scanner.yy_atEOF);
-
- }
- catch (java.io.IOException e) {
- System.out.println("An I/O error occured while scanning :");
- System.out.println(e);
- System.exit(1);
- }
- catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizerConstants.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizerConstants.java
deleted file mode 100644
index a991a03fa9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizerConstants.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.wst.css.core.internal.contenttype;
-
-
-public interface CSSHeadTokenizerConstants {
-
- String RuleEnd = "RuleEnd"; //$NON-NLS-1$
- String CHARSET_RULE = "CHARSET_RULE"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSResourceEncodingDetector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSResourceEncodingDetector.java
deleted file mode 100644
index 1562f6f02f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSResourceEncodingDetector.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.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 org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.sse.core.internal.encoding.CodedIO;
-import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
-import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector;
-import org.eclipse.wst.sse.core.internal.encoding.NonContentBasedEncodingRules;
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-
-
-
-public class CSSResourceEncodingDetector implements IResourceCharsetDetector {
- class NullMemento extends EncodingMemento {
- /**
- *
- */
- public NullMemento() {
- super();
- String defaultCharset = NonContentBasedEncodingRules.useDefaultNameRules(null);
- setJavaCharsetName(defaultCharset);
- setAppropriateDefault(defaultCharset);
- setDetectedCharsetName(null);
- }
- }
-
-
- private CSSHeadTokenizer fTokenizer;
- private EncodingMemento fEncodingMemento;
- private boolean fHeaderParsed;
- private Reader fReader;
-
- /**
- * There is no spec defined encoding for CSS, so Null is returned.
- */
- public String getSpecDefaultEncoding() {
- // should match what's in plugin.xml (or look it up from there).
- return null;
- }
-
- private boolean canHandleAsUnicodeStream(String tokenType) {
- boolean canHandleAsUnicodeStream = false;
- if (tokenType == EncodingParserConstants.UTF83ByteBOM) {
- canHandleAsUnicodeStream = true;
- String enc = "UTF-8"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- fEncodingMemento.setUTF83ByteBOMUsed(true);
- }
- else if (tokenType == EncodingParserConstants.UTF16BE) {
- canHandleAsUnicodeStream = true;
- String enc = "UTF-16BE"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- }
- else if (tokenType == EncodingParserConstants.UTF16LE) {
- canHandleAsUnicodeStream = true;
- String enc = "UTF-16"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- }
- return canHandleAsUnicodeStream;
- }
-
- /**
- * @return Returns the tokenizer.
- */
- private CSSHeadTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new CSSHeadTokenizer();
- }
- return fTokenizer;
- }
-
- 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;
- }
-
- private void parseInput() throws IOException {
- checkInContents();
- if (fEncodingMemento == null) {
- checkHeuristics();
- }
- }
-
- private void checkInContents() throws IOException {
- CSSHeadTokenizer tokenizer = getTokenizer();
- tokenizer.reset(fReader);
- HeadParserToken token = null;
- String tokenType = null;
- do {
- token = tokenizer.getNextToken();
- tokenType = token.getType();
- if (canHandleAsUnicodeStream(tokenType)) {
- // side effect of canHandle is to create appropriate memento
- }
- else if (tokenType == CSSHeadTokenizerConstants.CHARSET_RULE) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- createEncodingMemento(valueToken.getText(), EncodingMemento.FOUND_ENCODING_IN_CONTENT);
-
- }
- }
- }
-
- }
- while (tokenizer.hasMoreTokens());
- }
-
- /**
- *
- */
- private void checkHeuristics() throws IOException {
- boolean noHeuristic = false;
- String heuristicEncoding = null;
- try {
- fReader.reset();
- byte[] bytes = new byte[3];
- int nRead = 0;
- for (int i = 0; i < bytes.length; i++) {
- if (fReader.ready()) {
- int oneByte = fReader.read();
- nRead++;
- if (oneByte <= 0xFF) {
- bytes[i] = (byte) oneByte;
- }
- else {
- noHeuristic = true;
- }
- }
- else {
- noHeuristic = true;
- break;
- }
- }
- if (!noHeuristic && nRead == 3) {
- heuristicEncoding = EncodingGuesser.guessEncoding(bytes, 3);
- }
- }
- catch (IOException e) {
- // if any IO exception, then not a heuristic case
- }
- finally {
- fReader.reset();
- }
- if (heuristicEncoding != null) {
- createEncodingMemento(heuristicEncoding, EncodingMemento.GUESSED_ENCODING_FROM_STREAM);
- }
-
- }
-
- /**
- * 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());
- }
-
- /**
- * 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 final void ensureInputSet() {
- if (fReader == null) {
- throw new IllegalStateException("input must be set before use"); //$NON-NLS-1$
- }
- }
-
- /**
- * 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;
- }
-
- public String getEncoding() throws IOException {
- return getEncodingMemento().getDetectedCharsetName();
- }
-
- 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 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;
- }
-
- 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 void resetAll() {
- fReader = null;
- fHeaderParsed = false;
- fEncodingMemento = null;
- }
-
- /**
- *
- */
- 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);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/ContentDescriberForCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/ContentDescriberForCSS.java
deleted file mode 100644
index d04863d3ae..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/ContentDescriberForCSS.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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.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 ContentDescriberForCSS implements ITextContentDescriber {
- final private static QualifiedName[] SUPPORTED_OPTIONS = {IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK, IContentDescriptionExtended.DETECTED_CHARSET, IContentDescriptionExtended.UNSUPPORTED_CHARSET, IContentDescriptionExtended.APPROPRIATE_DEFAULT};
-
- public int describe(InputStream contents, IContentDescription description) throws IOException {
- int result = IContentDescriber.INDETERMINATE;
-
- if (description == null) {
- result = computeValidity(contents);
- }
- else {
- calculateSupportedOptions(contents, description);
- result = computeValidity(contents);
- }
- return result;
- }
-
- public int describe(Reader contents, IContentDescription description) throws IOException {
- int result = IContentDescriber.INDETERMINATE;
-
- if (description == null) {
- result = computeValidity(contents);
- }
- else {
- calculateSupportedOptions(contents, description);
- result = computeValidity(contents);
- }
- return result;
- }
-
- public QualifiedName[] getSupportedOptions() {
-
- return SUPPORTED_OPTIONS;
- }
-
- private void calculateSupportedOptions(InputStream contents, IContentDescription description) throws IOException {
- if (isRelevent(description)) {
- IResourceCharsetDetector detector = getDetector();
- detector.set(contents);
- handleCalculations(description, detector);
- }
- }
-
- /**
- * @param contents
- * @param description
- * @throws IOException
- */
- private void calculateSupportedOptions(Reader contents, IContentDescription description) throws IOException {
- if (isRelevent(description)) {
- IResourceCharsetDetector detector = getDetector();
- detector.set(contents);
- handleCalculations(description, detector);
- }
- }
-
- private int computeValidity(InputStream inputStream) {
- // currently no specific check for validilty
- // based on contents.
- return IContentDescriber.INDETERMINATE;
- }
-
- private int computeValidity(Reader reader) {
- // currently no specific check for validilty
- // based on contents.
- return IContentDescriber.INDETERMINATE;
- }
-
- private IResourceCharsetDetector getDetector() {
- return new CSSResourceEncodingDetector();
- }
-
- /**
- * @param description
- * @param detector
- * @throws IOException
- */
- private void handleCalculations(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 = ((CSSResourceEncodingDetector) 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 default.the
- Object defaultCharset = getDetector().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);
- }
- }
- }
-
- }
-
- private void handleDetectedSpecialCase(IContentDescription description, Object detectedCharset, Object javaCharset) {
- // since equal, we don't need to add, but if our detected version is
- // different than javaCharset, then we should add it. This will
- // happen, for example, if there's differences in case, or differences
- // due to override properties
- 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
- * @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(IContentDescriptionExtended.ENCODING_MEMENTO))
- // result = true;
- return result;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/EncodingGuesser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/EncodingGuesser.java
deleted file mode 100644
index 130800eec8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/EncodingGuesser.java
+++ /dev/null
@@ -1,173 +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.wst.css.core.internal.contenttype;
-
-/**
- *
- * This is ported from PageDesigner's hpbcom/Kanji.cpp's
- * Kanji::guess_kanji_code(),
- *
- */
-public class EncodingGuesser {
- private static final int ASCII = 0; // ASCII
- // ISO-2022-JP
- private static final int ASCII_IN = 8; // This is after ISO2022's change
- // Shift-JIS
- private static final int EUC_HALFKANA = 6; // This is Half Kana in EUC-JP
- private static final int EUC_JP = 3; // This is EUC-JP
- private static final int ISO2022_JP = 4; // This is ISO-2022-JP
- private static final int JIS_HALFKANA = 7; // THis is Half Kana in
- private static final byte KT_EUC1 = 0x40;
- private static final byte KT_EUC2 = (byte) 0x80;
- // ASCII
- private static final byte KT_JIN = 0x01;
- private static final byte KT_JOUT = 0x02;
- // private static final byte KT_ESC = 0x04;
- // private static final byte KT_JIS = 0x08;
- private static final byte KT_SFT1 = 0x10;
- private static final byte KT_SFT2 = 0x20;
- private static final byte ktype[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 00 */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 10 */
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x09, 0x08, 0x08, 0x08, /* !"#$%&' *//* " */
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* ()*+,-./ */
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 01234567 */
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 89:; <=>? */
- 0x29, 0x28, 0x2b, 0x28, 0x28, 0x28, 0x28, 0x28, /* @ABCDEFG */
- 0x2a, 0x28, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x28, /* HIJKLMNO */
- 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, /* PQRSTUVW */
- 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, /* XYZ[\]^_ */
- 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, /* abcdefg */
- 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, /* hijklmno */
- 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, /* pqrstuvw */
- 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x00, /* xyz{|}~ */
- 0x20, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, /* 80 */
- 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, /* 90 */
- 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x20, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, /* A0 */
- (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, /* B0 */
- (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, /* C0 */
- (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, /* D0 */
- (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xe0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, /* E0 */
- (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, /* F0 */
- (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xf0, (byte) 0xc0, (byte) 0xc0, 0x00,};
- // private static final int ISO8859_1 = 1; // ISO-1
- private static final int SHIFT_JIS = 2; // This is Shift-JIS
- private static final int SJIS_HALFKANA = 5; // This is Half Kana in
-
- /**
- * Currently, only Japanese encodings are supported.
- */
- private static final int UNKNOWN = -1; // Unknown
-
- /**
- * @return java.lang.String
- * @param code
- * int
- *
- * Convert private int to IANA Encoding name.
- */
- private static String convertToIANAEncodingName(int code) {
- String encoding = null;
-
- switch (code) {
- case SHIFT_JIS :
- case SJIS_HALFKANA :
- encoding = "Shift_JIS";//$NON-NLS-1$
- break;
- case EUC_JP :
- case EUC_HALFKANA :
- encoding = "EUC-JP";//$NON-NLS-1$
- break;
- case ISO2022_JP :
- case JIS_HALFKANA :
- encoding = "ISO-2022-JP";//$NON-NLS-1$
- default :
- break;
- }
-
- return encoding;
- }
-
- /**
- * Return guessed Java Encoding name target: bytes to be inspected length:
- * length of target
- */
- public static String guessEncoding(byte[] target, int length) {
- int code = UNKNOWN;
-
- // Currently, only Japanese is supported.
- String system_ctype = java.util.Locale.getDefault().getLanguage();
- String jp_ctype = java.util.Locale.JAPANESE.getLanguage();
- if (system_ctype.compareTo(jp_ctype) == 0) {
- // Ok, I'm under ja_JP.
- code = ASCII;
- int pos = 0;
- while ((code == ASCII) && (length > 0)) {
- int ch1 = target[pos];
- ch1 = ch1 & 0x000000FF;
- int ch2 = (length >= 2) ? target[pos + 1] : 0;
- ch2 = ch2 & 0x000000FF;
- int ch3 = (length >= 3) ? target[pos + 2] : 0;
- ch3 = ch3 & 0x000000FF;
- code = guessJapaneseKanjiCode(ch1, ch2, ch3, 0);
- pos++;
- length--;
- }
- switch (code) {
- case ISO2022_JP :
- case JIS_HALFKANA :
- code = ISO2022_JP;
- break;
- case EUC_JP :
- code = EUC_JP;
- break;
- default :
- code = SHIFT_JIS;
- }
- }
- return (convertToIANAEncodingName(code));
- }
-
- /**
- * Guess the encoding. halfkana_flag = 0x01 ( detect SJIS half kana )
- * halfkana_flag = 0x02 ( detect EUC half kana )
- */
- private static int guessJapaneseKanjiCode(int ch1, int ch2, int ch3, int halfkana_flag) {
- boolean sjis_hankaku_flag = ((halfkana_flag & 0x01) != 0) ? true : false;
- boolean euc_hankaku_flag = ((halfkana_flag & 0x02) != 0) ? true : false;
-
- if (ch1 == 0)
- return UNKNOWN;
- if (sjis_hankaku_flag && ch1 >= 0xa1 && ch1 <= 0xdf)
- return SJIS_HALFKANA;
- else if (euc_hankaku_flag && ch1 == 0x8e && ch2 >= 0xa1 && ch2 <= 0xdf)
- return EUC_HALFKANA;
- else if (((ktype[ch1] & KT_SFT1) != 0) && ((ktype[ch2] & KT_SFT2) != 0))
- return SHIFT_JIS;
- else if (((ktype[ch1] & KT_EUC1) != 0) && ((ktype[ch2] & KT_EUC2) != 0))
- return EUC_JP;
- else if (ch1 == 0x1b && ((ktype[ch2] & KT_JIN) != 0))
- return ISO2022_JP;
- else if (ch1 >= 0xa1 && ch1 <= 0xdf)
- return SJIS_HALFKANA;
- else if (ch1 == 0x1b && ch2 == 0x28/* '(' */&& ch3 == 0x49/* 'I' */)
- return JIS_HALFKANA;
- else if (ch1 == 0x1b && ch2 == 0x28/* '(' */&& ((ktype[ch3] & KT_JOUT) != 0))
- return ASCII_IN;
-
- return ASCII;
- }
-
- public EncodingGuesser() {
- super();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/HeadParserToken.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/HeadParserToken.java
deleted file mode 100644
index 51dc01cce1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/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.wst.css.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.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/IntStack.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/IntStack.java
deleted file mode 100644
index aa8cabd9f7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/IntStack.java
+++ /dev/null
@@ -1,99 +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.wst.css.core.internal.contenttype;
-
-/*
- *
- * A non-resizable class implementing the behavior of java.util.Stack, but
- * directly for the <code> integer </code> primitive.
- */
-import java.util.EmptyStackException;
-
-public class IntStack {
- private int[] list = null;
-
- private int size = 0;
-
- public IntStack() {
- this(100);
- }
-
- public IntStack(int maxdepth) {
- super();
- list = new int[maxdepth];
- initialize();
- }
-
- public void clear() {
- initialize();
- }
-
- public boolean empty() {
- return size == 0;
- }
-
- public int get(int slot) {
- return list[slot];
- }
-
- private void initialize() {
- for (int i = 0; i < list.length; i++)
- list[i] = -1;
- }
-
- /**
- * Returns the int at the top of the stack without removing it
- *
- * @return int at the top of this stack.
- * @exception EmptyStackException
- * when empty.
- */
- public int peek() {
- if (size == 0)
- throw new EmptyStackException();
- return list[size - 1];
- }
-
- /**
- * Removes and returns the int at the top of the stack
- *
- * @return int at the top of this stack.
- * @exception EmptyStackException
- * when empty.
- */
- public int pop() {
- int value = peek();
- list[size - 1] = -1;
- size--;
- return value;
- }
-
- /**
- * Pushes an item onto the top of this stack.
- *
- * @param newValue -
- * the int to be pushed onto this stack.
- * @return the <code>newValue</code> argument.
- */
- public int push(int newValue) {
- if (size == list.length) {
- throw new StackOverflowError();
- }
- list[size++] = newValue;
- return newValue;
- }
-
- public int size() {
- return list.length;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/AbstractCSSNodeList.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/AbstractCSSNodeList.java
deleted file mode 100644
index 007991b97b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/AbstractCSSNodeList.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.wst.css.core.internal.document;
-
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-
-/**
- *
- */
-abstract class AbstractCSSNodeList {
-
- protected Vector nodes = null;
-
- ICSSNode appendNode(ICSSNode node) {
- if (node == null)
- return null;
- if (this.nodes == null)
- this.nodes = new Vector();
- this.nodes.addElement(node);
- return node;
- }
-
- /**
- * @return int
- */
- public int getLength() {
- if (this.nodes == null)
- return 0;
- return this.nodes.size();
- }
-
-
- protected ICSSNode itemImpl(int index) {
- if (this.nodes == null)
- return null;
- if (index < 0 || index >= this.nodes.size())
- return null;
- return (ICSSNode) this.nodes.elementAt(index);
- }
-
-
- ICSSNode removeNode(int index) {
- if (this.nodes == null)
- return null; // no node
- if (index < 0 || index >= this.nodes.size())
- return null; // invalid parameter
-
- ICSSNode removed = (ICSSNode) this.nodes.elementAt(index);
- this.nodes.removeElementAt(index);
- return removed;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSAttrImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSAttrImpl.java
deleted file mode 100644
index 9a04a4f6c0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSAttrImpl.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNamedNodeMap;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-/**
- *
- */
-class CSSAttrImpl extends CSSRegionContainer implements ICSSAttr {
-
- private String fName = null;
- private String fValue = null;
- private CSSNodeImpl ownerCSSNode = null;
-
- CSSAttrImpl(CSSAttrImpl that) {
- super(that);
- this.fName = that.fName;
- this.setValue(that.fValue);
- }
-
- /**
- * CSSAttr constructor comment.
- */
- CSSAttrImpl(String name) {
- super();
- this.fName = name;
- }
-
- public ICSSNode cloneNode(boolean deep) {
- return new CSSAttrImpl(this);
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNamedNodeMap
- */
- public ICSSNamedNodeMap getAttributes() {
- return null;
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getName() {
- return fName;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return ATTR_NODE;
- }
-
- public ICSSNode getOwnerCSSNode() {
- return ownerCSSNode;
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getValue() {
- return fValue;
- }
-
- /**
- * @return boolean
- * @param name
- * java.lang.String
- */
- protected boolean matchName(String name) {
- if (name == null)
- return /* (this.name == null) */false;
- if (this.fName == null)
- return false;
- return this.fName.equals(name);
- }
-
- /**
- *
- */
- protected void notifyValueChanged(String oldValue) {
- if (this.ownerCSSNode == null)
- return;
-
- // for model
- ICSSDocument doc = ownerCSSNode.getContainerDocument();
- if (doc == null)
- return;
- CSSModelImpl model = (CSSModelImpl) doc.getModel();
- if (model == null)
- return;
- model.valueChanged(this, oldValue);
-
- // for adapters
- String value = getValue();
- this.ownerCSSNode.notify(CHANGE, this, oldValue, value, this.ownerCSSNode.getStartOffset());
- }
-
- /**
- * @param newName
- * java.lang.String
- */
- protected void setName(java.lang.String newName) {
- fName = newName;
- }
-
- protected void setOwnerCSSNode(CSSNodeImpl newOwnerCSSNode) {
- ownerCSSNode = newOwnerCSSNode;
- }
-
- /**
- * @param newValue
- * java.lang.String
- */
- public void setValue(java.lang.String newValue) {
- String oldValue = fValue;
- fValue = newValue;
-
- notifyValueChanged(oldValue);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSCharsetRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSCharsetRuleImpl.java
deleted file mode 100644
index 676c305bf0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSCharsetRuleImpl.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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-
-
-/**
- *
- */
-class CSSCharsetRuleImpl extends CSSRuleImpl implements ICSSCharsetRule {
-
- /**
- *
- */
- CSSCharsetRuleImpl() {
- super();
- }
-
- CSSCharsetRuleImpl(CSSCharsetRuleImpl that) {
- super(that);
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSCharsetRuleImpl cloned = new CSSCharsetRuleImpl(this);
-
- return cloned;
- }
-
- /**
- * The encoding information used in this <code>@charset</code> rule.
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the specified encoding value has a
- * syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding
- * rule is readonly.
- */
- public String getEncoding() {
- return CSSUtil.extractStringContents(getAttribute(ENCODING));
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return CHARSETRULE_NODE;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return CHARSET_RULE;
- }
-
- public void setEncoding(String encoding) throws org.w3c.dom.DOMException {
- String quote = CSSCorePlugin.getDefault().getPluginPreferences().getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- String enc = CSSUtil.extractStringContents(encoding);
- quote = CSSUtil.detectQuote(enc, quote);
- setAttribute(ENCODING, quote + enc + quote);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDeclarationItemParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDeclarationItemParser.java
deleted file mode 100644
index 58d9f05a14..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDeclarationItemParser.java
+++ /dev/null
@@ -1,1077 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICounter;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-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.text.TextRegionListImpl;
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-
-/**
- *
- */
-class CSSDeclarationItemParser {
- /**
- *
- */
- final class FloatInfo {
- /**
- *
- */
- FloatInfo(String text) {
- parse(text);
- }
-
- /**
- *
- */
- void parse(String text) {
- StringBuffer bufValue = new StringBuffer();
- StringBuffer bufIdent = new StringBuffer();
- boolean bNum = true;
- int len = text.length();
- for (int i = 0; i < len; i++) {
- char c = text.charAt(i);
- if (bNum) {
- if ('0' <= c && c <= '9' || c == '.' || c == '+' || c == '-') {
- bufValue.append(c);
- }
- else {
- bufIdent.append(c);
- bNum = false;
- }
- }
- else {
- bufIdent.append(c);
- }
- }
- String valueStr = bufValue.toString();
- fValue = Float.valueOf(valueStr).floatValue();
- fIdentifier = bufIdent.toString();
- fType = getFloatValueType(valueStr, fIdentifier);
- }
-
- /**
- *
- */
- float getValue() {
- return fValue;
- }
-
- /**
- *
- */
- String getIdentifier() {
- return fIdentifier;
- }
-
- /**
- *
- */
- short getValueType() {
- return fType;
- }
-
- private float fValue = 0.0f;
- private String fIdentifier = null;
- private short fType = CSSPrimitiveValue.CSS_UNKNOWN;
- }
-
- final static int S_NORMAL = 0;
- final static int S_FUNCTION = 1;
- final static int S_FONT_SLASH = 2;
- final static int S_COMMA_SEPARATION = 3;
- private ICSSDocument fDocument = null;
- private IStructuredDocumentRegion fParentRegion = null;
- private boolean fTempStructuredDocument = false;
- private CSSModelUpdateContext fUpdateContext = null;
-
- /**
- * CSSDeclarationItemParser constructor comment.
- */
- CSSDeclarationItemParser(ICSSDocument doc) {
- super();
- fDocument = doc;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createAttrValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("attr")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- if (valueRegions.size() != 1) {
- return null;
- }
-
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(CSSPrimitiveValue.CSS_ATTR);
- if (value == null) {
- return null;
- }
-
- ITextRegion region = valueRegions.get(0);
- value.setValue(getText(region));
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createCountersValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("counters")) { //$NON-NLS-1$
- return null;
- }
-
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT, CSSRegionContexts.CSS_DECLARATION_VALUE_STRING};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- int size = valueRegions.size();
- if (size != 2 && size != 3) {
- return null;
- }
-
- CounterImpl value = getCounter();
- if (value == null) {
- return null;
- }
-
- for (int i = 0; i < size; i++) {
- ITextRegion region = valueRegions.get(i);
- String text = getText(region);
- CSSAttrImpl attr = null;
- switch (i) {
- case 0 :
- value.setIdentifier(text);
- attr = value.getAttributeNode(ICounter.IDENTIFIER);
- break;
- case 1 :
- value.setSeparator(text);
- attr = value.getAttributeNode(ICounter.SEPARATOR);
- break;
- case 2 :
- value.setListStyle(text);
- attr = value.getAttributeNode(ICounter.LISTSTYLE);
- break;
- default :
- break;
- }
- if (attr != null) {
- attr.setRangeRegion(fParentRegion, region, region);
- }
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createCounterValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("counter")) { //$NON-NLS-1$
- return null;
- }
-
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- int size = valueRegions.size();
- if (size != 1 && size != 2) {
- return null;
- }
-
- CounterImpl value = getCounter();
- if (value == null) {
- return null;
- }
-
- for (int i = 0; i < size; i++) {
- ITextRegion region = valueRegions.get(i);
- String text = getText(region);
- CSSAttrImpl attr = null;
- switch (i) {
- case 0 :
- value.setIdentifier(text);
- attr = value.getAttributeNode(ICounter.IDENTIFIER);
- break;
- case 1 :
- value.setListStyle(text);
- attr = value.getAttributeNode(ICounter.LISTSTYLE);
- break;
- default :
- break;
- }
- if (attr != null) {
- attr.setRangeRegion(fParentRegion, region, region);
- }
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSStyleDeclItemImpl createDeclarationItem(ITextRegionList nodeRegions) {
- CSSStyleDeclItemImpl item = null;
- String name = getPropertyName(nodeRegions);
- if (name != null) {
- item = getCSSStyleDeclItem(name);
- }
- return item;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createFloatValue(String text, String type) {
- FloatInfo info = new FloatInfo(text);
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(info.getValueType());
- if (value != null) {
- value.setValue(info.getValue());
- }
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createFormatValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("format")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_STRING};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- // format can take variable args.
- if (valueRegions.size() == 0) {
- return null;
- }
-
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(ICSSPrimitiveValue.CSS_FORMAT);
- if (value == null) {
- return null;
- }
-
- ITextRegion region = valueRegions.get(0);
- value.setValue(CSSUtil.extractStringContents(getText(region)));
-
- return value;
-
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createLocalValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("local")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_STRING};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- if (valueRegions.size() != 1) {
- return null;
- }
-
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(ICSSPrimitiveValue.CSS_LOCAL);
- if (value == null) {
- return null;
- }
-
- ITextRegion region = valueRegions.get(0);
- value.setValue(CSSUtil.extractStringContents(getText(region)));
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createPrimitiveValue(ITextRegion region) {
- if (region == null) {
- return null;
- }
- CSSPrimitiveValueImpl value = null;
- String type = region.getType();
- String text = getText(region);
- if (isBlank(type)) {
- value = null;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || type == CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION || type == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- value = createFloatValue(text, type);
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_STRING || type == CSSRegionContexts.CSS_DECLARATION_VALUE_URI || type == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || type == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- value = createStringValue(text, type);
- }
-
- if (value == null) {
- value = createStringValue(text, type);
- }
-
- if (!fTempStructuredDocument && value != null) {
- value.setRangeRegion(fParentRegion, region, region);
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createPrimitiveValue(ITextRegionList regions) {
- CSSPrimitiveValueImpl value = null;
- CSSUtil.stripSurroundingSpace(regions);
- if (regions.isEmpty()) {
- return null;
- }
- ITextRegion region = regions.get(0);
- if (region == null) {
- return null;
- }
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- String text = getText(region).toLowerCase();
- if (text.equals("rgb(")) { //$NON-NLS-1$
- value = createRgbValue(regions);
- }
- else if (text.equals("counter(")) { //$NON-NLS-1$
- value = createCounterValue(regions);
- }
- else if (text.equals("counters(")) { //$NON-NLS-1$
- value = createCountersValue(regions);
- }
- else if (text.equals("attr(")) { //$NON-NLS-1$
- value = createAttrValue(regions);
- }
- else if (text.equals("format(")) { //$NON-NLS-1$
- value = createFormatValue(regions);
- }
- else if (text.equals("local(")) { //$NON-NLS-1$
- value = createLocalValue(regions);
- }
- else if (text.equals("rect(")) { //$NON-NLS-1$
- value = createRectValue(regions);
- }
- if (value == null) {
- value = createStringValue(regions);
- }
- }
- else {
- value = createStringValue(regions);
- }
-
- if (!fTempStructuredDocument && value != null) {
- value.setRangeRegion(fParentRegion, regions.get(0), regions.get(regions.size() - 1));
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createRectValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("rect")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION, CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT}; // IDENT:
- // for
- // 'auto'
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- if (valueRegions.size() != 4) {
- return null;
- }
-
- RectImpl value = getRect();
- if (value == null) {
- return null;
- }
-
- for (int i = 0; i < 4; i++) {
- ITextRegion region = valueRegions.get(i);
- CSSPrimitiveValueImpl childValue = null;
- switch (i) {
- case 0 :
- childValue = (CSSPrimitiveValueImpl) value.getTop();
- break;
- case 1 :
- childValue = (CSSPrimitiveValueImpl) value.getRight();
- break;
- case 2 :
- childValue = (CSSPrimitiveValueImpl) value.getBottom();
- break;
- case 3 :
- childValue = (CSSPrimitiveValueImpl) value.getLeft();
- break;
- default :
- break;
- }
- if (childValue == null) {
- return null;
- }
- String text = getText(region);
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- setStringValue(childValue, text, type);
- }
- else {
- setFloatValue(childValue, text, type);
- }
- if (!fTempStructuredDocument) {
- childValue.setRangeRegion(fParentRegion, region, region);
- }
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createRgbValue(ITextRegionList regions) {
- String funcName = getFunctionName(regions);
- if (funcName == null || !funcName.toLowerCase().equals("rgb")) { //$NON-NLS-1$
- return null;
- }
- String accepts[] = {CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE};
- ITextRegionList valueRegions = getFunctionParameters(regions, accepts);
- if (valueRegions.size() != 3) {
- return null;
- }
-
- RGBColorImpl value = getRGBColor();
- if (value == null) {
- return null;
- }
-
- for (int i = 0; i < 3; i++) {
- ITextRegion region = valueRegions.get(i);
- CSSPrimitiveValueImpl childValue = null;
- switch (i) {
- case 0 :
- childValue = (CSSPrimitiveValueImpl) value.getRed();
- break;
- case 1 :
- childValue = (CSSPrimitiveValueImpl) value.getGreen();
- break;
- case 2 :
- childValue = (CSSPrimitiveValueImpl) value.getBlue();
- break;
- default :
- break;
- }
- if (childValue == null) {
- return null;
- }
- setFloatValue(childValue, getText(region), region.getType());
- if (!fTempStructuredDocument) {
- childValue.setRangeRegion(fParentRegion, region, region);
- }
- }
-
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createStringValue(String text, String type) {
- short valueType = getStringValueType(text, type);
- CSSPrimitiveValueImpl value = getCSSPrimitiveValue(valueType);
- if (value != null) {
- if (valueType == CSSPrimitiveValue.CSS_URI) {
- text = CSSUtil.extractUriContents(text);
- }
- else if (valueType == CSSPrimitiveValue.CSS_STRING) {
- text = CSSUtil.extractStringContents(text);
- }
- value.setValue(text);
- }
- return value;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl createStringValue(ITextRegionList regions) {
- String type = CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT;
- if (regions.size() == 1) {
- ITextRegion region = regions.get(0);
- type = region.getType();
- }
- return createStringValue(makeString(regions), type);
- }
-
- /**
- *
- */
- private CounterImpl getCounter() {
- CounterImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getCounter();
- }
- else {
- node = (CounterImpl) fDocument.createCSSPrimitiveValue(CSSPrimitiveValue.CSS_COUNTER);
- }
- return node;
- }
-
- /**
- *
- */
- private CSSPrimitiveValueImpl getCSSPrimitiveValue(short type) {
- CSSPrimitiveValueImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSPrimitiveValue(type);
- }
- else {
- node = (CSSPrimitiveValueImpl) fDocument.createCSSPrimitiveValue(type);
- }
- return node;
- }
-
- /**
- *
- */
- private CSSStyleDeclItemImpl getCSSStyleDeclItem(String propertyName) {
- CSSStyleDeclItemImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSStyleDeclItem(propertyName);
- }
- else {
- node = (CSSStyleDeclItemImpl) fDocument.createCSSStyleDeclItem(propertyName);
- }
- return node;
- }
-
- /**
- *
- */
- static short getFloatValueType(String ident) {
- ident = ident.toLowerCase();
- short valueType;
- if (ident.length() == 0) {
- valueType = CSSPrimitiveValue.CSS_NUMBER;
- }
- else if (ident.equals("%")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PERCENTAGE;
- }
- else if (ident.equalsIgnoreCase("em")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_EMS;
- }
- else if (ident.equalsIgnoreCase("ex")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_EXS;
- }
- else if (ident.equalsIgnoreCase("px")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PX;
- }
- else if (ident.equalsIgnoreCase("cm")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_CM;
- }
- else if (ident.equalsIgnoreCase("mm")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_MM;
- }
- else if (ident.equalsIgnoreCase("in")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_IN;
- }
- else if (ident.equalsIgnoreCase("pt")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PT;
- }
- else if (ident.equalsIgnoreCase("pc")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PC;
- }
- else if (ident.equalsIgnoreCase("deg")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_DEG;
- }
- else if (ident.equalsIgnoreCase("rad")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_RAD;
- }
- else if (ident.equalsIgnoreCase("grad")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_GRAD;
- }
- else if (ident.equalsIgnoreCase("ms")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_MS;
- }
- else if (ident.equalsIgnoreCase("s")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_S;
- }
- else if (ident.equalsIgnoreCase("hz")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_HZ;
- }
- else if (ident.equalsIgnoreCase("khz")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_KHZ;
- }
- else {
- valueType = CSSPrimitiveValue.CSS_DIMENSION;
- }
- return valueType;
- }
-
- /**
- *
- */
- static short getFloatValueType(String value, String ident) {
- ident = ident.toLowerCase();
- short valueType;
- if (ident.length() == 0) {
- if (0 <= value.indexOf('.')) {
- valueType = CSSPrimitiveValue.CSS_NUMBER;
- }
- else {
- valueType = ICSSPrimitiveValue.CSS_INTEGER;
- }
- }
- else if (ident.equals("%")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PERCENTAGE;
- }
- else if (ident.equalsIgnoreCase("em")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_EMS;
- }
- else if (ident.equalsIgnoreCase("ex")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_EXS;
- }
- else if (ident.equalsIgnoreCase("px")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PX;
- }
- else if (ident.equalsIgnoreCase("cm")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_CM;
- }
- else if (ident.equalsIgnoreCase("mm")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_MM;
- }
- else if (ident.equalsIgnoreCase("in")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_IN;
- }
- else if (ident.equalsIgnoreCase("pt")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PT;
- }
- else if (ident.equalsIgnoreCase("pc")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_PC;
- }
- else if (ident.equalsIgnoreCase("deg")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_DEG;
- }
- else if (ident.equalsIgnoreCase("rad")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_RAD;
- }
- else if (ident.equalsIgnoreCase("grad")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_GRAD;
- }
- else if (ident.equalsIgnoreCase("ms")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_MS;
- }
- else if (ident.equalsIgnoreCase("s")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_S;
- }
- else if (ident.equalsIgnoreCase("hz")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_HZ;
- }
- else if (ident.equalsIgnoreCase("khz")) { //$NON-NLS-1$
- valueType = CSSPrimitiveValue.CSS_KHZ;
- }
- else {
- valueType = CSSPrimitiveValue.CSS_DIMENSION;
- }
- return valueType;
- }
-
- /**
- *
- */
- private String getFunctionName(ITextRegionList regions) {
- if (regions == null || regions.size() < 2) {
- return null;
- }
- ITextRegion firstRegion = regions.get(0);
- if (firstRegion.getType() != CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- return null;
- }
- ITextRegion lastRegion = regions.get(regions.size() - 1);
- if (lastRegion.getType() != CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- return null;
- }
- String text = getText(firstRegion);
- return text.substring(0, text.length() - 1);
- }
-
- /**
- * this method has no validation check, then regions must be passed
- * getFunctionName()...
- */
- private ITextRegionList getFunctionParameters(ITextRegionList regions, String[] accepts) {
- ITextRegionList newRegions = new TextRegionListImpl();
- int nAccepts = (accepts != null) ? accepts.length : 0;
- Iterator i = regions.iterator();
- i.next(); // skip FUNCTION
- while (i.hasNext()) {
- ITextRegion region = (ITextRegion) i.next();
- if (region == null) {
- continue;
- }
- String type = region.getType();
- if (isBlank(type)) {
- continue;
- }
- if (nAccepts == 0) {
- newRegions.add(region);
- }
- else {
- for (int iAccept = 0; iAccept < nAccepts; iAccept++) {
- if (type == accepts[iAccept]) {
- newRegions.add(region);
- break;
- }
- }
- }
- }
- return newRegions;
- }
-
- /**
- *
- */
- // private String getPropertyName(IStructuredDocumentRegion flatNode) {
- // Vector nodeRegions = new Vector(flatNode.getRegions());
- // return getPropertyName(nodeRegions);
- // }
- /**
- *
- */
- private String getPropertyName(ITextRegionList nodeRegions) {
- ITextRegionList nameRegions = new TextRegionListImpl();
- String name = null;
- while (!nodeRegions.isEmpty()) {
- ITextRegion region = nodeRegions.remove(0);
- if (region == null) {
- continue;
- }
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- CSSUtil.stripSurroundingSpace(nameRegions);
- name = makeString(nameRegions);
- break;
- }
- else {
- nameRegions.add(region);
- }
- }
- return name;
- }
-
- /**
- *
- */
- private RectImpl getRect() {
- RectImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getRect();
- }
- else {
- node = (RectImpl) fDocument.createCSSPrimitiveValue(CSSPrimitiveValue.CSS_RECT);
- }
- return node;
- }
-
- /**
- *
- */
- private RGBColorImpl getRGBColor() {
- RGBColorImpl node;
- if (fUpdateContext != null && fUpdateContext.isActive()) {
- node = fUpdateContext.getRGBColor();
- }
- else {
- node = (RGBColorImpl) fDocument.createCSSPrimitiveValue(CSSPrimitiveValue.CSS_RGBCOLOR);
- }
- return node;
- }
-
- /**
- *
- */
- private short getStringValueType(String text, String type) {
- short valueType;
- if (text.toLowerCase().equals("inherit")) { //$NON-NLS-1$
- valueType = ICSSPrimitiveValue.CSS_INHERIT_PRIMITIVE;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- valueType = CSSPrimitiveValue.CSS_URI;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_STRING) {
- valueType = CSSPrimitiveValue.CSS_STRING;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- valueType = ICSSPrimitiveValue.CSS_HASH;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && text.equals(",")) { //$NON-NLS-1$
- valueType = ICSSPrimitiveValue.CSS_COMMA;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && text.equals("/")) { //$NON-NLS-1$
- valueType = ICSSPrimitiveValue.CSS_SLASH;
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE) {
- valueType = ICSSPrimitiveValue.CSS_URANGE;
- }
- else {
- valueType = CSSPrimitiveValue.CSS_IDENT;
- }
- return valueType;
- }
-
- /**
- *
- */
- private String makeString(ITextRegionList regions) {
- StringBuffer buf = new StringBuffer();
- boolean bSpace = false;
- for (Iterator i = regions.iterator(); i.hasNext();) {
- ITextRegion region = (ITextRegion) i.next();
- String type = region.getType();
- if (!bSpace && isBlank(type)) {
- buf.append(" "); //$NON-NLS-1$
- bSpace = true;
- }
- else {
- buf.append(getText(region));
- bSpace = false;
- }
- }
-
- return buf.toString();
- }
-
- /**
- *
- */
- void setStructuredDocumentTemporary(boolean bTemp) {
- fTempStructuredDocument = bTemp;
- }
-
- /**
- *
- */
- private void setFloatValue(CSSPrimitiveValueImpl value, String text, String type) {
- FloatInfo info = new FloatInfo(text);
- value.setFloatValue(info.getValueType(), info.getValue());
- }
-
- /**
- *
- */
- private void setStringValue(CSSPrimitiveValueImpl value, String text, String type) {
- short valueType = getStringValueType(text, type);
- value.setStringValue(valueType, text);
- }
-
- /**
- * @param item
- * org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclItem
- * @param nodeRegions
- * java.util.Vector
- */
- private void setupImportantAttribute(ICSSStyleDeclItem item, ITextRegionList nodeRegions) {
- if (item == null || nodeRegions == null || nodeRegions.isEmpty()) {
- return;
- }
- ITextRegion region = nodeRegions.get(nodeRegions.size() - 1);
- if (region != null && region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT) {
- item.setPriority(getText(region));
- CSSAttrImpl attr = ((CSSStyleDeclItemImpl) item).getAttributeNode(ICSSStyleDeclItem.IMPORTANT);
- attr.setRangeRegion(fParentRegion, region, region);
- nodeRegions.remove(region);
- }
- }
-
- /**
- *
- */
- void setUpdateContext(CSSModelUpdateContext updateContext) {
- fUpdateContext = updateContext;
- }
-
- /**
- *
- */
- public static boolean hasColonSeparator(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return false;
- }
- ITextRegionList regions = flatNode.getRegions();
- if (regions == null || regions.size() == 0) {
- return false;
- }
-
- for (Iterator i = regions.iterator(); i.hasNext();) {
- ITextRegion region = (ITextRegion) i.next();
- if (region == null) {
- continue;
- }
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- CSSStyleDeclItemImpl setupDeclarationItem(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return null;
- }
- if (!hasColonSeparator(flatNode)) {
- return null;
- }
-
- fParentRegion = flatNode;
-
- ITextRegionList nodeRegions = new TextRegionListImpl(flatNode.getRegions()); // make
- // copy
- CSSStyleDeclItemImpl newItem = createDeclarationItem(nodeRegions);
- if (newItem == null) {
- return null;
- }
- if (!fTempStructuredDocument && flatNode != null) {
- newItem.setRangeStructuredDocumentRegion(flatNode, flatNode);
- }
-
- CSSUtil.stripSurroundingSpace(nodeRegions);
- setupImportantAttribute(newItem, nodeRegions);
- // Now, nodeRegions just has regions for value.
- setupValues(newItem, nodeRegions);
- return newItem;
- }
-
- void setupValues(ICSSStyleDeclItem item, IStructuredDocumentRegion parentRegion, ITextRegionList nodeRegions) {
- fParentRegion = parentRegion;
- setupValues(item, nodeRegions);
- }
-
- /**
- * nodeRegions must be broken. If you need after, make copy of them.
- */
- private void setupValues(ICSSStyleDeclItem item, ITextRegionList nodeRegions) {
- if (item == null) {
- return;
- }
-
- ICSSPrimitiveValue value;
- ITextRegionList regionBuf = new TextRegionListImpl();
-
- String propertyName = item.getPropertyName().toLowerCase();
- boolean bFont = (propertyName.equals(PropCMProperty.P_FONT));
- // (short-hand) font
- int status = (propertyName.equals(PropCMProperty.P_VOICE_FAMILY) || propertyName.equals(PropCMProperty.P_FONT_FAMILY)) ? S_COMMA_SEPARATION : S_NORMAL;
- while (!nodeRegions.isEmpty()) {
- value = null;
- ITextRegion region = nodeRegions.remove(0);
- if (region == null) {
- continue;
- }
- String type = region.getType();
- // if (type == CSSRegionContexts.CSS_DECLARATION_DELIMITER || type
- // == CSSRegionContexts.CSS_RBRACE) {
- // break;
- // }
- switch (status) {
- case S_NORMAL :
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- regionBuf.add(region);
- status = S_FUNCTION;
- }
- else if (bFont && type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && fParentRegion.getText(region).equals("/")) { //$NON-NLS-1$
- value = createPrimitiveValue(region);
- status = S_FONT_SLASH;
- }
- else if (!isBlank(type)) {
- value = createPrimitiveValue(region);
- }
- break;
- case S_FUNCTION :
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- regionBuf.add(region);
- value = createPrimitiveValue(regionBuf);
- regionBuf.clear();
- status = S_NORMAL;
- }
- else if (!isBlank(type)) {
- regionBuf.add(region);
- }
- break;
- case S_FONT_SLASH :
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION) {
- value = createPrimitiveValue(region);
- status = S_COMMA_SEPARATION;
- }
- else if (!isBlank(type)) {
- value = createPrimitiveValue(region);
- }
- break;
- case S_COMMA_SEPARATION :
- if (type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && fParentRegion.getText(region).equals(",")) { //$NON-NLS-1$
- value = createPrimitiveValue(regionBuf);
- regionBuf.clear();
- if (value != null) {
- if (fUpdateContext == null || !fUpdateContext.isActive()) {
- item.appendValue(value);
- }
- }
- value = createPrimitiveValue(region);
- }
- else {
- regionBuf.add(region);
- }
- break;
- default :
- break;
- }
- if (value != null) {
- if (fUpdateContext == null || !fUpdateContext.isActive()) {
- item.appendValue(value);
- }
- }
- }
- if (!regionBuf.isEmpty()) {
- value = createPrimitiveValue(regionBuf);
- if (fUpdateContext == null || !fUpdateContext.isActive()) {
- item.appendValue(value);
- }
- }
- }
-
- private String getText(ITextRegion region) {
- return (fParentRegion != null) ? fParentRegion.getText(region) : ""; //$NON-NLS-1$
- }
-
- private static boolean isBlank(String type) {
- return (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT || type == CSSRegionContexts.CSS_DECLARATION_VALUE_S);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDocumentImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDocumentImpl.java
deleted file mode 100644
index e3a543bc83..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDocumentImpl.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPageRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSUnknownRule;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-abstract class CSSDocumentImpl extends CSSStructuredDocumentRegionContainer implements ICSSDocument {
-
- private CSSModelImpl fModel = null;
-
- /**
- * CSSDocumentImpl constructor comment.
- */
- CSSDocumentImpl() {
- super();
- }
-
-
- CSSDocumentImpl(CSSDocumentImpl that) {
- super(that);
- }
-
- ICSSNode createCSSAttr(String name) {
- CSSAttrImpl attr = new CSSAttrImpl(name);
- attr.setOwnerDocument(this);
-
- return attr;
- }
-
- /**
- * @return org.w3c.dom.css.CSSCharsetRule
- */
- public ICSSCharsetRule createCSSCharsetRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSFontFaceRule
- */
- public CSSFontFaceRule createCSSFontFaceRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSImportRule
- */
- public ICSSImportRule createCSSImportRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.ICSSMediaRule
- */
- public ICSSMediaRule createCSSMediaRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPageRule
- */
- public ICSSPageRule createCSSPageRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- */
- public ICSSPrimitiveValue createCSSPrimitiveValue(short primitiveType) {
- CSSPrimitiveValueImpl value = null;
- if (primitiveType == CSSPrimitiveValue.CSS_COUNTER)
- value = new CounterImpl();
- else if (primitiveType == CSSPrimitiveValue.CSS_RECT)
- value = new RectImpl();
- else if (primitiveType == CSSPrimitiveValue.CSS_RGBCOLOR)
- value = new RGBColorImpl();
- else
- value = new CSSPrimitiveValueImpl(primitiveType);
- value.setOwnerDocument(this);
-
- return value;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * java.lang.String
- */
- public CSSRule createCSSRule(String rule) {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleDeclaration
- */
- public ICSSStyleDeclaration createCSSStyleDeclaration() {
- return null;
- }
-
- public ICSSStyleDeclItem createCSSStyleDeclItem(String propertyName) {
- CSSStyleDeclItemImpl item = new CSSStyleDeclItemImpl(propertyName);
- item.setOwnerDocument(this);
-
- return item;
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleRule
- */
- public ICSSStyleRule createCSSStyleRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSUnknownRule
- */
- public CSSUnknownRule createCSSUnknownRule() {
- return null;
- }
-
- /**
- * @return org.w3c.dom.stylesheets.MediaList
- */
- public MediaList createMediaList() {
- return null;
- }
-
- public ICSSModel getModel() {
- return fModel;
- }
-
- void setModel(CSSModelImpl model) {
- this.fModel = model;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSFontFaceRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSFontFaceRuleImpl.java
deleted file mode 100644
index 10cd9f7f61..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSFontFaceRuleImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.w3c.dom.css.CSSFontFaceRule;
-
-
-/**
- *
- */
-class CSSFontFaceRuleImpl extends CSSRuleDeclContainer implements CSSFontFaceRule {
-
- /**
- *
- */
- CSSFontFaceRuleImpl() {
- super();
- }
-
- CSSFontFaceRuleImpl(CSSFontFaceRuleImpl that) {
- super(that);
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSFontFaceRuleImpl cloned = new CSSFontFaceRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return java.lang.String
- */
- String extractPreString() {
- return "@font-face";//$NON-NLS-1$
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return FONTFACERULE_NODE;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return FONT_FACE_RULE;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java
deleted file mode 100644
index 4fa385b825..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java
+++ /dev/null
@@ -1,227 +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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.provisional.adapters.IModelProvideAdapter;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.internal.util.CSSLinkConverter;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.css.core.internal.util.URLModelProviderCSS;
-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.provisional.document.IDOMNode;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSStyleSheet;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- * currently public but may be made default access protected in future.
- */
-public class CSSImportRuleImpl extends CSSRuleImpl implements ICSSImportRule {
-
- private boolean fDirty = true;
- private ICSSStyleSheet fStyleSheet;
-
- /**
- * currently public but may be made default access protected in future.
- */
- public CSSImportRuleImpl() {
- super();
- }
- /**
- * currently public but may be made default access protected in future.
- */
- public CSSImportRuleImpl(CSSImportRuleImpl that) {
- super(that);
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSImportRuleImpl cloned = new CSSImportRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- *
- */
- void closeStyleSheet() {
- if (fStyleSheet != null) {
- ICSSStyleSheet sheet = fStyleSheet;
- fStyleSheet = null; // to prevent loop, we must reset fStyleSheet
- // before all closing action
-
- sheet.getModel().removeStyleListener(getOwnerDocument().getModel());
- // get ModelProvideAdapter
- IModelProvideAdapter adapter = (IModelProvideAdapter) getAdapterFor(IModelProvideAdapter.class);
- // if (getOwnerDocument().getModel().getStyleSheetType() ==
- // ICSSModel.EMBEDDED) { // case STYLE tag
- // adapter = (ModelProvideAdapter)
- // ((INodeNotifier)getOwnerDocument().getModel().getOwnerDOMNode()).getAdapterFor(ModelProvideAdapter.class);
- // }
- if (adapter != null)
- adapter.modelRemoved(sheet.getModel());
-
- sheet.getModel().releaseFromRead();
- }
- }
-
- /**
- * The location of the style sheet to be imported. The attribute will not
- * contain the <code>"url(...)"</code> specifier around the URI.
- */
- public String getHref() {
- return CSSUtil.extractUriContents(getAttribute(HREF));
- }
-
- /**
- * A list of media types for which this style sheet may be used.
- */
- public org.w3c.dom.stylesheets.MediaList getMedia() {
- ICSSNode media = getFirstChild();
- if (media != null) {
- if (media instanceof MediaList) {
- return (MediaList) media;
- }
- }
-
- // THIS CASE IS ERROR CASE
- return null;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return IMPORTRULE_NODE;
- }
-
- /**
- * The style sheet referred to by this rule, if it has been loaded. The
- * value of this attribute is <code>null</code> if the style sheet has
- * not yet been loaded or if it will not be loaded (e.g. if the style
- * sheet is for a media type not supported by the user agent).
- */
- public CSSStyleSheet getStyleSheet() {
-
- if (fDirty) {
- // NOTE: try/catch block is a TEMP fix to avoid compile errors:
- try {
- closeStyleSheet();
-
- if (getHref() == null || getHref().length() <= 0) {
- fDirty = false;
- return null;
- }
-
- IStructuredModel baseModel = getOwnerDocument().getModel();
- if (getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED) { // case
- // STYLE
- // tag
- baseModel = ((IDOMNode) getOwnerDocument().getModel().getOwnerDOMNode()).getModel();
- }
- // get ModelProvideAdapter
- IModelProvideAdapter adapter = (IModelProvideAdapter) getAdapterFor(IModelProvideAdapter.class);
- // if (getOwnerDocument().getModel().getStyleSheetType() ==
- // ICSSModel.EMBEDDED) { // case STYLE tag
- // adapter = (ModelProvideAdapter)
- // ((INodeNotifier)getOwnerDocument().getModel().getOwnerDOMNode()).getAdapterFor(ModelProvideAdapter.class);
- // }
-
- // load model from IModelManager
- URLModelProviderCSS provider = new URLModelProviderCSS();
- IStructuredModel newModel = provider.getModelForRead(baseModel, getHref());
- fDirty = false;
-
- if (newModel == null)
- return null;
- if (!(newModel instanceof ICSSModel)) {
- newModel.releaseFromRead();
- return null;
- }
-
- // notify adapter
- if (adapter != null)
- adapter.modelProvided(newModel);
-
- fStyleSheet = (ICSSStyleSheet) ((ICSSModel) newModel).getDocument();
- if (fStyleSheet != null)
- fStyleSheet.getModel().addStyleListener(getOwnerDocument().getModel());
- }
- catch (java.io.IOException e) {
- Logger.logException(e);
- }
- }
- return fStyleSheet;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return IMPORT_RULE;
- }
-
- /**
- *
- */
- public void refreshStyleSheet() {
- if (!fDirty) {
- closeStyleSheet();
- fDirty = true;
- notify(INodeNotifier.CHANGE, getAttributeNode(HREF), null, null, getStartOffset());
- }
- }
-
- /**
- */
- void releaseRule() {
- if (fStyleSheet != null) {
- ICSSStyleSheet sheet = fStyleSheet;
- fStyleSheet = null; // to prevent loop, we must reset fStyleSheet
- // before all closing action
-
- sheet.getModel().removeStyleListener(getOwnerDocument().getModel());
- // get ModelProvideAdapter
- IModelProvideAdapter adapter = (IModelProvideAdapter) getAdapterFor(IModelProvideAdapter.class);
- // if (getOwnerDocument().getModel().getStyleSheetType() ==
- // ICSSModel.EMBEDDED) { // case STYLE tag
- // adapter = (ModelProvideAdapter)
- // ((INodeNotifier)getOwnerDocument().getModel().getOwnerDOMNode()).getAdapterFor(ModelProvideAdapter.class);
- // }
- if (adapter != null)
- adapter.modelReleased(sheet.getModel());
-
- sheet.getModel().releaseFromRead();
- }
- }
-
- /**
- * @param href
- * java.lang.String
- */
- public void setHref(String href) throws DOMException {
- fDirty = true;
- setAttribute(HREF, CSSLinkConverter.addFunc(href));
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSMediaRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSMediaRuleImpl.java
deleted file mode 100644
index 0175c877e3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSMediaRuleImpl.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSRuleList;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-class CSSMediaRuleImpl extends CSSRuleImpl implements ICSSMediaRule {
-
- /**
- *
- */
- CSSMediaRuleImpl() {
- super();
- }
-
- CSSMediaRuleImpl(CSSMediaRuleImpl that) {
- super(that);
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule appendRule(org.w3c.dom.css.CSSRule rule) throws org.w3c.dom.DOMException {
- if (rule == null)
- return null;
-
- CSSRule ret = (CSSRule) appendChild((CSSNodeImpl) rule);
- return ret;
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSMediaRuleImpl cloned = new CSSMediaRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * Used to delete a rule from the media block.
- *
- * @param index
- * The index within the media block's rule collection of the
- * rule to remove.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified index does not
- * correspond to a rule in the media rule list. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule
- * is readonly.
- */
- public void deleteRule(int index) throws DOMException {
- CSSNodeImpl node = getIndexedRule(index);
- if (node != null)
- removeChild(node);
- }
-
- /**
- * A list of all CSS rules contained within the media block.
- */
- public CSSRuleList getCssRules() {
- CSSRuleListImpl list = new CSSRuleListImpl();
-
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSRule)
- list.appendNode(node);
- }
-
- return list;
- }
-
- CSSRuleImpl getIndexedRule(int index) {
- if (index < 0)
- return null;
-
- int i = 0;
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSRule) {
- if (i++ == index)
- return (CSSRuleImpl) node;
- }
- }
- return null;
- }
-
- /**
- * A list of media types for this rule.
- */
- public MediaList getMedia() {
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof MediaListImpl)
- return (MediaList) node;
- }
-
- return null;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return MEDIARULE_NODE;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return MEDIA_RULE;
- }
-
- /**
- * Used to insert a new rule into the media block.
- *
- * @param rule
- * The parsable text representing the rule. For rule sets this
- * contains both the selector and the style declaration. For
- * at-rules, this specifies both the at-identifier and the rule
- * content.
- * @param index
- * The index within the media block's rule collection of the
- * rule before which to insert the specified rule. If the
- * specified index is equal to the length of the media blocks's
- * rule collection, the rule will be added to the end of the
- * media block.
- * @return The index within the media block's rule collection of the newly
- * inserted rule.
- * @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be
- * inserted at the specified index, e.g., if an
- * <code>@import</code> rule is inserted after a standard rule set or other
- * at-rule. <br>
- * INDEX_SIZE_ERR: Raised if the specified index is not a valid
- * insertion point. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is
- * readonly. <br>
- * SYNTAX_ERR: Raised if the specified rule has a syntax error and
- * is unparsable.
- */
- public int insertRule(String rule, int index) throws DOMException {
- int length = getCssRules().getLength();
- if (index < 0 || length < index)
- throw new DOMException(DOMException.INDEX_SIZE_ERR, "");//$NON-NLS-1$
-
- CSSRuleImpl refRule = (length != index) ? getIndexedRule(index) : null;
-
- CSSRuleImpl newRule = (CSSRuleImpl) getOwnerDocument().createCSSRule(rule);
-
- // prevent from nesting @media rule
- if (newRule.getType() == CSSRule.MEDIA_RULE)
- throw new DOMException(DOMException.SYNTAX_ERR, "");//$NON-NLS-1$
-
- insertBefore(newRule, refRule);
-
- return index;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newRule
- * org.w3c.dom.css.CSSRule
- * @param refRule
- * org.w3c.dom.css.CSSRule
- */
- public org.w3c.dom.css.CSSRule insertRuleBefore(org.w3c.dom.css.CSSRule newRule, org.w3c.dom.css.CSSRule refRule) throws org.w3c.dom.DOMException {
- if (newRule == null && refRule == null)
- return null;
-
- CSSRule ret = (CSSRule) insertBefore((CSSNodeImpl) newRule, (CSSNodeImpl) refRule);
- return ret;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule removeRule(org.w3c.dom.css.CSSRule rule) throws org.w3c.dom.DOMException {
- if (rule == null)
- return null;
-
- CSSRule ret = (CSSRule) removeChild((CSSNodeImpl) rule);
- return ret;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newChild
- * org.w3c.dom.css.CSSRule
- * @param oldChild
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule replaceRule(org.w3c.dom.css.CSSRule newRule, org.w3c.dom.css.CSSRule oldRule) throws org.w3c.dom.DOMException {
- if (newRule == null && oldRule == null)
- return null;
-
- CSSRule ret = (CSSRule) replaceChild((CSSNodeImpl) newRule, (CSSNodeImpl) oldRule);
- return ret;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelCreationContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelCreationContext.java
deleted file mode 100644
index 8494a09af6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelCreationContext.java
+++ /dev/null
@@ -1,155 +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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-
-/**
- * currently public but may be made default access protected in future.
- */
-public class CSSModelCreationContext {
-
- private CSSNodeImpl fRootNode = null;
- private CSSNodeImpl fTargetNode = null;
- private CSSNodeImpl fNextNode = null;
- private int fReparseStart = -1;
- private int fReparseEnd = -1;
-
- /**
- * CSSModelContext constructor comment.
- */
- CSSModelCreationContext(CSSNodeImpl rootNode) {
- super();
-
- fRootNode = rootNode;
- }
-
- /**
- *
- */
- void clear() {
- fNextNode = null;
- fTargetNode = null;
- resetReparseRange();
- }
-
- /**
- * currently public but may be made default access protected in future.
- */
- public CSSNodeImpl getNextNode() {
- return fNextNode;
- }
-
- /**
- *
- */
- int getReparseEnd() {
- return fReparseEnd;
- }
-
- /**
- *
- */
- int getReparseStart() {
- return fReparseStart;
- }
-
- /**
- *
- */
- CSSNodeImpl getRootNode() {
- return fRootNode;
- }
-
- /**
- * currently public but may be made default access protected in future.
- */
- public CSSNodeImpl getTargetNode() {
- return fTargetNode;
- }
-
- /**
- *
- */
- boolean isToReparse() {
- return (0 <= getReparseStart() && 0 <= getReparseEnd());
- }
-
- /**
- *
- */
- void resetReparseRange() {
- fReparseStart = fReparseEnd = -1;
- }
-
- /**
- *
- */
- void setLast() {
- fNextNode = null;
-
- if (!(fRootNode instanceof CSSStructuredDocumentRegionContainer)) {
- fTargetNode = fRootNode;
- }
- else {
- IStructuredDocumentRegion lastStructuredDocumentRegion = ((CSSStructuredDocumentRegionContainer) fRootNode).getLastStructuredDocumentRegion();
- CSSNodeImpl node = fRootNode;
- while (node != null) {
- ICSSNode lastChild = node.getLastChild();
- if (lastChild instanceof CSSStructuredDocumentRegionContainer && ((CSSStructuredDocumentRegionContainer) lastChild).getLastStructuredDocumentRegion() == lastStructuredDocumentRegion) {
- node = (CSSNodeImpl) lastChild;
- }
- else {
- break;
- }
- }
- fTargetNode = node;
- }
- }
-
- /**
- *
- */
- void setNextNode(ICSSNode node) {
- fNextNode = (CSSNodeImpl) node;
- if (fNextNode != null) {
- fTargetNode = (CSSNodeImpl) fNextNode.getParentNode();
- }
- }
-
- /**
- *
- */
- void setReparseEnd(int end) {
- fReparseEnd = end;
- }
-
- /**
- *
- */
- void setReparseStart(int start) {
- fReparseStart = start;
- }
-
- /**
- *
- */
- void setTargetNode(ICSSNode node) {
- fTargetNode = (CSSNodeImpl) node;
- if (fNextNode != null && fNextNode.getParentNode() != fTargetNode) {
- fNextNode = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelDeletionContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelDeletionContext.java
deleted file mode 100644
index a864d433d0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelDeletionContext.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.wst.css.core.internal.document;
-
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList;
-
-
-/**
- *
- */
-class CSSModelDeletionContext {
-
- private int fOldStart = -1;
- private int fOldLength = 0;
- private int fNewStart = -1;
- private int fNewLength = 0;
- private int fLengthDifference = 0;
- private IStructuredDocumentRegionList fOldStructuredDocumentRegions = null;
- // private ICSSNode fRootNode = null;
- private int fRemovedRangeBegin = -1;
- private int fRemovedRangeEnd = -1;
- private CSSNodeListImpl fNodesToBeRemoved = new CSSNodeListImpl();
-
- /**
- * CSSModelDeletionContext constructor comment.
- */
- CSSModelDeletionContext(ICSSNode rootNode) {
- super();
-
- // fRootNode = rootNode;
- }
-
- /**
- *
- */
- boolean addNodeToBeRemoved(ICSSNode node) {
- int nNodes = fNodesToBeRemoved.getLength();
- for (int i = 0; i < nNodes; i++) {
- ICSSNode parent = fNodesToBeRemoved.item(i);
- if (CSSModelUtil.isParentOf(parent, node)) {
- return false;
- }
- }
- fNodesToBeRemoved.appendNode(node);
- return true;
- }
-
- /**
- *
- */
- void expandRemovedRangeBegin(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return;
- }
- int newBegin = flatNode.getStart(); // fOldStart == fNewStart, right??
- if (fRemovedRangeBegin < 0 || newBegin < fRemovedRangeBegin) {
- fRemovedRangeBegin = newBegin;
- }
- }
-
- /**
- *
- */
- void expandRemovedRangeEnd(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return;
- }
- int newEnd = flatNode.getEnd() + ((isOldNode(flatNode)) ? fLengthDifference : 0);
- if (fRemovedRangeEnd < 0 || fRemovedRangeEnd < newEnd) {
- fRemovedRangeEnd = newEnd;
- }
- }
-
- /**
- *
- */
- private CSSStructuredDocumentRegionContainer findContainer(CSSNodeImpl parent, IStructuredDocumentRegion flatNode) {
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- // Am i a container of flatNode?
- IStructuredDocumentRegion firstNode = ((CSSStructuredDocumentRegionContainer) parent).getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion lastNode = ((CSSStructuredDocumentRegionContainer) parent).getLastStructuredDocumentRegion();
- int firstStart = getOriginalOffset(firstNode);
- int lastStart = getOriginalOffset(lastNode);
- int start = flatNode.getStart();
-
- if (firstStart <= start && start <= lastStart) {
- // I am a container, is my child a container ?
- for (ICSSNode node = parent.getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSNodeImpl) {
- CSSStructuredDocumentRegionContainer container = findContainer((CSSNodeImpl) node, flatNode);
- if (container != null) {
- return container;
- }
- }
- }
- return (CSSStructuredDocumentRegionContainer) parent;
- }
- }
-
- return null;
- }
-
- /**
- *
- */
- CSSStructuredDocumentRegionContainer findDeletionTarget(CSSNodeImpl parent, IStructuredDocumentRegion flatNode) {
- CSSStructuredDocumentRegionContainer target = findContainer(parent, flatNode);
- if (target == null) {
- return null;
- }
-
- // System.out.print(flatNode.toString() + ": ");
-
- // child a(=====)b(=====)c
- // parent (================) a,c can remove parent, but b cannot.
-
- ICSSNode child;
-
- for (child = target.getFirstChild(); child != null && !(child instanceof CSSStructuredDocumentRegionContainer); child = child.getNextSibling()) {
- // just advancing
- }
-
- if (child == null) {
- // System.out.println("target has no children."); // TESTBYCOZY
- return target; // has no child containers.
- }
- else {
- IStructuredDocumentRegion firstNode = ((CSSStructuredDocumentRegionContainer) child).getFirstStructuredDocumentRegion();
- if (flatNode.getStart() < getOriginalOffset(firstNode)) {
- // System.out.println("flatNode is in front of first child");
- // // TESTBYCOZY
- return target; // a
- }
- }
-
- for (child = target.getLastChild(); child != null && !(child instanceof CSSStructuredDocumentRegionContainer); child = child.getPreviousSibling()) {
- // just advancing
- }
-
- if (child == null) {
- // System.out.println("target has no children."); // TESTBYCOZY
- return target; // has no child containers.
- }
- else {
- IStructuredDocumentRegion firstNode = ((CSSStructuredDocumentRegionContainer) child).getFirstStructuredDocumentRegion();
- if (getOriginalOffset(firstNode) < flatNode.getStart()) {
- // System.out.println("flatNode is in after of last child");
- // // TESTBYCOZY
- return target; // c
- }
- }
-
- // System.out.println("flatNode inner of children"); // TESTBYCOZY
- return null; // b
- }
-
- /**
- *
- */
- Iterator getNodesToBeRemoved() {
- Collection nodes = new ArrayList();
- int nNodes = fNodesToBeRemoved.getLength();
- for (int i = 0; i < nNodes; i++) {
- nodes.add(fNodesToBeRemoved.item(i));
- }
- return nodes.iterator();
- }
-
- /**
- *
- */
- private int getOriginalOffset(IStructuredDocumentRegion flatNode) {
- int offset = 0;
- if (flatNode != null) {
- offset = flatNode.getStart();
- if (0 <= fLengthDifference) {
- if (fNewStart + fNewLength < offset) {
- offset -= fLengthDifference;
- }
- }
- else {
- if (fOldStart + fOldLength <= offset || (fNewStart < 0 && fOldStart <= offset && !isOldNode(flatNode)) || (0 <= fNewStart && fNewStart + fNewLength <= offset && !isOldNode(flatNode))) {
- offset -= fLengthDifference;
- }
- }
- }
-
- return offset;
- }
-
- /**
- *
- */
- int getRemovedRangeBegin() {
- return fRemovedRangeBegin;
- }
-
- /**
- *
- */
- int getRemovedRangeEnd() {
- return fRemovedRangeEnd;
- }
-
- /**
- *
- */
- private boolean isOldNode(IStructuredDocumentRegion flatNode) {
- if (fOldStructuredDocumentRegions != null) {
- for (Enumeration e = fOldStructuredDocumentRegions.elements(); e.hasMoreElements();) {
- if (e.nextElement() == flatNode) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- void setupContext(IStructuredDocumentRegionList newStructuredDocumentRegions, IStructuredDocumentRegionList oldStructuredDocumentRegions) {
- IStructuredDocumentRegion flatNode = null;
- fOldLength = CSSUtil.getTextLength(oldStructuredDocumentRegions);
- if (oldStructuredDocumentRegions != null && 0 < oldStructuredDocumentRegions.getLength() && (flatNode = oldStructuredDocumentRegions.item(0)) != null) {
- fOldStart = flatNode.getStart();
- }
- else {
- fOldStart = -1;
- }
- fNewLength = CSSUtil.getTextLength(newStructuredDocumentRegions);
- if (newStructuredDocumentRegions != null && 0 < newStructuredDocumentRegions.getLength() && (flatNode = newStructuredDocumentRegions.item(0)) != null) {
- fNewStart = flatNode.getStart();
- fRemovedRangeBegin = fNewStart;
- fRemovedRangeEnd = fNewStart + fNewLength;
- }
- else {
- fNewStart = -1;
- fRemovedRangeBegin = fRemovedRangeEnd = -1;
- }
- fLengthDifference = fNewLength - fOldLength;
- fOldStructuredDocumentRegions = oldStructuredDocumentRegions;
-
- // cleanup nodes
- while (0 < fNodesToBeRemoved.getLength()) {
- fNodesToBeRemoved.removeNode(0);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java
deleted file mode 100644
index 03d6d40af3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java
+++ /dev/null
@@ -1,624 +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.wst.css.core.internal.document;
-
-
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.event.ICSSStyleListener;
-import org.eclipse.wst.css.core.internal.eventimpl.CSSEmbededStyleNotifyAdapter;
-import org.eclipse.wst.css.core.internal.eventimpl.CSSStyleNotifyAdapter;
-import org.eclipse.wst.css.core.internal.parser.CSSSourceParser;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValue;
-import org.eclipse.wst.css.core.internal.util.ImportRuleCollector;
-import org.eclipse.wst.css.core.internal.util.ImportedCollector;
-import org.eclipse.wst.css.core.internal.util.SelectorsCollector;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel;
-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.events.IStructuredDocumentListener;
-import org.eclipse.wst.sse.core.internal.provisional.events.NewDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.NoChangeEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.RegionsReplacedEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentRegionsReplacedEvent;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse;
-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.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-
-public class CSSModelImpl extends AbstractStructuredModel implements ICSSModel, IStructuredDocumentListener {
-
- private CSSDocumentImpl document = null;
- private org.w3c.dom.Node ownerNode = null;
- private CSSStyleNotifyAdapter styleNotifier = null;
- private CSSModelParser fParser = null;
- private CSSModelUpdater fUpdater = null;
- private boolean fStructuredDocumentUpdate = false;
- private final static String ID_NON_EXTERNAL_CSS = "**_NON_EXTERNAL_CSS_***";//$NON-NLS-1$
-
- /**
- * CSSModelImpl constructor comment.
- *
- */
- public CSSModelImpl() {
- super();
- }
-
- /**
- * @param listener
- * org.eclipse.wst.css.core.event.CSSStyleListener
- */
- public void addStyleListener(ICSSStyleListener listener) {
- getStyleNotifier().addStyleListener(listener);
- }
-
- void attrReplaced(CSSNodeImpl parentNode, CSSNodeImpl newAttr, CSSNodeImpl oldAttr) {
- if (!fStructuredDocumentUpdate) {
- CSSModelUpdater updater = getUpdater();
- updater.attrReplaced(parentNode, newAttr, oldAttr);
- }
-
- ICSSSelector removed[] = null, added[] = null;
- if (oldAttr != null && oldAttr.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) oldAttr).getName().equals(ICSSStyleRule.SELECTOR)) {
- CSSAttrImpl attr = (CSSAttrImpl) oldAttr;
- // collect changed selector
- ICSSSelectorList list = new CSSSelectorListImpl(attr.getValue());
- removed = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- removed[i] = list.getSelector(i);
- }
- if (newAttr != null && newAttr.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) newAttr).getName().equals(ICSSStyleRule.SELECTOR)) {
- CSSAttrImpl attr = (CSSAttrImpl) newAttr;
- // collect changed selector
- ICSSSelectorList list = new CSSSelectorListImpl(attr.getValue());
- added = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- added[i] = list.getSelector(i);
- }
- if (removed != null || added != null || getDocument().getNodeType() == ICSSNode.STYLEDECLARATION_NODE) {
- getStyleNotifier().fire(removed, added, null);
- }
- // for href attribute
- if (getStyleListeners() != null && getStyleListeners().size() > 0) {
- boolean update = false;
- if (oldAttr != null && oldAttr.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) oldAttr).getName().equals(ICSSImportRule.HREF)) {
- update = true;
- }
- if (newAttr != null && newAttr.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) newAttr).getName().equals(ICSSImportRule.HREF)) {
- update = true;
- }
- if (update)
- ((ICSSImportRule) parentNode).getStyleSheet();
- }
- }
-
- /**
- *
- */
- public void beginRecording(Object requester, String label, String description) {
- getStyleNotifier().beginRecording();
-
- Node node = getOwnerDOMNode();
- if (node != null && node instanceof IDOMNode) {
- IStructuredModel model = ((IDOMNode) node).getModel();
- if (model != null) {
- model.beginRecording(requester, label, description);
- return;
- }
- }
- super.beginRecording(requester, label, description);
- }
-
- void childReplaced(CSSNodeImpl parentNode, CSSNodeImpl newChild, CSSNodeImpl oldChild) {
- if (!fStructuredDocumentUpdate) {
- CSSModelUpdater updater = getUpdater();
- updater.childReplaced(parentNode, newChild, oldChild);
- }
-
- // always check and send selector event
- ICSSSelector removed[] = null, added[] = null;
- if (parentNode.getNodeType() == ICSSNode.STYLESHEET_NODE || parentNode.getNodeType() == ICSSNode.MEDIARULE_NODE) {
- // collect old selectors
- SelectorsCollector selTrav = new SelectorsCollector();
- selTrav.apply(oldChild);
- int nSel = selTrav.getSelectors().size();
- if (nSel > 0) {
- removed = new ICSSSelector[nSel];
- for (int i = 0; i < nSel; i++)
- removed[i] = (ICSSSelector) selTrav.getSelectors().get(i);
- }
- // collect new selectors
- selTrav = new SelectorsCollector();
- selTrav.apply(newChild);
- nSel = selTrav.getSelectors().size();
- if (nSel > 0) {
- added = new ICSSSelector[nSel];
- for (int i = 0; i < nSel; i++)
- added[i] = (ICSSSelector) selTrav.getSelectors().get(i);
- }
- }
- else {
- // modification
- ICSSNode rule = parentNode;
- while (rule != null) {
- if (rule instanceof ICSSStyleRule)
- break;
- rule = rule.getParentNode();
- }
- if (rule != null) {
- ICSSSelectorList list = ((ICSSStyleRule) rule).getSelectors();
- added = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- added[i] = list.getSelector(i);
- }
- }
- if (removed != null || added != null || getDocument().getNodeType() == ICSSNode.STYLEDECLARATION_NODE) {
- // send selector changed event
- getStyleNotifier().fire(removed, added, null);
- }
- // close removed import-rule's external style sheets
- {
- ImportRuleCollector trav = new ImportRuleCollector();
- trav.apply(oldChild);
- Iterator it = trav.getRules().iterator();
- while (it.hasNext()) {
- ((CSSImportRuleImpl) it.next()).closeStyleSheet();
- }
- }
- // send events to listener for new import-rules
- if (getStyleListeners() != null && getStyleListeners().size() > 0) {
- ImportedCollector trav = new ImportedCollector();
- trav.apply(newChild);
- }
- }
-
- /**
- *
- */
- private void closeImported() {
- if (!isShared()) {
- // release listeners
- if (getStyleListeners() != null) {
- Vector toRemove = new Vector(getStyleListeners());
- Iterator it = toRemove.iterator();
- while (it.hasNext()) {
- removeStyleListener((ICSSStyleListener) it.next());
- }
- }
- // close import rules
- ImportRuleCollector trav = new ImportRuleCollector();
- trav.apply(getDocument());
- Iterator it2 = trav.getRules().iterator();
- while (it2.hasNext()) {
- ((CSSImportRuleImpl) it2.next()).releaseRule();
- }
- }
- }
-
- private CSSDocumentImpl createDocument() {
- CSSDocumentImpl doc = null;
- int parserMode = CSSSourceParser.MODE_STYLESHEET;
- if (ownerNode == null) {
- // this case is external CSS file
- doc = (CSSStyleSheetImpl) DOMCSSImpl.createCSSStyleSheet(null, null); // parameters
- // are
- // for
- // STYLE-tag
- parserMode = CSSSourceParser.MODE_STYLESHEET;
- }
- else if (ownerNode instanceof org.w3c.dom.Element && ((Element) ownerNode).getTagName().toUpperCase().equals("STYLE")) {//$NON-NLS-1$
- // this case is STYLE-tag
- Element style = (Element) ownerNode;
- doc = (CSSStyleSheetImpl) DOMCSSImpl.createCSSStyleSheet(style.getAttribute("TITLE"), //$NON-NLS-1$
- style.getAttribute("MEDIA"));//$NON-NLS-1$
- parserMode = CSSSourceParser.MODE_STYLESHEET;
- }
- else if (ownerNode instanceof org.w3c.dom.Element || ownerNode instanceof org.w3c.dom.Attr) {
- // Inline attributes
- doc = (CSSStyleDeclarationImpl) DOMCSSImpl.createCSSStyleDeclaration();
- parserMode = CSSSourceParser.MODE_DECLARATION;
- }
- RegionParser regionParser = getStructuredDocument().getParser();
- if (regionParser instanceof CSSSourceParser) {
- ((CSSSourceParser) regionParser).setParserMode(parserMode);
- }
- return doc;
- }
-
- /**
- *
- */
- public void endRecording(Object requester) {
- Node node = getOwnerDOMNode();
- if (node != null && node instanceof IDOMNode) {
- IStructuredModel model = ((IDOMNode) node).getModel();
- if (model != null) {
- model.endRecording(requester);
- return;
- }
- }
- super.endRecording(requester);
-
- getStyleNotifier().endRecording();
- }
-
- public ICSSDocument getDocument() {
- if (document == null) {
- this.document = createDocument();
- this.document.setModel(this);
- }
- return this.document;
- }
-
- public IStructuredDocument getStructuredDocument() {
- IStructuredDocument structuredDocument = null;
- structuredDocument = super.getStructuredDocument();
- if (structuredDocument != null)
- return structuredDocument;
-
- // the first time
- Assert.isNotNull(getModelHandler());
- structuredDocument = (IStructuredDocument) getModelHandler().getDocumentLoader().createNewStructuredDocument();
-
- setStructuredDocument(structuredDocument);
- return structuredDocument;
- }
-
- /**
- * getNode method comment.
- */
- public IndexedRegion getIndexedRegion(int offset) {
- if (getDocument() == null)
- return null;
- return ((CSSStructuredDocumentRegionContainer) getDocument()).getContainerNode(offset);
- }
-
- /**
- * @return org.w3c.dom.Node
- */
- public Node getOwnerDOMNode() {
- return ownerNode;
- }
-
- /**
- * @param ownerNode
- * org.w3c.dom.Node if the case of external CSS model, you
- * should set null, else if internal css, you should set
- * STYLE-tag node, else if inline css, you should set the
- * element that is the owner of style-attribute.
- */
- public void setOwnerDOMNode(Node node) {
- // prohibit owner change
- Assert.isTrue(ownerNode == null);
- ownerNode = node;
- if (ownerNode != null) { // for internal/inline CSS context
- try {
- setId(ID_NON_EXTERNAL_CSS);
- }
- catch (ResourceInUse e) {
- // impossible
- }
- }
- }
-
- /**
- * currently public but may be made default access protected in future.
- */
- protected CSSModelParser getParser() {
- if (fParser == null) {
- if (getDocument() != null) {
- fParser = new CSSModelParser(document);
- }
- }
- return fParser;
- }
-
- /**
- * @return java.util.List
- */
- public List getStyleListeners() {
- return getStyleNotifier().getStyleListeners();
- }
-
- /**
- *
- * @return java.lang.Object
- */
- public java.lang.Object getStyleSheetType() {
- if (getDocument() instanceof ICSSStyleDeclaration)
- return INLINE;
- if (getOwnerDOMNode() != null)
- return EMBEDDED;
- else
- return EXTERNAL;
- }
-
- private CSSStyleNotifyAdapter getStyleNotifier() {
- if (styleNotifier == null) {
- styleNotifier = (ownerNode != null) ? new CSSEmbededStyleNotifyAdapter(this) : new CSSStyleNotifyAdapter(this);
- }
- return styleNotifier;
- }
-
- /**
- *
- */
- private CSSModelUpdater getUpdater() {
- if (fUpdater == null) {
- fUpdater = new CSSModelUpdater(this);
- fUpdater.setParser(getParser());
- }
- return fUpdater;
- }
-
- /**
- */
- public boolean isRecording() {
- return getStyleNotifier().isRecording();
- }
-
- /**
- * This function returns true if there are other references to the
- * underlying model.
- */
- public boolean isShared() {
- return (getStyleSheetType() == EXTERNAL) && super.isShared();
- }
-
- public void newModel(NewDocumentEvent structuredDocumentEvent) {
- if (structuredDocumentEvent == null)
- return;
- IStructuredDocument structuredDocument = structuredDocumentEvent.getStructuredDocument();
- if (structuredDocument == null)
- return;
- // this should not happen, but for the case
- if (structuredDocument != getStructuredDocument())
- setStructuredDocument(structuredDocument);
- IStructuredDocumentRegionList flatNodes = structuredDocument.getRegionList();
- if (flatNodes == null)
- return;
- if (getDocument() == null)
- return;
-
- fStructuredDocumentUpdate = true;
-
- ((CSSStructuredDocumentRegionContainer) getDocument()).removeChildNodes();
-
- CSSModelParser parser = getParser();
- parser.setStructuredDocumentEvent(structuredDocumentEvent);
- parser.replaceStructuredDocumentRegions(flatNodes, null);
-
- fStructuredDocumentUpdate = false;
- }
-
- /**
- * noChange method comment.
- */
- public void noChange(NoChangeEvent structuredDocumentEvent) {
- // nop
- }
-
- public void nodesReplaced(StructuredDocumentRegionsReplacedEvent structuredDocumentEvent) {
- if (structuredDocumentEvent == null) {
- return;
- }
- IStructuredDocumentRegionList oldStructuredDocumentRegions = structuredDocumentEvent.getOldStructuredDocumentRegions();
- IStructuredDocumentRegionList newStructuredDocumentRegions = structuredDocumentEvent.getNewStructuredDocumentRegions();
- if (oldStructuredDocumentRegions == null && newStructuredDocumentRegions == null) {
- return;
- }
-
- fStructuredDocumentUpdate = true;
-
- CSSModelParser parser = getParser();
- parser.setStructuredDocumentEvent(structuredDocumentEvent);
- parser.replaceStructuredDocumentRegions(newStructuredDocumentRegions, oldStructuredDocumentRegions);
-
- fStructuredDocumentUpdate = false;
- }
-
- /**
- * cleanup -> rebuild CSS Nodes This is pre-beta fix for 178176.
- */
- public void refreshNodes() {
- // cleanup old nodes
- fStructuredDocumentUpdate = true;
- ((CSSStructuredDocumentRegionContainer) getDocument()).removeChildNodes();
- fStructuredDocumentUpdate = false;
-
- getParser().cleanupUpdateContext();
-
- IStructuredDocument structuredDocument = getStructuredDocument();
- String source = structuredDocument.getText();
-
- structuredDocument.replaceText(this, 0, source.length(), null);
- structuredDocument.replaceText(this, 0, 0, source);
- }
-
- public void regionChanged(RegionChangedEvent structuredDocumentEvent) {
- if (structuredDocumentEvent == null) {
- return;
- }
- IStructuredDocumentRegion flatNode = structuredDocumentEvent.getStructuredDocumentRegion();
- if (flatNode == null) {
- return;
- }
- ITextRegion region = structuredDocumentEvent.getRegion();
- if (region == null) {
- return;
- }
-
- fStructuredDocumentUpdate = true;
-
- CSSModelParser parser = getParser();
- parser.setStructuredDocumentEvent(structuredDocumentEvent);
- parser.changeRegion(flatNode, region);
-
- fStructuredDocumentUpdate = false;
- }
-
- public void regionsReplaced(RegionsReplacedEvent structuredDocumentEvent) {
- if (structuredDocumentEvent == null)
- return;
- IStructuredDocumentRegion flatNode = structuredDocumentEvent.getStructuredDocumentRegion();
- if (flatNode == null)
- return;
- ITextRegionList oldRegions = structuredDocumentEvent.getOldRegions();
- ITextRegionList newRegions = structuredDocumentEvent.getNewRegions();
- if (oldRegions == null && newRegions == null)
- return;
-
- fStructuredDocumentUpdate = true;
-
- CSSModelParser parser = getParser();
- parser.setStructuredDocumentEvent(structuredDocumentEvent);
- parser.replaceRegions(flatNode, newRegions, oldRegions);
-
- fStructuredDocumentUpdate = false;
-
- }
-
- /**
- *
- */
- public void releaseFromEdit() {
- closeImported();
- if (getStyleSheetType() == EXTERNAL) {
- super.releaseFromEdit();
- }
- }
-
- /**
- *
- */
- public void releaseFromRead() {
- closeImported();
- if (getStyleSheetType() == EXTERNAL) {
- super.releaseFromRead();
- }
- }
-
- /**
- * @param listener
- * org.eclipse.wst.css.core.event.CSSStyleListener
- */
- public void removeStyleListener(ICSSStyleListener listener) {
- getStyleNotifier().removeStyleListener(listener);
- }
-
- public void setStructuredDocument(IStructuredDocument newStructuredDocument) {
- IStructuredDocument oldStructuredDocument = super.getStructuredDocument();
- if (newStructuredDocument == oldStructuredDocument)
- return; // noting to do
-
- if (oldStructuredDocument != null)
- oldStructuredDocument.removeDocumentChangingListener(this);
- super.setStructuredDocument(newStructuredDocument);
-
- if (newStructuredDocument != null) {
- if (newStructuredDocument.getLength() > 0) {
- newModel(new NewDocumentEvent(newStructuredDocument, this));
- }
- newStructuredDocument.addDocumentChangingListener(this);
- }
- }
-
- /**
- * @param srcModel
- * com.imb.sed.css.mode.intefaces.ICSSModel
- * @param removed
- * org.eclipse.wst.css.core.model.interfaces.ICSSSelector[]
- * @param added
- * org.eclipse.wst.css.core.model.interfaces.ICSSSelector[]
- */
- public void styleChanged(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- getStyleNotifier().styleChanged(srcModel, removed, added, media);
- }
-
- /**
- * @param srcModel
- * org.eclipse.wst.css.core.model.interfaces.ICSSModel
- */
- public void styleUpdate(ICSSModel srcModel) {
- getStyleNotifier().styleUpdate(srcModel);
- }
-
- void valueChanged(CSSNodeImpl node, String oldValue) {
- if (!fStructuredDocumentUpdate) {
- CSSModelUpdater updater = getUpdater();
- updater.valueChanged(node, oldValue);
- }
-
- ICSSSelector removed[] = null, added[] = null;
- if (node != null) {
- if (node.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) node).getName().equals(ICSSStyleRule.SELECTOR)) {
- CSSAttrImpl attr = (CSSAttrImpl) node;
- // collect changed selector
- ICSSSelectorList list = new CSSSelectorListImpl(attr.getValue());
- added = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- added[i] = list.getSelector(i);
-
- // get old value
- list = new CSSSelectorListImpl(oldValue);
- removed = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- removed[i] = list.getSelector(i);
- }
- else if (node instanceof ICSSValue) {
- ICSSNode rule = node;
- while (rule != null) {
- if (rule instanceof ICSSStyleRule)
- break;
- rule = rule.getParentNode();
- }
- if (rule != null) {
- ICSSSelectorList list = ((ICSSStyleRule) rule).getSelectors();
- added = new ICSSSelector[list.getLength()];
- for (int i = 0; i < list.getLength(); i++)
- added[i] = list.getSelector(i);
- }
- }
- }
- if (removed != null || added != null || getDocument().getNodeType() == ICSSNode.STYLEDECLARATION_NODE) {
- // send selector changed event
- getStyleNotifier().fire(removed, added, null);
- }
- // for href attribute
- if (getStyleListeners() != null && getStyleListeners().size() > 0) {
- if (node != null && node.getNodeType() == ICSSNode.ATTR_NODE && ((CSSAttrImpl) node).getName().equals(ICSSImportRule.HREF)) {
- ((ICSSImportRule) ((ICSSAttr) node).getOwnerCSSNode()).getStyleSheet();
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelNodeFeeder.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelNodeFeeder.java
deleted file mode 100644
index d6e6486406..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelNodeFeeder.java
+++ /dev/null
@@ -1,126 +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.wst.css.core.internal.document;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-
-
-/**
- *
- */
-class CSSModelNodeFeeder {
- /**
- * currently ICSSDocument is used but may go back to CSSDocumentImpl in future.
- */
- ICSSDocument fDocument = null;
- CSSModelUpdateContext fUpdateContext = null;
-
- /**
- * CSSModelNodeFeeder constructor comment.
- */
- CSSModelNodeFeeder() {
- super();
- }
-
- /**
- * CSSModelNodeFeeder constructor comment.
- * currently ICSSDocument is used but may go back to CSSDocumentImpl in future.
- */
- CSSModelNodeFeeder(ICSSDocument document, CSSModelUpdateContext updateContext) {
- super();
- fDocument = document;
- fUpdateContext = updateContext;
- }
-
- /**
- *
- */
- CSSCharsetRuleImpl getCSSCharsetRule() {
- CSSCharsetRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSCharsetRule();
- }
- else {
- node = (CSSCharsetRuleImpl) fDocument.createCSSCharsetRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSFontFaceRuleImpl getCSSFontFaceRule() {
- CSSFontFaceRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSFontFaceRule();
- }
- else {
- node = (CSSFontFaceRuleImpl) fDocument.createCSSFontFaceRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSImportRuleImpl getCSSImportRule() {
- CSSImportRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSImportRule();
- }
- else {
- node = (CSSImportRuleImpl) fDocument.createCSSImportRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSMediaRuleImpl getCSSMediaRule() {
- CSSMediaRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSMediaRule();
- }
- else {
- node = (CSSMediaRuleImpl) fDocument.createCSSMediaRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSPageRuleImpl getCSSPageRule() {
- CSSPageRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSPageRule();
- }
- else {
- node = (CSSPageRuleImpl) fDocument.createCSSPageRule();
- }
- return node;
- }
-
- /**
- *
- */
- CSSStyleRuleImpl getCSSStyleRule() {
- CSSStyleRuleImpl node;
- if (fUpdateContext.isActive()) {
- node = fUpdateContext.getCSSStyleRule();
- }
- else {
- node = (CSSStyleRuleImpl) fDocument.createCSSStyleRule();
- }
- return node;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelParser.java
deleted file mode 100644
index 82adaa2543..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelParser.java
+++ /dev/null
@@ -1,1296 +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.wst.css.core.internal.document;
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPageRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSRuleContainer;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.text.StructuredDocumentWalker;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-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.IStructuredDocumentRegionList;
-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.text.BasicStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.text.CoreNodeList;
-import org.eclipse.wst.sse.core.internal.text.TextRegionListImpl;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-
-/**
- * currently public but may be made default access protected in future.
- */
-public class CSSModelParser {
-
- private ICSSDocument fDocument = null;
- private CSSModelCreationContext fCreationContext = null;
- private CSSModelDeletionContext fDeletionContext = null;
- private CSSModelUpdateContext fUpdateContext = null;
- private CSSModelNodeFeeder fFeeder = null;
- private StructuredDocumentWalker fStructuredDocumentWalker = null;
- private boolean fParseFloating = false;
-
- /**
- * CSSModelParser constructor comment.
- */
- private CSSModelParser() {
- super();
- }
-
- /**
- * currently provded this method but may be removed in future.
- */
- protected boolean isParseFloating(){
- return fParseFloating;
- }
- /**
- * currently provded this method but may be removed in future.
- */
- protected CSSModelCreationContext getCreationContext(){
- return fCreationContext;
- }
- /**
- * currently provded this method but may be removed in future.
- */
- protected boolean isUpdateContextActive(){
- return fUpdateContext != null ? fUpdateContext.isActive() : false;
- }
- /**
- * currently public but may be made default access protected in future.
- */
- public CSSModelParser(ICSSDocument doc) {
- this();
- fDocument = doc;
- fCreationContext = new CSSModelCreationContext((CSSNodeImpl)doc);
- fDeletionContext = new CSSModelDeletionContext(doc);
- fUpdateContext = new CSSModelUpdateContext();
- fFeeder = new CSSModelNodeFeeder(doc, fUpdateContext);
- }
-
- /**
- *
- */
- void changeStructuredDocumentRegion(IStructuredDocumentRegion flatNode) {
- replaceStructuredDocumentRegions(new CoreNodeList(flatNode, flatNode), new CoreNodeList(flatNode, flatNode));
- }
-
- /**
- *
- */
- void changeRegion(IStructuredDocumentRegion flatNode, ITextRegion region) {
- if (flatNode == null || region == null) {
- return;
- }
- if (fDocument == null) {
- return;
- }
-
- changeStructuredDocumentRegion(flatNode);
- }
-
- /**
- *
- */
- private void checkNextNode(IStructuredDocumentRegion flatNode, String type) {
- IStructuredDocumentRegion next = CSSUtil.findNextSignificantNode(flatNode);
- if (CSSUtil.getStructuredDocumentRegionType(next) == type) {
- fCreationContext.setReparseStart(flatNode.getEnd());
- fCreationContext.setReparseEnd(next.getEnd());
- }
- }
-
- /**
- *
- */
- private void cleanupDeletionContext() {
- // setupDeletionContext(null);
- }
-
- /**
- *
- */
- boolean cleanupFirstNode(IStructuredDocumentRegion firstNode, CSSStructuredDocumentRegionContainer target) {
- if (firstNode == null || target == null) {
- return false;
- }
-
- if (firstNode == target.getFirstStructuredDocumentRegion()) {
- IStructuredDocumentRegion nextNode = fStructuredDocumentWalker.getNextNodeInCurrent(firstNode);
- IStructuredDocumentRegion lastNode = target.getLastStructuredDocumentRegion();
- if (lastNode == null || fStructuredDocumentWalker.isOldNode(lastNode) || nextNode == null || lastNode.getStartOffset() < nextNode.getStartOffset()) {
- target.setRangeStructuredDocumentRegion(null, null);
- }
- else {
- target.setFirstStructuredDocumentRegion(nextNode);
- }
- ICSSNode parent = target.getParentNode();
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- cleanupFirstNode(firstNode, (CSSStructuredDocumentRegionContainer) parent);
- return true;
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- boolean cleanupLastNode(IStructuredDocumentRegion lastNode, CSSStructuredDocumentRegionContainer target) {
- if (lastNode == null || target == null) {
- return false;
- }
-
- if (lastNode == target.getLastStructuredDocumentRegion()) {
- IStructuredDocumentRegion prevNode = fStructuredDocumentWalker.getPrevNodeInCurrent(lastNode);
- IStructuredDocumentRegion firstNode = target.getFirstStructuredDocumentRegion();
- if (firstNode == null || fStructuredDocumentWalker.isOldNode(firstNode) || prevNode == null || prevNode.getStartOffset() < firstNode.getStartOffset()) {
- target.setRangeStructuredDocumentRegion(null, null);
- }
- else {
- target.setLastStructuredDocumentRegion(prevNode);
- }
- ICSSNode parent = target.getParentNode();
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- cleanupLastNode(lastNode, (CSSStructuredDocumentRegionContainer) parent);
- return true;
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- int cleanupUpdateContext() {
- int remains = fUpdateContext.getNodeCount();
- fUpdateContext.cleanupContext();
- return remains;
- }
-
- /**
- * create floating CSS rule (owner document will be set) this is for
- * CSSStyleSheet.createCSSRule(String)
- *
- * @return org.w3c.dom.css.CSSRule
- */
- CSSRule createCSSRule(IStructuredDocumentRegionList flatNodes) {
- if (flatNodes == null) {
- return null;
- }
-
- fParseFloating = true;
-
- // setup creation context
- fCreationContext.clear();
- fCreationContext.setTargetNode(null);
- fCreationContext.setNextNode(null);
- CSSRuleImpl parentRule = null;
-
- for (Enumeration e = flatNodes.elements(); e.hasMoreElements();) {
- IStructuredDocumentRegion flatNode = (IStructuredDocumentRegion) e.nextElement();
- if (flatNode == null) {
- continue;
- }
- CSSNodeImpl modified = insertStructuredDocumentRegion(flatNode);
- if (parentRule == null && modified instanceof CSSRuleImpl) {
- parentRule = (CSSRuleImpl) modified;
- }
- }
-
- fParseFloating = false;
-
- if (parentRule != null) {
- CSSModelUtil.cleanupContainer(parentRule);
- }
-
- return parentRule;
- }
-
- /**
- *
- */
- private IStructuredDocumentRegion findBraceClose(int depth, IStructuredDocumentRegion start, boolean bBreakSibling) {
- IStructuredDocumentRegion result = null;
- int braceLevel = 0;
- IStructuredDocumentRegion prevNode = null;
- IStructuredDocumentRegion region = start.getNext();
- for (; region != null; region = region.getNext()) {
- int offset = region.getStart();
- if (offset < 0) {
- Assert.isTrue(false);
- break;
- }
- CSSNodeImpl node = getNodeAt(offset);
- int depthHit = (node != null) ? CSSModelUtil.getDepth(node) : -1;
- if (depth <= depthHit) {
- // sibling is found before "}"
- if (bBreakSibling) {
- CSSNodeImpl parent = (CSSNodeImpl) node.getParentNode();
- while (depth <= CSSModelUtil.getDepth(parent)) {
- node = parent;
- parent = (CSSNodeImpl) parent.getParentNode();
- }
- if (parent != null && node != null) {
- parent.removeChild(node);
- }
- }
- else {
- result = prevNode;
- break;
- }
- }
- String type = CSSUtil.getStructuredDocumentRegionType(region);
- if (type == CSSRegionContexts.CSS_LBRACE) {
- braceLevel++;
- }
- if (type == CSSRegionContexts.CSS_RBRACE) {
- braceLevel--;
- if (braceLevel < 0) {
- result = region;
- break;
- }
- }
- prevNode = region;
- }
-
- if (result == null && region == null) {
- // reach the end of document
- result = prevNode;
- }
-
- return result;
- }
-
- /**
- *
- */
- private IStructuredDocumentRegionList getStructuredDocumentRegionList(int start, int end) {
- IStructuredDocumentRegionList nodeList = null;
- if (0 <= start && start <= end) {
- ICSSModel model = fDocument.getModel();
- if (model instanceof CSSModelImpl) {
- IStructuredDocument structuredDocument = ((CSSModelImpl) model).getStructuredDocument();
- if (structuredDocument != null) {
- IStructuredDocumentRegion startNode = structuredDocument.getRegionAtCharacterOffset(start);
- IStructuredDocumentRegion endNode = structuredDocument.getRegionAtCharacterOffset(end - 1);
- if (startNode != null && endNode != null) {
- nodeList = new CoreNodeList(startNode, endNode);
- }
- }
- }
- }
-
- return nodeList;
- }
-
- /**
- *
- */
- private CSSNodeImpl getNodeAt(int offset) {
- CSSNodeImpl rootNode = fCreationContext.getRootNode();
- ICSSNode target = rootNode.getNodeAt(offset);
- if (target instanceof CSSNodeImpl) {
- return (CSSNodeImpl) target;
- }
- else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSNodeImpl insertBraceClose(IStructuredDocumentRegion region) {
- ICSSNode target = CSSModelUtil.findBraceContainer(fCreationContext.getTargetNode());
-
- if (!(target instanceof CSSStructuredDocumentRegionContainer)) {
- return null;
- }
-
- CSSStructuredDocumentRegionContainer parent = (CSSStructuredDocumentRegionContainer) target;
- if (CSSModelUtil.isInterruption(parent, region)) {
- ICSSNode node = parent.getParentNode();
- if (node instanceof CSSNodeImpl) {
- fCreationContext.setReparseStart(parent.getStartOffset());
- fCreationContext.setReparseEnd(parent.getEndOffset());
- ((CSSNodeImpl) node).removeChild(parent);
- }
- return null;
- }
-
- if (parent instanceof ICSSPageRule || parent instanceof ICSSMediaRule || parent instanceof CSSFontFaceRule || parent instanceof ICSSStyleRule) {
- CSSModelUtil.expandStructuredDocumentRegionContainer(parent, region);
- if (!CSSModelUtil.isBraceClosed(target)) {
- fCreationContext.setTargetNode(parent.getParentNode());
- fCreationContext.setNextNode(parent.getNextSibling());
- return parent;
- }
- }
-
- return null;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertBraceOpen(IStructuredDocumentRegion region) {
- IStructuredDocumentRegion keyRegion = CSSUtil.findPreviousSignificantNode(region);
- if (keyRegion == null) {
- return null;
- }
- if (!fParseFloating) {
- CSSNodeImpl node = getNodeAt(keyRegion.getStartOffset());
- if (node != null && !(node instanceof ICSSRuleContainer)) {
- return null;
- }
- }
- String type = CSSUtil.getStructuredDocumentRegionType(keyRegion);
-
- CSSNodeImpl inserted = null;
- if (type == CSSRegionContexts.CSS_PAGE) {
- inserted = insertPageRule(keyRegion, region);
- }
- else if (type == CSSRegionContexts.CSS_MEDIA) {
- inserted = insertMediaRule(keyRegion, region);
- }
- else if (type == CSSRegionContexts.CSS_FONT_FACE) {
- inserted = insertFontFaceRule(keyRegion, region);
- }
- else if (CSSUtil.isSelectorText(keyRegion)) {
- inserted = insertStyleRule(keyRegion, region);
- }
-
- if (inserted instanceof CSSStructuredDocumentRegionContainer) {
- // CSSModelUtil.expandStructuredDocumentRegionContainer((CSSStructuredDocumentRegionContainer)inserted,
- // flatNode);
- IStructuredDocumentRegion braceClose = findBraceClose(CSSModelUtil.getDepth(inserted), region, (type == CSSRegionContexts.CSS_MEDIA));
- if (braceClose != null) {
- fCreationContext.setReparseStart(region.getEnd());
- fCreationContext.setReparseEnd(braceClose.getEnd());
- }
- }
-
- return inserted;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertCharsetRule(IStructuredDocumentRegion beginDocRegion, IStructuredDocumentRegion endDocRegion) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- ITextRegionList regions = new TextRegionListImpl(beginDocRegion.getRegions());
- regions.remove(0); // must be "@charset"
- ITextRegion encodingRegion = null;
- while (!regions.isEmpty()) {
- ITextRegion textRegion = regions.remove(0);
- if (textRegion == null) {
- continue;
- }
- String type = textRegion.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- continue;
- }
- if (type == CSSRegionContexts.CSS_STRING) {
- encodingRegion = textRegion;
- break;
- }
- else {
- break;
- }
- }
- if (encodingRegion == null) {
- return null;
- }
-
- CSSCharsetRuleImpl rule = fFeeder.getCSSCharsetRule();
- if (rule == null) {
- return null;
- }
-
- if (!fUpdateContext.isActive()) {
- rule.setAttribute(ICSSCharsetRule.ENCODING, beginDocRegion.getText(encodingRegion));
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(beginDocRegion, endDocRegion);
- CSSAttrImpl attr = rule.getAttributeNode(ICSSCharsetRule.ENCODING);
- if (attr != null) {
- attr.setRangeRegion(beginDocRegion, encodingRegion, encodingRegion);
- }
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- return rule;
- }
-
- /**
- * currently public but may be made default access protected in future.
- */
- protected CSSNodeImpl insertStructuredDocumentRegion(IStructuredDocumentRegion region) {
- if (fCreationContext == null || region == null) {
- return null;
- }
-
- String type = ((BasicStructuredDocumentRegion) region).getType();
- CSSNodeImpl modified = null;
-
- ICSSNode target = fCreationContext.getTargetNode();
-
- if ((fParseFloating && target == null) || target instanceof ICSSRuleContainer) {
- if (type == CSSRegionContexts.CSS_DELIMITER) {
- modified = insertSemiColonForRule(region);
- }
- else if (type == CSSRegionContexts.CSS_LBRACE) {
- modified = insertBraceOpen(region);
- }
- else if (type == CSSRegionContexts.CSS_RBRACE) {
- modified = insertBraceClose(region);
- }
- else if (type == CSSRegionContexts.CSS_MEDIA || type == CSSRegionContexts.CSS_PAGE || type == CSSRegionContexts.CSS_FONT_FACE || CSSUtil.isSelectorText(region)) {
- checkNextNode(region, CSSRegionContexts.CSS_LBRACE);
- }
- else if (type == CSSRegionContexts.CSS_IMPORT || type == CSSRegionContexts.CSS_CHARSET) {
- checkNextNode(region, CSSRegionContexts.CSS_DELIMITER);
- }
- }
- else if ((target instanceof CSSRuleDeclContainer || target instanceof CSSStyleDeclaration) && type == CSSRegionContexts.CSS_DECLARATION_PROPERTY) {
- modified = insertStyleDeclarationItem(region);
- }
- else if (target instanceof ICSSStyleDeclItem && type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- modified = insertSemiColonForStyleDeclarationItem(region);
- }
- else if (type == CSSRegionContexts.CSS_RBRACE) {
- modified = insertBraceClose(region);
- }
-
- // post process
- if (modified != null) {
- if (modified instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) modified).propagateRangeStructuredDocumentRegion();
- }
- }
-
- return modified;
- }
-
- /**
- *
- */
- private void insertStructuredDocumentRegions(IStructuredDocumentRegionList regionList) {
- for (Enumeration e = regionList.elements(); e.hasMoreElements();) {
- IStructuredDocumentRegion region = (IStructuredDocumentRegion) e.nextElement();
- if (region == null) {
- continue;
- }
- insertStructuredDocumentRegion(region);
- if (fCreationContext.isToReparse()) {
- int origStart = region.getEnd();
- int origEnd = regionList.item(regionList.getLength() - 1).getEnd();
- int newStart = fCreationContext.getReparseStart();
- int newEnd = fCreationContext.getReparseEnd();
- if (newStart < origStart || origEnd < newEnd) {
- IStructuredDocumentRegionList newNodeList = getStructuredDocumentRegionList(newStart, newEnd);
- setupCreationContext(newNodeList.item(0));
- insertStructuredDocumentRegions(newNodeList);
- return;
- }
- else {
- fCreationContext.resetReparseRange();
- }
- }
- }
- }
-
- /**
- *
- */
- private CSSNodeImpl insertFontFaceRule(IStructuredDocumentRegion region, IStructuredDocumentRegion braceNode) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- CSSFontFaceRuleImpl rule = fFeeder.getCSSFontFaceRule();
- if (rule == null) {
- return null;
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(region, braceNode);
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- fCreationContext.setTargetNode(rule);
- // TargetNext is set to null automatically
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertImportRule(IStructuredDocumentRegion beginDocRegion, IStructuredDocumentRegion endDocRegion) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- ITextRegionList regions = new TextRegionListImpl(beginDocRegion.getRegions());
- regions.remove(0); // must be "@import"
- ITextRegion hrefRegion = null;
- while (!regions.isEmpty()) {
- ITextRegion textRegion = regions.remove(0);
- if (textRegion == null) {
- continue;
- }
- String type = textRegion.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- continue;
- }
- if (type == CSSRegionContexts.CSS_URI || type == CSSRegionContexts.CSS_STRING) {
- hrefRegion = textRegion;
- break;
- }
- else {
- break;
- }
- }
- if (hrefRegion == null) {
- return null;
- }
-
- CSSImportRuleImpl rule = fFeeder.getCSSImportRule();
- if (rule == null) {
- return null;
- }
-
- CSSUtil.stripSurroundingSpace(regions);
- MediaListImpl mediaList = (MediaListImpl) rule.getMedia();
- setMediaList(mediaList, beginDocRegion, regions);
-
- if (!fUpdateContext.isActive()) {
- rule.setAttribute(ICSSImportRule.HREF, beginDocRegion.getText(hrefRegion));
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(beginDocRegion, endDocRegion);
- CSSAttrImpl attr = rule.getAttributeNode(ICSSImportRule.HREF);
- if (attr != null) {
- attr.setRangeRegion(beginDocRegion, hrefRegion, hrefRegion);
- }
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertMediaRule(IStructuredDocumentRegion flatNode, IStructuredDocumentRegion braceNode) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- CSSMediaRuleImpl rule = fFeeder.getCSSMediaRule();
- if (rule == null) {
- return null;
- }
-
- ITextRegionList regions = new TextRegionListImpl(flatNode.getRegions());
- regions.remove(0); // must be "@media"
-
- CSSUtil.stripSurroundingSpace(regions);
- MediaListImpl mediaList = (MediaListImpl) rule.getMedia();
- setMediaList(mediaList, flatNode, regions);
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(flatNode, braceNode);
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- fCreationContext.setTargetNode(rule);
- // TargetNext is set to null automatically
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertPageRule(IStructuredDocumentRegion flatNode, IStructuredDocumentRegion braceNode) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- // get selector regions
- ITextRegionList selectorRegions = new TextRegionListImpl(flatNode.getRegions());
- selectorRegions.remove(0); // must be "@page"
- CSSUtil.stripSurroundingSpace(selectorRegions);
-
- CSSPageRuleImpl rule = fFeeder.getCSSPageRule();
- if (rule == null) {
- return null;
- }
-
- if (!fUpdateContext.isActive()) {
- String selectorStr = CSSUtil.getRegionText(flatNode, selectorRegions);
- if (0 < selectorStr.length()) {
- rule.setSelectorText(selectorStr);
- }
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(flatNode, braceNode);
- CSSAttrImpl attr = rule.getAttributeNode(ICSSPageRule.SELECTOR);
- if (attr != null && selectorRegions != null && !selectorRegions.isEmpty()) {
- attr.setRangeRegion(flatNode, selectorRegions.get(0), selectorRegions.get(selectorRegions.size() - 1));
- }
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- fCreationContext.setTargetNode(rule);
- // TargetNext is set to null automatically
-
- return rule;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertSemiColonForRule(IStructuredDocumentRegion region) {
- IStructuredDocumentRegion keyRegion = CSSUtil.findPreviousSignificantNode(region);
- String type = CSSUtil.getStructuredDocumentRegionType(keyRegion);
-
- CSSNodeImpl inserted = null;
- if (type == CSSRegionContexts.CSS_IMPORT) {
- inserted = insertImportRule(keyRegion, region);
- }
- else if (type == CSSRegionContexts.CSS_CHARSET) {
- inserted = insertCharsetRule(keyRegion, region);
- }
-
- return inserted;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertSemiColonForStyleDeclarationItem(IStructuredDocumentRegion region) {
- // only target/net node is changed. nothing to do.
-
- CSSNodeImpl targetNode = fCreationContext.getTargetNode();
- if (targetNode instanceof ICSSStyleDeclItem) {
- int offset = targetNode.getStartOffset();
- // widen document region range
- // ((CSSStyleDeclItemImpl)targetNode).setLastStructuredDocumentRegion(region);
- CSSModelUtil.expandStructuredDocumentRegionContainer((CSSStyleDeclItemImpl) targetNode, region);
- // psStructuredDocumentRegion indicates CSSStyleDeclItem
- ICSSNode parentNode = targetNode.getParentNode();
- fCreationContext.setTargetNode(parentNode);
- ICSSNode next = null;
- if (parentNode.hasChildNodes()) {
- for (ICSSNode child = targetNode.getFirstChild(); child != null; child = child.getNextSibling()) {
- if (child instanceof CSSStructuredDocumentRegionContainer && offset < ((CSSStructuredDocumentRegionContainer) child).getStartOffset()) {
- next = child;
- break;
- }
- }
- }
- fCreationContext.setNextNode(next);
-
- return targetNode;
- }
-
- return null;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertStyleDeclarationItem(IStructuredDocumentRegion docRegion) {
- CSSStyleDeclarationImpl parent = null;
- CSSNodeImpl node = fCreationContext.getTargetNode();
- if (node instanceof CSSRuleDeclContainer) {
- CSSRuleDeclContainer declContainer = (CSSRuleDeclContainer) node;
- parent = (CSSStyleDeclarationImpl) declContainer.getStyle();
- }
- else if (node instanceof CSSStyleDeclarationImpl) {
- parent = (CSSStyleDeclarationImpl) node;
- }
-
- CSSDeclarationItemParser itemParser = new CSSDeclarationItemParser(parent.getOwnerDocument());
- itemParser.setStructuredDocumentTemporary(false);
- itemParser.setUpdateContext(fUpdateContext);
- CSSStyleDeclItemImpl declItem = itemParser.setupDeclarationItem(docRegion);
- if (declItem == null) {
- return null;
- }
-
- // setup flat container
- declItem.setRangeStructuredDocumentRegion(docRegion, docRegion);
-
- // insert to tree
- if (!fUpdateContext.isActive()) {
- propagateRangePreInsert(parent, declItem);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(declItem, next);
- }
- else {
- parent.appendChild(declItem);
- }
- }
-
- fCreationContext.setTargetNode(declItem);
- // TargetNext is set to null automatically
-
- return declItem;
- }
-
- /**
- *
- */
- private CSSNodeImpl insertStyleRule(IStructuredDocumentRegion flatNode, IStructuredDocumentRegion braceNode) {
- CSSNodeImpl parent = fCreationContext.getTargetNode();
- if (!fParseFloating && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- // get selector regions
- ITextRegionList selectorRegions = new TextRegionListImpl(flatNode.getRegions());
- CSSUtil.stripSurroundingSpace(selectorRegions);
-
- CSSStyleRuleImpl rule = fFeeder.getCSSStyleRule();
- if (rule == null) {
- return null;
- }
-
- if (!fUpdateContext.isActive()) {
- String selectorStr = CSSUtil.getRegionText(flatNode, selectorRegions);
- if (selectorStr != null && 0 < selectorStr.length()) {
- rule.setSelectorText(selectorStr);
- }
- }
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(flatNode, braceNode);
- CSSAttrImpl attr = rule.getAttributeNode(ICSSPageRule.SELECTOR);
- if (attr != null && selectorRegions != null && !selectorRegions.isEmpty()) {
- attr.setRangeRegion(flatNode, selectorRegions.get(0), selectorRegions.get(selectorRegions.size() - 1));
- }
-
- // insert to tree
- if (!fUpdateContext.isActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = fCreationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- fCreationContext.setTargetNode(rule);
- // TargetNext is set to null automatically
-
- return rule;
- }
-
- /**
- *
- */
- private void pretendRemoveNode() {
- CSSStructuredDocumentRegionContainer node = (CSSStructuredDocumentRegionContainer) fUpdateContext.getDeletionTarget();
- if (node == null) {
- return;
- }
-
- IStructuredDocumentRegion firstNode = node.getFirstStructuredDocumentRegion();
- if (firstNode != null) {
- fDeletionContext.expandRemovedRangeBegin(firstNode);
- }
- IStructuredDocumentRegion lastNode = node.getLastStructuredDocumentRegion();
- if (lastNode != null) {
- fDeletionContext.expandRemovedRangeEnd(lastNode);
- }
-
- shrinkContainer((CSSStructuredDocumentRegionContainer) fUpdateContext.getDeletionTargetParent(), node);
- }
-
- /**
- * currently public but may be made default access protected in future.
- *
- * @param parent
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param child
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- protected void propagateRangePreInsert(CSSNodeImpl parent, CSSNodeImpl child) {
- if (!(child instanceof CSSStructuredDocumentRegionContainer) || !(parent instanceof CSSStructuredDocumentRegionContainer)) {
- return;
- }
-
- CSSStructuredDocumentRegionContainer parentContainer = (CSSStructuredDocumentRegionContainer) parent;
- CSSStructuredDocumentRegionContainer childContainer = (CSSStructuredDocumentRegionContainer) child;
- IStructuredDocumentRegion firstNode = childContainer.getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion lastNode = childContainer.getLastStructuredDocumentRegion();
- if (firstNode == null || lastNode == null) {
- return;
- }
-
- boolean bModified = parentContainer.includeRangeStructuredDocumentRegion(firstNode, lastNode);
- if (bModified) {
- parentContainer.propagateRangeStructuredDocumentRegion();
- }
- }
-
- /**
- *
- */
- private void removeStructuredDocumentRegion(IStructuredDocumentRegion flatNode) {
- String type = CSSUtil.getStructuredDocumentRegionType(flatNode);
- if (type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- do {
- flatNode = fStructuredDocumentWalker.getPrevNode(flatNode);
- type = (flatNode != null) ? CSSUtil.getStructuredDocumentRegionType(flatNode) : null;
- }
- while (type != null && (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT));
- }
- if (flatNode == null) {
- return;
- }
-
- // if (fDeletionContext.isInRemovedRange(flatNode)) { // already
- // removed
- // return;
- // }
-
- CSSStructuredDocumentRegionContainer node = fDeletionContext.findDeletionTarget((CSSNodeImpl)fDocument, flatNode);
- if (node == null || node == fDocument) {
- return; // not attached with any treeNode
- }
-
- if (node instanceof CSSStyleDeclarationImpl) {
- ICSSNode rule = node.getParentNode();
- if (rule instanceof CSSStyleRuleImpl) {
- node = (CSSStructuredDocumentRegionContainer) rule;
- }
- else {
- return;
- }
- }
-
- // ICSSNode p = node.getParentNode();
- // if (p == null || ! (p instanceof
- // CSSStructuredDocumentRegionContainer)) {
- // return;
- // }
- // CSSStructuredDocumentRegionContainer parent =
- // (CSSStructuredDocumentRegionContainer)p;
-
- if (fDeletionContext.addNodeToBeRemoved(node)) {
- IStructuredDocumentRegion firstNode = node.getFirstStructuredDocumentRegion();
- if (firstNode != null) {
- fDeletionContext.expandRemovedRangeBegin(firstNode);
- }
- IStructuredDocumentRegion lastNode = node.getLastStructuredDocumentRegion();
- if (lastNode != null) {
- fDeletionContext.expandRemovedRangeEnd(lastNode);
- }
- }
-
- // shrinkContainer(node);
- // parent.removeChild(node);
- }
-
- /**
- *
- */
- private void removeStructuredDocumentRegions(IStructuredDocumentRegionList flatNodes) {
- for (Enumeration e = flatNodes.elements(); e.hasMoreElements();) {
- IStructuredDocumentRegion flatNode = (IStructuredDocumentRegion) e.nextElement();
- if (flatNode == null) {
- continue;
- }
- removeStructuredDocumentRegion(flatNode);
- }
-
- Iterator i = fDeletionContext.getNodesToBeRemoved();
- while (i.hasNext()) {
- CSSNodeImpl node = (CSSNodeImpl) i.next();
- if (!(node instanceof CSSStructuredDocumentRegionContainer)) {
- continue;
- }
- CSSNodeImpl parent = (CSSNodeImpl) node.getParentNode();
- if (!(parent instanceof CSSStructuredDocumentRegionContainer)) {
- continue;
- }
- shrinkContainer((CSSStructuredDocumentRegionContainer) parent, (CSSStructuredDocumentRegionContainer) node);
- parent.removeChild(node);
- }
- }
-
- /**
- *
- */
- void replaceStructuredDocumentRegions(IStructuredDocumentRegionList newStructuredDocumentRegions, IStructuredDocumentRegionList oldStructuredDocumentRegions) {
- if (fDocument == null || fCreationContext == null) {
- return;
- }
-
- if (oldStructuredDocumentRegions != null && 0 < oldStructuredDocumentRegions.getLength()) {
- setupDeletionContext(newStructuredDocumentRegions, oldStructuredDocumentRegions);
- short updateMode = fUpdateContext.getUpdateMode();
- if (updateMode == CSSModelUpdateContext.UPDATE_IDLE) {
- removeStructuredDocumentRegions(oldStructuredDocumentRegions);
- }
- else {
- pretendRemoveNode();
- }
- newStructuredDocumentRegions = getStructuredDocumentRegionList(fDeletionContext.getRemovedRangeBegin(), fDeletionContext.getRemovedRangeEnd());
- cleanupDeletionContext();
- }
-
- if (newStructuredDocumentRegions != null && 0 < newStructuredDocumentRegions.getLength()) {
- setupCreationContext(newStructuredDocumentRegions.item(0));
- insertStructuredDocumentRegions(newStructuredDocumentRegions);
- }
-
- // make document hold whole structuredDocument
- /*
- * boolean bUpdate = false; IStructuredDocumentRegion flatNode;
- * flatNode = fDocument.getFirstStructuredDocumentRegion(); bUpdate =
- * bUpdate || (flatNode == null ||
- * fStructuredDocumentWalker.isOldNode(flatNode) ||
- * flatNode.getPrevious() != null); flatNode =
- * fDocument.getLastStructuredDocumentRegion(); bUpdate = bUpdate ||
- * (flatNode == null || fStructuredDocumentWalker.isOldNode(flatNode) ||
- * flatNode.getNext() != null);
- */
- IStructuredDocument structuredDocument = fStructuredDocumentWalker.getStructuredDocument();
- ((CSSStructuredDocumentRegionContainer)fDocument).setRangeStructuredDocumentRegion(structuredDocument.getFirstStructuredDocumentRegion(), structuredDocument.getLastStructuredDocumentRegion());
- /* } */
-
- // remove in official release
- // CSSModelUtil.diagnoseTree(fDocument,
- // fStructuredDocumentWalker.getStructuredDocument());
- }
-
- /**
- *
- */
- void replaceRegions(IStructuredDocumentRegion flatNode, ITextRegionList newRegions, ITextRegionList oldRegions) {
- if (flatNode == null) {
- return;
- }
- if (newRegions == null || oldRegions == null) {
- return;
- }
- if (fDocument == null) {
- return;
- }
-
- changeStructuredDocumentRegion(flatNode);
- }
-
- /**
- */
- private void resetCreationTarget(IStructuredDocumentRegion newStructuredDocumentRegion) {
- if (newStructuredDocumentRegion == null || newStructuredDocumentRegion.getStartOffset() <= 0) {
- // top of document
- fCreationContext.setTargetNode(fDocument);
- fCreationContext.setNextNode(fDocument.getFirstChild());
- return;
- }
-
- int cursorPos = newStructuredDocumentRegion.getStartOffset();
- CSSNodeImpl cursorNode = getNodeAt(cursorPos);
- if (cursorNode == null) { // end of document
- cursorNode = (CSSNodeImpl)fDocument;
- }
-
- // find edge of tree node
- CSSNodeImpl node = null;
- // boolean bOverSemiColon = false;
- boolean bOverOpenBrace = false;
- IStructuredDocumentRegion flatNode;
- for (flatNode = newStructuredDocumentRegion; flatNode != null; flatNode = flatNode.getPrevious()) {
- node = getNodeAt(flatNode.getStartOffset());
- if (node == null) {
- node = (CSSNodeImpl)fDocument;
- }
- if (node != cursorNode || node.getStartOffset() == flatNode.getStartOffset()) {
- break;
- }
- if (flatNode != newStructuredDocumentRegion) {
- String type = CSSUtil.getStructuredDocumentRegionType(flatNode);
- // if (type == CSSRegionContexts.CSS_DELIMITER ||
- // type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- // bOverSemiColon = true;
- // } else
- if (type == CSSRegionContexts.CSS_LBRACE) {
- bOverOpenBrace = true;
- }
- }
- }
-
- CSSNodeImpl targetNode = null;
-
- // if (flatNode == null) {
- // v<--|
- // AAAAAA
- // BBBBBBBBBB cursorNode:A , node:B -> target is A
- // targetNode = (node == null) ? fDocument : node;
- // } else
- if (cursorNode == node) {
- // v<--|
- // AAAAAA
- // BBBBBBBBBB cursorNode:A , node:B -> target is A
- if (bOverOpenBrace && cursorNode instanceof CSSRuleDeclContainer) {
- targetNode = (CSSNodeImpl) ((CSSRuleDeclContainer) cursorNode).getStyle();
- }
- else {
- targetNode = cursorNode;
- }
- }
- else {
- // v<--|
- // AAA
- // BBBBBBBBBB cursorNode:B , node:A -> depend on A's node type
- short nodeType = node.getNodeType();
- if (nodeType == ICSSNode.STYLEDECLITEM_NODE || nodeType == ICSSNode.CHARSETRULE_NODE || nodeType == ICSSNode.IMPORTRULE_NODE) {
- // targetNode = (CSSNodeImpl)((bOverSemiColon) ?
- // node.getParentNode() : node); // NP
- String regionType = CSSUtil.getStructuredDocumentRegionType(flatNode);
- if (regionType == CSSRegionContexts.CSS_DELIMITER || regionType == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- targetNode = (CSSNodeImpl) node.getParentNode();
- }
- else {
- targetNode = node;
- }
- }
- else if (CSSUtil.getStructuredDocumentRegionType(flatNode) == CSSRegionContexts.CSS_RBRACE) {
- targetNode = (CSSNodeImpl) node.getParentNode();
- }
- else {
- targetNode = node;
- }
- }
-
- fCreationContext.setTargetNode(targetNode);
- ICSSNode next = null;
- if (targetNode.hasChildNodes()) {
- for (ICSSNode child = targetNode.getFirstChild(); child != null; child = child.getNextSibling()) {
- if (child instanceof CSSStructuredDocumentRegionContainer && cursorPos < ((CSSStructuredDocumentRegionContainer) child).getStartOffset()) {
- next = child;
- break;
- }
- }
- }
- fCreationContext.setNextNode(next);
-
- }
-
- /**
- */
- private void resetReparseRange() {
- fCreationContext.clear();
- }
-
- void setStructuredDocumentEvent(StructuredDocumentEvent event) {
- if (fStructuredDocumentWalker == null) {
- fStructuredDocumentWalker = new StructuredDocumentWalker();
- }
- fStructuredDocumentWalker.initialize(event);
- }
-
- /**
- * regions: surrounding spaces should be removed. Q. Why did you set
- * mediaTable ? A. MediaList may have two or more medium that have same
- * value, then searcing in MediaList is not perfect. Q.
- * fUpdateContext.isActive() is not care. Are you OK? A. OK.
- */
- private void setMediaList(MediaListImpl mediaList, IStructuredDocumentRegion region, ITextRegionList textRegions) {
- if (mediaList == null || textRegions == null) {
- return;
- }
- Collection mediaTable = new HashSet();
- CSSNodeListImpl attrs = mediaList.getMedia();
- for (int i = 0; i != attrs.getLength(); i++) {
- mediaTable.add(attrs.item(i));
- }
-
- ITextRegion start = null;
- ITextRegion end = null;
-
- Iterator i = textRegions.iterator();
- ITextRegion textRegion = (ITextRegion) ((i.hasNext()) ? i.next() : null);
- while (textRegion != null) {
- if (textRegion.getType() == CSSRegionContexts.CSS_MEDIUM) {
- String mediumStr = region.getText(textRegion);
- if (0 < mediumStr.length()) {
- CSSAttrImpl attr = null;
- // is the medium already set ?
- Iterator iTable = mediaTable.iterator();
- while (iTable.hasNext()) {
- CSSAttrImpl cai = (CSSAttrImpl) iTable.next();
- if (mediumStr.equalsIgnoreCase(cai.getValue())) {
- attr = cai;
- mediaTable.remove(cai);
- break;
- }
- }
- if (attr == null) {
- // is not set. create new attribute
- String key = "mediumP" + mediaList.mediumCounter++; //$NON-NLS-1$
- mediaList.setAttribute(key, mediumStr);
- attr = mediaList.getAttributeNode(key);
- }
- attr.setRangeRegion(region, textRegion, textRegion);
- if (start == null) {
- start = textRegion;
- }
- end = textRegion;
- }
- }
- textRegion = (ITextRegion) ((i.hasNext()) ? i.next() : null);
- }
-
- if (start != null && end != null) {
- mediaList.setRangeRegion(region, start, end);
- }
- }
-
- /**
- *
- */
- private void setupCreationContext(IStructuredDocumentRegion region) {
- resetReparseRange();
- resetCreationTarget(region);
- }
-
- /**
- *
- */
- private void setupDeletionContext(IStructuredDocumentRegionList newStructuredDocumentRegions, IStructuredDocumentRegionList oldStructuredDocumentRegions) {
- fDeletionContext.setupContext(newStructuredDocumentRegions, oldStructuredDocumentRegions);
- }
-
- /**
- *
- */
- void setupUpdateContext(short updateMode, ICSSNode parentNode, ICSSNode targetNode) {
- fUpdateContext.setupContext(updateMode, parentNode, targetNode);
- }
-
- /**
- *
- */
- void shrinkContainer(CSSStructuredDocumentRegionContainer parent, CSSStructuredDocumentRegionContainer child) {
- if (child == null) {
- return;
- }
-
- boolean bModified = false;
- bModified = bModified || cleanupLastNode(child.getLastStructuredDocumentRegion(), parent);
- bModified = bModified || cleanupFirstNode(child.getFirstStructuredDocumentRegion(), parent);
-
- if (bModified) {
- if (parent != null) {
- for (ICSSNode node = parent.getFirstChild(); node != null; node = node.getNextSibling()) {
- if (child != node && node instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) node).propagateRangeStructuredDocumentRegion();
- }
- }
- }
- }
-
- child.setRangeStructuredDocumentRegion(null, null);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdateContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdateContext.java
deleted file mode 100644
index e7f4e9352d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdateContext.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import java.util.LinkedList;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.util.AbstractCssTraverser;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-
-/**
- *
- */
-class CSSModelUpdateContext {
-
-
- class CSSNodeUpdateTraverser extends AbstractCssTraverser {
- public CSSNodeUpdateTraverser() {
- super();
- setTraverseImported(false);
- setTraverseImportFirst(false);
- }
-
- public LinkedList getNodeList() {
- return fTravNodeList;
- }
-
- protected void begin(ICSSNode node) {
- fTravNodeList = new LinkedList();
- }
-
- protected short preNode(ICSSNode node) {
- if (node instanceof CSSStyleDeclarationImpl || node instanceof CSSAttrImpl || node instanceof MediaListImpl) {
- // skip
- }
- else {
- fTravNodeList.add(node);
- }
- if (node instanceof CSSPrimitiveContainer) {
- return TRAV_PRUNE;
- }
- else {
- return TRAV_CONT;
- }
- }
-
- LinkedList fTravNodeList = null;
- }
-
- ICSSNode fLastNode = null;
- ICSSNode fDeletionTargetParent = null;
- ICSSNode fDeletionTarget = null;
- LinkedList fNodeList = null;
- private short fUpdateMode = UPDATE_IDLE;
- static final short UPDATE_IDLE = 0;
- static final short UPDATE_INSERT_FNCONTAINER = 1;
- static final short UPDATE_INSERT_RCONTAINER = 2;
- static final short UPDATE_REMOVE_FNCONTAINER = 3;
- static final short UPDATE_REMOVE_RCONTAINER = 4;
- static final short UPDATE_CHANGE_RCONTAINER = 5;
-
- /**
- * CSSNodeUpdateQueue constructor comment.
- */
- CSSModelUpdateContext() {
- super();
- }
-
- /**
- *
- */
- void cleanupContext() {
- fNodeList = null;
- fDeletionTarget = null;
- fDeletionTargetParent = null;
- fUpdateMode = UPDATE_IDLE;
- }
-
- /**
- *
- */
- CounterImpl getCounter() {
- ICSSNode node = getNode();
- if (node instanceof CounterImpl) {
- return (CounterImpl) node;
- }
- else {
- CSSUtil.debugOut("CounterImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSCharsetRuleImpl getCSSCharsetRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSCharsetRuleImpl) {
- return (CSSCharsetRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSCharsetRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSFontFaceRuleImpl getCSSFontFaceRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSFontFaceRuleImpl) {
- return (CSSFontFaceRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSFontFaceRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSImportRuleImpl getCSSImportRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSImportRuleImpl) {
- return (CSSImportRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSImportRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSMediaRuleImpl getCSSMediaRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSMediaRuleImpl) {
- return (CSSMediaRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSMediaRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSPageRuleImpl getCSSPageRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSPageRuleImpl) {
- return (CSSPageRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSPageRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSPrimitiveValueImpl getCSSPrimitiveValue(short type) {
- ICSSNode node = getNode();
- if (node instanceof CSSPrimitiveValueImpl) {
- short nodeType = ((CSSPrimitiveValueImpl) node).getPrimitiveType();
- if (nodeType == type || ((nodeType == CSSPrimitiveValue.CSS_NUMBER || nodeType == ICSSPrimitiveValue.CSS_INTEGER) && (type == CSSPrimitiveValue.CSS_NUMBER || type == ICSSPrimitiveValue.CSS_INTEGER))) {
- return (CSSPrimitiveValueImpl) node;
- }
- }
-
- if (node instanceof CSSPrimitiveValueImpl) {
- CSSPrimitiveValueImpl value = (CSSPrimitiveValueImpl) node;
- CSSUtil.debugOut("CSSPrimitiveValueImpl [" + type + //$NON-NLS-1$
- "] is expected, but type is [" + //$NON-NLS-1$
- value.getPrimitiveType() + "]: \"" + value.generateSource() + "\"");//$NON-NLS-2$//$NON-NLS-1$
- }
- else {
- CSSUtil.debugOut("CSSPrimitiveValueImpl(" + type + //$NON-NLS-1$
- ") is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- }
-
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
-
- /**
- *
- */
- CSSPrimitiveValueImpl getCSSPrimitiveValueAny() {
- ICSSNode node = getNode();
- if (node instanceof CSSPrimitiveValueImpl) {
- return (CSSPrimitiveValueImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSPrimitiveValueImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSStyleDeclItemImpl getCSSStyleDeclItem(String propertyName) {
- ICSSNode node = getNode();
- if (node instanceof CSSStyleDeclItemImpl && ((CSSStyleDeclItemImpl) node).getPropertyName().equalsIgnoreCase(propertyName)) {
- return (CSSStyleDeclItemImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSStyleDeclItemImpl(" + propertyName + //$NON-NLS-1$
- ") is expected, but " + CSSUtil.getClassString(node));//$NON-NLS-1$
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- CSSStyleRuleImpl getCSSStyleRule() {
- ICSSNode node = getNode();
- if (node instanceof CSSStyleRuleImpl) {
- return (CSSStyleRuleImpl) node;
- }
- else {
- CSSUtil.debugOut("CSSStyleRuleImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- ICSSNode getDeletionTarget() {
- return fDeletionTarget;
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- ICSSNode getDeletionTargetParent() {
- return fDeletionTargetParent;
- }
-
- /**
- *
- */
- private ICSSNode getNode() {
- ICSSNode node = null;
- if (fNodeList != null && 0 < fNodeList.size()) {
- node = (ICSSNode) fNodeList.removeFirst();
- }
- fLastNode = node;
- return node;
- }
-
- /**
- *
- */
- int getNodeCount() {
- if (fNodeList != null) {
- return fNodeList.size();
- }
- else {
- return -1;
- }
- }
-
- /**
- *
- */
- // ICSSNode getParentNode() {
- // return fParentNode;
- // }
- /**
- *
- */
- RectImpl getRect() {
- ICSSNode node = getNode();
- if (node instanceof RectImpl) {
- return (RectImpl) node;
- }
- else {
- CSSUtil.debugOut("RectImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- RGBColorImpl getRGBColor() {
- ICSSNode node = getNode();
- if (node instanceof RGBColorImpl) {
- return (RGBColorImpl) node;
- }
- else {
- CSSUtil.debugOut("RGBColorImpl is expected, but " + //$NON-NLS-1$
- CSSUtil.getClassString(node));
- ungetNode();
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * @return short
- */
- short getUpdateMode() {
- return fUpdateMode;
- }
-
- /**
- *
- */
- boolean isActive() {
- return (fNodeList != null);
- }
-
- /**
- *
- */
- void setupContext(short updateMode, ICSSNode parentNode, ICSSNode targetNode) {
- fUpdateMode = updateMode;
-
- ICSSNode traverseRoot;
- if (updateMode == UPDATE_REMOVE_RCONTAINER || updateMode == UPDATE_INSERT_RCONTAINER || updateMode == UPDATE_CHANGE_RCONTAINER) {
- traverseRoot = parentNode;
- while (traverseRoot instanceof CSSRegionContainer) {
- traverseRoot = traverseRoot.getParentNode();
- }
- }
- else {
- traverseRoot = targetNode;
- }
-
- if (updateMode == UPDATE_REMOVE_RCONTAINER || updateMode == UPDATE_INSERT_RCONTAINER || // region
- // insert
- // =>
- // replace
- // flat
- // node
- updateMode == UPDATE_CHANGE_RCONTAINER || updateMode == UPDATE_REMOVE_FNCONTAINER) {
- fDeletionTarget = traverseRoot;
- if (fDeletionTarget == targetNode) {
- fDeletionTargetParent = parentNode;
- }
- else {
- fDeletionTargetParent = fDeletionTarget.getParentNode();
- }
- }
- else {
- fDeletionTarget = null;
- fDeletionTargetParent = null;
- }
-
- if (updateMode == UPDATE_INSERT_RCONTAINER || updateMode == UPDATE_INSERT_FNCONTAINER || updateMode == UPDATE_REMOVE_RCONTAINER || // region
- // remove
- // =>
- // re-insert
- // flat
- // node
- updateMode == UPDATE_CHANGE_RCONTAINER) {
- CSSNodeUpdateTraverser traverser = new CSSNodeUpdateTraverser();
- traverser.apply(traverseRoot);
- fNodeList = traverser.getNodeList();
- }
- else {
- fNodeList = null;
- }
- }
-
- /**
- *
- */
- private void ungetNode() {
- if (fNodeList != null && fLastNode != null) {
- fNodeList.addFirst(fLastNode);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdater.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdater.java
deleted file mode 100644
index d92bca5907..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdater.java
+++ /dev/null
@@ -1,561 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.formatter.AttrChangeContext;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceGenerator;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.events.NoChangeEvent;
-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.text.BasicStructuredDocument;
-import org.w3c.dom.DOMException;
-
-
-/**
- *
- */
-class CSSModelUpdater {
-
- private CSSModelImpl fModel = null;
- private CSSModelParser fParser = null;
-
- /**
- * CSSModelUpdater constructor comment.
- */
- CSSModelUpdater() {
- super();
- }
-
- /**
- *
- */
- CSSModelUpdater(CSSModelImpl model) {
- super();
- fModel = model;
- }
-
- /**
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private void attrInserted(CSSNodeImpl parentNode, CSSAttrImpl attr) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(parentNode);
-
- if (formatter == null) {
- CSSUtil.debugOut("Cannot get format adapter : " + parentNode.getClass().toString());//$NON-NLS-1$
- return;
- }
-
- short updateMode = CSSModelUpdateContext.UPDATE_INSERT_RCONTAINER;
- fParser.setupUpdateContext(updateMode, parentNode, attr);
-
- // get formatted info
- AttrChangeContext region = new AttrChangeContext();
- String text = new String(formatter.formatAttrChanged(parentNode, attr, true, region));
-
- // set text
- StructuredDocumentEvent result = insertText(region.start, region.end - region.start, text);
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private void attrRemoved(CSSNodeImpl parentNode, CSSAttrImpl attr) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(parentNode);
-
- if (formatter == null) {
- CSSUtil.debugOut("Cannot get format adapter : " + parentNode.getClass().toString());//$NON-NLS-1$
- return;
- }
-
- short updateMode = CSSModelUpdateContext.UPDATE_REMOVE_RCONTAINER;
- fParser.setupUpdateContext(updateMode, parentNode, attr);
-
- // get formatted info
- AttrChangeContext region = new AttrChangeContext();
- String text = new String(formatter.formatAttrChanged(parentNode, attr, false, region));
-
- // set text
- StructuredDocumentEvent result = insertText(region.start, region.end - region.start, text);
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- void attrReplaced(CSSNodeImpl parentNode, CSSNodeImpl newAttr, CSSNodeImpl oldAttr) {
- if (parentNode == null) {
- return;
- }
-
- if (oldAttr != null) {
- attrRemoved(parentNode, (CSSAttrImpl) oldAttr);
- }
-
- if (newAttr != null) {
- attrInserted(parentNode, (CSSAttrImpl) newAttr);
- }
- }
-
- /**
- *
- */
- private void childInserted(CSSNodeImpl parentNode, CSSNodeImpl node) {
- short updateMode = CSSModelUpdateContext.UPDATE_IDLE;
-
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- updateMode = CSSModelUpdateContext.UPDATE_INSERT_FNCONTAINER;
- }
- else if (node instanceof CSSRegionContainer) {
- updateMode = CSSModelUpdateContext.UPDATE_INSERT_RCONTAINER;
- }
- else {
- CSSUtil.debugOut("What's this node? : " + node.getClass().toString());//$NON-NLS-1$
- return;
- }
-
- fParser.setupUpdateContext(updateMode, parentNode, node);
-
- StructuredDocumentEvent result = defaultInserted(parentNode, node);
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- private void childRemoved(CSSNodeImpl parentNode, CSSNodeImpl node) {
- short updateMode = CSSModelUpdateContext.UPDATE_IDLE;
-
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- updateMode = CSSModelUpdateContext.UPDATE_REMOVE_FNCONTAINER;
- }
- else if (node instanceof CSSRegionContainer) {
- updateMode = CSSModelUpdateContext.UPDATE_REMOVE_RCONTAINER;
- }
- else {
- CSSUtil.debugOut("What's this node? : " + node.getClass().toString());//$NON-NLS-1$
- return;
- }
-
- fParser.setupUpdateContext(updateMode, parentNode, node);
-
- CSSNodeImpl prev = getOldPrevious(parentNode, node);
- CSSNodeImpl next = getOldNext(parentNode, node);
- int insertPos = -1, endPos = -1;
- String source = "";//$NON-NLS-1$
- if (prev != null) {
- insertPos = prev.getEndOffset();
- }
- else {
- insertPos = node.getStartOffset();
- insertPos -= nearestSpaceLengthBefore(parentNode, insertPos);
- }
- if (next != null) {
- endPos = next.getStartOffset();
- }
- else {
- endPos = node.getEndOffset();
- endPos += nearestSpaceLengthAfter(parentNode, endPos);
- }
- source = getSpaceBefore(parentNode, next, node);
- StructuredDocumentEvent result;
- if (source.length() > 0) {
- result = insertText(insertPos, endPos - insertPos, source);
- }
- else {
- result = removeText(insertPos, endPos - insertPos);
- }
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
-
- /*
- * int removeStart = -1; int removeEnd = -1; if (node instanceof
- * CSSStructuredDocumentRegionContainer) {
- * CSSStructuredDocumentRegionContainer container =
- * (CSSStructuredDocumentRegionContainer)node;
- * IStructuredDocumentRegion firstNode =
- * container.getFirstStructuredDocumentRegion();
- * IStructuredDocumentRegion lastNode =
- * container.getLastStructuredDocumentRegion(); if (firstNode != null &&
- * lastNode != null) { removeStart = firstNode.getStart(); removeEnd =
- * lastNode.getEnd(); } } else if (node instanceof CSSRegionContainer) {
- * CSSRegionContainer container = (CSSRegionContainer)node;
- * ITextRegion firstRegion = container.getFirstRegion(); ITextRegion
- * lastRegion = container.getLastRegion(); if (firstRegion != null &&
- * lastRegion != null) { removeStart = firstRegion.getStartOffset();
- * removeEnd = lastRegion.getEndOffset(); } } if (0 <= removeStart &&
- * 0 <= removeEnd) { removeText(removeStart, removeEnd - removeStart +
- * 1); }
- */
- }
-
- /**
- *
- */
- void childReplaced(CSSNodeImpl parentNode, CSSNodeImpl newChild, CSSNodeImpl oldChild) {
- if (parentNode == null) {
- return;
- }
-
- if (oldChild != null) {
- childRemoved(parentNode, oldChild);
- }
-
- if (newChild != null) {
- childInserted(parentNode, newChild);
- }
- }
-
- /**
- *
- */
- private StructuredDocumentEvent defaultInserted(CSSNodeImpl parentNode, CSSNodeImpl node) {
- int insertPos = -1;
- ICSSNode sibling;
- String preSpace = "", postSpace = "";//$NON-NLS-2$//$NON-NLS-1$
- int length = 0;
-
- if (insertPos < 0) {
- if ((sibling = node.getPreviousSibling()) != null) {
- // after previous child
- insertPos = getTextEnd(sibling);
- }
- }
-
- if (insertPos < 0) {
- if ((sibling = node.getNextSibling()) != null) {
- // before next child
- insertPos = getTextStart(sibling);
- }
- }
-
- if (insertPos < 0) {
- // position of parent
- insertPos = getChildInsertPos(parentNode);
- }
-
- if (insertPos < 0) {
- // firsttime
- insertPos = 0;
- }
-
- // format previous spaces
- length = nearestSpaceLengthBefore(parentNode, insertPos);
- insertPos -= length;
- preSpace = getSpaceBefore(parentNode, node, null);
- // format post spaces
- length += nearestSpaceLengthAfter(parentNode, insertPos + length);
- postSpace = getSpaceBefore(parentNode, node.getNextSibling(), null);
-
- // set text
- String text = preSpace + node.generateSource().trim() + postSpace;
- return insertText(insertPos, length, text);
- }
-
- /**
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private int getChildInsertPos(CSSNodeImpl node) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(node);
- if (formatter != null)
- return formatter.getChildInsertPos(node);
- else
- return node.getEndOffset();
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private CSSNodeImpl getOldNext(CSSNodeImpl parentNode, CSSNodeImpl node) {
- CSSNodeImpl child = (CSSNodeImpl) parentNode.getLastChild();
- CSSNodeImpl ret = null;
- while (child != null) {
- if (node.getEndOffset() < child.getEndOffset())
- ret = child;
- else
- break;
- child = (CSSNodeImpl) child.getPreviousSibling();
- }
- return ret;
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private CSSNodeImpl getOldPrevious(CSSNodeImpl parentNode, CSSNodeImpl node) {
- CSSNodeImpl child = (CSSNodeImpl) parentNode.getFirstChild();
- CSSNodeImpl ret = null;
- while (child != null) {
- if (child.getStartOffset() < node.getStartOffset())
- ret = child;
- else
- break;
- child = (CSSNodeImpl) child.getNextSibling();
- }
- return ret;
- }
-
- /**
- * @return java.lang.String
- * @param parentNode
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- * @param node
- * org.eclipse.wst.css.core.model.CSSNodeImpl
- */
- private String getSpaceBefore(ICSSNode parentNode, ICSSNode node, ICSSNode toRemove) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) parentNode);
-
- if (formatter != null) {
- org.eclipse.jface.text.IRegion exceptFor = null;
- if (toRemove != null) {
- CSSNodeImpl remove = (CSSNodeImpl) toRemove;
- exceptFor = new org.eclipse.jface.text.Region(remove.getStartOffset(), remove.getEndOffset() - remove.getStartOffset());
- }
- return formatter.formatBefore(parentNode, node, exceptFor).toString();
- }
- else
- return "";//$NON-NLS-1$
- }
-
- /**
- *
- */
- private int getTextEnd(ICSSNode node) {
- int end = -1;
- if (node != null) {
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- end = ((CSSStructuredDocumentRegionContainer) node).getEndOffset();
- }
- else if (node instanceof CSSRegionContainer) {
- end = ((CSSRegionContainer) node).getEndOffset();
- }
- }
- return end;
- }
-
- /**
- *
- */
- private int getTextStart(ICSSNode node) {
- int start = -1;
- if (node != null) {
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- start = ((CSSStructuredDocumentRegionContainer) node).getStartOffset();
- }
- else if (node instanceof CSSRegionContainer) {
- start = ((CSSRegionContainer) node).getStartOffset();
- }
- }
- return start;
- }
-
- /**
- *
- */
- private StructuredDocumentEvent insertText(int start, int oldLength, String text) {
- StructuredDocumentEvent result = null;
- BasicStructuredDocument structuredDocument = (BasicStructuredDocument) fModel.getStructuredDocument();
- if (structuredDocument != null) {
- if (text != null && 0 < oldLength && start + oldLength <= structuredDocument.getLength()) {
- // minimize text change
- String delText = structuredDocument.get(start, oldLength);
- int newLength = text.length();
- int shorterLen = Math.min(oldLength, newLength);
- int stMatchLen;
- for (stMatchLen = 0; stMatchLen < shorterLen && text.charAt(stMatchLen) == delText.charAt(stMatchLen); stMatchLen++) {
- //
- }
- if (0 < stMatchLen && stMatchLen < shorterLen && text.charAt(stMatchLen - 1) == 0x000d && (text.charAt(stMatchLen) == 0x000a || delText.charAt(stMatchLen) == 0x000a)) {
- // must not divide 0d->0a sequence
- stMatchLen--;
- }
- if (stMatchLen == shorterLen) {
- if (oldLength < newLength) { // just insert
- oldLength = 0;
- start += stMatchLen;
- text = text.substring(stMatchLen);
- }
- else if (newLength < oldLength) { // just remove
- oldLength -= stMatchLen;
- start += stMatchLen;
- text = null;
- }
- else { // nothing to do
- oldLength = 0;
- text = null;
- }
- }
- else {
- int edMatchLen;
- for (edMatchLen = 0; stMatchLen + edMatchLen < shorterLen && text.charAt(newLength - edMatchLen - 1) == delText.charAt(oldLength - edMatchLen - 1); edMatchLen++) {
- //
- }
- if (0 < edMatchLen && text.charAt(newLength - edMatchLen) == 0x000a && ((edMatchLen < newLength && text.charAt(newLength - edMatchLen - 1) == 0x000d) || (edMatchLen < oldLength && delText.charAt(oldLength - edMatchLen - 1) == 0x000d))) {
- // must not divide 0d->0a sequence
- edMatchLen--;
- }
- oldLength -= stMatchLen + edMatchLen;
- start += stMatchLen;
- if (stMatchLen + edMatchLen < newLength) {
- text = text.substring(stMatchLen, newLength - edMatchLen);
- }
- else {
- text = null;
- }
- }
- }
- if (0 < oldLength || text != null) {
- // String delText = structuredDocument.get(start, oldLength);
- result = structuredDocument.replaceText(fModel, start, oldLength, text);
- }
- }
- return result;
- }
-
- /**
- * @return int
- * @param insertPos
- * int
- */
- private int nearestSpaceLengthAfter(CSSNodeImpl node, int insertPos) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(node);
- if (formatter != null) {
- return formatter.getLengthToReformatAfter(node, insertPos);
- }
- else
- return 0;
- }
-
- /**
- * @return int
- * @param insertPos
- * int
- */
- private int nearestSpaceLengthBefore(CSSNodeImpl node, int insertPos) {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(node);
- if (formatter != null) {
- return formatter.getLengthToReformatBefore(node, insertPos);
- }
- else
- return 0;
- }
-
- /**
- *
- */
- private StructuredDocumentEvent removeText(int start, int length) {
- StructuredDocumentEvent result = null;
- IStructuredDocument structuredDocument = fModel.getStructuredDocument();
- if (structuredDocument != null) {
- result = structuredDocument.replaceText(fModel, start, length, new String(""));//$NON-NLS-1$
- }
- return result;
- }
-
- /**
- *
- */
- void setParser(CSSModelParser parser) {
- fParser = parser;
- }
-
- /**
- *
- */
- void valueChanged(CSSNodeImpl node, String oldValue) {
- if (!(node instanceof CSSRegionContainer)) {
- CSSUtil.debugOut("Too Bad.." + //$NON-NLS-1$
- ((node == null) ? "null" : node.getClass().toString()));//$NON-NLS-1$
- return;
- }
-
- int start = node.getStartOffset();
-
- if (node.getNodeType() == ICSSNode.ATTR_NODE) {
- ICSSAttr attr = (ICSSAttr) node;
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) attr.getOwnerCSSNode());
- if (formatter != null)
- start = formatter.getAttrInsertPos(attr.getOwnerCSSNode(), attr.getName());
- }
-
- int oldLength = (oldValue == null) ? 0 : oldValue.length();
- // flash old IStructuredDocumentRegion/ITextRegion
- if (node instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) node).setFirstStructuredDocumentRegion(null);
- ((CSSStructuredDocumentRegionContainer) node).setLastStructuredDocumentRegion(null);
- }
- else if (node instanceof CSSRegionContainer) {
- ((CSSRegionContainer) node).setRangeRegion(null, null, null);
- }
- // generate new source
- String newValue = node.generateSource();
-
- ICSSNode parent;
- if (node.getNodeType() == ICSSNode.ATTR_NODE) {
- parent = ((ICSSAttr) node).getOwnerCSSNode();
- }
- else {
- parent = node.getParentNode();
- }
-
- fParser.setupUpdateContext(CSSModelUpdateContext.UPDATE_CHANGE_RCONTAINER, parent, node);
-
- StructuredDocumentEvent result = insertText(start, oldLength, newValue);
-
- int nRemains = fParser.cleanupUpdateContext();
-
- if (0 < nRemains && !(result instanceof NoChangeEvent)) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java
deleted file mode 100644
index f9b137a19f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.css.core.internal.CSSCoreMessages;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNodeList;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSRuleContainer;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-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;
-
-/**
- *
- */
-class CSSModelUtil {
-
- /**
- *
- */
- static boolean canContainBrace(ICSSNode node) {
- return (node != null && (node instanceof ICSSRuleContainer || node instanceof CSSRuleDeclContainer)) ? true : false;
- }
-
- /**
- * @param parent
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- static void cleanupContainer(ICSSNode parent) {
- if (parent == null) {
- return;
- }
- for (ICSSNode child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
- cleanupContainer(child);
- }
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) parent).setRangeStructuredDocumentRegion(null, null);
- }
- else if (parent instanceof CSSRegionContainer) {
- ((CSSRegionContainer) parent).setRangeRegion(null, null, null);
- }
- }
-
- static boolean diagnoseNode(ICSSNode parent, IStructuredDocument structuredDocument) {
- // check this
- Vector errors = new Vector();
- if (parent instanceof CSSStructuredDocumentRegionContainer) {
- CSSStructuredDocumentRegionContainer node = (CSSStructuredDocumentRegionContainer) parent;
- String nodeText = CSSUtil.getClassString(node) + ": ";//$NON-NLS-1$
- IStructuredDocumentRegion flatNode = node.getFirstStructuredDocumentRegion();
- if (flatNode == null && (!(node instanceof CSSStyleDeclarationImpl || node instanceof CSSStyleSheetImpl) || node.getFirstChild() != null)) {
- errors.add(NLS.bind(CSSCoreMessages._1concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first flat node is null."
- }
- else if (flatNode != null) {
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(flatNode.getStart());
- if (flatNode != modelNode) {
- errors.add(NLS.bind(CSSCoreMessages._2concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first flat node is not in model."
- }
- }
- flatNode = node.getLastStructuredDocumentRegion();
- if (flatNode == null && (!(node instanceof CSSStyleDeclarationImpl || node instanceof CSSStyleSheetImpl) || node.getFirstChild() != null)) {
- errors.add(NLS.bind(CSSCoreMessages._3concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last flat node is null."
- }
- else if (flatNode != null) {
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(flatNode.getStart());
- if (flatNode != modelNode) {
- errors.add(NLS.bind(CSSCoreMessages._4concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last flat node is not in model."
- }
- }
- }
- else if (parent instanceof CSSRegionContainer) {
- CSSRegionContainer node = (CSSRegionContainer) parent;
- String nodeText = CSSUtil.getClassString(node) + ": ";//$NON-NLS-1$
- ITextRegion region = node.getFirstRegion();
- IStructuredDocumentRegion parentRegion = node.getDocumentRegion();
- if (region == null && (!(node instanceof MediaListImpl) || node.getFirstChild() != null)) {
- errors.add(NLS.bind(CSSCoreMessages._25concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is null."
- }
- else if (region != null) {
- int offset = parentRegion.getStartOffset(region);
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
- ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
- if (region != modelRegion) {
- errors.add(NLS.bind(CSSCoreMessages._26concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is not in model."
- }
- }
- region = node.getLastRegion();
- if (region == null && (!(node instanceof MediaListImpl) || node.getFirstChild() != null)) {
- errors.add(NLS.bind(CSSCoreMessages._27concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is null."
- }
- else if (region != null) {
- int offset = parentRegion.getStartOffset(region);
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
- ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
- if (region != modelRegion) {
- errors.add(NLS.bind(CSSCoreMessages._28concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is not in model."
- }
- }
- }
-
- ICSSNodeList attrs = parent.getAttributes();
- int nAttrs = attrs.getLength();
- for (int i = 0; i < nAttrs; i++) {
- ICSSAttr attr = (ICSSAttr) attrs.item(i);
- CSSRegionContainer node = (CSSRegionContainer) attr;
- String nodeText = CSSUtil.getClassString(node) + "(" + attr.getName() + "): ";//$NON-NLS-2$//$NON-NLS-1$
- ITextRegion region = node.getFirstRegion();
- IStructuredDocumentRegion parentRegion = node.getDocumentRegion();
- if (region == null && 0 < attr.getValue().length()) {
- errors.add(NLS.bind(CSSCoreMessages._5concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is null."
- }
- else if (region != null) {
- int offset = parentRegion.getStartOffset(region);
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
- ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
- if (region != modelRegion) {
- errors.add(NLS.bind(CSSCoreMessages._6concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}first region is not in model."
- }
- }
- region = node.getLastRegion();
- if (region == null && 0 < attr.getValue().length()) {
- errors.add(NLS.bind(CSSCoreMessages._7concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is null."
- }
- else if (region != null) {
- int offset = parentRegion.getStartOffset(region);
- IStructuredDocumentRegion modelNode = structuredDocument.getRegionAtCharacterOffset(offset);
- ITextRegion modelRegion = modelNode.getRegionAtCharacterOffset(offset);
- if (region != modelRegion) {
- errors.add(NLS.bind(CSSCoreMessages._8concat_ERROR_, (new Object[]{nodeText}))); //$NON-NLS-1$ = "{0}last region is not in model."
- }
- }
- }
-
- if (!errors.isEmpty()) {
- Iterator i = errors.iterator();
- while (i.hasNext()) {
- CSSUtil.debugOut((String) i.next());
- }
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * @return boolean
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- static boolean diagnoseTree(ICSSNode parent, IStructuredDocument structuredDocument) {
- if (parent == null) {
- return false;
- }
- // check children
- for (ICSSNode child = parent.getFirstChild(); child != null; child = child.getNextSibling()) {
- diagnoseTree(child, structuredDocument);
- }
-
- diagnoseNode(parent, structuredDocument);
-
- return true;
- }
-
- /**
- * If needed, modify last flat node
- */
- static void expandStructuredDocumentRegionContainer(CSSStructuredDocumentRegionContainer target, IStructuredDocumentRegion flatNode) {
- if (target == null || flatNode == null) {
- return;
- }
-
- IStructuredDocumentRegion lastNode = target.getLastStructuredDocumentRegion();
- if (lastNode == flatNode) {
- return;
- }
- if (lastNode == null || lastNode.getStart() < flatNode.getStart()) {
- target.setLastStructuredDocumentRegion(flatNode);
- }
- }
-
- /*
- *
- */
- static ICSSNode findBraceContainer(ICSSNode node) {
- for (ICSSNode i = node; i != null; i = i.getParentNode()) {
- if (CSSModelUtil.canContainBrace(i)) {
- return i;
- }
- }
- return null;
- }
-
- /**
- *
- */
- static int getDepth(ICSSNode node) {
- int depth = -1;
- while (node != null) {
- depth++;
- node = node.getParentNode();
- }
- return depth;
- }
-
- /**
- *
- */
- static boolean isBraceClosed(ICSSNode node) {
- boolean bClosed = true;
- if (!(node instanceof CSSStructuredDocumentRegionContainer)) {
- return bClosed;
- }
-
- IStructuredDocumentRegion first = ((CSSStructuredDocumentRegionContainer) node).getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion last = ((CSSStructuredDocumentRegionContainer) node).getLastStructuredDocumentRegion();
- if (first == null || last == null) {
- return bClosed;
- }
- if (last.getStart() < first.getStart()) {
- return bClosed;
- }
-
- IStructuredDocumentRegion flatNode = first;
- int nOpen = 0;
- int nClose = 0;
- do {
- String type = CSSUtil.getStructuredDocumentRegionType(flatNode);
- if (type == CSSRegionContexts.CSS_LBRACE) {
- nOpen++;
- }
- else if (type == CSSRegionContexts.CSS_RBRACE) {
- nClose++;
- }
- flatNode = flatNode.getNext();
- }
- while (flatNode != null && flatNode != last);
-
- if ((nOpen == 0 && nClose == 0) || nClose < nOpen) {
- bClosed = false;
- }
-
- return bClosed;
- }
-
- /**
- * only for insertion..
- */
- static boolean isInterruption(CSSStructuredDocumentRegionContainer target, IStructuredDocumentRegion flatNode) {
- if (target == null || flatNode == null) {
- return false;
- }
- int start = flatNode.getStart();
- IStructuredDocumentRegion firstNode = target.getFirstStructuredDocumentRegion();
- IStructuredDocumentRegion lastNode = target.getLastStructuredDocumentRegion();
- if (firstNode != null && firstNode.getStart() < start && lastNode != null && start < lastNode.getStart()) {
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- static boolean isParentOf(ICSSNode parent, ICSSNode child) {
- if (parent == null || child == null) {
- return false;
- }
-
- for (ICSSNode node = child; node != null; node = node.getParentNode()) {
- if (parent == node) {
- return true;
- }
- }
-
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNamedNodeMapImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNamedNodeMapImpl.java
deleted file mode 100644
index 9d21149b4d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNamedNodeMapImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNamedNodeMap;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-
-/**
- *
- */
-public class CSSNamedNodeMapImpl extends CSSNodeListImpl implements ICSSNamedNodeMap {
-
- /**
- * CSSNamedNodeMapImpl constructor comment.
- */
- CSSNamedNodeMapImpl() {
- super();
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param name
- * java.lang.String
- */
- public ICSSNode getNamedItem(String name) {
- Iterator it = nodes.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj instanceof CSSAttrImpl && ((CSSAttrImpl) obj).getName().compareToIgnoreCase(name) == 0) {
- return (ICSSNode) obj;
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeImpl.java
deleted file mode 100644
index 0f37dac06c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeImpl.java
+++ /dev/null
@@ -1,470 +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.wst.css.core.internal.document;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceGenerator;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNamedNodeMap;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNodeList;
-import org.eclipse.wst.css.core.internal.util.ImportRuleCollector;
-import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
-import org.eclipse.wst.sse.core.internal.provisional.AbstractNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.w3c.dom.DOMException;
-
-
-/**
- *
- */
-public abstract class CSSNodeImpl extends AbstractNotifier implements ICSSNode, IndexedRegion {
-
- private CSSDocumentImpl fOwnerDocument = null;
- private CSSNodeImpl fParentNode = null;
- private CSSNodeImpl fNextSibling = null;
- private CSSNodeImpl fPreviousSibling = null;
- private CSSNodeImpl fFirstChild = null;
- private CSSNodeImpl fLastChild = null;
- protected CSSNamedNodeMapImpl fAttrs = null;
-
- /**
- * CSSNodeImpl constructor comment.
- */
- CSSNodeImpl() {
- super();
- }
-
- CSSNodeImpl(CSSNodeImpl that) {
- if (that != null) {
- this.fOwnerDocument = that.fOwnerDocument;
- if (that.fAttrs != null) {
- int nAttrs = that.fAttrs.getLength();
- for (int i = 0; i < nAttrs; i++) {
- CSSAttrImpl attr = (CSSAttrImpl) that.fAttrs.item(i);
- setAttribute(attr.getName(), attr.getValue());
- }
- }
- }
- }
- /**
- * currently public but may be made default access protected in future.
- */
- public CSSNodeImpl appendChild(CSSNodeImpl newChild) throws org.w3c.dom.DOMException {
- return insertBefore(newChild, null);
- }
- /**
- * currently public but may be made default access protected in future.
- */
- protected void cloneChildNodes(ICSSNode newParent, boolean deep) {
- if (newParent == null || newParent == this)
- return;
-
- CSSNodeImpl container = (CSSNodeImpl) newParent;
- container.removeChildNodes();
-
- for (ICSSNode child = getFirstChild(); child != null; child = child.getNextSibling()) {
- CSSNodeImpl cloned = (CSSNodeImpl) child.cloneNode(deep);
- if (cloned != null)
- container.appendChild(cloned);
- }
- }
-
- /**
- * @return boolean
- * @param offset
- * int
- */
- public boolean contains(int offset) {
- return (getStartOffset() <= offset && offset < getEndOffset());
- }
-
- /**
- *
- * currently public but may be made default access protected in future.
- *
- * @return java.lang.String
- */
- protected String generateSource() {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(this);
- return formatter.format(this).toString();
- }
-
- /**
- *
- * currently public but may be made default access protected in future.
- *
- * @return java.lang.String
- * @param name
- * java.lang.String
- */
- protected String getAttribute(String name) {
- CSSAttrImpl attr = getAttributeNode(name);
- if (attr != null)
- return attr.getValue();
- return null;
- }
-
- protected CSSAttrImpl getAttributeNode(String name) {
- if (fAttrs == null)
- return null;
-
- int nAttrs = fAttrs.getLength();
- for (int i = 0; i < nAttrs; i++) {
- CSSAttrImpl attr = (CSSAttrImpl) fAttrs.item(i);
- if (attr.matchName(name))
- return attr;
- }
- return null;
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNamedNodeMap
- */
- public ICSSNamedNodeMap getAttributes() {
- if (fAttrs == null)
- fAttrs = new CSSNamedNodeMapImpl();
- return fAttrs;
- }
-
- public ICSSNodeList getChildNodes() {
- CSSNodeListImpl list = new CSSNodeListImpl();
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- list.appendNode(node);
- }
- return list;
- }
-
- ICSSNode getCommonAncestor(ICSSNode node) {
- if (node == null)
- return null;
-
- for (ICSSNode na = node; na != null; na = na.getParentNode()) {
- for (ICSSNode ta = this; ta != null; ta = ta.getParentNode()) {
- if (ta == na)
- return ta;
- }
- }
-
- return null; // not found
- }
-
- CSSDocumentImpl getContainerDocument() {
- for (ICSSNode node = this; node != null; node = node.getParentNode()) {
- if (node instanceof CSSDocumentImpl) {
- CSSDocumentImpl doc = (CSSDocumentImpl) node;
- if (doc.isDocument())
- return doc;
- }
- }
- return null;
- }
-
- CSSNodeImpl getContainerNode(int offset) {
- if (!contains(offset))
- return null;
-
- for (ICSSNode child = getFirstChild(); child != null; child = child.getNextSibling()) {
- ICSSNode found = ((CSSNodeImpl) child).getContainerNode(offset);
- if (found != null)
- return (CSSNodeImpl) found;
- }
-
- return this;
- }
-
- /**
- */
- public FactoryRegistry getFactoryRegistry() {
- ICSSModel model = getOwnerDocument().getModel();
- if (model != null) {
- FactoryRegistry reg = model.getFactoryRegistry();
- if (reg != null)
- return reg;
- }
- return null;
- }
-
- public ICSSNode getFirstChild() {
- return this.fFirstChild;
- }
-
- public ICSSNode getLastChild() {
- return this.fLastChild;
- }
-
- public ICSSNode getNextSibling() {
- return this.fNextSibling;
- }
-
- ICSSNode getNodeAt(int offset) {
- // the same as getContainerNode()
- return getContainerNode(offset);
- }
-
- public ICSSDocument getOwnerDocument() {
- return this.fOwnerDocument;
- }
-
- public ICSSNode getParentNode() {
- return this.fParentNode;
- }
-
- public ICSSNode getPreviousSibling() {
- return this.fPreviousSibling;
- }
-
- ICSSNode getRootNode() {
- CSSNodeImpl parent = (CSSNodeImpl) getParentNode();
- if (parent == null)
- return this;
- return parent.getRootNode();
- }
-
- /**
- * @return boolean
- */
- public boolean hasChildNodes() {
- return (this.fFirstChild != null);
- }
-
- /**
- * @return boolean
- */
- public boolean hasProperties() {
- return false;
- }
- /**
- * currently public but may be made default access protected in future.
- */
- public CSSNodeImpl insertBefore(CSSNodeImpl newChild, CSSNodeImpl refChild) throws org.w3c.dom.DOMException {
- if (newChild == null)
- return null;
-
- CSSNodeImpl child = newChild;
- CSSNodeImpl next = refChild;
- CSSNodeImpl prev = null;
- if (next == null) {
- prev = this.fLastChild;
- this.fLastChild = child;
- }
- else {
- prev = (CSSNodeImpl) next.getPreviousSibling();
- next.setPreviousSibling(child);
- }
-
- if (prev == null)
- this.fFirstChild = child;
- else
- prev.setNextSibling(child);
- child.setPreviousSibling(prev);
- child.setNextSibling(next);
- child.setParentNode(this);
-
- notifyChildReplaced(child, null);
-
- return newChild;
- }
-
- protected void notifyAttrReplaced(CSSNodeImpl newAttr, CSSNodeImpl oldAttr) {
- // for model
- ICSSDocument doc = getContainerDocument();
- if (doc == null)
- return;
- CSSModelImpl model = (CSSModelImpl) doc.getModel();
- if (model == null)
- return;
- model.attrReplaced(this, newAttr, oldAttr);
-
- // for adapters
- int type = CHANGE;
- if (newAttr == null)
- type = REMOVE;
- else if (oldAttr == null)
- type = ADD;
- notify(type, oldAttr, oldAttr, newAttr, getStartOffset());
- }
-
- protected void notifyChildReplaced(CSSNodeImpl newChild, CSSNodeImpl oldChild) {
- // for model
- ICSSDocument doc = getContainerDocument();
- if (doc == null)
- return;
- CSSModelImpl model = (CSSModelImpl) doc.getModel();
- if (model == null)
- return;
- model.childReplaced(this, newChild, oldChild);
-
- // for adapters
- int type = CHANGE;
- if (newChild == null)
- type = REMOVE;
- else if (oldChild == null)
- type = ADD;
- notify(type, oldChild, oldChild, newChild, getStartOffset());
- }
-
- void removeAttributeNode(CSSNodeImpl attr) {
- // find
- int nAttrs = fAttrs.getLength();
- for (int i = 0; i < nAttrs; i++) {
- if (fAttrs.item(i) == attr) {
- fAttrs.removeNode(i);
- notifyAttrReplaced(null, attr);
- return;
- }
- }
- }
-
- protected CSSNodeImpl removeChild(CSSNodeImpl oldChild) throws org.w3c.dom.DOMException {
- if (oldChild == null)
- return null;
- if (oldChild.getParentNode() != this)
- return null;
-
- // close import rules
- ImportRuleCollector trav = new ImportRuleCollector();
- trav.apply(oldChild);
- Iterator it = trav.getRules().iterator();
- while (it.hasNext()) {
- ((CSSImportRuleImpl) it.next()).closeStyleSheet();
- }
-
- CSSNodeImpl child = oldChild;
- CSSNodeImpl prev = (CSSNodeImpl) child.getPreviousSibling();
- CSSNodeImpl next = (CSSNodeImpl) child.getNextSibling();
-
- if (prev == null)
- this.fFirstChild = next;
- else
- prev.setNextSibling(next);
-
- if (next == null)
- this.fLastChild = prev;
- else
- next.setPreviousSibling(prev);
-
- child.setPreviousSibling(null);
- child.setNextSibling(null);
- child.setParentNode(null);
-
- notifyChildReplaced(null, child);
-
- return child;
- }
-
- /**
- *
- */
- void removeChildNodes() {
- ICSSNode nextChild = null;
- for (ICSSNode child = getFirstChild(); child != null; child = nextChild) {
- nextChild = child.getNextSibling();
- removeChild((CSSNodeImpl) child);
- }
- }
-
- protected CSSNodeImpl replaceChild(CSSNodeImpl newChild, CSSNodeImpl oldChild) throws org.w3c.dom.DOMException {
- if (oldChild == null)
- return newChild;
- if (newChild != null)
- insertBefore(newChild, oldChild);
- return removeChild(oldChild);
- }
-
- /**
- *
- * currently public but may be made default access protected in future.
- *
- * @param name
- * java.lang.String
- * @param value
- * java.lang.String
- */
- public void setAttribute(String name, String value) {
- if (name == null)
- return;
-
- CSSAttrImpl attr = getAttributeNode(name);
- if (attr != null) {
- String oldValue = attr.getValue();
- if (value != null && value.equals(oldValue))
- return;
- if (value == null) {
- if (oldValue != null) {
- removeAttributeNode(attr);
- }
- return;
- }
- }
- else {
- if (value == null)
- return;
- if (fAttrs == null)
- fAttrs = new CSSNamedNodeMapImpl();
- CSSDocumentImpl doc = (CSSDocumentImpl) getOwnerDocument();
- if (doc == null)
- return;
- attr = (CSSAttrImpl) doc.createCSSAttr(name);
- attr.setOwnerCSSNode(this);
- fAttrs.appendNode(attr);
- notifyAttrReplaced(attr, null);
- }
- attr.setValue(value);
- }
-
- /**
- * @param cssText
- * java.lang.String
- */
- public void setCssText(String cssText) {
- // TODO : call flat model parser and replace myself with new three!!
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
-
- private void setNextSibling(ICSSNode nextSibling) {
- this.fNextSibling = (CSSNodeImpl) nextSibling;
- }
- /**
- * currently public but may be made default access protected in future.
- */
- public void setOwnerDocument(ICSSDocument ownerDocument) {
- this.fOwnerDocument = (CSSDocumentImpl) ownerDocument;
- }
-
- private void setParentNode(ICSSNode parentNode) {
- this.fParentNode = (CSSNodeImpl) parentNode;
- }
-
- private void setPreviousSibling(ICSSNode previousSibling) {
- this.fPreviousSibling = (CSSNodeImpl) previousSibling;
- }
-
- public int getLength() {
- int result = -1;
- int start = getStartOffset();
- if (start >= 0) {
- int end = getEndOffset();
- if (end >= 0) {
- result = end - start;
- if (result < -1) {
- result = -1;
- }
- }
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeListImpl.java
deleted file mode 100644
index ed13871af7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeListImpl.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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNodeList;
-
-class CSSNodeListImpl extends AbstractCSSNodeList implements ICSSNodeList {
-
- CSSNodeListImpl() {
- super();
- }
-
- public ICSSNode item(int index) {
- return itemImpl(index);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPageRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPageRuleImpl.java
deleted file mode 100644
index e49d5789ee..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPageRuleImpl.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPageRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-
-
-/**
- *
- */
-class CSSPageRuleImpl extends CSSRuleDeclContainer implements ICSSPageRule {
-
- ICSSSelectorList fSelectorList = new CSSSelectorListImpl(null);
-
- /**
- *
- */
- CSSPageRuleImpl() {
- super();
- }
-
- CSSPageRuleImpl(CSSPageRuleImpl that) {
- super(that);
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSPageRuleImpl cloned = new CSSPageRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return java.lang.String
- */
- String extractPreString() {
- StringBuffer preStr = new StringBuffer("@page ");//$NON-NLS-1$
- preStr.append(getSelectorText());
-
- return preStr.toString();
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return PAGERULE_NODE;
- }
-
- public ICSSSelectorList getSelectors() {
- return fSelectorList;
- }
-
- /**
- * The parsable textual representation of the page selector for the rule.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
- * readonly.
- */
- public String getSelectorText() {
- return getAttribute(SELECTOR);
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return PAGE_RULE;
- }
-
- /**
- *
- */
- public void setSelectorText(String selectorText) throws org.w3c.dom.DOMException {
- setAttribute(SELECTOR, selectorText);
- fSelectorList = new CSSSelectorListImpl(selectorText);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveContainer.java
deleted file mode 100644
index 8d1f18699f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveContainer.java
+++ /dev/null
@@ -1,39 +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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-
-/**
- *
- */
-abstract class CSSPrimitiveContainer extends CSSPrimitiveValueImpl {
-
- CSSPrimitiveContainer(CSSPrimitiveContainer that) {
- super(that);
- }
-
- CSSPrimitiveContainer(short primitiveType) {
- super(primitiveType);
- }
-
- protected abstract void initPrimitives();
- /**
- * currently public but may be made default access protected in future.
- */
- public void setOwnerDocument(ICSSDocument ownerDocument) {
- super.setOwnerDocument(ownerDocument);
-
- initPrimitives();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveValueImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveValueImpl.java
deleted file mode 100644
index 1bbc097a53..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveValueImpl.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.Counter;
-import org.w3c.dom.css.RGBColor;
-import org.w3c.dom.css.Rect;
-
-
-/**
- *
- */
-class CSSPrimitiveValueImpl extends CSSRegionContainer implements ICSSPrimitiveValue {
-
- protected short fPrimitiveType = CSS_UNKNOWN;
- private float fFloatValue = 0.0f;
- private String fStringValue = null;
-
- CSSPrimitiveValueImpl(CSSPrimitiveValueImpl that) {
- super(that);
-
- this.fPrimitiveType = that.fPrimitiveType;
- this.fFloatValue = that.fFloatValue;
- this.fStringValue = that.fStringValue;
- }
-
- CSSPrimitiveValueImpl(short primitiveType) {
- super();
- fPrimitiveType = primitiveType;
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSPrimitiveValueImpl cloned = new CSSPrimitiveValueImpl(this);
-
- return cloned;
- }
-
- /**
- * This method is used to get the Counter value. If this CSS value doesn't
- * contain a counter value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>Counter</code> interface.
- *
- * @return The Counter value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a Counter value (e.g. this is not
- * <code>CSS_COUNTER</code>).
- */
- public Counter getCounterValue() throws DOMException {
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getCSSValueText() {
- return getCssText();
- }
-
- /**
- * A code defining the type of the value as defined above.
- */
- public short getCssValueType() {
- if (getPrimitiveType() == CSS_INHERIT_PRIMITIVE) {
- return CSS_INHERIT;
- }
- else {
- return CSS_PRIMITIVE_VALUE;
- }
- }
-
- /**
- * This method is used to get a float value in a specified unit. If this
- * CSS value doesn't contain a float value or can't be converted into the
- * specified unit, a <code>DOMException</code> is raised.
- *
- * @param unitType
- * A unit code to get the float value. The unit code can only
- * be a float unit type (i.e. <code>CSS_NUMBER</code>,
- * <code>CSS_PERCENTAGE</code>,<code>CSS_EMS</code>,
- * <code>CSS_EXS</code>,<code>CSS_PX</code>,
- * <code>CSS_CM</code>,<code>CSS_MM</code>,
- * <code>CSS_IN</code>,<code>CSS_PT</code>,
- * <code>CSS_PC</code>,<code>CSS_DEG</code>,
- * <code>CSS_RAD</code>,<code>CSS_GRAD</code>,
- * <code>CSS_MS</code>,<code>CSS_S</code>,
- * <code>CSS_HZ</code>,<code>CSS_KHZ</code>,
- * <code>CSS_DIMENSION</code>).
- * @return The float value in the specified unit.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a float value or if the float value can't be
- * converted into the specified unit.
- */
- public float getFloatValue(short unitType) throws DOMException {
- switch (fPrimitiveType) {
- case CSS_NUMBER :
- case CSS_PERCENTAGE :
- case CSS_EMS :
- case CSS_EXS :
- case CSS_PX :
- case CSS_CM :
- case CSS_MM :
- case CSS_IN :
- case CSS_PT :
- case CSS_PC :
- case CSS_DEG :
- case CSS_RAD :
- case CSS_GRAD :
- case CSS_MS :
- case CSS_S :
- case CSS_HZ :
- case CSS_KHZ :
- case CSS_DIMENSION :
- case CSS_INTEGER :
- case CSS_HASH :
- return fFloatValue;
- default :
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/17
- * 12:12:18)
- *
- * @return short
- */
- public short getNodeType() {
- return PRIMITIVEVALUE_NODE;
- }
-
- /**
- * The type of the value as defined by the constants specified above.
- */
- public short getPrimitiveType() {
- return fPrimitiveType;
- }
-
- /**
- * This method is used to get the Rect value. If this CSS value doesn't
- * contain a rect value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>Rect</code> interface.
- *
- * @return The Rect value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a Rect value. (e.g. this is not
- * <code>CSS_RECT</code>).
- */
- public Rect getRectValue() throws DOMException {
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
-
- /**
- * This method is used to get the RGB color. If this CSS value doesn't
- * contain a RGB color value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>RGBColor</code> interface.
- *
- * @return the RGB color value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the attached property
- * can't return a RGB color value (e.g. this is not
- * <code>CSS_RGBCOLOR</code>).
- */
- public RGBColor getRGBColorValue() throws DOMException {
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
-
- /**
- * This method is used to get the string value. If the CSS value doesn't
- * contain a string value, a <code>DOMException</code> is raised. Some
- * properties (like 'font-family' or 'voice-family') convert a whitespace
- * separated list of idents to a string.
- *
- * @return The string value in the current unit. The current
- * <code>primitiveType</code> can only be a string unit type
- * (i.e. <code>CSS_STRING</code>,<code>CSS_URI</code>,
- * <code>CSS_IDENT</code> and <code>CSS_ATTR</code>).
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a string value.
- */
- public String getStringValue() throws DOMException {
- switch (fPrimitiveType) {
- case CSS_STRING :
- case CSS_URI :
- case CSS_IDENT :
- case CSS_ATTR :
- case CSS_URANGE :
- case CSS_FORMAT :
- case CSS_LOCAL :
- case CSS_HASH :
- case CSS_COMMA :
- case CSS_SLASH :
- case CSS_INHERIT_PRIMITIVE :
- return fStringValue;
- default :
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void notifyValueChanged(String oldValue) {
- // for model
- ICSSDocument doc = getContainerDocument();
- if (doc == null)
- return;
- CSSModelImpl model = (CSSModelImpl) doc.getModel();
- if (model == null)
- return;
- model.valueChanged(this, oldValue);
-
- // for adapters
- notify(CHANGE, new Short(fPrimitiveType), null, null, getStartOffset());
- }
-
- /**
- * A method to set the float value with a specified unit. If the property
- * attached with this value can not accept the specified unit or the float
- * value, the value will be unchanged and a <code>DOMException</code>
- * will be raised.
- *
- * @param unitType
- * A unit code as defined above. The unit code can only be a
- * float unit type (i.e. <code>CSS_NUMBER</code>,
- * <code>CSS_PERCENTAGE</code>,<code>CSS_EMS</code>,
- * <code>CSS_EXS</code>,<code>CSS_PX</code>,
- * <code>CSS_CM</code>,<code>CSS_MM</code>,
- * <code>CSS_IN</code>,<code>CSS_PT</code>,
- * <code>CSS_PC</code>,<code>CSS_DEG</code>,
- * <code>CSS_RAD</code>,<code>CSS_GRAD</code>,
- * <code>CSS_MS</code>,<code>CSS_S</code>,
- * <code>CSS_HZ</code>,<code>CSS_KHZ</code>,
- * <code>CSS_DIMENSION</code>).
- * @param floatValue
- * The new float value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the attached property
- * doesn't support the float value or the unit type. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public void setFloatValue(short unitType, float floatValue) throws DOMException {
- switch (unitType) {
- case CSS_NUMBER :
- case CSS_PERCENTAGE :
- case CSS_EMS :
- case CSS_EXS :
- case CSS_PX :
- case CSS_CM :
- case CSS_MM :
- case CSS_IN :
- case CSS_PT :
- case CSS_PC :
- case CSS_DEG :
- case CSS_RAD :
- case CSS_GRAD :
- case CSS_MS :
- case CSS_S :
- case CSS_HZ :
- case CSS_KHZ :
- case CSS_DIMENSION :
- case CSS_INTEGER :
- String oldValue = getCSSValueText();
- fPrimitiveType = unitType;
- fFloatValue = floatValue;
- notifyValueChanged(oldValue);
- break;
- default :
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * A method to set the string value with the specified unit. If the
- * property attached to this value can't accept the specified unit or the
- * string value, the value will be unchanged and a
- * <code>DOMException</code> will be raised.
- *
- * @param stringType
- * A string code as defined above. The string code can only be
- * a string unit type (i.e. <code>CSS_STRING</code>,
- * <code>CSS_URI</code>,<code>CSS_IDENT</code>, and
- * <code>CSS_ATTR</code>).
- * @param stringValue
- * The new string value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a string value or if the string value can't be
- * converted into the specified unit. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public void setStringValue(short stringType, String stringValue) throws DOMException {
- switch (stringType) {
- case CSS_STRING :
- case CSS_URI :
- case CSS_IDENT :
- case CSS_ATTR :
- case CSS_URANGE :
- case CSS_FORMAT :
- case CSS_LOCAL :
- case CSS_HASH :
- case CSS_COMMA :
- case CSS_SLASH :
- case CSS_INHERIT_PRIMITIVE :
- String oldValue = getCSSValueText();
- fPrimitiveType = stringType;
- fStringValue = stringValue;
- notifyValueChanged(oldValue);
- break;
- default :
- throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");//$NON-NLS-1$
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/24
- * 15:06:25)
- *
- * @param floatValue
- * float
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setValue(float floatValue) throws org.w3c.dom.DOMException {
- setFloatValue(getPrimitiveType(), floatValue);
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/24
- * 15:06:25)
- *
- * @param stringValue
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setValue(java.lang.String stringValue) throws org.w3c.dom.DOMException {
- setStringValue(getPrimitiveType(), stringValue);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRegionContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRegionContainer.java
deleted file mode 100644
index c569e91036..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRegionContainer.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-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;
-
-/**
- *
- */
-abstract class CSSRegionContainer extends CSSNodeImpl {
-
- private ITextRegion fFirstRegion = null;
- private ITextRegion fLastRegion = null;
- private IStructuredDocumentRegion fParentRegion = null;
-
- /**
- * CSSRegionContainer constructor comment.
- */
- CSSRegionContainer() {
- super();
- }
-
- CSSRegionContainer(CSSRegionContainer that) {
- super(that);
- }
-
- /**
- * @return java.lang.String
- */
- public String getCssText() {
- if (fFirstRegion == null || fLastRegion == null)
- return generateSource();
-
- ITextRegionList regions = fParentRegion.getRegions();
- StringBuffer source = new StringBuffer();
- boolean bIn = false;
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion current = regions.get(i);
- if (bIn) {
- source.append(fParentRegion.getText(current));
- if (current == fLastRegion)
- break;
- }
- else {
- if (current == fFirstRegion) {
- bIn = true;
- source.append(fParentRegion.getText(current));
- if (current == fLastRegion)
- break;
- }
- }
- }
-
- return source.toString();
- }
-
- /**
- * @return int
- */
- public int getEndOffset() {
- int result = -1;
- ITextRegion region = getLastRegion();
- if (!(region == null || fParentRegion == null)) {
- result = fParentRegion.getEndOffset(region);
- }
- return result;
- }
-
- IStructuredDocumentRegion getDocumentRegion() {
- return fParentRegion;
- }
-
- ITextRegion getFirstRegion() {
- return fFirstRegion;
- }
-
- ITextRegion getLastRegion() {
- return fLastRegion;
- }
-
- ITextRegion getRegion(int index) {
- if (getFirstRegion() == null)
- return null;
- ITextRegionList regions = fParentRegion.getRegions();
-
- for (int i = 0; i < regions.size(); i++) {
- if (regions.get(i) == getFirstRegion()) {
- if (i + index < regions.size()) {
- ITextRegion target = regions.get(i + index);
- if (target.getStart() <= getLastRegion().getStart())
- return target;
- }
- return null;
- }
- }
- return null;
- }
-
- /**
- * @return int
- */
- int getRegionCount() {
- validateRange();
-
- if (getFirstRegion() == null)
- return 0;
- if (getFirstRegion() == getLastRegion())
- return 1;
- ITextRegionList regions = fParentRegion.getRegions();
-
- int j = 0;
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion current = regions.get(i);
- if (j != 0 || current == getFirstRegion())
- j++;
- if (current == getLastRegion())
- break;
- }
- return j;
- }
-
- /**
- * @return int
- */
- public int getStartOffset() {
- int result = -1;
- ITextRegion region = getFirstRegion();
- if (!(region == null || fParentRegion == null)) {
- result = fParentRegion.getStartOffset(region);
- }
- return result;
- }
-
-
-
- /**
- * @deprecated
- */
- ITextRegion setFirstRegion(ITextRegion region) {
- this.fFirstRegion = region;
- return region;
- }
-
- /**
- * @deprecated
- */
- ITextRegion setLastRegion(ITextRegion lastRegion) {
- this.fLastRegion = lastRegion;
- return lastRegion;
- }
-
- void setRangeRegion(IStructuredDocumentRegion parentRegion, ITextRegion firstRegion, ITextRegion lastRegion) {
- this.fParentRegion = parentRegion;
- this.fFirstRegion = firstRegion;
- this.fLastRegion = lastRegion;
-
- if (firstRegion == null && lastRegion == null) {
- setFirstRegion(null);
- setLastRegion(null);
- }
- else { // range validation
- validateRange();
- }
- }
-
- /**
- * @return boolean
- */
- private boolean validateRange() {
- boolean bModified = false;
-
- if (this.fFirstRegion != null || this.fLastRegion != null) {
- if (this.fFirstRegion == null) {
- this.fFirstRegion = this.fLastRegion;
- bModified = true;
- }
- else if (this.fLastRegion == null) {
- this.fLastRegion = this.fFirstRegion;
- bModified = true;
- }
- else if (this.fFirstRegion.getStart() > this.fLastRegion.getStart()) {
- // need to swap first for last
- ITextRegion reg = fFirstRegion;
- fFirstRegion = fLastRegion;
- fLastRegion = reg;
- bModified = true;
- }
- }
- return bModified;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleDeclContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleDeclContainer.java
deleted file mode 100644
index 64381642dc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleDeclContainer.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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-
-/**
- *
- */
-abstract class CSSRuleDeclContainer extends CSSRuleImpl {
-
- /**
- * CSSRuleDeclContainer constructor comment.
- */
- CSSRuleDeclContainer() {
- super();
- }
-
- /**
- * CSSRuleDeclContainer constructor comment.
- *
- */
- CSSRuleDeclContainer(CSSRuleDeclContainer that) {
- super(that);
- }
-
- /**
- * @return java.lang.String
- */
- abstract String extractPreString();
-
- /**
- * @return org.w3c.dom.css.CSSStyleDeclaration
- */
- public CSSStyleDeclaration getStyle() {
-
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSStyleDeclaration)
- return (CSSStyleDeclaration) node;
- }
-
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleImpl.java
deleted file mode 100644
index 32e6e38290..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleImpl.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSStyleSheet;
-
-
-/**
- *
- */
-abstract class CSSRuleImpl extends CSSStructuredDocumentRegionContainer implements CSSRule {
-
- /**
- *
- */
- CSSRuleImpl() {
- super();
- }
-
- CSSRuleImpl(CSSRuleImpl that) {
- super(that);
- }
-
- /**
- * If this rule is contained inside another rule (e.g. a style rule inside
- * an
- *
- * @media block), this is the containing rule. If this rule is not nested
- * inside any other rules, this returns <code>null</code>.
- */
- public CSSRule getParentRule() {
- ICSSNode rule = getParentNode();
-
- // parent rule is used only if parent is media rule
- if (rule instanceof CSSMediaRuleImpl)
- return (CSSRule) rule;
-
- return null;
- }
-
- /**
- * The style sheet that contains this rule.
- */
- public CSSStyleSheet getParentStyleSheet() {
- ICSSNode parent = getParentNode();
- while (parent != null) {
- if (parent instanceof CSSStyleSheetImpl)
- return (CSSStyleSheet) parent;
- parent = parent.getParentNode();
- }
- return null;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public abstract short getType();
-
- /**
- * @return boolean
- */
- public boolean hasProperties() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleListImpl.java
deleted file mode 100644
index 51f15a490b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleListImpl.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.wst.css.core.internal.document;
-
-
-
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSRuleList;
-
-/**
- *
- */
-public class CSSRuleListImpl extends AbstractCSSNodeList implements CSSRuleList {
-
- /**
- *
- */
- CSSRuleListImpl() {
- super();
- }
-
- /**
- * Used to retrieve a CSS rule by ordinal index. The order in this
- * collection represents the order of the rules in the CSS style sheet. If
- * index is greater than or equal to the number of rules in the list, this
- * returns <code>null</code>.
- *
- * @param indexIndex
- * into the collection
- * @return The style rule at the <code>index</code> position in the
- * <code>CSSRuleList</code>, or <code>null</code> if that is
- * not a valid index.
- */
- public CSSRule item(int index) {
- return (CSSRule) itemImpl(index);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelector.java
deleted file mode 100644
index 4f6dd49629..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelector.java
+++ /dev/null
@@ -1,422 +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.wst.css.core.internal.document;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import com.ibm.icu.util.StringTokenizer;
-
-import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleSelectorAdapter;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorCombinator;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSimpleSelector;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.xml.core.internal.provisional.NameValidator;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- *
- */
-class CSSSelector implements ICSSSelector {
-
- private int fSpecificity = -1;
- private String fCachedString = null;
- private List fTokens = null;
- private List fItems = null;
- private List fParseErrors = null;
- private List fNameErrors = null;
-
- CSSSelector(List tokens) {
- fTokens = new ArrayList(tokens);
- }
-
- /**
- * @return boolean
- * @param obj
- * java.lang.Object
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null || this.getClass() != obj.getClass())
- return false;
-
- CSSSelector foreign = (CSSSelector) obj;
-
- // if (fSpecificity != foreign.fSpecificity) return false;
-
- if (getLength() != foreign.getLength())
- return false;
-
- for (int i = 0; i < getLength(); i++) {
- if (!getItem(i).equals(foreign.getItem(i)))
- return false;
- }
-
- return true;
- }
-
- public ICSSSelectorItem getItem(int index) {
- if (fItems == null) {
- fItems = parseSelector(fTokens);
- }
- if (fItems != null && 0 <= index && index < fItems.size()) {
- return (ICSSSelectorItem) fItems.get(index);
- }
- else {
- return null;
- }
- }
-
- /**
- * @return java.util.Iterator
- */
- public Iterator getIterator() {
- if (fItems == null) {
- fItems = parseSelector(fTokens);
- }
- return (fItems != null) ? fItems.iterator() : null;
- }
-
- /**
- * @return int
- */
- public int getLength() {
- if (fItems == null) {
- fItems = parseSelector(fTokens);
- }
- return (fItems != null) ? fItems.size() : 0;
- }
-
- /**
- * @return org.w3c.dom.Element
- */
- private Element getParentElement(Element element) {
- try {
- element = (Element) element.getParentNode();
- }
- catch (Exception ex) {
- // cast error or null pointer ...
- element = null;
- }
- return element;
- }
-
- /**
- * @return org.w3c.dom.Element
- */
- private Element getPreviousElement(Element element) {
- Element p = null;
- for (Node node = element.getPreviousSibling(); node != null; node = node.getPreviousSibling()) {
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- p = (Element) node;
- break;
- }
- }
- return p;
- }
-
- /**
- * Calculate a selector's specificity a = the number of ID attributes in
- * the selector b = the number of other attributes and pseudo-classes in
- * the selector c = the number of element names in the selector (ignore
- * pseudo-elements) Concatenating the three numbers a-b-c (in a number
- * system with a large base) gives the specificity.
- *
- * @return int
- */
- public int getSpecificity() {
- if (fSpecificity < 0) {
- int nIDs = 0;
- int nAttributes = 0;
- int nElements = 0;
- Iterator i = getIterator();
- while (i.hasNext()) {
- ICSSSelectorItem item = (ICSSSelectorItem) i.next();
- if (item instanceof CSSSimpleSelector) {
- CSSSimpleSelector selector = (CSSSimpleSelector) item;
- nIDs += selector.getNumOfIDs();
- nAttributes += selector.getNumOfAttributes();
- nAttributes += selector.getNumOfClasses();
- nAttributes += selector.getNumOfPseudoNames();
- if (!selector.isUniversal()) {
- nElements++;
- }
- }
- }
- fSpecificity = nIDs * 10000 + nAttributes * 100 + nElements;
- }
-
- return fSpecificity;
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- if (fCachedString == null) {
- StringBuffer buf = new StringBuffer();
- Iterator i = getIterator();
- while (i.hasNext()) {
- ICSSSelectorItem item = (ICSSSelectorItem) i.next();
- if (item instanceof CSSSelectorCombinator) {
- // If item is DESCENDANT combinator, it is just single
- // space.
- // Then, you dont have to append string..
- if (((CSSSelectorCombinator) item).getCombinatorType() != ICSSSelectorCombinator.DESCENDANT) {
- buf.append(" ");//$NON-NLS-1$
- buf.append(item.getString());
- }
- buf.append(" ");//$NON-NLS-1$
- }
- else {
- buf.append(item.getString());
- }
- }
- fCachedString = buf.toString();
- }
-
- return fCachedString;
- }
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- */
- public boolean match(org.w3c.dom.Element element, java.lang.String pseudoName) {
- Element target = element;
- char combinatorType = ICSSSelectorCombinator.UNKNOWN;
- Element chunkStartElement = null; // for CHILD and ADJACENT
- // combinator
- int chunkStartItem = -1; // for CHILD and ADJACENT combinator
- int numItems = getLength();
- for (int iItem = numItems - 1; iItem >= 0; iItem--) {
- // Check Selector Items
- ICSSSelectorItem item = getItem(iItem);
- if (item instanceof ICSSSimpleSelector) {
- // Simple Selector
- if (target == null)
- return false;
- if (!matchExactly((ICSSSimpleSelector) item, target, pseudoName)) {
- switch (combinatorType) {
- case ICSSSelectorCombinator.DESCENDANT :
- do {
- target = getParentElement(target);
- if (target == null)
- return false;
- }
- while (!matchExactly((ICSSSimpleSelector) item, target, pseudoName));
- break;
- case ICSSSelectorCombinator.CHILD :
- case ICSSSelectorCombinator.ADJACENT :
- if (chunkStartElement != null && chunkStartElement != element) {
- // previous conbinator must be DESCENDENT.
- // goto parent
- target = getParentElement(chunkStartElement);
- iItem = chunkStartItem + 1;
- chunkStartElement = null;
- chunkStartItem = -1;
- break;
- }
- default :
- // other combinators are not supported yet.
- return false;
- }
- }
- }
- else if (item instanceof ICSSSelectorCombinator) {
- // Combinator ( "+", ">", " ", ...)
- if (iItem == numItems - 1)
- return false; // last item is combinator
-
- ICSSSelectorCombinator sc = (ICSSSelectorCombinator) item;
- combinatorType = sc.getCombinatorType();
- switch (combinatorType) {
- case ICSSSelectorCombinator.DESCENDANT :
- target = getParentElement(target);
- break;
- case ICSSSelectorCombinator.CHILD :
- case ICSSSelectorCombinator.ADJACENT :
- if (chunkStartElement == null) {
- chunkStartElement = target;
- chunkStartItem = iItem + 1; // safe because this
- // is not a last item.
- }
- if (combinatorType == ICSSSelectorCombinator.CHILD) {
- target = getParentElement(target);
- }
- else {
- target = getPreviousElement(target);
- }
- break;
- }
- }
- else {
- // what is this item ???
- return false;
- }
- }
- // OK this selector maches the element.
- return true;
-
- }
-
- /**
- * @return boolean
- */
- private boolean matchExactly(ICSSSimpleSelector selector, Element element, String pseudoName) {
- IStyleSelectorAdapter adapter = (IStyleSelectorAdapter) ((INodeNotifier) element).getAdapterFor(IStyleSelectorAdapter.class);
- if (adapter != null) {
- return adapter.match(selector, element, pseudoName);
- }
-
- if (element == null)
- return false;
- int i;
- String key;
-
- // TODO: PseudoName
-
- // check tag name
- if (!selector.isUniversal() && !element.getNodeName().equals(selector.getName()))
- return false;
-
- // check id
- i = selector.getNumOfIDs();
- if (i > 0) {
- if (i > 1)
- return false;
- key = element.getAttribute("id");//$NON-NLS-1$
- if (key == null)
- return false;
- if (!selector.getID(0).equals(key))
- return false;
- }
-
- // check class
- i = selector.getNumOfClasses();
- if (i > 0) {
- key = element.getAttribute("class");//$NON-NLS-1$
- if (key == null)
- return false;
- StringTokenizer tokenizer = new StringTokenizer(key);
- for (i = i - 1; i >= 0; i--) {
- boolean ok = false;
- while (tokenizer.hasMoreTokens()) {
- if (selector.getClass(i).equals(tokenizer.nextToken())) {
- ok = true;
- break;
- }
- }
- if (!ok)
- return false;
- }
- }
-
- // check attributes
- for (i = selector.getNumOfAttributes() - 1; i >= 0; i--) {
- StringTokenizer tokenizer = new StringTokenizer(selector.getAttribute(i), "=~| \t\r\n\f");//$NON-NLS-1$
- int countTokens = tokenizer.countTokens();
- if (countTokens > 0) {
- String attrValue = element.getAttribute(tokenizer.nextToken());
- if (attrValue == null)
- return false;
- if (countTokens > 1) {
- String token = tokenizer.nextToken("= \t\r\n\f");//$NON-NLS-1$
- StringTokenizer attrValueTokenizer = null;
- if (token.equals("~")) {//$NON-NLS-1$
- attrValueTokenizer = new StringTokenizer(attrValue);
- }
- else if (token.equals("|")) {//$NON-NLS-1$
- attrValueTokenizer = new StringTokenizer(attrValue, "-");//$NON-NLS-1$
- }
- if (attrValueTokenizer != null) {
- if (tokenizer.hasMoreTokens()) {
- token = tokenizer.nextToken();
- boolean ok = false;
- while (attrValueTokenizer.hasMoreTokens()) {
- if (token.equals(attrValueTokenizer.nextToken())) {
- ok = true;
- break;
- }
- }
- if (!ok)
- return false;
- }
- }
- else {
- if (!attrValue.equals(token))
- return false;
- }
- }
- }
- }
-
- return true;
- }
-
- private List parseSelector(List tokens) {
- CSSSelectorParser parser = new CSSSelectorParser(tokens);
- List selector = parser.getSelector();
- Iterator i = parser.getErrors();
- fParseErrors = new ArrayList();
- while (i.hasNext()) {
- fParseErrors.add(i.next());
- }
- return selector;
- }
-
- public Iterator getErrors() {
- if (fNameErrors == null) {
- fNameErrors = new ArrayList();
- Iterator iItem = getIterator();
- while (iItem.hasNext()) {
- ICSSSelectorItem item = (ICSSSelectorItem) iItem.next();
- if (item instanceof ICSSSimpleSelector) {
- if (!((ICSSSimpleSelector) item).isUniversal()) {
- String name = ((ICSSSimpleSelector) item).getName();
- if (!NameValidator.isValid(name)) {
- fNameErrors.add(item);
- }
- }
- }
- }
- }
- List errors = new ArrayList(fParseErrors);
- errors.addAll(fNameErrors);
- return errors.iterator();
- }
-
- public String toString() {
- return getString();
- }
-
- /**
- * @see ICSSSelector#getErrorCount()
- */
- public int getErrorCount() {
- int nErrors = 0;
- Iterator i = getErrors();
- while (i.hasNext()) {
- nErrors++;
- i.next();
- }
- return nErrors;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorCombinator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorCombinator.java
deleted file mode 100644
index d015aa515a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorCombinator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorCombinator;
-
-/**
- *
- */
-class CSSSelectorCombinator extends CSSSelectorItem implements ICSSSelectorCombinator {
-
- char fType = ICSSSelectorCombinator.UNKNOWN;
-
- /**
- * CSSSelectorCombinator constructor comment.
- */
- public CSSSelectorCombinator(char type) {
- super();
- setCombinatorType(type);
- }
-
- /**
- * @return boolean
- * @param obj
- * java.lang.Object
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null || this.getClass() != obj.getClass())
- return false;
-
- CSSSelectorCombinator foreign = (CSSSelectorCombinator) obj;
-
- return (getCombinatorType() == foreign.getCombinatorType());
-
- }
-
- /**
- * @return int
- */
- public char getCombinatorType() {
- return fType;
- }
-
- /**
- * @return int
- */
- public int getItemType() {
- return COMBINATOR;
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- StringBuffer buf = new StringBuffer();
- buf.append(fType);
- return buf.toString();
- }
-
- void setCombinatorType(char type) {
- fType = type;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorItem.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorItem.java
deleted file mode 100644
index 3436661aa0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorItem.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem;
-
-/**
- *
- */
-abstract class CSSSelectorItem implements ICSSSelectorItem {
-
- /**
- * CSSSelectorItem constructor comment.
- */
- public CSSSelectorItem() {
- super();
- }
-
- /**
- * @return int
- */
- public int getItemType() {
- return 0;
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
deleted file mode 100644
index ed231f9f5a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java
+++ /dev/null
@@ -1,207 +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.wst.css.core.internal.document;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-import org.w3c.dom.Element;
-
-
-/**
- *
- */
-public class CSSSelectorListImpl implements ICSSSelectorList {
-
- private String fText = null;
- private String fCachedString = null; // normalized string
- private List fSelectors = null;
-
- public CSSSelectorListImpl(String cssText) {
- super();
- fText = cssText;
- parseSelectorText();
- }
-
- /**
- * @return boolean
- * @param obj
- * java.lang.Object
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null || this.getClass() != obj.getClass())
- return false;
-
- CSSSelectorListImpl foreign = (CSSSelectorListImpl) obj;
-
- if (getLength() != foreign.getLength())
- return false;
-
- for (int i = 0; i < getLength(); i++) {
- if (!getSelector(i).equals(foreign.getSelector(i)))
- return false;
- }
-
- return true;
- }
-
- /**
- * @return java.util.Iterator
- */
- public Iterator getIterator() {
- return getSelectors().iterator();
- }
-
- /**
- * @return int
- */
- public int getLength() {
- return getSelectors().size();
- }
-
- public ICSSSelector getSelector(int index) {
- List selectors = getSelectors();
- if (0 <= index && index < selectors.size()) {
- return (ICSSSelector) selectors.get(index);
- }
- else {
- return null;
- }
- }
-
- private List getSelectors() {
- if (fSelectors == null) {
- parseSelectorText();
- }
- return fSelectors;
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- if (fCachedString == null) {
- StringBuffer buf = new StringBuffer();
- boolean bFirst = true;
- // groups is list of comma-separated selectors
- Iterator i = getSelectors().iterator();
- while (i.hasNext()) {
- if (!bFirst) {
- buf.append(", ");//$NON-NLS-1$
- }
- ICSSSelector item = (ICSSSelector) i.next();
- buf.append(item.getString());
- bFirst = false;
- }
- fCachedString = buf.toString();
- }
- return fCachedString;
- }
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- */
- public boolean match(Element element, String pseudoName) {
- int nSelectors = getLength();
- for (int iSelector = 0; iSelector < nSelectors; iSelector++) {
- // Check each Selector Lists
- ICSSSelector selector = getSelector(iSelector);
- if (selector.match(element, pseudoName))
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- private void parseSelectorText() {
- fSelectors = new ArrayList();
- if (fText == null) {
- return;
- }
-
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_STYLESHEET, fText);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return;
- }
-
- List tokenGroup = new ArrayList();
- for (int i = 0; i < tokens.length; i++) {
- CSSTextToken token = tokens[i];
- if (token.kind == CSSRegionContexts.CSS_SELECTOR_SEPARATOR && 0 < tokenGroup.size()) {
- ICSSSelector selector = new CSSSelector(tokenGroup);
- if (selector != null) {
- fSelectors.add(selector);
- }
- tokenGroup.clear();
- }
- else {
- tokenGroup.add(tokens[i]);
- }
- }
- if (0 < tokenGroup.size()) {
- ICSSSelector selector = new CSSSelector(tokenGroup);
- if (selector != null) {
- fSelectors.add(selector);
- }
- }
- }
-
- /**
- *
- */
- public String toString() {
- return getString();
- }
-
- /**
- *
- */
- public Iterator getErrors() {
- List errors = new ArrayList();
- Iterator iSelector = getSelectors().iterator();
- while (iSelector.hasNext()) {
- Iterator iError = ((ICSSSelector) iSelector.next()).getErrors();
- while (iError.hasNext()) {
- errors.add(iError.next());
- }
- }
- return errors.iterator();
- }
-
- /**
- *
- */
- public int getErrorCount() {
- int nErrors = 0;
- Iterator i = getErrors();
- while (i.hasNext()) {
- nErrors++;
- i.next();
- }
- return nErrors;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorParser.java
deleted file mode 100644
index b605610a89..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorParser.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorCombinator;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem;
-
-
-/**
- *
- */
-public class CSSSelectorParser {
-
- private final static int IDLE = 0;
- private final static int ATTRIBUTE = 1;
- private final static int SIMPLE = 2;
-
- private List fTokens = null;
- private List fItems = null;
- private List fErrors = null;
-
- /**
- *
- */
- CSSSelectorParser(List tokens) {
- super();
- fTokens = new ArrayList(tokens);
- }
-
- /**
- *
- */
- List getSelector() {
- if (fItems == null) {
- parseSelector();
- }
- return fItems;
- }
-
- /**
- *
- */
- private void parseSelector() {
- fItems = new ArrayList();
-
- List attrBuf = null;
- CSSSimpleSelector item = null;
-
- int status = IDLE;
- Iterator i = fTokens.iterator();
- while (i.hasNext()) {
- CSSTextToken token = (CSSTextToken) i.next();
- if (token == null || token.kind == CSSRegionContexts.CSS_S || token.kind == CSSRegionContexts.CSS_COMMENT) {
- continue;
- }
- switch (status) {
- case IDLE :
- if (isTag(token)) {
- item = createSimple();
- appendTag(item, token);
- status = SIMPLE;
- }
- else if (isID(token)) {
- item = createSimple();
- appendID(item, token);
- status = SIMPLE;
- }
- else if (isClass(token)) {
- item = createSimple();
- appendClass(item, token);
- status = SIMPLE;
- }
- else if (isPseudo(token)) {
- item = createSimple();
- appendPseudo(item, token);
- status = SIMPLE;
- }
- else if (isAttributeBegin(token)) {
- item = createSimple();
- status = ATTRIBUTE;
- }
- else {
- addError(token);
- }
- break;
- case SIMPLE :
- if (isID(token)) {
- appendID(item, token);
- }
- else if (isClass(token)) {
- appendClass(item, token);
- }
- else if (isPseudo(token)) {
- appendPseudo(item, token);
- }
- else if (isAttributeBegin(token)) {
- status = ATTRIBUTE;
- }
- else if (isCombinator(token)) { // combinator
- closeItem(item);
- closeItem(createCombinator(token));
- status = IDLE;
- }
- else {
- addError(token);
- }
- break;
- case ATTRIBUTE :
- if (isAttributeEnd(token)) {
- appendAttribute(item, attrBuf);
- attrBuf = null;
- status = SIMPLE;
- }
- else {
- if (attrBuf == null) {
- attrBuf = new ArrayList();
- }
- attrBuf.add(token);
- if (!isAttributeContent(token)) {
- addError(token);
- }
- }
- break;
- default :
- break;
- }
- }
-
- closeItem(item);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isAttributeContent(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isAttributeEnd(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isAttributeBegin(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isCombinator(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_COMBINATOR);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isPseudo(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_PSEUDO);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isClass(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_CLASS);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isID(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ID);
- }
-
- /**
- * @param token
- * @return
- */
- private boolean isTag(CSSTextToken token) {
- String type = token.kind;
- return (type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_UNIVERSAL || type == CSSRegionContexts.CSS_UNKNOWN);
- }
-
- private CSSSimpleSelector createSimple() {
- return new CSSSimpleSelector();
- }
-
- /**
- * if " " or "+" or ">" appeared, close simpleselector and add new
- * combinator
- */
- private CSSSelectorCombinator createCombinator(CSSTextToken token) {
- char type = 0;
-
- String str = token.image;
- if (str.trim().length() == 0) { // space
- type = ICSSSelectorCombinator.DESCENDANT;
- }
- else if (str.equals("+")) { //$NON-NLS-1$
- type = ICSSSelectorCombinator.ADJACENT;
- }
- else if (str.equals(">")) { //$NON-NLS-1$
- type = ICSSSelectorCombinator.CHILD;
- }
-
- if (0 < type) {
- return new CSSSelectorCombinator(type);
- }
- else {
- return null;
- }
- }
-
- /**
- *
- */
- private void closeItem(ICSSSelectorItem item) {
- if (item != null) {
- fItems.add(item);
- }
- }
-
- private void appendTag(CSSSimpleSelector item, CSSTextToken token) {
- item.setName(token.image);
- if (token.kind == CSSRegionContexts.CSS_UNKNOWN) {
- addError(token);
- }
- }
-
- /**
- * if "#xxxx" appeared, add ID to current selector
- */
- private void appendID(CSSSimpleSelector item, CSSTextToken token) {
- String text = token.toString();
- String idContent = text.substring(1, text.length());
- item.addID(idContent);
- }
-
- /**
- * if ".xxxx" appeared, add Class to current selector
- */
- private void appendClass(CSSSimpleSelector item, CSSTextToken token) {
- String text = token.toString();
- String classContent = text.substring(1, text.length());
- item.addClass(classContent);
- if (Character.isDigit(classContent.charAt(0))) {
- addError(token);
- }
- }
-
- /**
- * if ":xxxx" appeared, add Pseudo(element/class) to current selector
- */
- private void appendPseudo(CSSSimpleSelector item, CSSTextToken token) {
- String text = token.toString();
- String pseudoContent = text.substring(1, text.length());
- item.addPseudoName(pseudoContent);
- }
-
- /**
- *
- */
- private void appendAttribute(CSSSimpleSelector item, List tokens) {
- StringBuffer buf = new StringBuffer();
-
- CSSTextToken token;
- Iterator i = tokens.iterator();
- while (i.hasNext()) {
- token = (CSSTextToken) i.next();
- buf.append(token.image);
- }
-
- item.addAttribute(buf.toString());
- }
-
- /**
- *
- */
- List getSelectorTags() {
- List tagList = new ArrayList();
- return tagList;
- }
-
- /**
- *
- */
- private void addError(CSSTextToken token) {
- if (fErrors == null) {
- fErrors = new ArrayList();
- }
- fErrors.add(token);
- }
-
- /**
- *
- */
- Iterator getErrors() {
- return (fErrors == null) ? Collections.EMPTY_LIST.iterator() : fErrors.iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSimpleSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSimpleSelector.java
deleted file mode 100644
index 5928e90dfe..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSimpleSelector.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSimpleSelector;
-
-
-/**
- *
- */
-class CSSSimpleSelector extends CSSSelectorItem implements ICSSSimpleSelector {
-
- private String fName = null;
- private String fCachedString = null;
- private StringBuffer fStringBuf = null;
- private List fPseudoName = null;
- private List fAttribute = null;
- private List fClass = null;
- private List fID = null;
-
- /**
- * CSSSimpleSelector constructor comment.
- */
- public CSSSimpleSelector() {
- super();
- }
-
- /**
- *
- */
- void addAttribute(String attribute) {
- if (fAttribute == null) {
- fAttribute = new ArrayList();
- }
- fAttribute.add(attribute);
- addToBuf("[");//$NON-NLS-1$
- addToBuf(attribute);
- addToBuf("]");//$NON-NLS-1$
- fCachedString = null;
- }
-
- /**
- *
- */
- void addClass(String cls) {
- if (fClass == null) {
- fClass = new ArrayList();
- }
- fClass.add(cls);
- addToBuf(".");//$NON-NLS-1$
- addToBuf(cls);
- fCachedString = null;
- }
-
- /**
- *
- */
- void addID(String id) {
- if (fID == null) {
- fID = new ArrayList();
- }
- fID.add(id);
- addToBuf("#");//$NON-NLS-1$
- addToBuf(id);
- fCachedString = null;
- }
-
- /**
- *
- */
- void addPseudoName(String cls) {
- if (fPseudoName == null) {
- fPseudoName = new ArrayList();
- }
- fPseudoName.add(cls);
- addToBuf(":");//$NON-NLS-1$
- addToBuf(cls);
- fCachedString = null;
- }
-
- /**
- *
- */
- private void addToBuf(String str) {
- if (fStringBuf == null) {
- fStringBuf = new StringBuffer();
- }
- fStringBuf.append(str);
- }
-
- /**
- * @return boolean
- * @param obj
- * java.lang.Object
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null || this.getClass() != obj.getClass())
- return false;
-
- CSSSimpleSelector foreign = (CSSSimpleSelector) obj;
-
- if (getName().compareToIgnoreCase(foreign.getName()) != 0)
- return false;
-
- int i;
-
- // compare pseudo-classes / pseudo-elements
- if (getNumOfPseudoNames() != foreign.getNumOfPseudoNames())
- return false;
- for (i = 0; i < getNumOfPseudoNames(); i++) {
- if (getPseudoName(i).compareToIgnoreCase(foreign.getPseudoName(i)) != 0)
- return false;
- }
-
- // compare classes
- if (getNumOfClasses() != foreign.getNumOfClasses())
- return false;
- for (i = 0; i < getNumOfClasses(); i++) {
- if (getClass(i).compareToIgnoreCase(foreign.getClass(i)) != 0)
- return false;
- }
-
- // compare IDs
- if (getNumOfIDs() != foreign.getNumOfIDs())
- return false;
- for (i = 0; i < getNumOfIDs(); i++) {
- if (getID(i).compareToIgnoreCase(foreign.getID(i)) != 0)
- return false;
- }
-
- // compare Attributes
- if (getNumOfAttributes() != foreign.getNumOfAttributes())
- return false;
- for (i = 0; i < getNumOfAttributes(); i++) {
- if (getAttribute(i).compareToIgnoreCase(foreign.getAttribute(i)) != 0)
- return false;
- }
- return true;
- }
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- public String getAttribute(int index) {
- if (fAttribute != null && 0 <= index && index < fAttribute.size()) {
- return (String) fAttribute.get(index);
- }
- else {
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- public String getClass(int index) {
- if (fClass != null && 0 <= index && index < fClass.size()) {
- return (String) fClass.get(index);
- }
- else {
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- public String getID(int index) {
- if (fID != null && 0 <= index && index < fID.size()) {
- return (String) fID.get(index);
- }
- else {
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * @return int
- */
- public int getItemType() {
- return SIMPLE;
- }
-
- /**
- * @return java.lang.String
- */
- public String getName() {
- return (fName != null) ? fName : "";//$NON-NLS-1$
- }
-
- /**
- * @return boolean
- */
- public int getNumOfAttributes() {
- return (fAttribute != null) ? fAttribute.size() : 0;
- }
-
- /**
- * @return boolean
- */
- public int getNumOfClasses() {
- return (fClass != null) ? fClass.size() : 0;
- }
-
- /**
- * @return boolean
- */
- public int getNumOfIDs() {
- return (fID != null) ? fID.size() : 0;
- }
-
- /**
- * @return boolean
- */
- public int getNumOfPseudoNames() {
- return (fPseudoName != null) ? fPseudoName.size() : 0;
- }
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- public String getPseudoName(int index) {
- if (fPseudoName != null && 0 <= index && index < fPseudoName.size()) {
- return (String) fPseudoName.get(index);
- }
- else {
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * @return java.lang.String
- */
- public String getString() {
- if (fCachedString == null) {
- StringBuffer buf = new StringBuffer(getName());
- if (fStringBuf != null) {
- buf.append(fStringBuf.toString());
- }
- fCachedString = buf.toString();
- }
- return fCachedString;
- }
-
- /**
- * @return boolean
- */
- public boolean isUniversal() {
- return (fName == null || fName.equals("*"));//$NON-NLS-1$
- }
-
- /**
- *
- */
- void setName(String name) {
- fName = name;
- fCachedString = null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStructuredDocumentRegionContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStructuredDocumentRegionContainer.java
deleted file mode 100644
index 07bf389b2b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStructuredDocumentRegionContainer.java
+++ /dev/null
@@ -1,229 +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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-/**
- * currently public but may be made default access protected in future.
- */
-public abstract class CSSStructuredDocumentRegionContainer extends CSSNodeImpl {
-
- private IStructuredDocumentRegion firstStructuredDocumentRegion = null;
- private IStructuredDocumentRegion lastStructuredDocumentRegion = null;
-
- /**
- * CSSContainer constructor comment.
- * currently public but may be made default access protected in future.
- */
- public CSSStructuredDocumentRegionContainer() {
- super();
- }
- /**
- * currently public but may be made default access protected in future.
- */
- public CSSStructuredDocumentRegionContainer(CSSStructuredDocumentRegionContainer that) {
- super(that);
- }
-
- /**
- * @return java.lang.String
- */
- public String getCssText() {
- if (getFirstStructuredDocumentRegion() == null)
- return generateSource();
-
- StringBuffer str = new StringBuffer(getFirstStructuredDocumentRegion().getText());
- IStructuredDocumentRegion node = getFirstStructuredDocumentRegion();
-
- while (node != getLastStructuredDocumentRegion()) {
- node = node.getNext();
- str.append(node.getText());
- }
-
- return str.toString();
- }
-
- /**
- * @return int
- */
- public int getEndOffset() {
- IStructuredDocumentRegion flatNode = getLastStructuredDocumentRegion();
- if (flatNode != null)
- return flatNode.getEnd();
- return -1;
- }
-
- IStructuredDocumentRegion getFirstStructuredDocumentRegion() {
- return firstStructuredDocumentRegion;
- }
-
- IStructuredDocumentRegion getStructuredDocumentRegion(int index) {
- IStructuredDocumentRegion node = firstStructuredDocumentRegion;
- for (int i = index; i > 0; i--) {
- if (node == null)
- return null;
- node = node.getNext();
- }
- return node;
- }
-
- /**
- * @return int
- */
- int getStructuredDocumentRegionCount() {
- if (firstStructuredDocumentRegion == null)
- return 0;
-
- IStructuredDocumentRegion node = firstStructuredDocumentRegion;
- int i = 0;
- for (; node != null; i++)
- node = node.getNext();
- return i;
- }
-
- IStructuredDocumentRegion getLastStructuredDocumentRegion() {
- return lastStructuredDocumentRegion;
- }
-
- /**
- * @return int
- */
- public int getStartOffset() {
- IStructuredDocumentRegion flatNode = getFirstStructuredDocumentRegion();
- if (flatNode != null)
- return flatNode.getStart();
- return -1;
- }
-
- boolean includeRangeStructuredDocumentRegion(IStructuredDocumentRegion first, IStructuredDocumentRegion last) {
- boolean bModified = false;
-
- // validate range of parameters
- if (first != null && last != null) {
- if (first.getStart() > last.getStart()) {
- IStructuredDocumentRegion node = first;
- first = last;
- last = node;
- }
- }
-
- // validate mine
- boolean b = validateRange();
- bModified = b || bModified;
-
- if (first != null) {
- if (getFirstStructuredDocumentRegion() == null || getFirstStructuredDocumentRegion().getStart() > first.getStart()) {
- setFirstStructuredDocumentRegion(first);
- bModified = true;
- }
- }
-
- if (last != null) {
- if (getLastStructuredDocumentRegion() == null || getLastStructuredDocumentRegion().getStart() < last.getStart()) {
- setLastStructuredDocumentRegion(last);
- bModified = true;
- }
- }
-
- // re-validate
- if (bModified)
- validateRange();
-
- return bModified;
- }
-
- /**
- *
- */
- public boolean propagateRangeStructuredDocumentRegion() {
- boolean bModified = false;
-
- CSSStructuredDocumentRegionContainer parent = (CSSStructuredDocumentRegionContainer) getParentNode();
- if (parent == null)
- return bModified;
-
- boolean b = parent.includeRangeStructuredDocumentRegion(getFirstStructuredDocumentRegion(), getLastStructuredDocumentRegion());
- bModified = b || bModified;
-
- if (b)
- parent.propagateRangeStructuredDocumentRegion();
- // else need not update range of ancestors
-
- return bModified;
- }
-
- /**
- * @param cssText
- * java.lang.String
- */
- public void setCssText(String cssText) {
- if (firstStructuredDocumentRegion != null) {
- getOwnerDocument().getModel().getStructuredDocument().replaceText(this, getStartOffset(), getEndOffset() - getStartOffset(), cssText);
- }
- else
- super.setCssText(cssText);
- }
-
- IStructuredDocumentRegion setFirstStructuredDocumentRegion(IStructuredDocumentRegion node) {
- firstStructuredDocumentRegion = node;
- return node;
- }
-
- IStructuredDocumentRegion setLastStructuredDocumentRegion(IStructuredDocumentRegion node) {
- lastStructuredDocumentRegion = node;
- return node;
- }
-
- public void setRangeStructuredDocumentRegion(IStructuredDocumentRegion firstNode, IStructuredDocumentRegion lastNode) {
- if (firstNode != null)
- setFirstStructuredDocumentRegion(firstNode);
- if (lastNode != null)
- setLastStructuredDocumentRegion(lastNode);
-
- if (firstNode == null && lastNode == null) {
- setFirstStructuredDocumentRegion(null);
- setLastStructuredDocumentRegion(null);
- }
- else { // range validation
- validateRange();
- }
- }
-
- /**
- * @return boolean
- */
- private boolean validateRange() {
- boolean bModified = false;
-
- if (firstStructuredDocumentRegion != null || lastStructuredDocumentRegion != null) {
- if (this.firstStructuredDocumentRegion == null) {
- this.firstStructuredDocumentRegion = this.lastStructuredDocumentRegion;
- bModified = true;
- }
- else if (this.lastStructuredDocumentRegion == null) {
- this.lastStructuredDocumentRegion = this.firstStructuredDocumentRegion;
- bModified = true;
- }
- else if (this.firstStructuredDocumentRegion.getStart() > this.lastStructuredDocumentRegion.getStart()) {
- // need to swap first for last
- IStructuredDocumentRegion node = firstStructuredDocumentRegion;
- firstStructuredDocumentRegion = lastStructuredDocumentRegion;
- lastStructuredDocumentRegion = node;
- bModified = true;
- }
- }
-
- return bModified;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclItemImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclItemImpl.java
deleted file mode 100644
index 94a5cc60b3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclItemImpl.java
+++ /dev/null
@@ -1,272 +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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceGenerator;
-import org.eclipse.wst.css.core.internal.formatter.StyleDeclItemFormatter;
-import org.eclipse.wst.css.core.internal.parser.CSSSourceParser;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-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.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.text.TextRegionListImpl;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- *
- */
-class CSSStyleDeclItemImpl extends CSSStructuredDocumentRegionContainer implements ICSSStyleDeclItem {
-
- private java.lang.String fPropertyName;
-
- /**
- * CSSStyleDeclItemImpl constructor comment.
- *
- */
- CSSStyleDeclItemImpl(CSSStyleDeclItemImpl that) {
- super(that);
- this.fPropertyName = that.fPropertyName;
- }
-
- /**
- * CSSStyleDeclItemImpl constructor comment.
- */
- CSSStyleDeclItemImpl(String propertyName) {
- super();
- this.fPropertyName = propertyName;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- public ICSSPrimitiveValue appendValue(ICSSPrimitiveValue value) throws DOMException {
- return insertValueBefore(value, null);
- }
-
- /**
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CSSStyleDeclItemImpl cloned = new CSSStyleDeclItemImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return java.lang.String
- */
- String generateValueSource() {
- CSSSourceGenerator formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(this);
- if (formatter != null && formatter instanceof StyleDeclItemFormatter)
- return ((StyleDeclItemFormatter) formatter).formatValue(this).toString();
- else
- return "";//$NON-NLS-1$
- }
-
- /**
- * @return org.w3c.dom.css.CSSValue
- */
- public CSSValue getCSSValue() {
- int nValue = getLength();
- if (nValue <= 0)
- return null;
- else if (nValue == 1)
- return item(0);
- else
- return this;
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getCSSValueText() {
- if (getFirstChild() == null)
- return "";//$NON-NLS-1$
- // check whether children has flatnodes
- ICSSNode child = getFirstChild();
- while (child != null) {
- if (((IndexedRegion) child).getEndOffset() <= 0)
- return generateValueSource();
- child = child.getNextSibling();
- }
-
- IStructuredDocumentRegion node = getFirstStructuredDocumentRegion();
- int start = ((IndexedRegion) getFirstChild()).getStartOffset() - node.getStartOffset();
- int end = ((IndexedRegion) getLastChild()).getEndOffset() - node.getStartOffset();
- return node.getText().substring(start, end);
- }
-
- /**
- * @return short
- */
- public short getCssValueType() {
- return CSS_VALUE_LIST;
- }
-
- /**
- * @return int
- */
- public int getLength() {
- int i = 0;
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSPrimitiveValueImpl)
- i++;
- }
- return i;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return STYLEDECLITEM_NODE;
- }
-
- /**
- * @return java.lang.String
- */
- public java.lang.String getPriority() {
- return getAttribute(IMPORTANT);
- }
-
- /**
- * @return java.lang.String
- */
- public String getPropertyName() {
- String name = fPropertyName.trim();
- return PropCMProperty.getInstanceOf(name) != null ? fPropertyName.trim().toLowerCase() : name;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param newValue
- * org.w3c.dom.css.CSSPrimitiveValue
- * @param refValue
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- ICSSPrimitiveValue insertValueBefore(ICSSPrimitiveValue newValue, ICSSPrimitiveValue refValue) {
- ICSSNode node = insertBefore((CSSNodeImpl) newValue, (CSSNodeImpl) refValue);
- return (ICSSPrimitiveValue) node;
- }
-
- /**
- * @return org.w3c.dom.css.CSSValue
- * @param index
- * int
- */
- public CSSValue item(int index) {
- int i = 0;
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSPrimitiveValueImpl) {
- if (i++ == index)
- return (CSSValue) node;
- }
- }
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- public ICSSPrimitiveValue removeValue(ICSSPrimitiveValue value) throws DOMException {
- ICSSNode node = removeChild((CSSNodeImpl) value);
- return (ICSSPrimitiveValue) node;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param newValue
- * org.w3c.dom.css.CSSPrimitiveValue
- * @param oldValue
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- public ICSSPrimitiveValue replaceValue(ICSSPrimitiveValue newValue, ICSSPrimitiveValue oldValue) throws DOMException {
- if (oldValue == null)
- return newValue;
- if (newValue != null)
- insertValueBefore(newValue, oldValue);
- return removeValue(oldValue);
- }
-
- /**
- * @param value
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setCssValueText(String value) throws DOMException {
- ICSSNode child = getFirstChild();
- while (child != null) {
- ICSSNode next = child.getNextSibling();
- if (child instanceof ICSSPrimitiveValue) {
- removeChild((CSSNodeImpl) child);
- }
- child = next;
- }
- setCssValueTextCore(value);
- }
-
- private void setCssValueTextCore(String value) throws DOMException {
- // use temporary document
- synchronized (CSSStyleDeclarationImpl.class) {
- if (sharedStructuredDocument == null) {
- IDocumentLoader loader = new CSSDocumentLoader();
- sharedStructuredDocument = (IStructuredDocument) loader.createNewStructuredDocument();
- ((CSSSourceParser) sharedStructuredDocument.getParser()).setParserMode(CSSSourceParser.MODE_DECLARATION_VALUE);
-
- }
- sharedStructuredDocument.set(value);
- IStructuredDocumentRegion node = sharedStructuredDocument.getFirstStructuredDocumentRegion();
-
- if (node == null) {
- return;
- }
- if (node.getNext() != null) {
- throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");//$NON-NLS-1$
- }
-
- CSSDeclarationItemParser itemParser = new CSSDeclarationItemParser(getOwnerDocument());
- itemParser.setStructuredDocumentTemporary(true);
- // make a copy of nodelist because setupValues will destroy list
- ITextRegionList nodeList = new TextRegionListImpl(node.getRegions());
- itemParser.setupValues(this, node, nodeList);
- }
- }
-
- private static IStructuredDocument sharedStructuredDocument;
-
- /**
- * @param newPriority
- * java.lang.String
- */
- public void setPriority(java.lang.String newPriority) throws DOMException {
- setAttribute(IMPORTANT, newPriority);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java
deleted file mode 100644
index 1d56480f10..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.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.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-
-public abstract class CSSStyleDeclarationFactoryContext {
-
- protected ICSSDocument fOwnerDocument = null;
-
- /**
- *
- */
- protected void cloneChildNodes(ICSSNode src, ICSSNode dest) {
- if (fOwnerDocument == null) {
- return;
- }
- if (!(dest instanceof CSSNodeImpl)) {
- return;
- }
-
- CSSNodeImpl container = (CSSNodeImpl) dest;
- container.removeChildNodes();
-
- for (ICSSNode child = src.getFirstChild(); child != null; child = child.getNextSibling()) {
- if (child instanceof CSSStyleDeclItemImpl) {
- // extract shorthand property ..
- // --> Temp
- ICSSNode cloned = child.cloneNode(false);
- if (cloned instanceof CSSNodeImpl) {
- ((CSSNodeImpl) cloned).setOwnerDocument(fOwnerDocument);
- container.appendChild((CSSNodeImpl) cloned);
- cloneChildNodes(child, cloned);
- }
- // <-- Temp
- }
- else {
- ICSSNode cloned = child.cloneNode(false);
- if (cloned instanceof CSSNodeImpl) {
- ((CSSNodeImpl) cloned).setOwnerDocument(fOwnerDocument);
- container.appendChild((CSSNodeImpl) cloned);
- cloneChildNodes(child, cloned);
- }
- }
- }
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclaration
- */
- public ICSSStyleDeclaration createStyleDeclaration() {
- CSSStyleDeclarationImpl decl = new CSSStyleDeclarationImpl(true);
- decl.setOwnerDocument(decl);
- return decl;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationImpl.java
deleted file mode 100644
index 90aed46160..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationImpl.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValue;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- *
- */
-class CSSStyleDeclarationImpl extends CSSDocumentImpl implements ICSSStyleDeclaration {
-
- private boolean fIsDocument;
-
- CSSStyleDeclarationImpl(CSSStyleDeclarationImpl that) {
- super(that);
- this.fIsDocument = that.fIsDocument;
- if (fIsDocument) {
- setOwnerDocument(this);
- }
- }
-
- CSSStyleDeclarationImpl(boolean isDocument) {
- super();
- fIsDocument = isDocument;
- if (fIsDocument) {
- setOwnerDocument(this);
- }
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSStyleDeclarationImpl cloned = new CSSStyleDeclarationImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- public ICSSStyleDeclItem getDeclItemNode(String propertyName) {
- ICSSNode node = getLastChild();
- propertyName = propertyName.trim();
- while (node != null) {
- if (node instanceof CSSStyleDeclItemImpl) {
- ICSSStyleDeclItem item = (ICSSStyleDeclItem) node;
- if (propertyName.compareToIgnoreCase(item.getPropertyName().trim()) == 0)
- return item;
- }
- node = node.getPreviousSibling();
- }
- return null;
- }
-
- /**
- * @return int
- */
- public int getLength() {
- int i = 0;
- ICSSNode node = getFirstChild();
- while (node != null) {
- if (node instanceof CSSStyleDeclItemImpl)
- i++;
- node = node.getNextSibling();
- }
- return i;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return STYLEDECLARATION_NODE;
- }
-
- /**
- * The CSS rule that contains this declaration block or <code>null</code>
- * if this <code>CSSStyleDeclaration</code> is not attached to a
- * <code>CSSRule</code>.
- */
- public CSSRule getParentRule() {
- ICSSNode parent = getParentNode();
- if (parent instanceof CSSRule)
- return (CSSRule) parent;
- return null;
- }
-
- /**
- * Used to retrieve the object representation of the value of a CSS
- * property if it has been explicitly set within this declaration block.
- * This method returns <code>null</code> if the property is a shorthand
- * property. Shorthand property values can only be accessed and modified
- * as strings, using the <code>getPropertyValue</code> and
- * <code>setProperty</code> methods.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns <code>null</code> if the
- * property has not been set.
- */
- public CSSValue getPropertyCSSValue(String propertyName) {
- ICSSStyleDeclItem item = getDeclItemNode(propertyName);
- if (item != null)
- return item.getCSSValue();
- return null;
- }
-
- /**
- * Used to retrieve the priority of a CSS property (e.g. the
- * <code>"important"</code> qualifier) if the property has been
- * explicitly set in this declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return A string representing the priority (e.g.
- * <code>"important"</code>) if one exists. The empty string if
- * none exists.
- */
- public String getPropertyPriority(String propertyName) {
- ICSSStyleDeclItem item = getDeclItemNode(propertyName);
- if (item != null)
- return item.getPriority();
- return null;
- }
-
- /**
- * Used to retrieve the value of a CSS property if it has been explicitly
- * set within this declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns the empty string if the
- * property has not been set.
- */
- public String getPropertyValue(String propertyName) {
- CSSValue value = getPropertyCSSValue(propertyName);
- if (value != null)
- return ((ICSSValue) value).getCSSValueText();
- return null;
- }
-
- /**
- * @return boolean
- */
- public boolean isDocument() {
- return fIsDocument;
- }
-
- /**
- * Used to retrieve the properties that have been explicitly set in this
- * declaration block. The order of the properties retrieved using this
- * method does not have to be the order in which they were set. This
- * method can be used to iterate over all properties in this declaration
- * block.
- *
- * @param index
- * Index of the property name to retrieve.
- * @return The name of the property at this ordinal position. The empty
- * string if no property exists at this position.
- */
- public String item(int index) {
- if (index < 0)
- return null;
-
- int i = 0;
- ICSSNode node = getFirstChild();
- while (node != null) {
- if (node instanceof CSSStyleDeclItemImpl) {
- if (i != index)
- i++;
- else {
- CSSStyleDeclItemImpl item = (CSSStyleDeclItemImpl) node;
- return item.getPropertyName();
- }
- }
- node = node.getNextSibling();
- }
- return null;
- }
-
- public ICSSStyleDeclItem removeDeclItemNode(ICSSStyleDeclItem oldDecl) throws DOMException {
- return (ICSSStyleDeclItem) removeChild((CSSNodeImpl) oldDecl);
- }
-
- /**
- * Used to remove a CSS property if it has been explicitly set within this
- * declaration block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @return Returns the value of the property if it has been explicitly set
- * for this declaration block. Returns the empty string if the
- * property has not been set or the property name does not
- * correspond to a known CSS property.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration
- * is readonly or the property is readonly.
- */
- public String removeProperty(String propertyName) throws DOMException {
- ICSSStyleDeclItem item = getDeclItemNode(propertyName);
- if (item != null) {
- removeChild((CSSNodeImpl) item);
- return item.getCssText();
- }
- return null;
- }
-
- public ICSSStyleDeclItem setDeclItemNode(ICSSStyleDeclItem newDecl) throws DOMException {
- if (newDecl == null)
- return null;
-
- ICSSStyleDeclItem item = getDeclItemNode(newDecl.getPropertyName());
- if (item != null)
- return (ICSSStyleDeclItem) replaceChild((CSSNodeImpl) newDecl, (CSSNodeImpl) item);
- else
- return (ICSSStyleDeclItem) appendChild((CSSNodeImpl) newDecl);
- }
-
- /**
- * Used to set a property value and priority within this declaration
- * block.
- *
- * @param propertyName
- * The name of the CSS property. See the CSS property index.
- * @param value
- * The new value of the property.
- * @param priority
- * The new priority of the property (e.g.
- * <code>"important"</code>).
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified value has a syntax
- * error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration
- * is readonly or the property is readonly.
- */
- public void setProperty(String propertyName, String value, String priority) throws DOMException {
- if (propertyName.equals("")) //$NON-NLS-1$
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, ""); //$NON-NLS-1$
-
- // You can use this only if CSSValue.setCssText() is implemented
- CSSStyleDeclItemImpl item = (CSSStyleDeclItemImpl) getDeclItemNode(propertyName);
- if (item == null) {
- item = (CSSStyleDeclItemImpl) getOwnerDocument().createCSSStyleDeclItem(propertyName);
- appendChild(item);
- }
-
- // ICSSNode next = item.getNextSibling();
- // removeChild(item);
-
- item.setCssValueText(value);
- item.setPriority(priority);
-
- // insertBefore(item, (CSSNodeImpl)next);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleRuleImpl.java
deleted file mode 100644
index 3366f09e5a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleRuleImpl.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.w3c.dom.DOMException;
-
-
-/**
- *
- */
-class CSSStyleRuleImpl extends CSSRuleDeclContainer implements ICSSStyleRule {
-
- ICSSSelectorList fSelectorList = new CSSSelectorListImpl(null);
-
- /**
- *
- */
- CSSStyleRuleImpl() {
- super();
- }
-
- CSSStyleRuleImpl(CSSStyleRuleImpl that) {
- super(that);
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSStyleRuleImpl cloned = new CSSStyleRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return java.lang.String
- */
- String extractPreString() {
- return getSelectorText();
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return STYLERULE_NODE;
- }
-
- public ICSSSelectorList getSelectors() {
- return fSelectorList;
- }
-
- /**
- * The textual representation of the selector for the rule set. The
- * implementation may have stripped out insignificant whitespace while
- * parsing the selector.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified CSS string value has
- * a syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
- * readonly.
- */
- public String getSelectorText() {
- return getAttribute(SELECTOR);
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return STYLE_RULE;
- }
-
- /**
- *
- */
- public void setSelectorText(String selectorText) throws DOMException {
- setAttribute(SELECTOR, selectorText);
- fSelectorList = new CSSSelectorListImpl(selectorText);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java
deleted file mode 100644
index ec31ff02d7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java
+++ /dev/null
@@ -1,612 +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.wst.css.core.internal.document;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.CSSCoreMessages;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleSheetAdapter;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPageRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.internal.util.ImportRuleCollector;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSRuleList;
-import org.w3c.dom.css.CSSUnknownRule;
-import org.w3c.dom.stylesheets.MediaList;
-import org.w3c.dom.stylesheets.StyleSheet;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- *
- */
-class CSSStyleSheetImpl extends CSSDocumentImpl implements ICSSStyleSheet {
-
-
- class InternalNodeList implements NodeList {
-
- Vector nodes = new Vector();
-
- public int getLength() {
- if (nodes == null)
- return 0;
- else
- return nodes.size();
- }
-
- public Node item(int i) {
- if (nodes == null)
- return null;
- if (i < 0 || nodes.size() <= i)
- return null;
- return (Node) nodes.get(i);
- }
- }
-
- class InternalStyleSheetList extends AbstractCSSNodeList implements StyleSheetList {
-
- public ICSSNode appendNode(ICSSNode node) {
- if (nodes == null || !nodes.contains(node))
- return super.appendNode(node);
- else
- return node;
- }
-
- public StyleSheet item(int i) {
- return (StyleSheet) itemImpl(i);
- }
- }
-
- private boolean fDisabled = false;
-
- /**
- *
- */
- CSSStyleSheetImpl() {
- super();
- setOwnerDocument(this);
- }
-
- CSSStyleSheetImpl(CSSStyleSheetImpl that) {
- super(that);
- setOwnerDocument(this);
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule appendRule(org.w3c.dom.css.CSSRule rule) throws org.w3c.dom.DOMException {
- if (rule == null)
- return null;
-
- CSSRule ret = (CSSRule) appendChild((CSSNodeImpl) rule);
- return ret;
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSStyleSheetImpl cloned = new CSSStyleSheetImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * @return org.w3c.dom.css.CSSCharsetRule
- */
- public ICSSCharsetRule createCSSCharsetRule() {
- CSSCharsetRuleImpl rule = new CSSCharsetRuleImpl();
- rule.setOwnerDocument(this);
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSFontFaceRule
- */
- public CSSFontFaceRule createCSSFontFaceRule() {
- CSSFontFaceRuleImpl rule = new CSSFontFaceRuleImpl();
- CSSStyleDeclarationImpl style = (CSSStyleDeclarationImpl) createCSSStyleDeclaration();
-
- rule.appendChild(style);
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSImportRule
- */
- public ICSSImportRule createCSSImportRule() {
- CSSImportRuleImpl rule = new CSSImportRuleImpl();
- MediaListImpl media = (MediaListImpl) createMediaList();
-
- rule.appendChild(media);
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.ICSSMediaRule
- */
- public ICSSMediaRule createCSSMediaRule() {
- CSSMediaRuleImpl rule = new CSSMediaRuleImpl();
- MediaListImpl media = (MediaListImpl) createMediaList();
-
- rule.insertBefore(media, (CSSNodeImpl) rule.getFirstChild()); // media
- // must
- // be
- // the
- // top
- // of
- // children
- // list
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSPageRule
- */
- public ICSSPageRule createCSSPageRule() {
- CSSPageRuleImpl rule = new CSSPageRuleImpl();
- CSSStyleDeclarationImpl style = (CSSStyleDeclarationImpl) createCSSStyleDeclaration();
-
- rule.appendChild(style);
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * java.lang.String
- */
- public CSSRule createCSSRule(String rule) {
- CSSDocumentLoader loader = new CSSDocumentLoader();
- IStructuredDocument structuredDocument = (IStructuredDocument) loader.createNewStructuredDocument();
- structuredDocument.set(rule);
-
- //CSSModelParser modelParser = new CSSModelParser((CSSDocumentImpl) getOwnerDocument());
- CSSModelParser modelParser = new CSSModelParser(getOwnerDocument());
- return modelParser.createCSSRule(structuredDocument.getRegionList());
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleDeclaration
- */
- public ICSSStyleDeclaration createCSSStyleDeclaration() {
- CSSStyleDeclarationImpl decl = new CSSStyleDeclarationImpl(false);
- decl.setOwnerDocument(this);
-
- return decl;
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleRule
- */
- public ICSSStyleRule createCSSStyleRule() {
- CSSStyleRuleImpl rule = new CSSStyleRuleImpl();
- CSSStyleDeclarationImpl style = (CSSStyleDeclarationImpl) createCSSStyleDeclaration();
-
- rule.appendChild(style);
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.css.CSSUnknownRule
- */
- public CSSUnknownRule createCSSUnknownRule() {
- CSSUnknownRuleImpl rule = new CSSUnknownRuleImpl();
- rule.setOwnerDocument(this);
-
- return rule;
- }
-
- /**
- * @return org.w3c.dom.stylesheets.MediaList
- */
- public MediaList createMediaList() {
- MediaListImpl media = new MediaListImpl();
- media.setOwnerDocument(this);
-
- return media;
- }
-
- /**
- * Used to delete a rule from the style sheet.
- *
- * @param index
- * The index within the style sheet's rule list of the rule to
- * remove.
- * @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified index does not
- * correspond to a rule in the style sheet's rule list.
- * <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet
- * is readonly.
- */
- public void deleteRule(int index) throws DOMException {
- CSSNodeImpl node = getIndexedRule(index);
- if (node != null)
- removeChild(node);
- }
-
- /**
- * The list of all CSS rules contained within the style sheet. This
- * includes both rule sets and at-rules.
- */
- public CSSRuleList getCssRules() {
- CSSRuleListImpl list = new CSSRuleListImpl();
-
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSRule) {
- list.appendNode(node);
- }
- }
-
- return list;
- }
-
- /**
- * <code>false</code> if the style sheet is applied to the document.
- * <code>true</code> if it is not. Modifying this attribute may cause a
- * new resolution of style for the document. A stylesheet only applies if
- * both an appropriate medium definition is present and the disabled
- * attribute is false. So, if the media doesn't apply to the current user
- * agent, the <code>disabled</code> attribute is ignored.
- */
- public boolean getDisabled() {
- return fDisabled;
- }
-
- /**
- * If the style sheet is a linked style sheet, the value of its attribute
- * is its location. For inline style sheets, the value of this attribute
- * is <code>null</code>. See the href attribute definition for the
- * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute
- * for the XML style sheet processing instruction.
- */
- public String getHref() {
- ICSSModel model = getModel();
- if (model != null && model.getStyleSheetType() == ICSSModel.EXTERNAL) {
- return model.getBaseLocation();
- /*
- * Object id = model.getId(); if (id != null) { if (id instanceof
- * IResource) { // TODO: need to check whether this is correct or
- * not, later. return ((IResource)id).getFullPath().toString(); }
- * return id.toString(); }
- */}
- return null;
- }
-
- CSSRuleImpl getIndexedRule(int index) {
- if (index < 0)
- return null;
-
- int i = 0;
- for (ICSSNode node = getFirstChild(); node != null; node = node.getNextSibling()) {
- if (node instanceof CSSRule) {
- if (i++ == index)
- return (CSSRuleImpl) node;
- }
- }
- return null;
- }
-
- /**
- * The intended destination media for style information. The media is
- * often specified in the <code>ownerNode</code>. If no media has been
- * specified, the <code>MediaList</code> will be empty. See the media
- * attribute definition for the <code>LINK</code> element in HTML 4.0,
- * and the media pseudo-attribute for the XML style sheet processing
- * instruction . Modifying the media list may cause a change to the
- * attribute <code>disabled</code>.
- */
- public MediaList getMedia() {
- return null;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return STYLESHEET_NODE;
- }
-
- /**
- * The node that associates this style sheet with the document. For HTML,
- * this may be the corresponding <code>LINK</code> or <code>STYLE</code>
- * element. For XML, it may be the linking processing instruction. For
- * style sheets that are included by other style sheets, the value of this
- * attribute is <code>null</code>.
- */
- public Node getOwnerNode() {
- // for <LINK> tag or <STYLE> tag
- ICSSModel model = getModel();
- if (model != null)
- return model.getOwnerDOMNode();
- return null;
- }
-
- /**
- * @return org.w3c.dom.NodeList
- */
- public org.w3c.dom.NodeList getOwnerNodes() {
- List list = (getModel().getStyleListeners() != null) ? new Vector(getModel().getStyleListeners()) : null;
- if (list == null)
- return null;
- InternalNodeList nodes = new InternalNodeList();
- Iterator it = list.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj instanceof IStyleSheetAdapter) {
- nodes.nodes.add(((IStyleSheetAdapter) obj).getElement());
- }
- }
- if (nodes.getLength() > 0)
- return nodes;
- else
- return null;
- }
-
- /**
- * @return org.w3c.dom.NodeList
- * @param doc
- * org.w3c.dom.Document
- */
- public NodeList getOwnerNodes(Document doc) {
- List list = (getModel().getStyleListeners() != null) ? new Vector(getModel().getStyleListeners()) : null;
- if (list == null)
- return null;
- InternalNodeList nodes = new InternalNodeList();
- Iterator it = list.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj instanceof IStyleSheetAdapter) {
- Element ele = ((IStyleSheetAdapter) obj).getElement();
- if (ele.getOwnerDocument() == doc)
- nodes.nodes.add(ele);
- }
- }
- if (nodes.getLength() > 0)
- return nodes;
- else
- return null;
- }
-
- /**
- * If this style sheet comes from an <code>@import</code> rule, the <code>ownerRule</code> attribute will
- * contain the <code>CSSImportRule</code>. In that case, the
- * <code>ownerNode</code> attribute in the
- * <code>StyleSheet</code> interface will be <code>null</code>.
- * If the style sheet comes from an element or a processing
- * instruction, the <code>ownerRule</code> attribute will be
- * <code>null</code> and the <code>ownerNode</code> attribute
- * will contain the <code>Node</code>.
- */
- public CSSRule getOwnerRule() {
- Assert.isTrue(false, CSSCoreMessages.You_cannot_use_CSSStyleShe_UI_); //$NON-NLS-1$ = "You cannot use CSSStyleSheet.getOwnerRule() because of many referencers of this rule\nPlease use getOnwerRules()"
- // for @import
- return null;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRuleList
- */
- public org.w3c.dom.css.CSSRuleList getOwnerRules() {
- StyleSheetList list = getParentStyleSheets();
- if (list == null)
- return null;
- CSSRuleListImpl ruleList = new CSSRuleListImpl();
- for (int i = 0; i < list.getLength(); i++) {
- ImportRuleCollector trav = new ImportRuleCollector(this);
- trav.apply((ICSSStyleSheet) list.item(i));
- ruleList.nodes.addAll(trav.getRules());
- }
- return ruleList;
- }
-
- /**
- * For style sheet languages that support the concept of style sheet
- * inclusion, this attribute represents the including style sheet, if one
- * exists. If the style sheet is a top-level style sheet, or the style
- * sheet language does not support inclusion, the value of this attribute
- * is <code>null</code>.
- */
- public StyleSheet getParentStyleSheet() {
- CSSRule owner = getOwnerRule();
- if (owner != null)
- return owner.getParentStyleSheet();
- return null;
- }
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheetList
- */
- public org.w3c.dom.stylesheets.StyleSheetList getParentStyleSheets() {
- List list = (getModel().getStyleListeners() != null) ? new Vector(getModel().getStyleListeners()) : null;
- if (list == null)
- return null;
- InternalStyleSheetList sheets = new InternalStyleSheetList();
- Iterator it = list.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj instanceof ICSSModel) {
- sheets.appendNode(((ICSSModel) obj).getDocument());
- }
- }
- if (sheets.getLength() > 0)
- return sheets;
- else
- return null;
- }
-
- /**
- * The advisory title. The title is often specified in the
- * <code>ownerNode</code>. See the title attribute definition for the
- * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute
- * for the XML style sheet processing instruction.
- */
- public String getTitle() {
- Node node = getOwnerNode();
- if (node instanceof Element) {
- return ((Element) node).getAttribute("TITLE");//$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * This specifies the style sheet language for this style sheet. The style
- * sheet language is specified as a content type (e.g. "text/css"). The
- * content type is often specified in the <code>ownerNode</code>. Also
- * see the type attribute definition for the <code>LINK</code> element
- * in HTML 4.0, and the type pseudo-attribute for the XML style sheet
- * processing instruction.
- */
- public String getType() {
- Node node = getOwnerNode();
- if (node instanceof Element) {
- return ((Element) node).getAttribute("TYPE");//$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Used to insert a new rule into the style sheet. The new rule now
- * becomes part of the cascade.
- *
- * @param rule
- * The parsable text representing the rule. For rule sets this
- * contains both the selector and the style declaration. For
- * at-rules, this specifies both the at-identifier and the rule
- * content.
- * @param index
- * The index within the style sheet's rule list of the rule
- * before which to insert the specified rule. If the specified
- * index is equal to the length of the style sheet's rule
- * collection, the rule will be added to the end of the style
- * sheet.
- * @return The index within the style sheet's rule collection of the newly
- * inserted rule.
- * @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be
- * inserted at the specified index e.g. if an
- * <code>@import</code> rule is inserted after a standard rule set or other
- * at-rule. <br>
- * INDEX_SIZE_ERR: Raised if the specified index is not a valid
- * insertion point. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is
- * readonly. <br>
- * SYNTAX_ERR: Raised if the specified rule has a syntax error and
- * is unparsable.
- */
- public int insertRule(String rule, int index) throws DOMException {
- int length = getCssRules().getLength();
- if (index < 0 || length < index)
- throw new DOMException(DOMException.INDEX_SIZE_ERR, "");//$NON-NLS-1$
-
- IStructuredDocument doc = getModel().getStructuredDocument();
- CSSRuleImpl refRule = (length != index) ? getIndexedRule(index) : null;
- int offset = (refRule != null) ? refRule.getStartOffset() : doc.getLength();
- doc.replaceText(this, offset, 0, rule);
-
- // insertBefore((CSSNodeImpl) createCSSRule(rule),refRule);
- return index;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newRule
- * org.w3c.dom.css.CSSRule
- * @param refRule
- * org.w3c.dom.css.CSSRule
- */
- public org.w3c.dom.css.CSSRule insertRuleBefore(org.w3c.dom.css.CSSRule newRule, org.w3c.dom.css.CSSRule refRule) throws org.w3c.dom.DOMException {
- if (newRule == null && refRule == null)
- return null;
-
- CSSRule ret = (CSSRule) insertBefore((CSSNodeImpl) newRule, (CSSNodeImpl) refRule);
- return ret;
- }
-
- /**
- * @return boolean
- */
- public boolean isDocument() {
- return true;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule removeRule(org.w3c.dom.css.CSSRule rule) throws org.w3c.dom.DOMException {
- if (rule == null)
- return null;
-
- CSSRule ret = (CSSRule) removeChild((CSSNodeImpl) rule);
- return ret;
- }
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newChild
- * org.w3c.dom.css.CSSRule
- * @param oldChild
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public org.w3c.dom.css.CSSRule replaceRule(org.w3c.dom.css.CSSRule newRule, org.w3c.dom.css.CSSRule oldRule) throws org.w3c.dom.DOMException {
- if (newRule == null && oldRule == null)
- return null;
-
- CSSRule ret = (CSSRule) replaceChild((CSSNodeImpl) newRule, (CSSNodeImpl) oldRule);
- return ret;
- }
-
- /**
- * setDisabled method comment.
- */
- public void setDisabled(boolean disabled) {
- this.fDisabled = disabled;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSUnknownRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSUnknownRuleImpl.java
deleted file mode 100644
index a93ed7527d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSUnknownRuleImpl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.w3c.dom.css.CSSUnknownRule;
-
-
-/**
- *
- */
-class CSSUnknownRuleImpl extends CSSRuleImpl implements CSSUnknownRule {
-
- // TODO: This field is never read
- String fCssText = null;
-
- /**
- *
- */
- CSSUnknownRuleImpl() {
- super();
- }
-
- CSSUnknownRuleImpl(CSSUnknownRuleImpl that) {
- super(that);
- }
-
- public ICSSNode cloneNode(boolean deep) {
- CSSUnknownRuleImpl cloned = new CSSUnknownRuleImpl(this);
-
- return cloned;
- }
-
- /**
- * @return short
- */
- public short getNodeType() {
- return UNKNOWNRULE_NODE;
- }
-
- /**
- * The type of the rule, as defined above. The expectation is that
- * binding-specific casting methods can be used to cast down from an
- * instance of the <code>CSSRule</code> interface to the specific
- * derived interface implied by the <code>type</code>.
- */
- public short getType() {
- return UNKNOWN_RULE;
- }
-
- /**
- * @param cssText
- * java.lang.String
- */
- public void setCssText(String cssText) {
- this.fCssText = cssText;
-
- super.setCssText(cssText);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CounterImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CounterImpl.java
deleted file mode 100644
index 2b921f7bec..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CounterImpl.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICounter;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.Counter;
-
-
-/**
- *
- */
-class CounterImpl extends CSSPrimitiveContainer implements ICounter {
-
- /**
- *
- */
- CounterImpl() {
- super(CSS_COUNTER);
- }
-
- CounterImpl(CounterImpl that) {
- super(that);
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- CounterImpl cloned = new CounterImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- /**
- * This method is used to get the Counter value. If this CSS value doesn't
- * contain a counter value, a <code>DOMException</code> is raised.
- * Modification to the corresponding style property can be achieved using
- * the <code>Counter</code> interface.
- *
- * @return The Counter value.
- * @exception DOMException
- * INVALID_ACCESS_ERR: Raised if the CSS value doesn't
- * contain a Counter value (e.g. this is not
- * <code>CSS_COUNTER</code>).
- */
- public Counter getCounterValue() throws DOMException {
- return this;
- }
-
- /**
- * This attribute is used for the identifier of the counter.
- */
- public String getIdentifier() {
- return getAttribute(IDENTIFIER);
- }
-
- /**
- * This attribute is used for the style of the list.
- */
- public String getListStyle() {
- return getAttribute(LISTSTYLE);
- }
-
- /**
- * This attribute is used for the separator of the nested counters.
- */
- public String getSeparator() {
- return getAttribute(SEPARATOR);
- }
-
- /**
- *
- */
- protected void initPrimitives() {
- return;
- }
-
- /**
- * @param identifier
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setIdentifier(String identifier) throws DOMException {
- setAttribute(IDENTIFIER, identifier);
- }
-
- /**
- * @param listStyle
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setListStyle(String listStyle) throws DOMException {
- setAttribute(LISTSTYLE, listStyle);
- }
-
- /**
- * @param Separator
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public void setSeparator(String Separator) throws org.w3c.dom.DOMException {
- setAttribute(SEPARATOR, Separator);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/DOMCSSImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/DOMCSSImpl.java
deleted file mode 100644
index fb7907f815..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/DOMCSSImpl.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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.w3c.dom.css.CSSStyleSheet;
-
-
-/**
- *
- */
-public class DOMCSSImpl {
-
- /**
- * DOMCSSImpl constructor comment.
- */
- public DOMCSSImpl() {
- super();
- }
-
- public static ICSSStyleDeclaration createCSSStyleDeclaration() throws org.w3c.dom.DOMException {
- CSSStyleDeclarationImpl document = new CSSStyleDeclarationImpl(true);
-
- return document;
- }
-
- /**
- * @return org.w3c.dom.css.CSSStyleSheet
- * @param title
- * java.lang.String
- * @param media
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public static CSSStyleSheet createCSSStyleSheet(String title, String media) throws org.w3c.dom.DOMException {
- return new CSSStyleSheetImpl();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/MediaListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/MediaListImpl.java
deleted file mode 100644
index a84b3b1a02..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/MediaListImpl.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-class MediaListImpl extends CSSRegionContainer implements MediaList {
-
- int mediumCounter;
-
- /**
- * MediaListImpl constructor comment.
- */
- MediaListImpl() {
- super();
- }
-
- /**
- * MediaListImpl constructor comment.
- */
- MediaListImpl(MediaListImpl that) {
- super(that);
- }
-
- /**
- * Adds the medium <code>newMedium</code> to the end of the list. If the
- * <code>newMedium</code> is already used, it is first removed.
- *
- * @param newMediumThe
- * new medium to add.
- * @exception DOMException
- * INVALID_CHARACTER_ERR: If the medium contains characters
- * that are invalid in the underlying style language. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is
- * readonly.
- */
- public void appendMedium(String newMedium) throws DOMException {
- if (newMedium == null)
- return;
-
- CSSNodeListImpl m = getMedia();
- for (int i = 0; i != m.getLength(); i++) {
- if (newMedium.equals(item(i)))
- return;
- }
-
- setAttribute("medium" + Integer.toString(mediumCounter++), newMedium);//$NON-NLS-1$
- }
-
- public ICSSNode cloneNode(boolean deep) {
- MediaListImpl cloned = new MediaListImpl(this);
- return cloned;
- }
-
- /**
- * Deletes the medium indicated by <code>oldMedium</code> from the list.
- *
- * @param oldMediumThe
- * medium to delete in the media list.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is
- * readonly. <br>
- * NOT_FOUND_ERR: Raised if <code>oldMedium</code> is not
- * in the list.
- */
- public void deleteMedium(String oldMedium) throws DOMException {
- for (int i = 0; i != getLength(); i++) {
- if (oldMedium.equals(item(i))) {
- removeAttributeNode((CSSAttrImpl) fAttrs.item(i));
- }
- }
- }
-
- /**
- * The number of media in the list. The range of valid media is
- * <code>0</code> to <code>length-1</code> inclusive.
- */
- public int getLength() {
- return getMedia().getLength();
- }
-
- /**
- * @return CSSNodeListImpl
- */
- CSSNodeListImpl getMedia() {
- if (fAttrs == null)
- fAttrs = new CSSNamedNodeMapImpl();
- return fAttrs;
- }
-
- /**
- * The parsable textual representation of the media list. This is a
- * comma-separated list of media.
- *
- * @exception DOMException
- * SYNTAX_ERR: Raised if the specified string value has a
- * syntax error and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this media list
- * is readonly.
- */
- public String getMediaText() {
- return getCssText();
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/01/17
- * 18:50:29)
- *
- * @return short
- */
- public short getNodeType() {
- return MEDIALIST_NODE;
- }
-
- /**
- * Returns the <code>index</code> th in the list. If <code>index</code>
- * is greater than or equal to the number of media in the list, this
- * returns <code>null</code>.
- *
- * @param index
- * Index into the collection.
- * @return The medium at the <code>index</code> th position in the
- * <code>MediaList</code>, or <code>null</code> if that is
- * not a valid index.
- */
- public String item(int index) {
- if (index < 0 || getLength() <= index)
- return null;
-
- return ((CSSAttrImpl) getMedia().item(index)).getValue();
- }
-
- /**
- * setMediaText method comment.
- */
- public void setMediaText(String mediaText) throws DOMException {
- setCssText(mediaText);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RGBColorImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RGBColorImpl.java
deleted file mode 100644
index 25550275c1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RGBColorImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.RGBColor;
-
-
-/**
- *
- */
-class RGBColorImpl extends CSSPrimitiveContainer implements RGBColor {
-
- private CSSPrimitiveValueImpl fRed;
- private CSSPrimitiveValueImpl fGreen;
- private CSSPrimitiveValueImpl fBlue;
-
- /**
- *
- */
- RGBColorImpl() {
- super(CSS_RGBCOLOR);
- }
-
- RGBColorImpl(RGBColorImpl that) {
- super(that);
-
- fRed = new CSSPrimitiveValueImpl(that.fRed);
- appendChild(fRed);
-
- fGreen = new CSSPrimitiveValueImpl(that.fGreen);
- appendChild(fGreen);
-
- fBlue = new CSSPrimitiveValueImpl(that.fBlue);
- appendChild(fBlue);
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- RGBColorImpl cloned = new RGBColorImpl(this);
-
- return cloned;
- }
-
- /**
- * This attribute is used for the blue value of the RGB color.
- */
- public CSSPrimitiveValue getBlue() {
- return fBlue;
- }
-
- /**
- * This attribute is used for the green value of the RGB color.
- */
- public CSSPrimitiveValue getGreen() {
- return fGreen;
- }
-
- /**
- * This attribute is used for the red value of the RGB color.
- */
- public CSSPrimitiveValue getRed() {
- return fRed;
- }
-
- /**
- * @return org.w3c.dom.css.RGBColor
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public RGBColor getRGBColorValue() throws org.w3c.dom.DOMException {
- return this;
- }
-
- /**
- *
- */
- protected void initPrimitives() {
-
- fRed = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fRed);
-
- fGreen = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fGreen);
-
- fBlue = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fBlue);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RectImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RectImpl.java
deleted file mode 100644
index a295ea3c91..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RectImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.document;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.Rect;
-
-
-/**
- *
- */
-class RectImpl extends CSSPrimitiveContainer implements Rect {
-
- private CSSPrimitiveValueImpl fTop;
- private CSSPrimitiveValueImpl fRight;
- private CSSPrimitiveValueImpl fBottom;
- private CSSPrimitiveValueImpl fLeft;
-
- /**
- *
- */
- RectImpl() {
- super(CSS_RECT);
- }
-
- RectImpl(RectImpl that) {
- super(that);
-
- fTop = new CSSPrimitiveValueImpl(that.fTop);
- appendChild(fTop);
-
- fRight = new CSSPrimitiveValueImpl(that.fRight);
- appendChild(fRight);
-
- fBottom = new CSSPrimitiveValueImpl(that.fBottom);
- appendChild(fBottom);
-
- fLeft = new CSSPrimitiveValueImpl(that.fLeft);
- appendChild(fLeft);
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param deep
- * boolean
- */
- public ICSSNode cloneNode(boolean deep) {
- RectImpl cloned = new RectImpl(this);
-
- return cloned;
- }
-
- /**
- * This attribute is used for the bottom of the rect.
- */
- public CSSPrimitiveValue getBottom() {
- return fBottom;
- }
-
- /**
- * This attribute is used for the left of the rect.
- */
- public CSSPrimitiveValue getLeft() {
- return fLeft;
- }
-
- /**
- * @return org.w3c.dom.css.Rect
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- public Rect getRectValue() throws org.w3c.dom.DOMException {
- return this;
- }
-
- /**
- * This attribute is used for the right of the rect.
- */
- public CSSPrimitiveValue getRight() {
- return fRight;
- }
-
- /**
- * This attribute is used for the top of the rect.
- */
- public CSSPrimitiveValue getTop() {
- return fTop;
- }
-
- /**
- *
- */
- protected void initPrimitives() {
-
- fTop = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fTop);
-
- fRight = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fRight);
-
- fBottom = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fBottom);
-
- fLeft = (CSSPrimitiveValueImpl) getOwnerDocument().createCSSPrimitiveValue(CSS_NUMBER);
- appendChild(fLeft);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/StyleSheetListImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/StyleSheetListImpl.java
deleted file mode 100644
index fea1bfca15..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/StyleSheetListImpl.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.wst.css.core.internal.document;
-
-
-
-import org.w3c.dom.stylesheets.StyleSheet;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- *
- */
-class StyleSheetListImpl extends AbstractCSSNodeList implements StyleSheetList {
-
- /**
- * StyleSheetListImpl constructor comment.
- */
- StyleSheetListImpl() {
- super();
- }
-
- /**
- * Used to retrieve a style sheet by ordinal index. If index is greater
- * than or equal to the number of style sheets in the list, this returns
- * <code>null</code>.
- *
- * @param indexIndex
- * into the collection
- * @return The style sheet at the <code>index</code> position in the
- * <code>StyleSheetList</code>, or <code>null</code> if that
- * is not a valid index.
- */
- public StyleSheet item(int index) {
- return (StyleSheet) itemImpl(index);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentCharsetDetector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentCharsetDetector.java
deleted file mode 100644
index 51a51e1f1f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentCharsetDetector.java
+++ /dev/null
@@ -1,126 +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.wst.css.core.internal.encoding;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.css.core.internal.contenttype.CSSResourceEncodingDetector;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.sse.core.internal.document.DocumentReader;
-import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
-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.IStructuredDocumentRegionList;
-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;
-
-
-public class CSSDocumentCharsetDetector extends CSSResourceEncodingDetector implements IDocumentCharsetDetector {
-
- public String getEncodingName(IStructuredDocument structuredDocument) {
- String result = null;
- // if the document is empty, then there will be no nodes,
- // so no need to continue.
- IStructuredDocumentRegionList nodes = structuredDocument.getRegionList();
- if (nodes.getLength() > 0) {
- IStructuredDocumentRegion node = null;
- // skip any initial whitespace
- // Note that @charset "encodingname";
- // must appear at very beginning of document,
- // to be valid.
- // May have to test with "damaged" files (e.g.
- // beginning EOLs, etc., to verify this works
- // as expected.
- for (int i = 0; i < nodes.getLength(); i++) {
- node = nodes.item(i);
- if (getType(node) != CSSRegionContexts.CSS_S) {
- break;
- }
- }
- Iterator regions = node.getRegions().iterator();
- ITextRegion region = getNextRegionOfType(CSSRegionContexts.CSS_CHARSET, regions);
- if (region != null) {
- ITextRegion valueRegion = getNextRegionOfType(CSSRegionContexts.CSS_STRING, regions);
- if (valueRegion == null) {
- // if didn't find the region, its probably due to ill
- // formed input, such as
- // @charset "ISO-8859-6;
- // so we'll try again for "unknown" region.
- // If that fails, we'll give up?
- regions = node.getRegions().iterator();
- region = getNextRegionOfType(CSSRegionContexts.CSS_CHARSET, regions);
- if (region != null) {
- valueRegion = getNextRegionOfType(CSSRegionContexts.CSS_UNKNOWN, regions);
- if (valueRegion != null) {
- result = node.getText(valueRegion);
- }
- }
- }
- else {
- result = node.getText(valueRegion);
- }
- result = StringUtils.stripNonLetterDigits(result);
- }
- }
- return result;
- }
-
- public String getEncodingName(IDocument document) {
- String enc = null;
- if (document instanceof IStructuredDocument) {
- enc = getEncodingName((IStructuredDocument) document);
- }
- else {
- // TODO Important: need to implement some "raw" parser for
- // IDocument level
- }
- return enc;
- }
-
- private String getType(IStructuredDocumentRegion node) {
- if (node == null)
- return null;
- ITextRegionList regions = node.getRegions();
- if (regions == null || regions.size() == 0)
- return null;
- ITextRegion region = regions.get(0);
- String result = region.getType();
- return result;
- }
-
- private ITextRegion getNextRegionOfType(String type, Iterator regions) {
- if (type == null)
- return null;
- if (regions == null)
- return null;
- ITextRegion result = null;
- while (regions.hasNext()) {
- ITextRegion region = (ITextRegion) regions.next();
- if (region.getType() == type) {
- result = region;
- break;
- }
- }
- return result;
- }
-
- /**
- *
- */
-
- public void set(IDocument document) {
- set(new DocumentReader(document, 0));
-
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentLoader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentLoader.java
deleted file mode 100644
index b46ff08f87..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentLoader.java
+++ /dev/null
@@ -1,91 +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.wst.css.core.internal.encoding;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.wst.css.core.internal.contenttype.EncodingGuesser;
-import org.eclipse.wst.css.core.internal.parser.CSSSourceParser;
-import org.eclipse.wst.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
-import org.eclipse.wst.css.core.internal.text.CSSStructuredDocumentReParser;
-import org.eclipse.wst.css.core.internal.text.StructuredTextPartitionerForCSS;
-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.ContentTypeEncodingPreferences;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-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;
-
-
-public class CSSDocumentLoader extends AbstractDocumentLoader {
- private final static String CSS_ID = ContentTypeIdForCSS.ContentTypeID_CSS;
- private IDocumentCharsetDetector documentEncodingDetector;
-
-
- public CSSDocumentLoader() {
- super();
- }
-
- protected String getEncodingNameByGuess(byte[] string, int length) {
- String ianaEnc = null;
- ianaEnc = EncodingGuesser.guessEncoding(string, length);
- return ianaEnc;
- }
-
- /**
- * Default encoding. For CSS there is no spec'd default.
- */
- protected String getSpecDefaultEncoding() {
- return null;
- }
-
- protected IEncodedDocument newEncodedDocument() {
- // DMW: I copied this from CSSModelImple ...
- // but am not sure its right
- IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- CSSStructuredDocumentReParser reParser = new CSSStructuredDocumentReParser();
- reParser.setStructuredDocument(structuredDocument);
- ((BasicStructuredDocument) structuredDocument).setReParser(reParser);
- return structuredDocument;
- }
-
- public RegionParser getParser() {
- // return new CSSRegionParser();
- return new CSSSourceParser();
- }
-
- protected String getPreferredNewLineDelimiter(IFile file) {
- String delimiter = ContentTypeEncodingPreferences.getPreferredNewLineDelimiter(CSS_ID);
- if (delimiter == null)
- delimiter = super.getPreferredNewLineDelimiter(file);
- return delimiter;
- }
-
- public IDocumentCharsetDetector getDocumentEncodingDetector() {
- if (documentEncodingDetector == null) {
- documentEncodingDetector = new CSSDocumentCharsetDetector();
- }
- return documentEncodingDetector;
- }
-
- public IDocumentPartitioner getDefaultDocumentPartitioner() {
- return new StructuredTextPartitionerForCSS();
- }
-
- public IDocumentLoader newInstance() {
- return new CSSDocumentLoader();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/ICSSStyleListener.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/ICSSStyleListener.java
deleted file mode 100644
index 0c77119003..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/ICSSStyleListener.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.wst.css.core.internal.event;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-
-
-
-/**
- *
- */
-public interface ICSSStyleListener {
-
- /**
- *
- */
- void styleChanged(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media);
-
- /**
- *
- */
- void styleUpdate(ICSSModel srcModel);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/ICSSStyleNotifier.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/ICSSStyleNotifier.java
deleted file mode 100644
index ba49ee8d2f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/ICSSStyleNotifier.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.wst.css.core.internal.event;
-
-
-
-import java.util.List;
-
-/**
- *
- */
-public interface ICSSStyleNotifier extends ICSSStyleListener {
-
- /**
- *
- */
- void addStyleListener(ICSSStyleListener listener);
-
- /**
- *
- */
- List getStyleListeners();
-
- /**
- */
- boolean isRecording();
-
- /**
- *
- */
- void removeStyleListener(ICSSStyleListener listener);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSEmbededStyleNotifyAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSEmbededStyleNotifyAdapter.java
deleted file mode 100644
index e8031ba3de..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSEmbededStyleNotifyAdapter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.eventimpl;
-
-
-
-import org.eclipse.wst.css.core.internal.event.ICSSStyleListener;
-import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleSheetAdapter;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-
-public class CSSEmbededStyleNotifyAdapter extends CSSStyleNotifyAdapter {
-
- /**
- * CSSEmbeddedStyleNotifyAdapter constructor comment.
- *
- * @param model
- * org.eclipse.wst.css.core.model.interfaces.ICSSModel
- */
- public CSSEmbededStyleNotifyAdapter(ICSSModel model) {
- super(model);
- }
-
- /**
- *
- */
- public void styleChanged(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- IDOMNode node = (IDOMNode) model.getOwnerDOMNode();
- if (node != null)
- return;
- INodeAdapter adapter = node.getAdapterFor(IStyleSheetAdapter.class);
- if (adapter instanceof ICSSStyleListener) {
- ((ICSSStyleListener) adapter).styleChanged(srcModel, removed, added, media);
- }
- }
-
- /**
- *
- */
- public void styleUpdate(ICSSModel srcModel) {
- IDOMNode node = (IDOMNode) model.getOwnerDOMNode();
- if (node != null)
- return;
- INodeAdapter adapter = node.getAdapterFor(IStyleSheetAdapter.class);
- if (adapter instanceof ICSSStyleListener) {
- ((ICSSStyleListener) adapter).styleUpdate(srcModel);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSStyleEventDeliverer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSStyleEventDeliverer.java
deleted file mode 100644
index 0760182eff..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSStyleEventDeliverer.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.eventimpl;
-
-
-
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.event.ICSSStyleListener;
-import org.eclipse.wst.css.core.internal.event.ICSSStyleNotifier;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-
-
-/**
- *
- */
-public class CSSStyleEventDeliverer {
-
- private Vector fVisited = new Vector();
- private ICSSModel fSrcModel;
- private ICSSSelector[] fRemoved;
- private ICSSSelector[] fAdded;
- private String fMedia;
-
- /**
- *
- */
- public CSSStyleEventDeliverer() {
- super();
- }
-
- /**
- *
- */
- public void fire(ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- if (srcModel == null || srcModel.getStyleListeners() == null)
- return;
-
- this.fSrcModel = srcModel;
- this.fRemoved = removed;
- this.fAdded = added;
- this.fMedia = media;
-
- // prohibit delivering to srcModel
- fVisited.clear();
- fVisited.add(srcModel);
- Object[] listeners = srcModel.getStyleListeners().toArray();
- for (int i = 0; i < listeners.length; i++) {
- visit((ICSSStyleListener) listeners[i]);
- }
- }
-
- /**
- *
- */
- public void fireTo(ICSSStyleListener listener, ICSSModel srcModel, ICSSSelector[] removed, ICSSSelector[] added, String media) {
- this.fSrcModel = srcModel;
- this.fRemoved = removed;
- this.fAdded = added;
- this.fMedia = media;
-
- // prohibit delivering to srcModel
- fVisited.clear();
- // visited.add(srcModel); : because looping problem
- visit(listener);
- }
-
- /**
- *
- */
- public void fireUpdate(ICSSModel srcModel) {
- if (srcModel == null || srcModel.getStyleListeners() == null)
- return;
-
- this.fSrcModel = srcModel;
-
- // prohibit delivering to srcModel
- fVisited.clear();
- fVisited.add(srcModel);
- Object[] listeners = srcModel.getStyleListeners().toArray();
- for (int i = 0; i < listeners.length; i++) {
- visitUpdate((ICSSStyleListener) listeners[i]);
- }
- }
-
- /**
- *
- */
- public void fireUpdateTo(ICSSStyleListener listener, ICSSModel srcModel) {
- if (srcModel == null || srcModel.getStyleListeners() == null)
- return;
-
- this.fSrcModel = srcModel;
-
- // prohibit delivering to srcModel
- fVisited.clear();
- // visited.add(srcModel);
- visitUpdate(listener);
- }
-
- /**
- *
- */
- protected void visit(ICSSStyleListener listener) {
- if (listener == null || fVisited.contains(listener))
- return;
-
- // fire event to listener
- listener.styleChanged(fSrcModel, fRemoved, fAdded, fMedia);
- fVisited.add(listener);
-
- // traverse notifier
- if (listener instanceof ICSSStyleNotifier) {
- ICSSStyleNotifier notifier = (ICSSStyleNotifier) listener;
- if (notifier.getStyleListeners() != null) {
- Object[] listeners = notifier.getStyleListeners().toArray();
- for (int i = 0; i < listeners.length; i++) {
- visit((ICSSStyleListener) listeners[i]);
- }
- }
- }
- }
-
- /**
- *
- */
- protected void visitUpdate(ICSSStyleListener listener) {
- if (listener == null || fVisited.contains(listener))
- return;
-
- // fire event to listener
- listener.styleUpdate(fSrcModel);
- fVisited.add(listener);
-
- // traverse notifier
- if (listener instanceof ICSSStyleNotifier) {
- ICSSStyleNotifier notifier = (ICSSStyleNotifier) listener;
- if (notifier.getStyleListeners() != null) {
- Object[] listeners = notifier.getStyleListeners().toArray();
- for (int i = 0; i < listeners.length; i++) {
- visitUpdate((ICSSStyleListener) listeners[i]);
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSStyleNotifyAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSStyleNotifyAdapter.java
deleted file mode 100644
index 0633b1029b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSStyleNotifyAdapter.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.eventimpl;
-
-
-
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.event.ICSSStyleListener;
-import org.eclipse.wst.css.core.internal.event.ICSSStyleNotifier;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.internal.util.ImportedCollector;
-import org.eclipse.wst.css.core.internal.util.SelectorsCollector;
-
-
-/**
- *
- */
-public class CSSStyleNotifyAdapter implements ICSSStyleNotifier {
-
- protected java.util.Vector listeners;
- protected final org.eclipse.wst.css.core.internal.provisional.document.ICSSModel model;
- protected boolean recording = false;
-
- /**
- *
- */
- public CSSStyleNotifyAdapter(ICSSModel model) {
- super();
- this.model = model;
- }
-
- /**
- *
- */
- public void addStyleListener(ICSSStyleListener listener) {
- if (listener == null)
- return;
-
- if (listeners == null)
- listeners = new Vector();
- if (!listeners.contains(listener)) {
-
- // send new selectors event to listener
- ImportedCollector trav = new ImportedCollector();
- trav.apply(model.getDocument());
- Iterator it = trav.getExternals().iterator();
- while (it.hasNext()) {
- ICSSStyleSheet sheet = (ICSSStyleSheet) it.next();
- // collect selectors
- SelectorsCollector selTrav = new SelectorsCollector();
- selTrav.apply(sheet);
- int nSel = selTrav.getSelectors().size();
- ICSSSelector[] added = new ICSSSelector[nSel];
- for (int i = 0; i < nSel; i++)
- added[i] = (ICSSSelector) selTrav.getSelectors().get(i);
-
- // fire event
- CSSStyleEventDeliverer deliverer = new CSSStyleEventDeliverer();
- deliverer.fireTo(listener, sheet.getModel(), null, added, null/*
- * media
- * will
- * be
- * implemented
- * in
- * the
- * future
- */);
- }
-
- // add listener
- listeners.add(listener);
- }
- }
-
- /**
- *
- */
- public void beginRecording() {
- recording = true;
- }
-
- /**
- *
- */
- public void endRecording() {
- recording = false;
- }
-
- /**
- *
- */
- public void fire(ICSSSelector[] removed, ICSSSelector[] added, String media) {
- // send selector changed event
- CSSStyleEventDeliverer deliv = new CSSStyleEventDeliverer();
- deliv.fire(model, removed, added, null);
-
- }
-
- /**
- *
- */
- public java.util.List getStyleListeners() {
- return listeners;
- }
-
- /**
- */
- public boolean isRecording() {
- return recording;
- }
-
- /**
- *
- */
- public void removeStyleListener(ICSSStyleListener listener) {
- if (listener == null)
- return;
-
- if (listeners.contains(listener)) {
- listeners.remove(listener);
-
- // send old selectors event to listener
- ImportedCollector trav = new ImportedCollector();
- trav.apply(model.getDocument());
- Iterator it = trav.getExternals().iterator();
- while (it.hasNext()) {
- ICSSStyleSheet sheet = (ICSSStyleSheet) it.next();
- // collect selectors
- SelectorsCollector selTrav = new SelectorsCollector();
- selTrav.apply(sheet);
- int nSel = selTrav.getSelectors().size();
- ICSSSelector[] removed = new ICSSSelector[nSel];
- for (int i = 0; i < nSel; i++)
- removed[i] = (ICSSSelector) selTrav.getSelectors().get(i);
-
- // fire event
- CSSStyleEventDeliverer deliverer = new CSSStyleEventDeliverer();
- deliverer.fireTo(listener, sheet.getModel(), removed, null, null/*
- * media
- * will
- * be
- * implemented
- * in
- * the
- * future
- */);
- }
- }
- }
-
- /**
- *
- */
- public void styleChanged(org.eclipse.wst.css.core.internal.provisional.document.ICSSModel srcModel, org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector[] removed, org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector[] added, java.lang.String media) {
- }
-
- /**
- *
- */
- public void styleUpdate(org.eclipse.wst.css.core.internal.provisional.document.ICSSModel srcModel) {
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/format/FormatProcessorCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/format/FormatProcessorCSS.java
deleted file mode 100644
index 797d07646f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/format/FormatProcessorCSS.java
+++ /dev/null
@@ -1,123 +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.wst.css.core.internal.format;
-
-import java.util.List;
-
-import org.eclipse.jface.text.DocumentRewriteSession;
-import org.eclipse.jface.text.DocumentRewriteSessionType;
-import org.eclipse.jface.text.IDocumentExtension4;
-import org.eclipse.wst.css.core.internal.formatter.CSSFormatUtil;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatter;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.format.AbstractStructuredFormatProcessor;
-import org.eclipse.wst.sse.core.internal.format.IStructuredFormatPreferences;
-import org.eclipse.wst.sse.core.internal.format.IStructuredFormatter;
-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.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Node;
-
-
-public class FormatProcessorCSS extends AbstractStructuredFormatProcessor {
- /*
- * Max length of text to be formatted to be considered a "small change"
- * Used for document rewrite session type.
- */
- private final int MAX_SMALL_FORMAT_SIZE = 1000;
-
- protected String getFileExtension() {
- return "css"; //$NON-NLS-1$
- }
-
- public void formatModel(IStructuredModel structuredModel, int start, int length) {
- CSSFormatUtil formatUtil = CSSFormatUtil.getInstance();
- if (structuredModel instanceof ICSSModel) {
- // BUG102822 take advantage of IDocumentExtension4
- IDocumentExtension4 docExt4 = null;
- if (structuredModel.getStructuredDocument() instanceof IDocumentExtension4) {
- docExt4 = (IDocumentExtension4) structuredModel.getStructuredDocument();
- }
- DocumentRewriteSession rewriteSession = null;
-
- try {
- DocumentRewriteSessionType rewriteType = (length > MAX_SMALL_FORMAT_SIZE) ? DocumentRewriteSessionType.UNRESTRICTED : DocumentRewriteSessionType.UNRESTRICTED_SMALL;
- rewriteSession = (docExt4 == null || docExt4.getActiveRewriteSession() != null) ? null : docExt4.startRewriteSession(rewriteType);
-
- ICSSDocument doc = ((ICSSModel) structuredModel).getDocument();
- CSSSourceFormatter formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) doc);
- StringBuffer buf = formatter.format(doc);
- if (buf != null) {
- int startOffset = ((IndexedRegion) doc).getStartOffset();
- int endOffset = ((IndexedRegion) doc).getEndOffset();
- formatUtil.replaceSource(doc.getModel(), startOffset, endOffset - startOffset, buf.toString());
- }
- }
- finally {
- // BUG102822 take advantage of IDocumentExtension4
- if (docExt4 != null && rewriteSession != null)
- docExt4.stopRewriteSession(rewriteSession);
- }
- }
- else if (structuredModel instanceof IDOMModel) {
- List cssnodes = formatUtil.collectCSSNodes(structuredModel, start, length);
- if (cssnodes != null && !cssnodes.isEmpty()) {
- ICSSModel model = null;
-
- // BUG102822 take advantage of IDocumentExtension4
- IDocumentExtension4 docExt4 = null;
- if (structuredModel.getStructuredDocument() instanceof IDocumentExtension4) {
- docExt4 = (IDocumentExtension4) structuredModel.getStructuredDocument();
- }
- DocumentRewriteSession rewriteSession = null;
-
- try {
- DocumentRewriteSessionType rewriteType = (length > MAX_SMALL_FORMAT_SIZE) ? DocumentRewriteSessionType.UNRESTRICTED : DocumentRewriteSessionType.UNRESTRICTED_SMALL;
- rewriteSession = (docExt4 == null || docExt4.getActiveRewriteSession() != null) ? null : docExt4.startRewriteSession(rewriteType);
-
- for (int i = 0; i < cssnodes.size(); i++) {
- ICSSNode node = (ICSSNode) cssnodes.get(i);
- CSSSourceFormatter formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) node);
- StringBuffer buf = formatter.format(node);
- if (buf != null) {
- int startOffset = ((IndexedRegion) node).getStartOffset();
- int endOffset = ((IndexedRegion) node).getEndOffset();
- if (model == null) {
- model = node.getOwnerDocument().getModel();
- }
- formatUtil.replaceSource(model, startOffset, endOffset - startOffset, buf.toString());
- }
- }
- }
- finally {
- // BUG102822 take advantage of IDocumentExtension4
- if (docExt4 != null && rewriteSession != null)
- docExt4.stopRewriteSession(rewriteSession);
- }
- }
- }
- }
-
- public IStructuredFormatPreferences getFormatPreferences() {
- return null;
- }
-
- protected IStructuredFormatter getFormatter(Node node) {
- return null;
- }
-
- protected void refreshFormatPreferences() {
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java
deleted file mode 100644
index 7d6cf7933f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java
+++ /dev/null
@@ -1,1003 +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.wst.css.core.internal.formatter;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.DefaultLineTracker;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategyImpl;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-import org.eclipse.wst.css.core.internal.util.CSSLinkConverter;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-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.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-
-/**
- *
- */
-public abstract class AbstractCSSSourceFormatter implements CSSSourceGenerator {
-
- protected final static short GENERATE = 0;
- protected final static short FORMAT = 1;
- protected final static short CLEANUP = 2;
- protected static short strategy;
-
- /**
- *
- */
- AbstractCSSSourceFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void appendDelimBefore(ICSSNode node, CompoundRegion toAppend, StringBuffer source) {
- if (node == null || source == null)
- return;
- if (isCleanup() && !getCleanupStrategy(node).isFormatSource())
- return; // for not formatting case on cleanup action
- String delim = getLineDelimiter(node);
-
- boolean needIndent = !(node instanceof ICSSStyleSheet);
- if (toAppend == null) {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(getIndentString());
- }
- else {
- String type = toAppend.getType();
- if (type == CSSRegionContexts.CSS_COMMENT) {
- RegionIterator it = new RegionIterator(toAppend.getDocumentRegion(), toAppend.getTextRegion());
- it.prev();
- ITextRegion prev = it.prev();
- if (prev == null || (prev.getType() == CSSRegionContexts.CSS_S && TextUtilities.indexOf(DefaultLineTracker.DELIMITERS, it.getStructuredDocumentRegion().getText(prev), 0)[0] >= 0)) {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(getIndentString());
- }
- else {
- appendSpaceBefore(node, toAppend.getText(), source);
- }
- }
- else if (type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- RegionIterator it = new RegionIterator(toAppend.getDocumentRegion(), toAppend.getTextRegion());
- it.prev();
- ITextRegion prev = it.prev();
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- if (prev.getType() == CSSRegionContexts.CSS_S && TextUtilities.indexOf(DefaultLineTracker.DELIMITERS, it.getStructuredDocumentRegion().getText(prev), 0)[0] >= 0) {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(getIndentString());
- }
- else if (preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH) > 0 && (!preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR) || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = 1;
- if (length + append > preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH)) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- if (needIndent)
- source.append(getIndentString());
- }
- }
- }
- else if (type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_LBRACE) {
- source.append(delim);
- source.append(getIndent(node));
- }
- else {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(getIndentString());
- }
- }
- }
-
- /**
- *
- */
- protected void appendSpaceBefore(ICSSNode node, CompoundRegion toAppend, StringBuffer source) {
- if (node == null || toAppend == null || source == null)
- return;
- if (isCleanup() && !getCleanupStrategy(node).isFormatSource())
- return; // for not formatting case on cleanup action
- String type = toAppend.getType();
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- boolean needIndent = !(node instanceof ICSSStyleSheet);
- if (type == CSSRegionContexts.CSS_COMMENT) {
- // check whether previous region is 'S' and has CR-LF
- String delim = getLineDelimiter(node);
- RegionIterator it = new RegionIterator(toAppend.getDocumentRegion(), toAppend.getTextRegion());
- it.prev();
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S && TextUtilities.indexOf(DefaultLineTracker.DELIMITERS, it.getStructuredDocumentRegion().getText(prev), 0)[0] >= 0) {
- source.append(delim);
- source.append(getIndent(node));
- if (needIndent)
- source.append(getIndentString());
- }
- else {
- appendSpaceBefore(node, toAppend.getText(), source);
- }
- }
- else if (type == CSSRegionContexts.CSS_LBRACE && preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_NEWLINE_ON_OPEN_BRACE)) {
- String delim = getLineDelimiter(node);
- source.append(delim);
- source.append(getIndent(node));
- // } else if (type == CSSRegionContexts.CSS_CURLY_BRACE_CLOSE) {
- // } else if (type == CSSRegionContexts.CSS_INCLUDES || type ==
- // CSSRegionContexts.CSS_DASHMATCH) {
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_SEPARATOR && node instanceof ICSSStyleDeclItem) {
- int n = preferences.getInt(CSSCorePreferenceNames.FORMAT_PROP_PRE_DELIM);
- if (preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH) > 0 && (!preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR) || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = 1;
- if (length + n + append > preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH)) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- if (needIndent)
- source.append(getIndentString());
- n = 0; // no space is necessary
- }
- }
- // no delimiter case
- while (n-- > 0)
- source.append(" ");//$NON-NLS-1$
- }
- else if (type == CSSRegionContexts.CSS_DECLARATION_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR || type == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- if (preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH) > 0 && (!preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR) || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = 1;
- if (length + append > preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH)) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- if (needIndent)
- source.append(getIndentString());
- }
- }
- }
- else if (CSSRegionContexts.CSS_FOREIGN_ELEMENT == type) {
- return;
- }
- else
- appendSpaceBefore(node, toAppend.getText(), source);
- }
-
- /**
- *
- */
- protected void appendSpaceBefore(ICSSNode node, String toAppend, StringBuffer source) {
- if (node == null || source == null)
- return;
- if (isCleanup() && !getCleanupStrategy(node).isFormatSource())
- return; // for not formatting case on cleanup action
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (toAppend != null && toAppend.startsWith("{") && preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_NEWLINE_ON_OPEN_BRACE)) {//$NON-NLS-1$
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- return;
- }
- else if (/* ! mgr.isOnePropertyPerLine() && */preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH) > 0 && (!preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR) || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int n = getLastLineLength(node, source);
- int append = (toAppend != null) ? TextUtilities.indexOf(DefaultLineTracker.DELIMITERS, toAppend, 0)[0] : 0;
- if (toAppend != null)
- append = (append < 0) ? toAppend.length() : append;
- if (n + append + 1 > preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH)) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- source.append(getIndentString());
- return;
- }
- }
- source.append(" ");//$NON-NLS-1$
- }
-
- /**
- *
- */
- public final StringBuffer cleanup(ICSSNode node) {
- short oldStrategy = strategy;
- strategy = CLEANUP;
- StringBuffer source = formatProc(node);
- strategy = oldStrategy;
-
- return source;
- }
-
- /**
- *
- */
- public final StringBuffer cleanup(ICSSNode node, IRegion region) {
- short oldStrategy = strategy;
- strategy = CLEANUP;
- StringBuffer source = formatProc(node, region);
- strategy = oldStrategy;
-
- return source;
- }
-
- /**
- *
- */
- protected String decoratedIdentRegion(CompoundRegion region, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- String text = null;
- if (!stgy.isFormatSource())
- text = region.getFullText();
- else
- text = region.getText();
-
- if (region.getType() == CSSRegionContexts.CSS_STRING || region.getType() == CSSRegionContexts.CSS_URI)
- return decoratedRegion(region, 0, stgy);
-
- if (isCleanup()) {
- if (stgy.getIdentCase() == CSSCleanupStrategy.ASIS || region.getType() == CSSRegionContexts.CSS_COMMENT)
- return text;
- else if (stgy.getIdentCase() == CSSCleanupStrategy.UPPER)
- return text.toUpperCase();
- else
- return text.toLowerCase();
- }
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (region.getType() == CSSRegionContexts.CSS_COMMENT)
- return text;
- else if (preferences.getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- return text.toUpperCase();
- else
- return text.toLowerCase();
- }
-
- /**
- *
- */
- protected String decoratedPropNameRegion(CompoundRegion region, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- String text = null;
- if (!stgy.isFormatSource())
- text = region.getFullText();
- else
- text = region.getText();
-
- if (region.getType() == CSSRegionContexts.CSS_STRING || region.getType() == CSSRegionContexts.CSS_URI)
- return decoratedRegion(region, 1, stgy);
- if (isCleanup()) {
- if (stgy.getPropNameCase() == CSSCleanupStrategy.ASIS || region.getType() != CSSRegionContexts.CSS_DECLARATION_PROPERTY)
- return text;
- else if (stgy.getPropNameCase() == CSSCleanupStrategy.UPPER)
- return text.toUpperCase();
- else
- return text.toLowerCase();
- }
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- if (region.getType() != CSSRegionContexts.CSS_DECLARATION_PROPERTY)
- return text;
- else if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.UPPER)
- return text.toUpperCase();
- else
- return text.toLowerCase();
- }
-
- /**
- *
- */
- protected String decoratedPropValueRegion(CompoundRegion region, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- String text = null;
- if (!stgy.isFormatSource())
- text = region.getFullText();
- else
- text = region.getText();
-
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_STRING || type == CSSRegionContexts.CSS_URI || type == CSSRegionContexts.CSS_DECLARATION_VALUE_URI)
- return decoratedRegion(region, 2, stgy);
- if (isCleanup()) {
- if (stgy.getPropValueCase() != CSSCleanupStrategy.ASIS) {
- if (type == CSSRegionContexts.CSS_COMMENT) {
- }
- else {
- if (stgy.getPropValueCase() == CSSCleanupStrategy.UPPER)
- text = text.toUpperCase();
- else
- text = text.toLowerCase();
- }
- }
- }
- return text;
- }
-
- /**
- *
- */
- protected String decoratedRegion(CompoundRegion region, int type, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- String text = null;
- if (!stgy.isFormatSource())
- text = region.getFullText();
- else
- text = region.getText();
-
- String regionType = region.getType();
- if (regionType == CSSRegionContexts.CSS_URI || regionType == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- String uri = CSSLinkConverter.stripFunc(text);
-
- boolean prefIsUpper = preferences.getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER;
- boolean upper = (type == 0) ? prefIsUpper : ((type == 1) ? preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.UPPER : preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER);
- String func = text.substring(0, 4);
- if (isCleanup()) {
- upper = ((type == 0) ? stgy.getIdentCase() : ((type == 1) ? stgy.getPropNameCase() : stgy.getPropValueCase())) == CSSCleanupStrategy.UPPER;
- func = ((type == 0) ? stgy.getIdentCase() : ((type == 1) ? stgy.getPropNameCase() : stgy.getPropValueCase())) == CSSCleanupStrategy.ASIS ? text.substring(0, 4) : (upper ? "URL(" : "url(");//$NON-NLS-2$//$NON-NLS-1$
- }
- if ((!isCleanup() && preferences.getBoolean(CSSCorePreferenceNames.FORMAT_QUOTE_IN_URI)) || (isCleanup() && stgy.isQuoteValues())) {
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- quote = CSSUtil.detectQuote(uri, quote);
- text = func + quote + uri + quote + ")";//$NON-NLS-1$
- }
- else if (isCleanup() && !stgy.isQuoteValues()) {
- text = func + CSSLinkConverter.removeFunc(text) + ")";//$NON-NLS-1$
- }
- else {
- text = func + uri + ")";//$NON-NLS-1$
- }
- }
- else if (region.getType() == CSSRegionContexts.CSS_STRING && (!isCleanup() || stgy.isQuoteValues())) {
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- // begginning
- if (!text.startsWith(quote)) {
- if (text.startsWith("\"") || text.startsWith("\'")) //$NON-NLS-1$ //$NON-NLS-2$
- text = quote + text.substring(1);
- else
- text = quote + text;
- }
- // ending
- if (!text.endsWith(quote)) {
- if (text.endsWith("\"") || text.endsWith("\'")) //$NON-NLS-1$ //$NON-NLS-2$
- text = text.substring(0, text.length() - 1) + quote;
- else
- text = text + quote;
- }
- }
- return text;
- }
-
- /**
- *
- */
- public final StringBuffer format(ICSSNode node) {
- short oldStrategy = strategy;
- strategy = FORMAT;
- StringBuffer source = formatProc(node);
- strategy = oldStrategy;
-
- return source;
- }
-
- /**
- *
- */
- public final StringBuffer format(ICSSNode node, IRegion region) {
- short oldStrategy = strategy;
- strategy = FORMAT;
- StringBuffer source = formatProc(node, region);
- strategy = oldStrategy;
-
- return source;
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- return new StringBuffer(insert && (attr != null) ? attr.getValue() : "");//$NON-NLS-1$
- }
-
- /**
- * Generate or format source between children('child' and its previous
- * sibling) and append to string buffer
- */
- abstract protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor);
-
- /**
- * Generate or format source between children('child' and its previous
- * sibling) and append to string buffer
- */
- public final StringBuffer formatBefore(ICSSNode node, ICSSNode child, IRegion exceptFor) {
- Assert.isTrue(child == null || child.getParentNode() == node);
- StringBuffer buf = new StringBuffer();
- formatBefore(node, child, /* (child != null) ? (child.getCssText()) : */"", buf, exceptFor);//$NON-NLS-1$
- return buf;
- }
-
- /**
- * Generate or format source between children('child' and its previous
- * sibling) and append to string buffer
- */
- protected abstract void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source);
-
- /**
- *
- */
- protected final void formatChildren(ICSSNode node, StringBuffer source) {
- ICSSNode child = node.getFirstChild();
- boolean first = true;
- while (child != null) {
- // append child
- CSSSourceFormatter formatter = (CSSSourceFormatter) ((INodeNotifier) child).getAdapterFor(CSSSourceFormatter.class);
- if (formatter == null) {
- formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) child);
- }
- StringBuffer childSource = ((AbstractCSSSourceFormatter) formatter).formatProc(child);
- if (!first) {
- formatBefore(node, child, new String(childSource), source, null);
- }
- source.append(childSource);
- // append between children
- child = child.getNextSibling();
- first = false;
- }
- }
-
- /**
- *
- */
- protected final void formatChildren(ICSSNode node, IRegion region, StringBuffer source) {
- ICSSNode child = node.getFirstChild();
- int start = region.getOffset();
- int end = region.getOffset() + region.getLength();
- boolean first = true;
- while (child != null) {
- int curEnd = ((IndexedRegion) child).getEndOffset();
- StringBuffer childSource = null;
- boolean toFinish = false;
- if (start < curEnd) {
- int curStart = ((IndexedRegion) child).getStartOffset();
- if (curStart < end) {
- // append child
- CSSSourceFormatter formatter = (CSSSourceFormatter) ((INodeNotifier) child).getAdapterFor(CSSSourceFormatter.class);
- if (formatter == null) {
- formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) child);
- }
- if (includes(region, curStart, curEnd))
- childSource = ((AbstractCSSSourceFormatter) formatter).formatProc(child);
- else
- childSource = ((AbstractCSSSourceFormatter) formatter).formatProc(child, overlappedRegion(region, curStart, curEnd));
- }
- else
- toFinish = true;
- }
- // append between children
- if (!first) {
- curEnd = ((IndexedRegion) child).getStartOffset(); // change
- // only
- // start
- if (start < curEnd) {
- int curStart = ((IndexedRegion) child.getPreviousSibling()).getEndOffset();
- if (curStart < end) {
- String toAppend = (childSource != null) ? new String(childSource) : "";//$NON-NLS-1$
- if (includes(region, curStart, curEnd))
- formatBefore(node, child, toAppend, source, null);
- else
- formatBefore(node, child, overlappedRegion(region, curStart, curEnd), toAppend, source);
- }
- }
- }
- if (childSource != null) {
- source.append(childSource);
- }
- first = false;
- if (toFinish)
- break;
- child = child.getNextSibling();
- }
- }
-
- /**
- * Generate or format source after the last child and append to string
- * buffer
- */
- protected abstract void formatPost(ICSSNode node, StringBuffer source);
-
- /**
- * Generate or format source after the last child and append to string
- * buffer
- */
- protected abstract void formatPost(ICSSNode node, IRegion region, StringBuffer source);
-
- /**
- * Generate or format source before the first child and append to string
- * buffer
- */
- protected abstract void formatPre(ICSSNode node, StringBuffer source);
-
- /**
- * Generate or format source before the first child and append to string
- * buffer
- */
- abstract protected void formatPre(ICSSNode node, IRegion region, StringBuffer source);
-
- /**
- *
- * @return java.lang.StringBuffer
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- protected final StringBuffer formatProc(ICSSNode node) {
- StringBuffer source = new StringBuffer();
- formatPre(node, source);
- formatChildren(node, source);
- formatPost(node, source);
- return source;
- }
-
- /**
- *
- * @return java.lang.StringBuffer
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param region
- * org.eclipse.jface.text.IRegion
- */
- protected final StringBuffer formatProc(ICSSNode node, IRegion region) {
- StringBuffer source = new StringBuffer();
- int curStart = ((IndexedRegion) node).getStartOffset();
- int curEnd = ((IndexedRegion) node).getEndOffset();
- if (node.getChildNodes().getLength() > 0) {
- curEnd = ((IndexedRegion) node.getFirstChild()).getStartOffset();
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatPre(node, source);
- else
- formatPre(node, overlappedRegion(region, curStart, curEnd), source);
- }
- curStart = curEnd;
- curEnd = ((IndexedRegion) node.getLastChild()).getEndOffset();
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatChildren(node, source);
- else
- formatChildren(node, overlappedRegion(region, curStart, curEnd), source);
- }
- curStart = curEnd;
- curEnd = ((IndexedRegion) node).getEndOffset();
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatPost(node, source);
- else
- formatPost(node, overlappedRegion(region, curStart, curEnd), source);
- }
- }
- else {
- curEnd = getChildInsertPos(node);
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatPre(node, source);
- else
- formatPre(node, overlappedRegion(region, curStart, curEnd), source);
- }
- curStart = curEnd;
- curEnd = ((IndexedRegion) node).getEndOffset();
- if (overlaps(region, curStart, curEnd)) {
- if (includes(region, curStart, curEnd))
- formatPost(node, source);
- else
- formatPost(node, overlappedRegion(region, curStart, curEnd), source);
- }
- }
- return source;
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- return -1;
- }
-
- /**
- * Insert the method's description here.
- *
- * @return org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- protected CSSCleanupStrategy getCleanupStrategy(ICSSNode node) {
- CSSCleanupStrategy currentStrategy = CSSCleanupStrategyImpl.getInstance();
- ICSSDocument doc = node.getOwnerDocument();
- if (doc == null)
- return currentStrategy;
- ICSSModel model = doc.getModel();
- if (model == null)
- return currentStrategy;
- if (model.getStyleSheetType() != ICSSModel.EXTERNAL) {
- // TODO - TRANSITION Nakamori-san, or Kit, how can we move to
- // "HTML" plugin?
- // can we subclass?
- // currentStrategy = CSSInHTMLCleanupStrategyImpl.getInstance();
- }
- return currentStrategy;
- }
-
- /**
- *
- */
- protected String getIndent(ICSSNode node) {
- if (node == null)
- return "";//$NON-NLS-1$
- ICSSNode parent = node.getParentNode();
- if (node instanceof ICSSAttr)
- parent = ((ICSSAttr) node).getOwnerCSSNode();
- if (parent == null)
- return "";//$NON-NLS-1$
- if (node instanceof org.w3c.dom.css.CSSStyleDeclaration)
- parent = parent.getParentNode();
- if (parent == null)
- return "";//$NON-NLS-1$
-
- String parentIndent = getIndent(parent);
- if (parent instanceof org.w3c.dom.css.CSSRule)
- return parentIndent + getIndentString();
- if (node.getParentNode() instanceof ICSSStyleDeclaration)
- return parentIndent + getIndentString();
- return parentIndent;
- }
-
- /**
- *
- */
- protected int getLastLineLength(ICSSNode node, StringBuffer source) {
- if (node == null || source == null)
- return 0;
- String delim = getLineDelimiter(node);
- String str = new String(source);
- int n = str.lastIndexOf(delim);
- if (n < 0)
- return str.length();
-
- return str.length() - n - delim.length();
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatAfter(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos < 0 || !nnode.contains(insertPos))
- return 0;
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(insertPos);
- if (flatNode == null)
- return 0;
- ITextRegion region = flatNode.getRegionAtCharacterOffset(insertPos);
- if (region == null)
- return 0;
- RegionIterator it = new RegionIterator(flatNode, region);
- boolean found = false;
- while (it.hasNext()) {
- region = it.next();
- // if (region.getType() != CSSRegionContexts.CSS_S &&
- // region.getType() != CSSRegionContexts.CSS_DELIMITER &&
- // region.getType() !=
- // CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- if (region.getType() != CSSRegionContexts.CSS_S) {
- found = true;
- break;
- }
- }
- int pos = (found ? it.getStructuredDocumentRegion().getStartOffset(region) : it.getStructuredDocumentRegion().getTextEndOffset(region)) - insertPos;
- return (pos >= 0) ? pos : 0;
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatBefore(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos <= 0 || !nnode.contains(insertPos - 1))
- return 0;
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(insertPos - 1);
- if (flatNode == null)
- return 0;
- ITextRegion region = flatNode.getRegionAtCharacterOffset(insertPos - 1);
- if (region == null)
- return 0;
- RegionIterator it = new RegionIterator(flatNode, region);
- boolean found = false;
- while (it.hasPrev()) {
- region = it.prev();
- // if (region.getType() != CSSRegionContexts.CSS_S &&
- // region.getType() != CSSRegionContexts.CSS_DELIMITER &&
- // region.getType() !=
- // CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- if (region.getType() != CSSRegionContexts.CSS_S) {
- found = true;
- break;
- }
- }
- int pos = insertPos - (found ? it.getStructuredDocumentRegion().getTextEndOffset(region) : it.getStructuredDocumentRegion().getStartOffset(region));
- // flatNode = it.getStructuredDocumentRegion();
- // if (found) {
- // if (region.getLength() != region.getTextLength()) {
- // pos = insertPos - flatNode.getTextEndOffset(region);
- // } else {
- // pos = insertPos - flatNode.getEndOffset(region);
- // }
- // } else {
- // pos = insertPos - flatNode.getStartOffset(region);
- // }
- return (pos >= 0) ? pos : 0;
- }
-
- /**
- *
- */
- String getLineDelimiter(ICSSNode node) {
- ICSSModel model = (node != null) ? node.getOwnerDocument().getModel() : null;
- return (model != null) ? model.getStructuredDocument().getLineDelimiter() : "\n"; //$NON-NLS-1$
-
- // TODO : check whether to use model.getLineDelimiter() or
- // model.getStructuredDocument().getLineDelimiter()
- }
-
- /**
- *
- */
- protected CompoundRegion[] getOutsideRegions(IStructuredDocument model, IRegion reg) {
- CompoundRegion[] ret = new CompoundRegion[2];
- RegionIterator it = new RegionIterator(model, reg.getOffset());
- it.prev();
- if (it.hasPrev()) {
- ITextRegion textRegion = it.prev();
- IStructuredDocumentRegion documentRegion = it.getStructuredDocumentRegion();
- ret[0] = new CompoundRegion(documentRegion, textRegion);
- }
- else {
- ret[0] = null;
- }
- it.reset(model, reg.getOffset() + reg.getLength());
- if (it.hasNext()) {
- ITextRegion textRegion = it.next();
- IStructuredDocumentRegion documentRegion = it.getStructuredDocumentRegion();
- ret[1] = new CompoundRegion(documentRegion, textRegion);
- }
- else {
- ret[1] = null;
- }
- return ret;
- }
-
- /**
- */
- protected CSSSourceGenerator getParentFormatter(ICSSNode node) {
- ICSSNode parent = node.getParentNode();
- if (parent != null) {
- CSSSourceGenerator formatter = (CSSSourceGenerator) ((INodeNotifier) parent).getAdapterFor(CSSSourceFormatter.class);
- if (formatter == null) {
- formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter((INodeNotifier) parent);
- }
- return formatter;
- }
- return null;
- }
-
- /**
- *
- */
- protected CompoundRegion[] getRegions(IStructuredDocument model, IRegion reg, IRegion exceptFor, String pickupType) {
- int start = reg.getOffset();
- int end = reg.getOffset() + reg.getLength();
- int startE = (exceptFor != null) ? exceptFor.getOffset() : -1;
- int endE = (exceptFor != null) ? exceptFor.getOffset() + exceptFor.getLength() : 0;
-
- ArrayList list = new ArrayList();
- IStructuredDocumentRegion flatNode = model.getRegionAtCharacterOffset(start);
- boolean pickuped = false;
- while (flatNode != null && flatNode.getStartOffset() < end) {
- ITextRegionList regionList = flatNode.getRegions();
- Iterator it = regionList.iterator();
- while (it.hasNext()) {
- ITextRegion region = (ITextRegion) it.next();
- if (flatNode.getStartOffset(region) < start)
- continue;
- if (end <= flatNode.getStartOffset(region))
- break;
- if (startE >= 0 && startE <= flatNode.getStartOffset(region) && flatNode.getEndOffset(region) <= endE)
- continue;
- if (region.getType() == CSSRegionContexts.CSS_COMMENT || region.getType() == CSSRegionContexts.CSS_CDC || region.getType() == CSSRegionContexts.CSS_CDO)
- list.add(new CompoundRegion(flatNode, region));
- else if (!pickuped && region.getType() == pickupType) {
- list.add(new CompoundRegion(flatNode, region));
- pickuped = true;
- }
- }
- flatNode = flatNode.getNext();
- }
- if (list.size() > 0) {
- CompoundRegion[] regions = new CompoundRegion[list.size()];
- list.toArray(regions);
- return regions;
- }
- return new CompoundRegion[0];
- }
-
- /**
- *
- */
- protected CompoundRegion[] getRegionsWithoutWhiteSpaces(IStructuredDocument model, IRegion reg, CSSCleanupStrategy stgy) {
- int start = reg.getOffset();
- int end = reg.getOffset() + reg.getLength() - 1;
- ArrayList list = new ArrayList();
- IStructuredDocumentRegion flatNode = model.getRegionAtCharacterOffset(start);
- while (flatNode != null && flatNode.getStartOffset() <= end) {
- ITextRegionList regionList = flatNode.getRegions();
- Iterator it = regionList.iterator();
- while (it.hasNext()) {
- ITextRegion region = (ITextRegion) it.next();
- if (flatNode.getStartOffset(region) < start)
- continue;
- if (end < flatNode.getStartOffset(region))
- break;
- if (region.getType() != CSSRegionContexts.CSS_S || (isCleanup() && !stgy.isFormatSource())) // for
- // not
- // formatting
- // case
- // on
- // cleanup
- // action
- list.add(new CompoundRegion(flatNode, region));
- }
- flatNode = flatNode.getNext();
- }
- if (list.size() > 0) {
- CompoundRegion[] regions = new CompoundRegion[list.size()];
- list.toArray(regions);
- return regions;
- }
- return new CompoundRegion[0];
- }
-
- /**
- *
- */
- public static boolean includes(IRegion region, int start, int end) {
- if (region == null)
- return false;
-
- return (region.getOffset() <= start) && (end <= region.getOffset() + region.getLength());
- }
-
- /**
- *
- * @return boolean
- */
- protected static boolean isCleanup() {
- return strategy == CLEANUP;
- }
-
- /**
- *
- * @return boolean
- */
- protected static boolean isFormat() {
- return strategy == FORMAT;
- }
-
- /**
- *
- */
- protected boolean isIncludesPreEnd(ICSSNode node, IRegion region) {
- return (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getStartOffset() == (region.getOffset() + region.getLength()));
- }
-
- /**
- *
- */
- static protected boolean needS(CompoundRegion region) {
- return (region != null && region.getType() != CSSRegionContexts.CSS_S);
- }
-
- /**
- *
- */
- public static IRegion overlappedRegion(IRegion region, int start, int end) {
- if (overlaps(region, start, end)) {
- int offset = (region.getOffset() <= start) ? start : region.getOffset();
- int length = ((end <= region.getOffset() + region.getLength()) ? end : region.getOffset() + region.getLength()) - offset;
- return new FormatRegion(offset, length);
- }
- return null;
- }
-
- /**
- *
- */
- public static boolean overlaps(IRegion region, int start, int end) {
- if (region == null)
- return false;
-
- return (start < region.getOffset() + region.getLength()) && (region.getOffset() < end);
- }
-
- private String getIndentString() {
- StringBuffer indent = new StringBuffer();
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (preferences != null) {
- char indentChar = ' ';
- String indentCharPref = preferences.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
- if (CSSCorePreferenceNames.TAB.equals(indentCharPref)) {
- indentChar = '\t';
- }
- int indentationWidth = preferences.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
-
- for (int i = 0; i < indentationWidth; i++) {
- indent.append(indentChar);
- }
- }
- return indent.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrChangeContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrChangeContext.java
deleted file mode 100644
index 924a73e7b6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrChangeContext.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.wst.css.core.internal.formatter;
-
-
-
-/**
- *
- */
-public class AttrChangeContext {
-
- public int start, end;
-
- /**
- *
- */
- public AttrChangeContext() {
- super();
- start = end = 0;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrFormatter.java
deleted file mode 100644
index 141a9d49d7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrFormatter.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPageRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-
-
-/**
- *
- */
-public class AttrFormatter extends DefaultCSSSourceFormatter {
-
- private static AttrFormatter instance;
-
- /**
- *
- */
- AttrFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- ICSSAttr attr = (ICSSAttr) node;
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- if (end > 0) { // format source
- int start = ((IndexedRegion) node).getStartOffset();
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
-
- if (attr.getName().equals(ICSSStyleRule.SELECTOR) || attr.getName().equals(ICSSPageRule.SELECTOR)) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBetween(node, regions[i - 1], regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
- else if (attr.getName().equals(ICSSImportRule.HREF)) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- else if (attr.getName().equals(ICSSCharsetRule.ENCODING)) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else if (attr.getName().equals(ICSSStyleDeclItem.IMPORTANT)) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- else if (attr.getName() == null || attr.getName().length() == 0) {
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else {
- // counter attributes
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- }
- else { // generate source
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- String value = attr.getValue();
- if (value == null)
- value = "";//$NON-NLS-1$
- if (attr.getName().equals(ICSSStyleRule.SELECTOR) || attr.getName().equals(ICSSPageRule.SELECTOR)) {
- }
- else if (attr.getName().equals(ICSSImportRule.HREF)) {
- String uri = org.eclipse.wst.css.core.internal.util.CSSLinkConverter.stripFunc(value);
- String func = preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER ? "URL(" : "url(";//$NON-NLS-2$//$NON-NLS-1$
- if (preferences.getBoolean(CSSCorePreferenceNames.FORMAT_QUOTE_IN_URI)) {
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- quote = CSSUtil.detectQuote(uri, quote);
- value = func + quote + uri + quote + ")";//$NON-NLS-1$
- }
- else {
- value = func + uri + ")";//$NON-NLS-1$
- }
- }
- else if (attr.getName().equals(ICSSCharsetRule.ENCODING)) {
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- if (!value.startsWith("\"") && !value.startsWith("\'"))//$NON-NLS-2$//$NON-NLS-1$
- value = quote + value;
- if (!value.endsWith("\"") && !value.endsWith("\'"))//$NON-NLS-2$//$NON-NLS-1$
- value = value + quote;
- }
- else if (attr.getName().equals(ICSSStyleDeclItem.IMPORTANT)) {
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER)
- value = value.toUpperCase();
- else
- value = value.toLowerCase();
- }
- else if (attr.getName() == null || attr.getName().length() == 0) {
- if (CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- value = value.toUpperCase();
- else
- value = value.toLowerCase();
- }
- else {
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER)
- value = value.toUpperCase();
- else
- value = value.toLowerCase();
- }
- source.append(value);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- formatPre(node, source);
- }
-
- /**
- *
- */
- public synchronized static AttrFormatter getInstance() {
- if (instance == null) {
- instance = new AttrFormatter();
- }
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java
deleted file mode 100644
index 880851941c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.provisional.adapters.ICSSModelAdapter;
-import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleDeclarationAdapter;
-import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleSheetAdapter;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-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.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-
-public class CSSFormatUtil {
- public List collectCSSNodes(IStructuredModel model, int start, int length) {
- List nodes = new ArrayList();
-
- IndexedRegion startNode = model.getIndexedRegion(start);
- IndexedRegion endNode = model.getIndexedRegion(start + length - 1);
-
- if (startNode == null || endNode == null) {
- return nodes;
- }
-
- if (model instanceof ICSSModel && startNode instanceof ICSSNode && endNode instanceof ICSSNode) {
- // CSS model
- ICSSNode ca = getCommonAncestor((ICSSNode) startNode, (ICSSNode) endNode);
- if (ca != null) {
- for (ICSSNode node = ca.getFirstChild(); node != null && start + length < ((IndexedRegion) node).getStartOffset(); node = node.getNextSibling()) {
- if (start < ((IndexedRegion) node).getEndOffset()) {
- nodes.add(node);
- }
- }
- }
- }
- else if (model instanceof IDOMModel && startNode instanceof IDOMNode && endNode instanceof IDOMNode) {
- if (startNode instanceof Text) {
- startNode = (IndexedRegion) ((Text) startNode).getParentNode();
- }
- if (endNode instanceof Text) {
- endNode = (IndexedRegion) ((Text) endNode).getParentNode();
- }
- // HTML model, maybe
- IDOMNode ca = (IDOMNode) getCommonAncestor((Node) startNode, (Node) endNode);
- findCSS(nodes, ca);
- }
-
- return nodes;
- }
-
- /**
- * getCommonAncestor method
- *
- * @return org.w3c.dom.Node
- * @param node
- * org.w3c.dom.Node
- */
- private Node getCommonAncestor(Node node1, Node node2) {
- if (node1 == null || node2 == null)
- return null;
-
- for (Node na = node2; na != null; na = na.getParentNode()) {
- for (Node ta = node1; ta != null; ta = ta.getParentNode()) {
- if (ta == na)
- return ta;
- }
- }
- return null; // not found
- }
-
- private void findCSS(List cssNodes, IDOMNode node) {
- ICSSModelAdapter adapter;
- adapter = (ICSSModelAdapter) node.getAdapterFor(IStyleSheetAdapter.class);
- if (adapter != null) {
- ICSSModel model = adapter.getModel();
- if (model != null && model.getStyleSheetType() == ICSSModel.EMBEDDED) {
- cssNodes.add(model.getDocument());
- }
- }
- else {
- adapter = (ICSSModelAdapter) node.getAdapterFor(IStyleDeclarationAdapter.class);
- if (adapter != null) {
- ICSSModel model = adapter.getModel();
- if (model != null && model.getStyleSheetType() == ICSSModel.INLINE) {
- cssNodes.add(model.getDocument());
- }
- }
- }
-
- for (IDOMNode child = (IDOMNode) node.getFirstChild(); child != null; child = (IDOMNode) child.getNextSibling()) {
- findCSS(cssNodes, child);
- }
- }
-
- private ICSSNode getCommonAncestor(ICSSNode nodeA, ICSSNode nodeB) {
- if (nodeA == null || nodeB == null) {
- return null;
- }
-
- for (ICSSNode na = nodeA; na != null; na = na.getParentNode()) {
- for (ICSSNode ta = nodeB; ta != null; ta = ta.getParentNode()) {
- if (ta == na) {
- return ta;
- }
- }
- }
-
- return null; // not found
- }
-
- /**
- */
- public void replaceSource(IStructuredModel model, int offset, int length, String source) {
- if (model == null)
- return;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- if (structuredDocument == null)
- return;
- if (offset >= 0 && length >= 0 && offset + length <= structuredDocument.getLength()) {
- if (structuredDocument.containsReadOnly(offset, length))
- return;
- if (source == null)
- source = new String();
- // We use 'structuredDocument' as the requester object just so
- // this and the other
- // format-related 'repalceText' (in replaceSource) can use the
- // same requester.
- // Otherwise, if requester is not identical,
- // the undo group gets "broken" into multiple pieces based
- // on the requesters being different. Technically, any unique,
- // common
- // requester object would work.
- structuredDocument.replaceText(structuredDocument, offset, length, source);
- }
- }
-
- public synchronized static CSSFormatUtil getInstance() {
- if (fInstance == null) {
- fInstance = new CSSFormatUtil();
- }
- return fInstance;
- }
-
- private CSSFormatUtil() {
- super();
- }
-
- private static CSSFormatUtil fInstance;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatter.java
deleted file mode 100644
index 04473a0234..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-
-/**
- *
- */
-public interface CSSSourceFormatter {
-
- /**
- *
- */
- StringBuffer cleanup(ICSSNode node);
-
- /**
- *
- * @return java.lang.StringBuffer
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param region
- * org.eclipse.jface.text.IRegion
- */
- StringBuffer cleanup(ICSSNode node, IRegion region);
-
- /**
- *
- */
- StringBuffer format(ICSSNode node);
-
- /**
- *
- */
- StringBuffer format(ICSSNode node, IRegion region);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatterFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatterFactory.java
deleted file mode 100644
index 2f689c4af4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatterFactory.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.wst.css.core.internal.formatter;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-
-
-/**
- *
- */
-public class CSSSourceFormatterFactory {
- /**
- *
- */
- private CSSSourceFormatterFactory() {
- super();
- }
-
- /**
- *
- */
- public CSSSourceGenerator getSourceFormatter(INodeNotifier target) {
- ICSSNode node = (ICSSNode) target;
- short type = node.getNodeType();
- switch (type) {
- case ICSSNode.CHARSETRULE_NODE :
- return CharsetRuleFormatter.getInstance();
- case ICSSNode.FONTFACERULE_NODE :
- return FontFaceRuleFormatter.getInstance();
- case ICSSNode.IMPORTRULE_NODE :
- return ImportRuleFormatter.getInstance();
- case ICSSNode.MEDIALIST_NODE :
- return MediaListFormatter.getInstance();
- case ICSSNode.MEDIARULE_NODE :
- return MediaRuleFormatter.getInstance();
- case ICSSNode.PRIMITIVEVALUE_NODE :
- ICSSPrimitiveValue value = (ICSSPrimitiveValue) node;
- if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_COUNTER)
- return CounterFormatter.getInstance();
- else if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_RECT)
- return RectFormatter.getInstance();
- else if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_RGBCOLOR)
- return RGBFormatter.getInstance();
- else
- return PrimitiveValueFormatter.getInstance();
- case ICSSNode.PAGERULE_NODE :
- return PageRuleFormatter.getInstance();
- case ICSSNode.STYLEDECLARATION_NODE :
- return StyleDeclarationFormatter.getInstance();
- case ICSSNode.STYLEDECLITEM_NODE :
- return StyleDeclItemFormatter.getInstance();
- case ICSSNode.STYLERULE_NODE :
- return StyleRuleFormatter.getInstance();
- case ICSSNode.STYLESHEET_NODE :
- return StyleSheetFormatter.getInstance();
- case ICSSNode.ATTR_NODE :
- return AttrFormatter.getInstance();
- default :
- return UnknownRuleFormatter.getInstance();
- }
- }
-
- public synchronized static CSSSourceFormatterFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CSSSourceFormatterFactory();
- }
- return fInstance;
- }
-
- private static CSSSourceFormatterFactory fInstance;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceGenerator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceGenerator.java
deleted file mode 100644
index 992e8afdf3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceGenerator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-
-public interface CSSSourceGenerator extends CSSSourceFormatter {
-
- /**
- *
- */
- StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext region);
-
- /**
- *
- */
- StringBuffer formatBefore(ICSSNode node, ICSSNode child, IRegion exceptFor);
-
- /**
- *
- */
- int getAttrInsertPos(ICSSNode node, String attrName);
-
- /**
- *
- */
- int getChildInsertPos(ICSSNode node);
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- int getLengthToReformatAfter(ICSSNode node, int insertPos);
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- int getLengthToReformatBefore(ICSSNode node, int insertPos);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CharsetRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CharsetRuleFormatter.java
deleted file mode 100644
index 744eedc450..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CharsetRuleFormatter.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-
-/**
- *
- */
-public class CharsetRuleFormatter extends DefaultCSSSourceFormatter {
-
- public final static java.lang.String CHARSET = "@charset";//$NON-NLS-1$
- private static CharsetRuleFormatter instance;
-
- /**
- *
- */
- CharsetRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSCharsetRule.ENCODING.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- it.prev();
- if (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- } else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- } else {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- if (region.getType() == CSSRegionContexts.CSS_S) {
- context.start = flatNode.getStartOffset(region);
- context.end = flatNode.getStartOffset(region);
- } else {
- context.start = flatNode.getEndOffset() + 1;
- context.end = flatNode.getEndOffset();
- }
- }
- }
- // generate text
- if (insert) {
- appendSpaceBefore(node, attr.getValue(), buf);
- buf.append(attr.getValue());
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int end = ((IndexedRegion) node).getEndOffset();
- if (end > 0) { // format source
- int start = ((IndexedRegion) node).getStartOffset();
- formatPre(node, new FormatRegion(start, end - start), source);
- } else { // generate source
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- String str = CHARSET;
- if (preferences.getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- str = CHARSET.toUpperCase();
- source.append(str);
- String enc = ((ICSSCharsetRule) node).getEncoding();
- quote = CSSUtil.detectQuote(enc, quote);
- str = quote + ((enc != null) ? enc : "") + quote + ";";//$NON-NLS-1$ //$NON-NLS-2$
- appendSpaceBefore(node, str, source);
- source.append(str);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if ((i != 0 || needS(outside[0])) && !regions[i].getType().equals(CSSRegionContexts.CSS_DELIMITER))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- if (!ICSSCharsetRule.ENCODING.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSCharsetRule.ENCODING);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- CompoundRegion regions[] = getRegionsWithoutWhiteSpaces(node.getOwnerDocument().getModel().getStructuredDocument(), new FormatRegion(iNode.getStartOffset(), iNode.getEndOffset() - iNode.getStartOffset()), stgy);
- for (int i = regions.length - 1; i >= 0; i--) {
- if (regions[i].getType() != CSSRegionContexts.CSS_COMMENT)
- return regions[i].getStartOffset();
- }
- return iNode.getEndOffset();
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_DELIMITER)
- return n - 1;
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static CharsetRuleFormatter getInstance() {
- if (instance == null)
- instance = new CharsetRuleFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CompoundRegion.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CompoundRegion.java
deleted file mode 100644
index 0662feb19e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CompoundRegion.java
+++ /dev/null
@@ -1,58 +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.wst.css.core.internal.formatter;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-class CompoundRegion {
-
- CompoundRegion(IStructuredDocumentRegion documentRegion, ITextRegion textRegion) {
- super();
- this.fDocumentRegion = documentRegion;
- this.fTextRegion = textRegion;
- }
-
- IStructuredDocumentRegion getDocumentRegion() {
- return fDocumentRegion;
- }
-
- ITextRegion getTextRegion() {
- return fTextRegion;
- }
-
- String getType() {
- return fTextRegion.getType();
- }
-
- String getText() {
- return fDocumentRegion.getText(fTextRegion);
- }
-
- // Bug 218993: Added to get text with whitespace for cleanup
- // without formatting
- String getFullText() {
- return fDocumentRegion.getFullText(fTextRegion);
- }
-
- int getStartOffset() {
- return fDocumentRegion.getStartOffset(fTextRegion);
- }
-
- int getEndOffset() {
- return fDocumentRegion.getEndOffset(fTextRegion);
- }
-
-
- private IStructuredDocumentRegion fDocumentRegion;
- private ITextRegion fTextRegion;
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CounterFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CounterFormatter.java
deleted file mode 100644
index c31725b66e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CounterFormatter.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICounter;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-
-/**
- *
- */
-public class CounterFormatter extends DefaultCSSSourceFormatter {
-
- private static CounterFormatter instance;
-
- /**
- *
- */
- CounterFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- StringBuffer source = new StringBuffer();
- if (node == null || attr == null)
- return source;
-
- if (!ICounter.IDENTIFIER.equalsIgnoreCase(attr.getName()) && !ICounter.LISTSTYLE.equalsIgnoreCase(attr.getName()) && !ICounter.SEPARATOR.equalsIgnoreCase(attr.getName()))
- return source;
-
- // get region to replace
- IndexedRegion iNode = (IndexedRegion) node;
- context.start = iNode.getStartOffset();
- context.end = iNode.getEndOffset();
-
- ICounter counter = (ICounter) node;
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- String sep = counter.getSeparator();
- String ident = counter.getIdentifier();
- String style = counter.getListStyle();
-
- if (ICounter.IDENTIFIER.equalsIgnoreCase(attr.getName())) {
- if (insert)
- ident = attr.getValue();
- else
- ident = "";//$NON-NLS-1$
- }
- else if (ICounter.LISTSTYLE.equalsIgnoreCase(attr.getName())) {
- if (insert)
- style = attr.getValue();
- else
- style = null;
- }
- else if (ICounter.SEPARATOR.equalsIgnoreCase(attr.getName())) {
- if (insert)
- sep = attr.getValue();
- else
- sep = null;
- }
-
- quote = CSSUtil.detectQuote(sep, quote);
- sep = (sep == null || sep.length() == 0) ? null : (quote + sep + quote);
-
- String func = (sep == null || sep.length() == 0) ? "counter(" : "counters(";//$NON-NLS-2$//$NON-NLS-1$
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER) {
- ident = ident.toUpperCase();
- style = style.toUpperCase();
- func = func.toUpperCase();
- }
- else {
- ident = ident.toLowerCase();
- style = style.toLowerCase();
- }
- if (sep == null || sep.length() == 0) {
- source.append(func);
- appendSpaceBefore(node, ident, source);
- source.append(ident);
- }
- else {
- source.append(func);
- appendSpaceBefore(node, ident, source);
- source.append(ident);
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, sep, source);
- source.append(sep);
- }
-
- if (style != null && style.length() != 0) {
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, style, source);
- }
- source.append(")");//$NON-NLS-1$
-
- /*
- * IStructuredDocument structuredDocument =
- * node.getOwnerDocument().getModel().getStructuredDocument();
- * ITextRegion[] regions =
- * getRegionsWithoutWhiteSpaces(structuredDocument, new
- * FormatRegion(context.start, context.end - context.start + 1)); int
- * commas[2]; int numComma = 0; for(int j = 0; j <regions.length; j++) {
- * if (regions[j].getType() == CSSRegionContexts.COMMA) {
- * commas[numComma++] = j; if (numComma > 1) break; } }
- *
- * if (ICounter.IDENTIFIER.equalsIgnoreCase(attr.getName())) { } else
- * if (ICounter.LISTSTYLE.equalsIgnoreCase(attr.getName())) { } else
- * if (ICounter.SEPARATOR.equalsIgnoreCase(attr.getName())) { boolean
- * skipSpace = false; String func = insert ? "counters(" : "counter(";
- * if (mgr.isPropValueUpperCase()) func = func.toUpperCase();
- *
- * for(int i=0; i <regions.length; i++) { if (regions[i].getType() ==
- * CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- * source.append(func); else { if (numComma == 2 && commas[1] < i) {
- * } else if (numComma == 1 && commas[0] < i && insert) {
- * } else if (numComma == 1 && commas[0] < i && ! insert) { } else if
- * (numComma == 0 && insert && regions[i].getType ==
- * CSSRegionContexts.PARENTHESIS_CLOSE) { source.append(",");
- * appendSpaceBefore(node,attr.getValue(),source);
- * source.append(attr.getValue()); }
- *
- * if (i != 0 && !skipSpace)
- * appendSpaceBefore(node,regions[i],source);
- * source.append(decoratedPropValueRegion(regions[i])); } skipSpace =
- * false;
- *
- * if (regions[i].getType() ==
- * CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) skipSpace = true; } }
- */
- return source;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = ((IndexedRegion) node).getEndOffset();
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- boolean skipSpace = false;
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 && !skipSpace)
- appendSpaceBefore(node, regions[i], source);
- skipSpace = false;
- source.append(decoratedPropValueRegion(regions[i], stgy));
- if (regions[i].getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- skipSpace = true;
- }
- }
- else { // generate source
- ICounter counter = (ICounter) node;
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- String separator = counter.getSeparator();
- quote = CSSUtil.detectQuote(separator, quote);
- String sep = (separator == null || separator.length() == 0) ? null : (quote + separator + quote);
- String ident = counter.getIdentifier();
- String style = counter.getListStyle();
- String func = (sep == null || sep.length() == 0) ? "counter(" : "counters(";//$NON-NLS-2$//$NON-NLS-1$
- // normalize
- if (ident == null)
- ident = "";//$NON-NLS-1$
- if (style == null)
- style = "";//$NON-NLS-1$
-
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER) {
- ident = ident.toUpperCase();
- style = style.toUpperCase();
- func = func.toUpperCase();
- }
- else {
- ident = ident.toLowerCase();
- style = style.toLowerCase();
- }
- if (sep == null || sep.length() == 0) {
- source.append(func);
- appendSpaceBefore(node, ident, source);
- source.append(ident);
- }
- else {
- source.append(func);
- appendSpaceBefore(node, ident, source);
- source.append(ident);
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, sep, source);
- source.append(sep);
- }
-
- if (style != null && style.length() != 0) {
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, style, source);
- }
- source.append(")");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- IndexedRegion iNode = (IndexedRegion) node;
- if (ICounter.IDENTIFIER.equalsIgnoreCase(attrName)) {
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICounter.IDENTIFIER);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(iNode.getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, flatNode.getRegionAtCharacterOffset(iNode.getEndOffset() - 1));
- while (it.hasPrev()) {
- ITextRegion region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- return it.getStructuredDocumentRegion().getEndOffset(region);
- }
- return ((IndexedRegion) node).getEndOffset();
- }
- else if (ICounter.LISTSTYLE.equalsIgnoreCase(attrName)) {
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICounter.LISTSTYLE);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(iNode.getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, flatNode.getRegionAtCharacterOffset(iNode.getEndOffset() - 1));
- while (it.hasPrev()) {
- ITextRegion region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR)
- return it.getStructuredDocumentRegion().getEndOffset(region);
- else if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- return it.getStructuredDocumentRegion().getEndOffset(region);
- }
- return ((IndexedRegion) node).getEndOffset();
- }
- else if (ICounter.SEPARATOR.equalsIgnoreCase(attrName)) {
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICounter.SEPARATOR);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
-
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(iNode.getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, flatNode.getRegionAtCharacterOffset(iNode.getEndOffset() - 1));
- boolean hasComma = false;
- while (it.hasPrev()) {
- ITextRegion region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR) {
- if (!hasComma)
- hasComma = true;
- else
- return it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- return it.getStructuredDocumentRegion().getEndOffset(region);
- }
- return ((IndexedRegion) node).getEndOffset();
- }
- else
- return -1;
- }
-
- /**
- *
- */
- public synchronized static CounterFormatter getInstance() {
- if (instance == null)
- instance = new CounterFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DeclContainerFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DeclContainerFormatter.java
deleted file mode 100644
index ea799966f6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DeclContainerFormatter.java
+++ /dev/null
@@ -1,119 +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.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-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;
-
-
-/**
- *
- */
-public class DeclContainerFormatter extends DefaultCSSSourceFormatter {
-
- /**
- *
- */
- DeclContainerFormatter() {
- super();
- }
-
- /**
- *
- * @return java.lang.String
- */
- protected String decoratedSelectorRegion(CompoundRegion region, CompoundRegion prevRegion, CSSCleanupStrategy stgy) {
- if (isFormat())
- return region.getText();
-
- String text = null;
- if (!stgy.isFormatSource())
- text = region.getFullText();
- else
- text = region.getText();
-
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE || type == CSSRegionContexts.CSS_SELECTOR_CLASS || type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_ID || type == CSSRegionContexts.CSS_SELECTOR_PSEUDO) {
- short selCase = stgy.getSelectorTagCase();
- if (selCase == org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy.UPPER) {
- return text.toUpperCase();
- }
- else if (selCase == org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy.LOWER) {
- return text.toLowerCase();
- }
- return text;
- }
-
- return decoratedRegion(region, 0, stgy);
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
- else { // generate source
- String delim = getLineDelimiter(node);
- source.append(delim);
- source.append(getIndent(node));
- source.append("}");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_RBRACE)
- return n - 1;
- else
- return n;
- }
- return -1;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java
deleted file mode 100644
index 04a6730316..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java
+++ /dev/null
@@ -1,126 +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.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-
-
-/**
- *
- */
-public class DefaultCSSSourceFormatter extends AbstractCSSSourceFormatter {
-
- /**
- *
- */
- DefaultCSSSourceFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void appendSpaceBetween(ICSSNode node, CompoundRegion prev, CompoundRegion next, StringBuffer source) {
- if (isCleanup() && !getCleanupStrategy(node).isFormatSource())
- return; // for not formatting case on cleanup action
-
- // in selector
- String prevType = prev.getType();
- String nextType = next.getType();
- if (CSSRegionUtil.isSelectorBegginingType(prevType) && CSSRegionUtil.isSelectorBegginingType(nextType)) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=73990
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=110539
- // Formatting CSS file splits element.class into element . class
- if (((prevType == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || prevType == CSSRegionContexts.CSS_SELECTOR_CLASS || prevType == CSSRegionContexts.CSS_SELECTOR_ID) && (nextType == CSSRegionContexts.CSS_SELECTOR_CLASS || nextType == CSSRegionContexts.CSS_SELECTOR_ID)) || ((prevType == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || prevType == CSSRegionContexts.CSS_SELECTOR_CLASS) && nextType == CSSRegionContexts.CSS_SELECTOR_PSEUDO) || (nextType == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START)) {
- // Individually, SELECTOR_ELEMENT_NAME, SELECTOR_CLASS, and SELECTOR_ID can all be beginning types.
- // But, we should not insert a space in between when they are followed by SELECTOR_CLASS or SELECTOR_ID.
- // For example: H1.pastoral and H1#z98y and .pastoral.other and #myid.myclass
- //
- // Also, space is now not inserted in between when SELECTOR_ELEMENT_NAME is followed by SELECTOR_PSEUDO, or when
- // SELECTOR_CLASS is followed by SELECTOR_PSEUDO.
- // For example: P:first-letter and A.external:visited
- }
- else
- appendSpaceBefore(node, next, source);
- return;
- }
-
- if (prevType == CSSRegionContexts.CSS_PAGE || prevType == CSSRegionContexts.CSS_CHARSET || prevType == CSSRegionContexts.CSS_ATKEYWORD || prevType == CSSRegionContexts.CSS_FONT_FACE || prevType == CSSRegionContexts.CSS_IMPORT || prevType == CSSRegionContexts.CSS_MEDIA) {
- appendSpaceBefore(node, next, source);
- return;
- }
-
- if (prevType == CSSRegionContexts.CSS_UNKNOWN && nextType != CSSRegionContexts.CSS_COMMENT) {
- if (prev.getEndOffset() != next.getStartOffset()) { // not
- // sequential
- appendSpaceBefore(node, next, source);
- }
- return;
- }
-
- if (prevType == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR || prevType == CSSRegionContexts.CSS_COMMENT || nextType == CSSRegionContexts.CSS_COMMENT || nextType == CSSRegionContexts.CSS_LBRACE || nextType == CSSRegionContexts.CSS_UNKNOWN) {
- appendSpaceBefore(node, next, source);
- return;
- }
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0)
- return n;
- return -1;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FontFaceRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FontFaceRuleFormatter.java
deleted file mode 100644
index ee46eed456..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FontFaceRuleFormatter.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-
-
-/**
- *
- */
-public class FontFaceRuleFormatter extends DeclContainerFormatter {
-
- public final static java.lang.String FONT_FACE = "@font-face";//$NON-NLS-1$
- private static FontFaceRuleFormatter instance;
-
- /**
- *
- */
- FontFaceRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatPre(org.eclipse.wst.css.core.internal.provisional.document.ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- if (end > 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else {
- String str = FONT_FACE;
- if (CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- str = FONT_FACE.toUpperCase();
- source.append(str);
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- }
- appendDelimBefore(node, null, source);
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region))
- appendDelimBefore(node, null, source);
- else
- appendSpaceBefore(node, outside[1], source);
- }
- }
-
- /**
- *
- */
- public synchronized static FontFaceRuleFormatter getInstance() {
- if (instance == null)
- instance = new FontFaceRuleFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FormatRegion.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FormatRegion.java
deleted file mode 100644
index ff0c9d322a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FormatRegion.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-
-/**
- *
- */
-class FormatRegion implements IRegion {
-
- private int fOffset, fLength;
-
- /**
- *
- */
- FormatRegion(int offset, int length) {
- super();
- set(offset, length);
- }
-
- /**
- * Returns the length of the region.
- *
- * @return the length of the region
- */
- public int getLength() {
- return fLength;
- }
-
- /**
- * Returns the offset of the region.
- *
- * @return the offset of the region
- */
- public int getOffset() {
- return fOffset;
- }
-
- /**
- *
- */
- void set(int offset, int length) {
- this.fOffset = offset;
- this.fLength = length;
- }
-
- /**
- *
- */
- void setLength(int newLength) {
- fLength = newLength;
- }
-
- /**
- *
- */
- void setOffset(int newOffset) {
- fOffset = newOffset;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FunctionFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FunctionFormatter.java
deleted file mode 100644
index 8c47f0e994..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FunctionFormatter.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-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;
-
-
-/**
- *
- */
-abstract public class FunctionFormatter extends AbstractCSSSourceFormatter {
-
- /**
- *
- */
- FunctionFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR;
- if (prev == null || child == null)
- pickupType = null;
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // extract source
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy));
- }
- } else if (prev != null && child != null) { // generate source between
- // parameters
- source.append(",");//$NON-NLS-1$
- }
- appendSpaceBefore(node, toAppend, source);
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPost(org.eclipse.wst.css.core.internal.provisional.document.ICSSNode node, java.lang.StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy));
- }
- } else { // generate source
- source.append(")");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
-
- if (end > 0) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- } else { // generate source
- String func = getFunc();
- if (CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER)
- func = func.toUpperCase();
- source.append(func);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- return n - 1;
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- protected abstract String getFunc();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/ImportRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/ImportRuleFormatter.java
deleted file mode 100644
index fc758520be..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/ImportRuleFormatter.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-
-/**
- *
- */
-public class ImportRuleFormatter extends AbstractCSSSourceFormatter {
-
- public final static java.lang.String IMPORT = "@import";//$NON-NLS-1$
- private static ImportRuleFormatter instance;
-
- /**
- *
- */
- ImportRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSImportRule.HREF.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- it.prev();
- if (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- it.next();
- } else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- it.next();
- it.next();
- if (it.hasNext()) {
- ITextRegion next = it.next();
- if (next.getType() == CSSRegionContexts.CSS_S)
- context.end = it.getStructuredDocumentRegion().getEndOffset(next);
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- } else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- } else {
- ICSSNode child = node.getFirstChild();
- IStructuredDocumentRegion flatNode = null;
- ITextRegion region = null;
- if (child == null) {
- flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- } else {
- flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) child).getStartOffset() - 1);
- region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) child).getStartOffset() - 1);
- }
- if (region.getType() == CSSRegionContexts.CSS_S) {
- context.start = flatNode.getStartOffset(region);
- context.end = flatNode.getEndOffset(region);
- } else {
- context.start = flatNode.getEndOffset();
- context.end = flatNode.getEndOffset();
- }
- }
- }
- // generate text
- if (insert && attr.getValue() != null && attr.getValue().length() > 0) {
- appendSpaceBefore(node, attr.getValue(), buf);
- buf.append(attr.getValue());
- appendSpaceBefore(node, "", buf);//$NON-NLS-1$
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- // for media-type
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = CSSRegionContexts.CSS_MEDIA_SEPARATOR;
- if (prev == null || child == null)
- pickupType = null;
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // extract source
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- appendSpaceBefore(node, toAppend, source);
- } else if (prev != null && child != null) { // generate source : ????
- source.append(",");//$NON-NLS-1$
- appendSpaceBefore(node, toAppend, source);
- } else if (child != null) { // generate source : between 'url()' and
- // media types
- appendSpaceBefore(node, toAppend, source);
- }
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must be
- // comments
- }
- if (needS(outside[1])) {
- if (((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength())
- appendSpaceBefore(node, toAppend, source);
- else
- appendSpaceBefore(node, outside[1], source);
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- } else {
- source.append(";"); //$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if ((i != 0 || needS(outside[0])) && !regions[i].getType().equals(CSSRegionContexts.CSS_DELIMITER))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
-
- if (end > 0) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- String str = regions[i].getText();
- if (regions[i].getType() == CSSRegionContexts.CSS_IMPORT)
- str = decoratedIdentRegion(regions[i], stgy);
- else
- str = decoratedPropValueRegion(regions[i], stgy);
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(str);
- }
- } else { // generate source
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- String str = IMPORT;
- if (preferences.getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- str = IMPORT.toUpperCase();
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- source.append(str);
- str = "url(";//$NON-NLS-1$
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER)
- str = str.toUpperCase();
- String href = ((ICSSImportRule) node).getHref();
- quote = CSSUtil.detectQuote(href, quote);
- str = str + quote + href + quote + ")";//$NON-NLS-1$
- appendSpaceBefore(node, str, source);
- source.append(str);
- }
- ICSSNode child = node.getFirstChild();
- if (child != null && (child instanceof org.w3c.dom.stylesheets.MediaList) && ((org.w3c.dom.stylesheets.MediaList) child).getLength() > 0) {
- appendSpaceBefore(node, "", source);//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- String str = regions[i].getText();
- if (regions[i].getType() == CSSRegionContexts.CSS_IMPORT)
- str = decoratedIdentRegion(regions[i], stgy);
- else
- str = decoratedPropValueRegion(regions[i], stgy);
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(str);
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- if (!ICSSImportRule.HREF.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSImportRule.HREF);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- FormatRegion formatRegion = null;
- ICSSNode child = node.getFirstChild();
- if (child != null && ((IndexedRegion) child).getEndOffset() > 0)
- formatRegion = new FormatRegion(iNode.getStartOffset(), ((IndexedRegion) child).getStartOffset() - iNode.getStartOffset());
- else
- formatRegion = new FormatRegion(iNode.getStartOffset(), iNode.getEndOffset() - iNode.getStartOffset());
- CompoundRegion regions[] = getRegionsWithoutWhiteSpaces(node.getOwnerDocument().getModel().getStructuredDocument(), formatRegion, getCleanupStrategy(node));
-
- boolean atrule = false;
- for (int i = 0; i < regions.length; i++) {
- if (regions[i].getType() == CSSRegionContexts.CSS_IMPORT) {
- atrule = true;
- continue;
- } else if (!atrule)
- continue;
- if (regions[i].getType() != CSSRegionContexts.CSS_COMMENT)
- return regions[i].getStartOffset();
- }
- return (child != null && ((IndexedRegion) child).getEndOffset() > 0) ? ((IndexedRegion) child).getStartOffset() : iNode.getEndOffset();
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_DELIMITER)
- return n - 1;
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static ImportRuleFormatter getInstance() {
- if (instance == null)
- instance = new ImportRuleFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaListFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaListFormatter.java
deleted file mode 100644
index f44eb3494d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaListFormatter.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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.w3c.dom.stylesheets.MediaList;
-
-
-/**
- *
- */
-public class MediaListFormatter extends DefaultCSSSourceFormatter {
-
- private static MediaListFormatter instance;
-
- /**
- *
- */
- MediaListFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- boolean first = false, last = false;
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- it.prev();
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- while (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S || prev.getType() == CSSRegionContexts.CSS_MEDIA_SEPARATOR || prev.getType() == CSSRegionContexts.CSS_COMMENT)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- break;
- }
- if (context.start < ((IndexedRegion) node).getStartOffset()) {
- context.start = ((IndexedRegion) node).getStartOffset();
- first = true;
-
- }
- it.reset(flatNode, region);
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- while (it.hasNext()) {
- ITextRegion next = it.next();
- if (next.getType() == CSSRegionContexts.CSS_S || next.getType() == CSSRegionContexts.CSS_MEDIA_SEPARATOR || next.getType() == CSSRegionContexts.CSS_COMMENT)
- context.end = it.getStructuredDocumentRegion().getEndOffset(next);
- else
- break;
- }
- if (((IndexedRegion) node).getEndOffset() < context.end) {
- context.end = ((IndexedRegion) node).getEndOffset();
- last = true;
- }
- } else {
- last = true;
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, region);
- context.start = it.getStructuredDocumentRegion().getEndOffset(region);
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- while (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S || prev.getType() == CSSRegionContexts.CSS_MEDIA_SEPARATOR || prev.getType() == CSSRegionContexts.CSS_COMMENT)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- break;
- }
- if (context.start < ((IndexedRegion) node).getStartOffset()) {
- context.start = ((IndexedRegion) node).getStartOffset();
- first = true;
- }
- }
- }
- // generate text
- if (insert && attr.getValue() != null && attr.getValue().length() > 0) {
- if (!first)
- buf.append(","); //$NON-NLS-1$
- appendSpaceBefore(node, attr.getValue(), buf);
- buf.append(attr.getValue());
- if (!last) {
- buf.append(","); //$NON-NLS-1$
- appendSpaceBefore(node, "", buf); //$NON-NLS-1$
- }
- } else if (!first && !last) {
- buf.append(","); //$NON-NLS-1$
- appendSpaceBefore(node, "", buf); //$NON-NLS-1$
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = ((IndexedRegion) node).getEndOffset();
-
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- } else { // generate source
- MediaList list = (MediaList) node;
- int n = list.getLength();
- for (int i = 0; i < n; i++) {
- String medium = list.item(i);
- if (CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- medium = medium.toUpperCase();
- else
- medium = medium.toLowerCase();
-
- if (i != 0) {
- source.append(","); //$NON-NLS-1$
- appendSpaceBefore(node, medium, source);
- }
- source.append(medium);
- }
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(attrName);
-
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- /*
- * ITextRegion regions[] =
- * getRegionsWithoutWhiteSpaces(node.getOwnerDocument().getModel().getStructuredDocument(),
- * new FormatRegion(iNode.getStartOffset(), iNode.getEndOffset() -
- * iNode.getStartOffset() + 1)); for(int i=regions.length - 1; i >= 0;
- * i--) { if (regions[i].getType() == CSSRegionContexts.IMPORTANT_SYM)
- * return regions[i].getStartOffset(); }
- */
- return iNode.getEndOffset();
- }
-
- /**
- *
- */
- public synchronized static MediaListFormatter getInstance() {
- if (instance == null)
- instance = new MediaListFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaRuleFormatter.java
deleted file mode 100644
index 059f56a450..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaRuleFormatter.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-
-/**
- *
- */
-public class MediaRuleFormatter extends AbstractCSSSourceFormatter {
-
- public final static java.lang.String MEDIA = "@media";//$NON-NLS-1$
- private static MediaRuleFormatter instance;
-
- /**
- *
- */
- MediaRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) { // source formatting
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = null;
- if ((prev != null && prev.getNodeType() == ICSSNode.MEDIALIST_NODE) || (prev == null && (child == null || child.getNodeType() != ICSSNode.MEDIALIST_NODE))) {
- pickupType = CSSRegionContexts.CSS_LBRACE;
- }
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // extract source
- if (child != null && child.getNodeType() == ICSSNode.MEDIALIST_NODE) { // between
- // "@media"
- // and
- // mediatype
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- appendSpaceBefore(node, toAppend, source);
- } else if (child != null && (child.getPreviousSibling() == null || child.getPreviousSibling().getNodeType() == ICSSNode.MEDIALIST_NODE)) { // between
- // mediatype
- // and
- // the
- // first
- // style
- // rule
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- appendDelimBefore(node, null, source);
- } else { // between styles
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- appendDelimBefore(node, null, source);
- }
- } else { // source generation
- if (child == null && prev != null && prev.getNodeType() != ICSSNode.MEDIALIST_NODE) { // after
- // the
- // last
- // style
- // rule
- appendDelimBefore(node.getParentNode(), null, source);
- } else if (child != null && child.getNodeType() == ICSSNode.MEDIALIST_NODE) { // between
- // "@media"
- // and
- // mediatype
- appendSpaceBefore(node, toAppend, source);
- } else if (prev != null && prev.getNodeType() == ICSSNode.MEDIALIST_NODE) { // between
- // mediatype
- // and
- // the
- // first
- // style
- // rule
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- if (child != null)
- appendDelimBefore(node, null, source);
- else
- appendDelimBefore(node.getParentNode(), null, source);
- } else { // normal case
- appendDelimBefore(node, null, source);
- }
- }
-
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- if (child != null && child.getNodeType() == ICSSNode.MEDIALIST_NODE) { // between
- // "@media"
- // and
- // mediatype
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- if (needS(outside[1]) && ((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength()) {
- appendSpaceBefore(node, toAppend, source);
- }
- } else if (child != null && (child.getPreviousSibling() == null || child.getPreviousSibling().getNodeType() == ICSSNode.MEDIALIST_NODE)) { // between
- // mediatype
- // and
- // the
- // first
- // style
- // rule
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- if (needS(outside[1]) && ((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength()) {
- appendDelimBefore(node, null, source);
- }
- } else { // between styles
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- if (needS(outside[1]) && ((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength()) {
- appendDelimBefore(node, null, source);
- }
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) { // source formatting
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- if (node.getLastChild() == null || node.getLastChild().getNodeType() != ICSSNode.MEDIALIST_NODE) {
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- } else {
- boolean bInCurlyBrace = false;
- for (int i = 0; i < regions.length; i++) {
- if (!bInCurlyBrace)
- appendSpaceBefore(node, regions[i], source);
- else
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- if (regions[i].getType() == CSSRegionContexts.CSS_LBRACE)
- bInCurlyBrace = true;
- }
- }
- } else { // source generation
- String delim = getLineDelimiter(node);
- if (node.getLastChild() != null && node.getLastChild().getNodeType() == ICSSNode.MEDIALIST_NODE) {
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- }
-
- source.append(delim);
- source.append(getIndent(node));
- source.append("}");//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
-
- if (end > 0) { // source formatting
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- } else { // source generation
- String str = MEDIA;
- if (CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- str = MEDIA.toUpperCase();
- source.append(str);
- }
- ICSSNode child = node.getFirstChild();
- if (child != null && (child instanceof org.w3c.dom.stylesheets.MediaList) && ((org.w3c.dom.stylesheets.MediaList) child).getLength() > 0) {
- appendSpaceBefore(node, "", source);//$NON-NLS-1$
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode.getRegionAtCharacterOffset(n - 1).getType() == CSSRegionContexts.CSS_LBRACE)
- return n - 1;
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static MediaRuleFormatter getInstance() {
- if (instance == null)
- instance = new MediaRuleFormatter();
- return instance;
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatAfter(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos <= 0 || !nnode.contains(insertPos - 1))
- return 0;
-
- if (node.getFirstChild().getNextSibling() == node.getLastChild()) { // inserted
- // first
- // style
- // rule
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(insertPos);
- if (flatNode == null)
- return 0;
- ITextRegion region = flatNode.getRegionAtCharacterOffset(insertPos);
- if (region == null)
- return 0;
- RegionIterator it = new RegionIterator(flatNode, region);
- while (it.hasNext()) {
- region = it.next();
- if (region.getType() == CSSRegionContexts.CSS_LBRACE)
- break;
- if (nnode.getEndOffset() <= it.getStructuredDocumentRegion().getEndOffset(region))
- break;
- }
- int pos = it.getStructuredDocumentRegion().getStartOffset(region) - insertPos;
- return (pos >= 0) ? pos : 0;
-
- }
- return super.getLengthToReformatAfter(node, insertPos);
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatBefore(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos <= 0 || !nnode.contains(insertPos - 1))
- return 0;
-
- if (node.getFirstChild().getNextSibling() == node.getLastChild()) { // inserted
- // first
- // style
- // rule
- int pos = ((IndexedRegion) node.getFirstChild()).getEndOffset();
- if (pos <= 0)
- pos = ((IndexedRegion) node).getStartOffset() + 6 /*
- * length
- * of
- * "@media"
- */;
- return insertPos - pos;
- }
- return super.getLengthToReformatBefore(node, insertPos);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PageRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PageRuleFormatter.java
deleted file mode 100644
index fa1f7a37fa..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PageRuleFormatter.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPageRule;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-
-/**
- *
- */
-public class PageRuleFormatter extends DeclContainerFormatter {
-
- public final static java.lang.String PAGE = "@page";//$NON-NLS-1$
- private static PageRuleFormatter instance;
-
- /**
- *
- */
- PageRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSPageRule.SELECTOR.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, region);
- it.next();
- if (it.hasNext()) {
- ITextRegion next = it.next();
- if (next.getType() == CSSRegionContexts.CSS_S)
- context.end = it.getStructuredDocumentRegion().getEndOffset(next);
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- }
- else {
- int pos = getAttrInsertPos(node, attr.getName());
- context.start = pos;
- context.end = pos;
- /*
- * IStructuredDocumentRegion flatNode =
- * node.getOwnerDocument().getModel().getStructuredDocument().getNodeAtCharacterOffset(((IndexedRegion)node).getStartOffset());
- * ITextRegion region =
- * flatNode.getRegionAtCharacterOffset(((IndexedRegion)node).getStartOffset());
- * if (region.getType() == CSSRegionContexts.S) {
- * context.start = region.getStartOffset(); context.end =
- * region.getEndOffset(); } else { context.start =
- * flatNode.getEndOffset() + 1; context.end =
- * flatNode.getEndOffset(); }
- */}
- }
- // generate text
- if (insert) {
- String val = attr.getValue();
- if (val != null && val.length() > 0) {
- buf.append(val);
- appendSpaceBefore(node, "", buf);//$NON-NLS-1$
- }
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
-
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBetween(node, regions[i - 1], regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
- else { // generate source
- String str = PAGE;
- if (CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- str = PAGE.toUpperCase();
- source.append(str);
- str = ((ICSSPageRule) node).getSelectorText();
- if (str != null && str.length() > 0) {
- appendSpaceBefore(node, str, source);
- source.append(str);
- }
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- }
- appendDelimBefore(node, null, source);
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBetween(node, (i == 0) ? outside[0] : regions[i - 1], regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region))
- appendDelimBefore(node, null, source);
- else
- appendSpaceBetween(node, regions[regions.length - 1], outside[1], source);
- }
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- if (!ICSSPageRule.SELECTOR.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSPageRule.SELECTOR);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- else if (((IndexedRegion) node).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- while (it.hasNext()) {
- region = it.next();
- if (region.getType() == CSSRegionContexts.CSS_LBRACE) {
- return it.getStructuredDocumentRegion().getStartOffset(region);
- }
- if (it.getStructuredDocumentRegion().getEndOffset(region) >= ((IndexedRegion) node).getEndOffset())
- break;
- }
- }
- return ((IndexedRegion) node).getStartOffset();
- }
-
- /**
- *
- */
- public synchronized static PageRuleFormatter getInstance() {
- if (instance == null)
- instance = new PageRuleFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PrimitiveValueFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PrimitiveValueFormatter.java
deleted file mode 100644
index b215c9dc8d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PrimitiveValueFormatter.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-
-/**
- *
- */
-public class PrimitiveValueFormatter extends DefaultCSSSourceFormatter {
-
- private static PrimitiveValueFormatter instance;
-
- /**
- *
- */
- PrimitiveValueFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = ((IndexedRegion) node).getEndOffset();
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- boolean appendQuote = regions.length > 1 && node.getParentNode() instanceof ICSSStyleDeclItem && isCleanup() && getCleanupStrategy(node).isQuoteValues() && (((ICSSStyleDeclItem) node.getParentNode()).getPropertyName().equals(PropCMProperty.P_FONT) || ((ICSSStyleDeclItem) node.getParentNode()).getPropertyName().equals(PropCMProperty.P_FONT_FAMILY) || ((ICSSStyleDeclItem) node.getParentNode()).getPropertyName().equals(PropCMProperty.P_VOICE_FAMILY));
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
-
- StringBuffer strBuf = new StringBuffer();
- boolean skipSpace = false;
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 && !skipSpace)
- appendSpaceBefore(node, regions[i], strBuf);
- skipSpace = false;
- strBuf.append(decoratedPropValueRegion(regions[i], stgy));
- if (regions[i].getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- skipSpace = true;
- }
-
- if (appendQuote) {
- source.append(quote);
- String str = strBuf.toString();
- str = str.replace('\'', ' ');
- str = str.replace('\"', ' ');
- str = str.trim();
- source.append(str);
- source.append(quote);
- }
- else {
- source.append(strBuf);
- }
- }
- else { // generate source
- ICSSPrimitiveValue value = (ICSSPrimitiveValue) node;
- short type = value.getPrimitiveType();
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
-
- String str = null;
- switch (type) {
- case CSSPrimitiveValue.CSS_NUMBER :
- case CSSPrimitiveValue.CSS_PERCENTAGE :
- case CSSPrimitiveValue.CSS_EMS :
- case CSSPrimitiveValue.CSS_EXS :
- case CSSPrimitiveValue.CSS_PX :
- case CSSPrimitiveValue.CSS_CM :
- case CSSPrimitiveValue.CSS_MM :
- case CSSPrimitiveValue.CSS_IN :
- case CSSPrimitiveValue.CSS_PT :
- case CSSPrimitiveValue.CSS_PC :
- case CSSPrimitiveValue.CSS_DEG :
- case CSSPrimitiveValue.CSS_RAD :
- case CSSPrimitiveValue.CSS_GRAD :
- case CSSPrimitiveValue.CSS_MS :
- case CSSPrimitiveValue.CSS_S :
- case CSSPrimitiveValue.CSS_HZ :
- case CSSPrimitiveValue.CSS_KHZ :
- case CSSPrimitiveValue.CSS_DIMENSION :
- case ICSSPrimitiveValue.CSS_INTEGER :
- if (value.getFloatValue(type) == ((int) value.getFloatValue(type))) {
- str = Integer.toString((int) value.getFloatValue(type));
- }
- else {
- str = Float.toString(value.getFloatValue(type));
- }
- break;
- case CSSPrimitiveValue.CSS_IDENT :
- case ICSSPrimitiveValue.CSS_HASH :
- case ICSSPrimitiveValue.CSS_INHERIT_PRIMITIVE :
- str = value.getStringValue();
- if (str != null) {
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER)
- str = str.toUpperCase();
- else
- str.toLowerCase();
- }
- break;
- case CSSPrimitiveValue.CSS_STRING :
- case CSSPrimitiveValue.CSS_URI :
- case CSSPrimitiveValue.CSS_ATTR :
- case ICSSPrimitiveValue.CSS_URANGE :
- case ICSSPrimitiveValue.CSS_FORMAT :
- case ICSSPrimitiveValue.CSS_LOCAL :
- case ICSSPrimitiveValue.CSS_COMMA :
- case ICSSPrimitiveValue.CSS_SLASH :
- str = value.getStringValue();
- }
-
- String preStr = null, postStr = null;
- switch (type) {
- case CSSPrimitiveValue.CSS_ATTR :
- preStr = "attr(";//$NON-NLS-1$
- postStr = ")";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_CM :
- postStr = "cm";//$NON-NLS-1$
- break;
- // case ICSSPrimitiveValue.CSS_COUNTER:
- case CSSPrimitiveValue.CSS_DEG :
- postStr = "deg";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_EMS :
- postStr = "em";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_EXS :
- postStr = "ex";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_GRAD :
- postStr = "grad";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_HZ :
- postStr = "Hz";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_IN :
- postStr = "in";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_KHZ :
- postStr = "kHz";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_MM :
- postStr = "mm";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_MS :
- postStr = "ms";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_PC :
- postStr = "pc";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_PERCENTAGE :
- postStr = "%";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_PT :
- postStr = "pt";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_PX :
- postStr = "px";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_RAD :
- postStr = "rad";//$NON-NLS-1$
- break;
- // case ICSSPrimitiveValue.CSS_RECT:
- // case ICSSPrimitiveValue.CSS_RGBCOLOR:
- case CSSPrimitiveValue.CSS_S :
- postStr = "s";//$NON-NLS-1$
- break;
- case CSSPrimitiveValue.CSS_STRING :
- quote = CSSUtil.detectQuote(str, quote);
- preStr = quote;
- postStr = quote;
- break;
- case CSSPrimitiveValue.CSS_URI :
- quote = CSSUtil.detectQuote(str, quote);
- preStr = "url(" + quote;//$NON-NLS-1$
- postStr = quote + ")";//$NON-NLS-1$
- break;
- // the followings are original primitive values
- case CSSPrimitiveValue.CSS_IDENT :
- case CSSPrimitiveValue.CSS_UNKNOWN :
- // use str
- case ICSSPrimitiveValue.CSS_INTEGER :
- case ICSSPrimitiveValue.CSS_HASH :
- case ICSSPrimitiveValue.CSS_SLASH :
- case ICSSPrimitiveValue.CSS_COMMA :
- case CSSPrimitiveValue.CSS_DIMENSION :
- case CSSPrimitiveValue.CSS_NUMBER :
- case ICSSPrimitiveValue.CSS_INHERIT_PRIMITIVE :
- break;
- case ICSSPrimitiveValue.CSS_URANGE :
- preStr = "U+";//$NON-NLS-1$
- break;
- case ICSSPrimitiveValue.CSS_FORMAT :
- quote = CSSUtil.detectQuote(str, quote);
- preStr = "format(" + quote;//$NON-NLS-1$
- postStr = quote + ")";//$NON-NLS-1$
- break;
- case ICSSPrimitiveValue.CSS_LOCAL :
- quote = CSSUtil.detectQuote(str, quote);
- preStr = "local(" + quote;//$NON-NLS-1$
- postStr = quote + ")";//$NON-NLS-1$
- break;
- }
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER) {
- if (preStr != null)
- preStr = preStr.toUpperCase();
- if (postStr != null)
- postStr = postStr.toUpperCase();
- }
- if (preStr != null)
- source.append(preStr);
- if (str != null)
- source.append(str);
- if (postStr != null)
- source.append(postStr);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public synchronized static PrimitiveValueFormatter getInstance() {
- if (instance == null)
- instance = new PrimitiveValueFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RGBFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RGBFormatter.java
deleted file mode 100644
index a6909db3fe..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RGBFormatter.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.wst.css.core.internal.formatter;
-
-
-
-/**
- *
- */
-public class RGBFormatter extends FunctionFormatter {
-
- private static RGBFormatter instance;
-
- /**
- *
- */
- RGBFormatter() {
- super();
- }
-
- /**
- *
- */
- protected String getFunc() {
- return "rgb(";//$NON-NLS-1$
- }
-
- /**
- *
- */
- public synchronized static RGBFormatter getInstance() {
- if (instance == null)
- instance = new RGBFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RectFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RectFormatter.java
deleted file mode 100644
index f3ec832dfc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RectFormatter.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.wst.css.core.internal.formatter;
-
-
-
-/**
- *
- */
-public class RectFormatter extends FunctionFormatter {
-
- private static RectFormatter instance;
-
- /**
- *
- */
- RectFormatter() {
- super();
- }
-
- /**
- *
- */
- protected String getFunc() {
- return "rect(";//$NON-NLS-1$
- }
-
- /**
- *
- */
- public synchronized static RectFormatter getInstance() {
- if (instance == null)
- instance = new RectFormatter();
- return instance;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclItemFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclItemFormatter.java
deleted file mode 100644
index bf9c042ef9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclItemFormatter.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-
-/**
- *
- */
-public class StyleDeclItemFormatter extends DefaultCSSSourceFormatter {
-
- private static StyleDeclItemFormatter instance;
-
- /**
- *
- */
- StyleDeclItemFormatter() {
- super();
- }
-
- /**
- *
- */
- private void appendAfterColonSpace(ICSSNode node, StringBuffer source) {
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- int n = preferences.getInt(CSSCorePreferenceNames.FORMAT_PROP_POST_DELIM);
-
- if (preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH) > 0 && (!preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR) || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = getFirstChildRegionLength(node);
- if (length + n + append > preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH)) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- source.append(getIndentString());
- n = 0; // no space is necessary
- }
- }
- // no delimiter case
- while (n-- > 0)
- source.append(" ");//$NON-NLS-1$
- }
-
- /**
- *
- */
- private int getFirstChildRegionLength(ICSSNode node) {
- ICSSNode firstChild = node.getFirstChild();
- if (firstChild == null)
- return 1;
- int start = ((IndexedRegion) firstChild).getStartOffset();
- RegionIterator itr = new RegionIterator(node.getOwnerDocument().getModel().getStructuredDocument(), start);
- while (itr.hasNext()) {
- ITextRegion reg = itr.next();
- if (reg != null && reg.getType() != CSSRegionContexts.CSS_S)
- return reg.getTextLength();
- }
- return 1;
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSStyleDeclItem.IMPORTANT.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getStartOffset());
- RegionIterator it = new RegionIterator(flatNode, region);
- it.prev();
- if (it.hasPrev()) {
- ITextRegion prev = it.prev();
- if (prev.getType() == CSSRegionContexts.CSS_S)
- context.start = it.getStructuredDocumentRegion().getStartOffset(prev);
- else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- } else
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- } else {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getEndOffset() - 1);
- if (region.getType() == CSSRegionContexts.CSS_S) {
- context.start = flatNode.getStartOffset(region);
- context.end = flatNode.getEndOffset(region);
- } else {
- context.start = flatNode.getEndOffset();
- context.end = flatNode.getEndOffset();
- }
- }
- }
- // generate text
- if (insert && attr.getValue() != null && attr.getValue().length() > 0) {
- appendSpaceBefore(node, attr.getValue(), buf);
- buf.append(attr.getValue());
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, null);
- }
- // generate source
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy)); // must
- // be
- // comments
- }
- }
- if (child != null && child instanceof ICSSPrimitiveValue) {
- if (((ICSSPrimitiveValue) child).getPrimitiveType() == ICSSPrimitiveValue.CSS_COMMA)
- toAppend = ",";//$NON-NLS-1$
- else if (((ICSSPrimitiveValue) child).getPrimitiveType() == ICSSPrimitiveValue.CSS_SLASH)
- toAppend = "/";//$NON-NLS-1$
- }
- if (child != null && toAppend != null && !toAppend.equals(",") && !toAppend.equals("/")) //$NON-NLS-1$ //$NON-NLS-2$
- appendSpaceBefore(node, toAppend, source);
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 2, stgy)); // must be
- // comments
- }
- if (needS(outside[1])) {
- if (((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength()) {
- if (toAppend != "," && toAppend != "/") //$NON-NLS-1$ //$NON-NLS-2$
- appendSpaceBefore(node, toAppend, source);
- }
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- } else { // generate source
- // append "!important"
- String priority = ((ICSSStyleDeclItem) node).getPriority();
- if (priority != null && priority.length() > 0) {
- appendSpaceBefore(node, priority, source);
- source.append(priority);
- }
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedIdentRegion(regions[i], stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (end > 0) { // format source
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropNameRegion(regions[i], stgy));
- }
- } else { // generatoe source
- ICSSStyleDeclItem item = (ICSSStyleDeclItem) node;
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.UPPER)
- source.append(item.getPropertyName().toUpperCase());
- else
- source.append(item.getPropertyName());
-
- int k = preferences.getInt(CSSCorePreferenceNames.FORMAT_PROP_PRE_DELIM);
- if (preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH) > 0 && (!preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR) || node.getOwnerDocument().getNodeType() != ICSSNode.STYLEDECLARATION_NODE)) {
- int length = getLastLineLength(node, source);
- int append = 1;
- if (length + k + append > preferences.getInt(CSSCorePreferenceNames.LINE_WIDTH)) {
- source.append(getLineDelimiter(node));
- source.append(getIndent(node));
- source.append(getIndentString());
- k = 0; // no space is necessary
- }
- }
- // no delimiter case
- while (k-- > 0)
- source.append(" ");//$NON-NLS-1$
- source.append(":");//$NON-NLS-1$
- }
- if (!isCleanup() || getCleanupStrategy(node).isFormatSource()) {
- appendAfterColonSpace(node, source);
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropNameRegion(regions[i], stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region) && (!isCleanup() || getCleanupStrategy(node).isFormatSource())) {
- appendAfterColonSpace(node, source);
- } else
- appendSpaceBefore(node, outside[1], source);
- }
- }
-
- /**
- *
- */
- public StringBuffer formatValue(ICSSNode node) {
- StringBuffer source = new StringBuffer();
- formatChildren(node, source);
-
- return source;
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- if (!ICSSStyleDeclItem.IMPORTANT.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSStyleDeclItem.IMPORTANT);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getEndOffset() <= 0)
- return -1;
-
- CompoundRegion regions[] = getRegionsWithoutWhiteSpaces(node.getOwnerDocument().getModel().getStructuredDocument(), new FormatRegion(iNode.getStartOffset(), iNode.getEndOffset() - iNode.getStartOffset()), getCleanupStrategy(node));
- for (int i = regions.length - 1; i >= 0; i--) {
- if (regions[i].getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT)
- return regions[i].getStartOffset();
- }
- return iNode.getEndOffset();
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n < 0) {
- return -1;
- }
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- if (flatNode != null && flatNode.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- n -= flatNode.getLength();
- }
- if (n > 0) {
- String important = ((ICSSStyleDeclItem) node).getPriority();
- if (important != null && important.length() > 0) {
- // find before "!important" position
- flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- RegionIterator it = new RegionIterator(flatNode, flatNode.getRegionAtCharacterOffset(n - 1));
- while (it.hasPrev()) {
- ITextRegion region = it.prev();
- if (it.getStructuredDocumentRegion() != flatNode)
- break;
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT)
- return it.getStructuredDocumentRegion().getStartOffset(region);
- }
- }
- // skip last space
- flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(n - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(n - 1);
- if (region != null) {
- n -= region.getLength() - region.getTextLength();
- }
-
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static StyleDeclItemFormatter getInstance() {
- if (instance == null)
- instance = new StyleDeclItemFormatter();
- return instance;
- }
-
- private String getIndentString() {
- StringBuffer indent = new StringBuffer();
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (preferences != null) {
- char indentChar = ' ';
- String indentCharPref = preferences.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
- if (CSSCorePreferenceNames.TAB.equals(indentCharPref)) {
- indentChar = '\t';
- }
- int indentationWidth = preferences.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
-
- for (int i = 0; i < indentationWidth; i++) {
- indent.append(indentChar);
- }
- }
- return indent.toString();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclarationFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclarationFormatter.java
deleted file mode 100644
index 56c928769c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclarationFormatter.java
+++ /dev/null
@@ -1,325 +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.wst.css.core.internal.formatter;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-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;
-
-/**
- *
- */
-public class StyleDeclarationFormatter extends DefaultCSSSourceFormatter {
-
- private static StyleDeclarationFormatter instance;
-
- /**
- *
- */
- StyleDeclarationFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
-
- // check no child
- if (child == null && prev == null)
- return;
-
- if (start > 0 && start < end) { // format source
- ICSSModel cssModel = node.getOwnerDocument().getModel();
- // BUG202615 - it is possible to have a style declaration with no
- // model associated with it
- if (cssModel != null) {
- IStructuredDocument structuredDocument = cssModel.getStructuredDocument();
- if (structuredDocument != null) {
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = CSSRegionContexts.CSS_DECLARATION_DELIMITER;
- if (prev == null || child == null)
- pickupType = null;
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // extract source
- for (int i = 0; i < regions.length; i++) {
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be comments
- }
- }
- }
- } else if (prev != null && child != null) { // generate source :
- // between two declarations
- // BUG93037-properties view adds extra ; when add new property
- boolean semicolonFound = false;
-
- ICSSModel cssModel = node.getOwnerDocument().getModel();
- // BUG202615 - it is possible to have a style declaration with no
- // model associated with it
- if (cssModel != null) {
- IStructuredDocument structuredDocument = cssModel.getStructuredDocument();
- if (structuredDocument != null) {
- int prevStart = (prev != null) ? ((IndexedRegion) prev).getStartOffset() : 0;
- int prevEnd = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(prevStart, prevEnd - prevStart), stgy);
- int i = regions.length - 1;
- while (i >= 0 && !semicolonFound) {
- if (regions[i].getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER)
- semicolonFound = true;
- --i;
- }
- }
- }
- if (!semicolonFound)
- source.append(";");//$NON-NLS-1$
- } else if (prev == null) { // generate source : before the first
- // declaration
- org.eclipse.wst.css.core.internal.util.RegionIterator it = null;
- if (end > 0) {
- ICSSModel cssModel = node.getOwnerDocument().getModel();
- // BUG202615 - it is possible to have a style declaration with
- // no model associated with it
- if (cssModel != null) {
- IStructuredDocument structuredDocument = cssModel.getStructuredDocument();
- if (structuredDocument != null) {
- it = new org.eclipse.wst.css.core.internal.util.RegionIterator(structuredDocument, end - 1);
- }
- }
- } else {
- int pos = getChildInsertPos(node);
- if (pos >= 0) {
- ICSSModel cssModel = node.getOwnerDocument().getModel();
- // BUG202615 - it is possible to have a style declaration
- // with no model associated with it
- if (cssModel != null) {
- IStructuredDocument structuredDocument = cssModel.getStructuredDocument();
- if (structuredDocument != null) {
- it = new org.eclipse.wst.css.core.internal.util.RegionIterator(structuredDocument, pos - 1);
- }
- }
- }
- }
- if (it != null) {
- int limit = ((IndexedRegion) ((node.getParentNode() != null) ? node.getParentNode() : node)).getStartOffset();
- while (it.hasPrev()) {
- ITextRegion curReg = it.prev();
- if (curReg.getType() == CSSRegionContexts.CSS_LBRACE || curReg.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER)
- break;
- if (curReg.getType() != CSSRegionContexts.CSS_S && curReg.getType() != CSSRegionContexts.CSS_COMMENT) {
- source.append(";");//$NON-NLS-1$
- break;
- }
- if (it.getStructuredDocumentRegion().getStartOffset(curReg) <= limit)
- break;
- }
- }
- } else if (child == null) { // generate source : after the last
- // declaration
- org.eclipse.wst.css.core.internal.util.RegionIterator it = null;
- if (start > 0) {
- ICSSModel cssModel = node.getOwnerDocument().getModel();
- // BUG202615 - it is possible to have a style declaration with
- // no model associated with it
- if (cssModel != null) {
- IStructuredDocument structuredDocument = cssModel.getStructuredDocument();
- if (structuredDocument != null) {
- it = new org.eclipse.wst.css.core.internal.util.RegionIterator(structuredDocument, start);
- }
- }
- } else {
- int pos = getChildInsertPos(node);
- if (pos >= 0) {
- ICSSModel cssModel = node.getOwnerDocument().getModel();
- // BUG202615 - it is possible to have a style declaration
- // with no model associated with it
- if (cssModel != null) {
- IStructuredDocument structuredDocument = cssModel.getStructuredDocument();
- if (structuredDocument != null) {
- it = new org.eclipse.wst.css.core.internal.util.RegionIterator(structuredDocument, pos);
- }
- }
- }
- }
- if (it != null) {
- int limit = ((IndexedRegion) ((node.getParentNode() != null) ? node.getParentNode() : node)).getEndOffset();
- while (it.hasNext()) {
- ITextRegion curReg = it.next();
- if (curReg.getType() == CSSRegionContexts.CSS_RBRACE || curReg.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER)
- break;
- if (curReg.getType() != CSSRegionContexts.CSS_S && curReg.getType() != CSSRegionContexts.CSS_COMMENT) {
- // Bug 219004 - Before appending a ;, make sure that there
- // isn't one already
- boolean semicolonFound = false;
- while(it.hasNext() && !semicolonFound) {
- if(it.next().getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER)
- semicolonFound = true;
- }
-
- if(!semicolonFound)
- source.append(";");//$NON-NLS-1$
- break;
- }
- if (limit <= it.getStructuredDocumentRegion().getEndOffset(curReg))
- break;
- }
- }
- }
- if (child == null) {
- if (((IndexedRegion) node).getEndOffset() <= 0) {
- // get next region
- int pos = getChildInsertPos(node);
- CompoundRegion toAppendRegion = null;
- if (pos >= 0) {
- ICSSModel cssModel = node.getOwnerDocument().getModel();
- // BUG202615 - it is possible to have a style declaration
- // with no model associated with it
- if (cssModel != null) {
- IStructuredDocument structuredDocument = cssModel.getStructuredDocument();
- if (structuredDocument != null) {
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(pos);
- toAppendRegion = new CompoundRegion(flatNode, flatNode.getRegionAtCharacterOffset(pos));
- }
- }
- }
- appendDelimBefore(node.getParentNode(), toAppendRegion, source);
- }
- } else if ((prev != null || ((IndexedRegion) node).getEndOffset() <= 0)) {
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- if (preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE) && (node.getOwnerDocument() != node || !preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR)))
- appendDelimBefore(node, null, source);
- else if (prev != null || node.getOwnerDocument() != node)
- appendSpaceBefore(node, toAppend, source);
- }
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- ICSSModel cssModel = node.getOwnerDocument().getModel();
- // BUG202615 - it is possible to have a style declaration
- // with no model associated with it
- if (cssModel != null) {
- IStructuredDocument structuredDocument = cssModel.getStructuredDocument();
- if (structuredDocument != null) {
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
-
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- }
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (needS(outside[1])) {
- if (((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength() && preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE) && (node.getOwnerDocument() != node || !preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR))) {
- appendDelimBefore(node, null, source);
- } else
- appendSpaceBefore(node, toAppend, source);
- }
- }
- }
- }
-
- /**
- * Insert the method's description here.
- */
- public int getChildInsertPos(ICSSNode node) {
- if (node == null)
- return -1;
- int pos = super.getChildInsertPos(node);
- if (pos < 0) {
- CSSSourceGenerator formatter = getParentFormatter(node);
- return (formatter != null) ? formatter.getChildInsertPos(node.getParentNode()) : -1;
- }
- return pos;
- }
-
- /**
- *
- */
- public synchronized static StyleDeclarationFormatter getInstance() {
- if (instance == null)
- instance = new StyleDeclarationFormatter();
- return instance;
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatAfter(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos < 0 || !nnode.contains(insertPos)) {
- if (node.getParentNode() != null && nnode.getEndOffset() <= 0) {
- CSSSourceGenerator pntFormatter = getParentFormatter(node);
- if (pntFormatter != null)
- return pntFormatter.getLengthToReformatAfter(node.getParentNode(), insertPos);
- }
- return 0;
- }
- return super.getLengthToReformatAfter(node, insertPos);
- }
-
- /**
- *
- * @return int
- * @param node
- * org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param insertPos
- * int
- */
- public int getLengthToReformatBefore(ICSSNode node, int insertPos) {
- if (node == null)
- return 0;
- IndexedRegion nnode = (IndexedRegion) node;
- if (insertPos <= 0 || !nnode.contains(insertPos - 1)) {
- if (node.getParentNode() != null && nnode.getEndOffset() <= 0) {
- CSSSourceGenerator pntFormatter = getParentFormatter(node);
- if (pntFormatter != null)
- return pntFormatter.getLengthToReformatBefore(node.getParentNode(), insertPos);
- }
- return 0;
- }
- return super.getLengthToReformatBefore(node, insertPos);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleRuleFormatter.java
deleted file mode 100644
index fca98b4463..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleRuleFormatter.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSAttr;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-
-/**
- *
- */
-public class StyleRuleFormatter extends DeclContainerFormatter {
-
- private static StyleRuleFormatter instance;
-
- /**
- *
- */
- StyleRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- public StringBuffer formatAttrChanged(ICSSNode node, ICSSAttr attr, boolean insert, AttrChangeContext context) {
- StringBuffer buf = new StringBuffer();
- if (node == null || attr == null)
- return buf;
-
- if (!ICSSStyleRule.SELECTOR.equalsIgnoreCase(attr.getName()))
- return buf;
-
- // get region to replace
- if (context != null && ((IndexedRegion) node).getEndOffset() > 0) {
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0) {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) attr).getEndOffset() - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) attr).getEndOffset() - 1);
- RegionIterator it = new RegionIterator(flatNode, region);
- it.next();
- if (it.hasNext()) {
- ITextRegion next = it.next();
- if (next.getType() == CSSRegionContexts.CSS_S)
- context.end = it.getStructuredDocumentRegion().getEndOffset(next);
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- }
- else
- context.end = it.getStructuredDocumentRegion().getEndOffset(region);
- context.start = it.getStructuredDocumentRegion().getStartOffset(region);
- }
- else {
- IStructuredDocumentRegion flatNode = node.getOwnerDocument().getModel().getStructuredDocument().getRegionAtCharacterOffset(((IndexedRegion) node).getStartOffset());
- ITextRegion region = flatNode.getRegionAtCharacterOffset(((IndexedRegion) node).getStartOffset());
- if (region.getType() == CSSRegionContexts.CSS_S) {
- context.start = flatNode.getStartOffset(region);
- context.end = flatNode.getEndOffset(region);
- }
- else {
- context.start = flatNode.getEndOffset();
- context.end = flatNode.getEndOffset();
- }
- }
- }
- // generate text
- if (insert) {
- buf.append(attr.getValue());
- appendSpaceBefore(node, "", buf);//$NON-NLS-1$
- }
- return buf;
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBetween(node, regions[i - 1], regions[i], source);
- source.append(decoratedSelectorRegion(regions[i], (i != 0) ? regions[i - 1] : null, stgy));
- }
- }
- else { // generate source
- String str = ((ICSSStyleRule) node).getSelectorText();
- // appendSpaceBefore(node,str,source);
- source.append(str);
- appendSpaceBefore(node, "{", source);//$NON-NLS-1$
- source.append("{");//$NON-NLS-1$
- }
- appendDelimBefore(node, null, source);
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBetween(node, (i == 0) ? outside[0] : regions[i - 1], regions[i], source);
- source.append(decoratedSelectorRegion(regions[i], (i != 0) ? regions[i - 1] : null, stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region))
- appendDelimBefore(node, null, source);
- else
- appendSpaceBetween(node, regions[regions.length - 1], outside[1], source);
- }
- }
-
- /**
- *
- */
- public int getAttrInsertPos(ICSSNode node, String attrName) {
- if (node == null || attrName == null || attrName.length() == 0)
- return -1;
-
- if (!ICSSStyleRule.SELECTOR.equalsIgnoreCase(attrName))
- return -1;
-
- ICSSAttr attr = (ICSSAttr) node.getAttributes().getNamedItem(ICSSStyleRule.SELECTOR);
- if (attr != null && ((IndexedRegion) attr).getEndOffset() > 0)
- return ((IndexedRegion) attr).getStartOffset();
- else
- return ((IndexedRegion) node).getStartOffset();
- }
-
- /**
- *
- */
- public synchronized static StyleRuleFormatter getInstance() {
- if (instance == null)
- instance = new StyleRuleFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleSheetFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleSheetFormatter.java
deleted file mode 100644
index 0d83caa211..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleSheetFormatter.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-
-/**
- *
- */
-public class StyleSheetFormatter extends AbstractCSSSourceFormatter {
-
- private static StyleSheetFormatter instance;
-
- /**
- *
- */
- StyleSheetFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, String toAppend, StringBuffer source, IRegion exceptFor) {
- String delim = getLineDelimiter(node);
- ICSSNode prev = (child != null) ? child.getPreviousSibling() : node.getLastChild();
- if (prev == null && child == null)
- return;
- int start = (prev != null) ? ((IndexedRegion) prev).getEndOffset() : 0;
- int end = (child != null) ? ((IndexedRegion) child).getStartOffset() : 0;
- if (start > 0 && start < end) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- // get meaning regions
- CompoundRegion[] regions = null;
- if (exceptFor == null)
- regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- else {
- String pickupType = CSSRegionContexts.CSS_DELIMITER;
- if (prev == null)
- pickupType = null;
- regions = getRegions(structuredDocument, new FormatRegion(start, end - start), exceptFor, pickupType);
- }
- // generate source
- if (prev != null) {
- appendDelimBefore(node, (regions.length > 0) ? regions[0] : null, source);
- }
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must
- // be
- // comments
- // or
- // semi_colon
- if (regions[i].getType() == CSSRegionContexts.CSS_DELIMITER) {
- // append delim after
- appendDelimBefore(node, null, source);
- }
- }
- if (prev != null)
- appendDelimBefore(node, null, source);
- }
- else if (prev != null && child != null) { // source generation :
- // between two rules
- source.append(delim);
- source.append(delim);
- }
- else if (((IndexedRegion) node).getEndOffset() > 0) {
- if (prev == null) { // source formatting : before the first rule
- ICSSNode next = child.getNextSibling();
- int pos = getChildInsertPos(node);
- if (next != null && ((IndexedRegion) next).getEndOffset() > 0)
- pos = ((IndexedRegion) next).getStartOffset();
- if (pos != 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] prevRegions = getRegions(structuredDocument, new FormatRegion(0, pos), null, null);
- if (prevRegions != null && prevRegions.length > 0)
- appendDelimBefore(node, null, source);
- }
- }
- else if (child == null) { // source formatting : after the last
- // rule
- if (start > 0 && start <= ((IndexedRegion) node).getEndOffset()) {
- appendDelimBefore(node, null, source);
- }
- else if (start <= 0) {
- int pos = getChildInsertPos(node);
- if (pos < ((IndexedRegion) node).getEndOffset()) {
- appendDelimBefore(node, null, source);
- }
- }
- }
- }
- }
-
- /**
- *
- */
- protected void formatBefore(ICSSNode node, ICSSNode child, IRegion region, String toAppend, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy)); // must be
- // comments
- }
- if (needS(outside[1])) {
- if (((IndexedRegion) child).getStartOffset() == region.getOffset() + region.getLength())
- appendDelimBefore(node, null, source);
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, StringBuffer source) {
- int end = ((IndexedRegion) node).getEndOffset();
- int start = (node.getLastChild() != null && ((IndexedRegion) node.getLastChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getLastChild()).getEndOffset() : getChildInsertPos(node);
- if (end > 0 && start < end) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- if ((regions != null && regions.length > 0 && regions[regions.length - 1].getType() == CSSRegionContexts.CSS_CDC) || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)
- appendDelimBefore(node, null, source);
- }
- else { // source generation
- if (node.getOwnerDocument().getModel() != null && node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)
- appendDelimBefore(node, null, source);
- return; // nothing
- }
- }
-
- /**
- *
- */
- protected void formatPost(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- }
-
- /**
- *
- */
- protected void formatPre(org.eclipse.wst.css.core.internal.provisional.document.ICSSNode node, java.lang.StringBuffer source) {
- int start = ((IndexedRegion) node).getStartOffset();
- int end = (node.getFirstChild() != null && ((IndexedRegion) node.getFirstChild()).getEndOffset() > 0) ? ((IndexedRegion) node.getFirstChild()).getStartOffset() : getChildInsertPos(node);
- if (end > 0) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || regions[i].getType() == CSSRegionContexts.CSS_CDO || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- if (node.getLastChild() != null && (source.length() > 0 || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)) {
- appendDelimBefore(node, null, source);
- }
- }
- else if (node.getOwnerDocument().getModel() != null && node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED) {
- appendDelimBefore(node, null, source);
- // source.append("<!--");
- // appendDelimBefore(node,null, source);
- }
- else
- return; // nothing
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, java.lang.StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]) || regions[i].getType() == CSSRegionContexts.CSS_CDO || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED)
- appendDelimBefore(node, regions[i], source);
- source.append(decoratedRegion(regions[i], 0, stgy));
- }
- if (needS(outside[1])) {
- if (isIncludesPreEnd(node, region)) {
- if (source.length() > 0 || node.getOwnerDocument().getModel().getStyleSheetType() == ICSSModel.EMBEDDED) {
- String delim = getLineDelimiter(node);
- source.append(delim);
- }
- }
- }
- }
-
- /**
- *
- */
- public int getChildInsertPos(ICSSNode node) {
- int n = ((IndexedRegion) node).getEndOffset();
- if (n > 0) {
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(n - 1);
- ITextRegion region = flatNode.getRegionAtCharacterOffset(n - 1);
- RegionIterator it = new RegionIterator(flatNode, region);
- while (it.hasPrev()) {
- ITextRegion reg = it.prev();
- if (reg.getType() == CSSRegionContexts.CSS_CDC)
- return it.getStructuredDocumentRegion().getStartOffset(reg);
- }
- return n;
- }
- return -1;
- }
-
- /**
- *
- */
- public synchronized static StyleSheetFormatter getInstance() {
- if (instance == null)
- instance = new StyleSheetFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/UnknownRuleFormatter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/UnknownRuleFormatter.java
deleted file mode 100644
index 81abef8adc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/UnknownRuleFormatter.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.formatter;
-
-
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.w3c.dom.css.CSSUnknownRule;
-
-
-/**
- *
- */
-public class UnknownRuleFormatter extends DefaultCSSSourceFormatter {
-
- private static UnknownRuleFormatter instance;
-
- /**
- *
- */
- UnknownRuleFormatter() {
- super();
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- int start = ((IndexedRegion) node).getStartOffset();
- int end = ((IndexedRegion) node).getEndOffset();
- if (end > 0) { // format source
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, new FormatRegion(start, end - start), stgy);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0)
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- }
- else { // generate source
- CSSUnknownRule rule = (CSSUnknownRule) node;
- source.append(rule.getCssText());
- }
- }
-
- /**
- *
- */
- protected void formatPre(ICSSNode node, IRegion region, StringBuffer source) {
- CSSCleanupStrategy stgy = getCleanupStrategy(node);
-
- IStructuredDocument structuredDocument = node.getOwnerDocument().getModel().getStructuredDocument();
- CompoundRegion[] regions = getRegionsWithoutWhiteSpaces(structuredDocument, region, stgy);
- CompoundRegion[] outside = getOutsideRegions(structuredDocument, region);
- for (int i = 0; i < regions.length; i++) {
- if (i != 0 || needS(outside[0]))
- appendSpaceBefore(node, regions[i], source);
- source.append(decoratedPropValueRegion(regions[i], stgy));
- }
- if (needS(outside[1]) && !isIncludesPreEnd(node, region))
- appendSpaceBefore(node, outside[1], source);
- }
-
- /**
- *
- */
- public synchronized static UnknownRuleFormatter getInstance() {
- if (instance == null)
- instance = new UnknownRuleFormatter();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCategory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCategory.java
deleted file mode 100644
index 12ac146214..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCategory.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-public interface CSSMMCategory extends CSSMMNode {
-
- String getCaption();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCharsetRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCharsetRule.java
deleted file mode 100644
index d86d46960e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCharsetRule.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMCharsetRule extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMContainer.java
deleted file mode 100644
index cedb5d5040..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMContainer.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMContainer extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMDescriptor.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMDescriptor.java
deleted file mode 100644
index 88797925f2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMDescriptor.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.wst.css.core.internal.metamodel;
-
-
-
-import java.util.Iterator;
-
-public interface CSSMMDescriptor extends CSSMMNode {
-
- Iterator getValues();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFontFaceRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFontFaceRule.java
deleted file mode 100644
index 0e8dff2506..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFontFaceRule.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMFontFaceRule extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFunction.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFunction.java
deleted file mode 100644
index 9be706e34a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFunction.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMFunction extends CSSMMNode {
-
- String getFunctionString();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMImportRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMImportRule.java
deleted file mode 100644
index c6bd2afc42..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMImportRule.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMImportRule extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMKeyword.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMKeyword.java
deleted file mode 100644
index 60837fff2b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMKeyword.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMKeyword extends CSSMMNode {
-
- String getKeywordString();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMMediaRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMMediaRule.java
deleted file mode 100644
index e16b7d9c4e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMMediaRule.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMMediaRule extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNode.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNode.java
deleted file mode 100644
index c6a5866d75..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNode.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.wst.css.core.internal.metamodel;
-
-
-
-import java.util.Iterator;
-
-public interface CSSMMNode {
- String getType();
-
- String getName();
-
- String getDescription();
-
- String getAttribute(String name);
-
- Iterator getChildNodes();
-
- Iterator getDescendants();
-
-
- static final String _PREFIX = "CSSMM."; //$NON-NLS-1$
- static final String TYPE_KEYWORD = _PREFIX + "Keyword"; //$NON-NLS-1$
- static final String TYPE_UNIT = _PREFIX + "Unit"; //$NON-NLS-1$
- static final String TYPE_FUNCTION = _PREFIX + "Function"; //$NON-NLS-1$
- static final String TYPE_STRING = _PREFIX + "String"; //$NON-NLS-1$
- static final String TYPE_STYLE_SHEET = _PREFIX + "StyleSheet"; //$NON-NLS-1$
- static final String TYPE_PROPERTY = _PREFIX + "Property"; //$NON-NLS-1$
- static final String TYPE_DESCRIPTOR = _PREFIX + "Descriptor"; //$NON-NLS-1$
- static final String TYPE_CONTAINER = _PREFIX + "Container"; //$NON-NLS-1$
- static final String TYPE_NUMBER = _PREFIX + "Number"; //$NON-NLS-1$
- static final String TYPE_SEPARATOR = _PREFIX + "Separator"; //$NON-NLS-1$
- static final String TYPE_CHARSET_RULE = _PREFIX + "CharsetRule"; //$NON-NLS-1$
- static final String TYPE_IMPORT_RULE = _PREFIX + "ImportRule"; //$NON-NLS-1$
- static final String TYPE_STYLE_RULE = _PREFIX + "StyleRule"; //$NON-NLS-1$
- static final String TYPE_MEDIA_RULE = _PREFIX + "MediaRule"; //$NON-NLS-1$
- static final String TYPE_PAGE_RULE = _PREFIX + "PageRule"; //$NON-NLS-1$
- static final String TYPE_FONT_FACE_RULE = _PREFIX + "FontFaceRule"; //$NON-NLS-1$
- static final String TYPE_CATEGORY = _PREFIX + "Category"; //$NON-NLS-1$
- static final String TYPE_META_MODEL = _PREFIX + "MetaModel"; //$NON-NLS-1$
- static final String TYPE_SELECTOR = _PREFIX + "Selector"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNumber.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNumber.java
deleted file mode 100644
index d3c0f5599a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNumber.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMNumber extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPageRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPageRule.java
deleted file mode 100644
index 57a084535e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPageRule.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMPageRule extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMProperty.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMProperty.java
deleted file mode 100644
index c92f7282a3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMProperty.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.wst.css.core.internal.metamodel;
-
-
-
-import java.util.Iterator;
-
-public interface CSSMMProperty extends CSSMMNode {
-
- String getCategoryName();
-
- Iterator getValues();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelector.java
deleted file mode 100644
index 543bbcce8c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelector.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-public interface CSSMMSelector extends CSSMMNode {
- String getSelectorType();
-
- String getSelectorString();
-
-
- static final String TYPE_EXPRESSION = "Expression"; //$NON-NLS-1$
- static final String TYPE_PSEUDO_CLASS = "PseudoClass"; //$NON-NLS-1$
- static final String TYPE_PSEUDO_ELEMENT = "PseudoElement"; //$NON-NLS-1$
-
- // embedded expression type
- static final String EXPRESSION_DESCENDANT = "descendant"; //$NON-NLS-1$
- static final String EXPRESSION_CHILD = "child"; //$NON-NLS-1$
- static final String EXPRESSION_ADJACENT = "adjacent"; //$NON-NLS-1$
- static final String EXPRESSION_UNIVERSAL = "universal"; //$NON-NLS-1$
- static final String EXPRESSION_ATTRIBUTE = "attribute"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMString.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMString.java
deleted file mode 100644
index 6d8374d835..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMString.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMString extends CSSMMNode {
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleRule.java
deleted file mode 100644
index 1ad749b691..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleRule.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMStyleRule extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleSheet.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleSheet.java
deleted file mode 100644
index 3f8b2a3686..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleSheet.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMStyleSheet extends CSSMMNode {
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMUnit.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMUnit.java
deleted file mode 100644
index 047d109134..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMUnit.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-public interface CSSMMUnit extends CSSMMNode {
-
- String getUnitString();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMetaModel.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMetaModel.java
deleted file mode 100644
index 337048de1c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMetaModel.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.wst.css.core.internal.metamodel;
-
-
-
-import java.util.Iterator;
-
-public interface CSSMetaModel extends CSSMMNode {
-
- // public interface CSSMetaModel {
- CSSMMStyleSheet getStyleSheet();
-
- /*
- * Shortcut to access property node
- */
- // Iterator getProperties();
- // Iterator getDescriptors();
- // CSSMMProperty getProperty(String propertyName);
- /*
- * access to category information
- */
- Iterator getCategories();
-
- /*
- * Utilities
- */
- // Iterator collectNodesByType(String type);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfile.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfile.java
deleted file mode 100644
index ebdc9fa9f4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfile.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel;
-
-
-
-import java.net.URL;
-
-
-public interface CSSProfile {
-
- String getProfileID();
-
- String getProfileName();
-
- URL getProfileURL();
-
- CSSMetaModel getMetaModel();
-
- boolean isDefault();
-
- String getOwnerPluginID();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.java
deleted file mode 100644
index c000cb304d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.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.wst.css.core.internal.metamodel;
-
-
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.internal.metamodelimpl.RegistryReader;
-
-
-
-public class CSSProfileRegistry {
- public synchronized static CSSProfileRegistry getInstance() {
- if (fInstance == null) {
- fInstance = new CSSProfileRegistry();
- }
- return fInstance;
- }
-
- public Iterator getProfiles() {
- return Collections.unmodifiableCollection(fProfiles.values()).iterator();
- }
-
- public CSSProfile getProfile(String profileID) {
- return (CSSProfile) fProfiles.get(profileID);
- }
-
- public CSSProfile getDefaultProfile() {
- Iterator i = getProfiles();
- while (i.hasNext()) {
- CSSProfile profile = (CSSProfile) i.next();
- if (profile.isDefault()) {
- return profile;
- }
- }
- return null;
- }
-
- /**
- * Constructor for CSSProfileRegistry.
- */
- private CSSProfileRegistry() {
- super();
- fProfiles = new HashMap();
- Iterator i = new RegistryReader().enumProfiles();
- while (i.hasNext()) {
- Object profile = i.next();
- if (profile instanceof CSSProfile) {
- fProfiles.put(((CSSProfile) profile).getProfileID(), profile);
- }
- }
- }
-
-
- private static CSSProfileRegistry fInstance = null;
- private Map fProfiles = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSFunctionID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSFunctionID.java
deleted file mode 100644
index 8a4e1659c2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSFunctionID.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.wst.css.core.internal.metamodel.util;
-
-public interface CSSFunctionID {
-
- final static String F_ATTR = "attr"; //$NON-NLS-1$
- final static String F_COUNTER = "counter"; //$NON-NLS-1$
- final static String F_RGB = "rgb"; //$NON-NLS-1$
- final static String F_RECT = "rect"; //$NON-NLS-1$
- final static String F_URI = "uri"; //$NON-NLS-1$
- final static String F_FORMAT = "format"; //$NON-NLS-1$
- final static String F_LOCAL = "local"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSKeywordID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSKeywordID.java
deleted file mode 100644
index b8f898e2a4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSKeywordID.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel.util;
-
-public interface CSSKeywordID {
-
- final static String K_100 = "100"; //$NON-NLS-1$
- final static String K_200 = "200"; //$NON-NLS-1$
- final static String K_300 = "300"; //$NON-NLS-1$
- final static String K_400 = "400"; //$NON-NLS-1$
- final static String K_500 = "500"; //$NON-NLS-1$
- final static String K_600 = "600"; //$NON-NLS-1$
- final static String K_700 = "700"; //$NON-NLS-1$
- final static String K_800 = "800"; //$NON-NLS-1$
- final static String K_900 = "900"; //$NON-NLS-1$
- final static String K_ABOVE = "above"; //$NON-NLS-1$
- final static String K_ABSOLUTE = "absolute"; //$NON-NLS-1$
- final static String K_ACTIVEBORDER = "ActiveBorder"; //$NON-NLS-1$
- final static String K_ACTIVECAPTION = "ActiveCaption"; //$NON-NLS-1$
- final static String K_ALL = "all"; //$NON-NLS-1$
- final static String K_ALWAYS = "always"; //$NON-NLS-1$
- final static String K_APPWORKSPACE = "AppWorkspace"; //$NON-NLS-1$
- final static String K_AQUA = "aqua"; //$NON-NLS-1$
- final static String K_ARMENIAN = "armenian"; //$NON-NLS-1$
- final static String K_AUTO = "auto"; //$NON-NLS-1$
- final static String K_AVOID = "avoid"; //$NON-NLS-1$
- final static String K_BACKGROUND = "Background"; //$NON-NLS-1$
- final static String K_BASELINE = "baseline"; //$NON-NLS-1$
- final static String K_BEHIND = "behind"; //$NON-NLS-1$
- final static String K_BELOW = "below"; //$NON-NLS-1$
- final static String K_BIDI_OVERRIDE = "bidi-override"; //$NON-NLS-1$
- final static String K_BLACK = "black"; //$NON-NLS-1$
- final static String K_BLINK = "blink"; //$NON-NLS-1$
- final static String K_BLOCK = "block"; //$NON-NLS-1$
- final static String K_BLUE = "blue"; //$NON-NLS-1$
- final static String K_BOLD = "bold"; //$NON-NLS-1$
- final static String K_BOLDER = "bolder"; //$NON-NLS-1$
- final static String K_BOTH = "both"; //$NON-NLS-1$
- final static String K_BOTTOM = "bottom"; //$NON-NLS-1$
- final static String K_BUTTONFACE = "ButtonFace"; //$NON-NLS-1$
- final static String K_BUTTONHIGHLIGHT = "ButtonHighlight"; //$NON-NLS-1$
- final static String K_BUTTONSHADOW = "ButtonShadow"; //$NON-NLS-1$
- final static String K_BUTTONTEXT = "ButtonText"; //$NON-NLS-1$
- final static String K_CAPITALIZE = "capitalize"; //$NON-NLS-1$
- final static String K_CAPTION = "caption"; //$NON-NLS-1$
- final static String K_CAPTIONTEXT = "CaptionText"; //$NON-NLS-1$
- final static String K_CENTER = "center"; //$NON-NLS-1$
- final static String K_CENTER_LEFT = "center-left"; //$NON-NLS-1$
- final static String K_CENTER_RIGHT = "center-right"; //$NON-NLS-1$
- final static String K_CHILD = "child"; //$NON-NLS-1$
- final static String K_CIRCLE = "circle"; //$NON-NLS-1$
- final static String K_CJK_IDEOGRAPHIC = "cjk-ideographic"; //$NON-NLS-1$
- final static String K_CLOSE_QUOTE = "close-quote"; //$NON-NLS-1$
- final static String K_CODE = "code"; //$NON-NLS-1$
- final static String K_CONDENSED = "condensed"; //$NON-NLS-1$
- final static String K_COLLAPSE = "collapse"; //$NON-NLS-1$
- final static String K_COMPACT = "compact"; //$NON-NLS-1$
- final static String K_CONTINUOUS = "continuous"; //$NON-NLS-1$
- final static String K_CROP = "crop"; //$NON-NLS-1$
- final static String K_CROSS = "cross"; //$NON-NLS-1$
- final static String K_CROSSHAIR = "crosshair"; //$NON-NLS-1$
- final static String K_CURSIVE = "cursive"; //$NON-NLS-1$
- final static String K_DASHED = "dashed"; //$NON-NLS-1$
- final static String K_DECIMAL = "decimal"; //$NON-NLS-1$
- final static String K_DECIMAL_LEADING_ZERO = "decimal-leading-zero"; //$NON-NLS-1$
- final static String K_DEFAULT = "default"; //$NON-NLS-1$
- final static String K_DIGITS = "digits"; //$NON-NLS-1$
- final static String K_DISC = "disc"; //$NON-NLS-1$
- final static String K_DOTTED = "dotted"; //$NON-NLS-1$
- final static String K_DOUBLE = "double"; //$NON-NLS-1$
- final static String K_E_RESIZE = "e-resize"; //$NON-NLS-1$
- final static String K_EMBED = "embed"; //$NON-NLS-1$
- final static String K_EXPANDED = "expanded"; //$NON-NLS-1$
- final static String K_EXTRA_CONDENSED = "extra-condensed"; //$NON-NLS-1$
- final static String K_EXTRA_EXPANDED = "extra-expanded"; //$NON-NLS-1$
- final static String K_FANTASY = "fantasy"; //$NON-NLS-1$
- final static String K_FAR_LEFT = "far-left"; //$NON-NLS-1$
- final static String K_FAR_RIGHT = "far-right"; //$NON-NLS-1$
- final static String K_FAST = "fast"; //$NON-NLS-1$
- final static String K_FASTER = "faster"; //$NON-NLS-1$
- final static String K_FEMALE = "female"; //$NON-NLS-1$
- final static String K_FIXED = "fixed"; //$NON-NLS-1$
- final static String K_FUCHSIA = "fuchsia"; //$NON-NLS-1$
- final static String K_GEORGIAN = "georgian"; //$NON-NLS-1$
- final static String K_GRAY = "gray"; //$NON-NLS-1$
- final static String K_GRAYTEXT = "GrayText"; //$NON-NLS-1$
- final static String K_GREEN = "green"; //$NON-NLS-1$
- final static String K_GROOVE = "groove"; //$NON-NLS-1$
- final static String K_HEBREW = "hebrew"; //$NON-NLS-1$
- final static String K_HELP = "help"; //$NON-NLS-1$
- final static String K_HIDDEN = "hidden"; //$NON-NLS-1$
- final static String K_HIDE = "hide"; //$NON-NLS-1$
- final static String K_HIGH = "high"; //$NON-NLS-1$
- final static String K_HIGHLIGHT = "Highlight"; //$NON-NLS-1$
- final static String K_HIGHLIGHTTEXT = "HighlightText"; //$NON-NLS-1$
- final static String K_HIGHER = "higher"; //$NON-NLS-1$
- final static String K_HIRAGANA = "hiragana"; //$NON-NLS-1$
- final static String K_HIRAGANA_IROHA = "hiragana-iroha"; //$NON-NLS-1$
- final static String K_ICON = "icon"; //$NON-NLS-1$
- final static String K_INACTIVEBORDER = "InactiveBorder"; //$NON-NLS-1$
- final static String K_INACTIVECAPTION = "InactiveCaption"; //$NON-NLS-1$
- final static String K_INACTIVECAPTIONTEXT = "InactiveCaptionText"; //$NON-NLS-1$
- final static String K_INFOBACKGROUND = "InfoBackground"; //$NON-NLS-1$
- final static String K_INFOTEXT = "InfoText"; //$NON-NLS-1$
- final static String K_INLINE = "inline"; //$NON-NLS-1$
- final static String K_INLINE_TABLE = "inline-table"; //$NON-NLS-1$
- final static String K_INSET = "inset"; //$NON-NLS-1$
- final static String K_INSIDE = "inside"; //$NON-NLS-1$
- final static String K_INVERT = "invert"; //$NON-NLS-1$
- final static String K_ITALIC = "italic"; //$NON-NLS-1$
- final static String K_JUSTIFY = "justify"; //$NON-NLS-1$
- final static String K_KATAKANA = "katakana"; //$NON-NLS-1$
- final static String K_KATAKANA_IROHA = "katakana-iroha"; //$NON-NLS-1$
- final static String K_LANDSCAPE = "landscape"; //$NON-NLS-1$
- final static String K_LARGE = "large"; //$NON-NLS-1$
- final static String K_LARGER = "larger"; //$NON-NLS-1$
- final static String K_LEFT = "left"; //$NON-NLS-1$
- final static String K_LEFT_SIDE = "left-side"; //$NON-NLS-1$
- final static String K_LEFTWARDS = "leftwards"; //$NON-NLS-1$
- final static String K_LEVEL = "level"; //$NON-NLS-1$
- final static String K_LIGHTER = "lighter"; //$NON-NLS-1$
- final static String K_LIME = "lime"; //$NON-NLS-1$
- final static String K_LINE_THROUGH = "line-through"; //$NON-NLS-1$
- final static String K_LIST_ITEM = "list-item"; //$NON-NLS-1$
- final static String K_LOUD = "loud"; //$NON-NLS-1$
- final static String K_LOW = "low"; //$NON-NLS-1$
- final static String K_LOWER = "lower"; //$NON-NLS-1$
- final static String K_LOWER_ALPHA = "lower-alpha"; //$NON-NLS-1$
- final static String K_LOWER_GREEK = "lower-greek"; //$NON-NLS-1$
- final static String K_LOWER_LATIN = "lower-latin"; //$NON-NLS-1$
- final static String K_LOWER_ROMAN = "lower-roman"; //$NON-NLS-1$
- final static String K_LOWERCASE = "lowercase"; //$NON-NLS-1$
- final static String K_LTR = "ltr"; //$NON-NLS-1$
- final static String K_MALE = "male"; //$NON-NLS-1$
- final static String K_MARKER = "marker"; //$NON-NLS-1$
- final static String K_MAROON = "maroon"; //$NON-NLS-1$
- final static String K_MEDIUM = "medium"; //$NON-NLS-1$
- final static String K_MENU = "menu"; //$NON-NLS-1$
- final static String K_MENUTEXT = "MenuText"; //$NON-NLS-1$
- final static String K_MESSAGE_BOX = "message-box"; //$NON-NLS-1$
- final static String K_MIDDLE = "middle"; //$NON-NLS-1$
- final static String K_MIX = "mix"; //$NON-NLS-1$
- final static String K_MONOSPACE = "monospace"; //$NON-NLS-1$
- final static String K_MOVE = "move"; //$NON-NLS-1$
- final static String K_N_RESIZE = "n-resize"; //$NON-NLS-1$
- final static String K_NARROWER = "narrower"; //$NON-NLS-1$
- final static String K_NAVY = "navy"; //$NON-NLS-1$
- final static String K_NE_RESIZE = "ne-resize"; //$NON-NLS-1$
- final static String K_NO_CLOSE_QUOTE = "no-close-quote"; //$NON-NLS-1$
- final static String K_NO_OPEN_QUOTE = "no-open-quote"; //$NON-NLS-1$
- final static String K_NO_REPEAT = "no-repeat"; //$NON-NLS-1$
- final static String K_NONE = "none"; //$NON-NLS-1$
- final static String K_NORMAL = "normal"; //$NON-NLS-1$
- final static String K_NOWRAP = "nowrap"; //$NON-NLS-1$
- final static String K_NW_RESIZE = "nw-resize"; //$NON-NLS-1$
- final static String K_OBLIQUE = "oblique"; //$NON-NLS-1$
- final static String K_OLIVE = "olive"; //$NON-NLS-1$
- final static String K_ONCE = "once"; //$NON-NLS-1$
- final static String K_OPEN_QUOTE = "open-quote"; //$NON-NLS-1$
- final static String K_OUTSET = "outset"; //$NON-NLS-1$
- final static String K_OUTSIDE = "outside"; //$NON-NLS-1$
- final static String K_OVERLINE = "overline"; //$NON-NLS-1$
- final static String K_POINTER = "pointer"; //$NON-NLS-1$
- final static String K_PORTRAIT = "portrait"; //$NON-NLS-1$
- final static String K_PRE = "pre"; //$NON-NLS-1$
- final static String K_PURPLE = "purple"; //$NON-NLS-1$
- final static String K_RED = "red"; //$NON-NLS-1$
- final static String K_RELATIVE = "relative"; //$NON-NLS-1$
- final static String K_REPEAT = "repeat"; //$NON-NLS-1$
- final static String K_REPEAT_X = "repeat-x"; //$NON-NLS-1$
- final static String K_REPEAT_Y = "repeat-y"; //$NON-NLS-1$
- final static String K_RIDGE = "ridge"; //$NON-NLS-1$
- final static String K_RIGHT = "right"; //$NON-NLS-1$
- final static String K_RIGHT_SIDE = "right-side"; //$NON-NLS-1$
- final static String K_RIGHTWARDS = "rightwards"; //$NON-NLS-1$
- final static String K_RTL = "rtl"; //$NON-NLS-1$
- final static String K_RUN_IN = "run-in"; //$NON-NLS-1$
- final static String K_S_RESIZE = "s-resize"; //$NON-NLS-1$
- final static String K_SANS_SERIF = "sans-serif"; //$NON-NLS-1$
- final static String K_SCROLL = "scroll"; //$NON-NLS-1$
- final static String K_SCROLLBAR = "Scrollbar"; //$NON-NLS-1$
- final static String K_SE_RESIZE = "se-resize"; //$NON-NLS-1$
- final static String K_SEMI_CONDENSED = "semi-condensed"; //$NON-NLS-1$
- final static String K_SEMI_EXPANDED = "semi-expanded"; //$NON-NLS-1$
- final static String K_SEPARATE = "separate"; //$NON-NLS-1$
- final static String K_SERIF = "serif"; //$NON-NLS-1$
- final static String K_SHOW = "show"; //$NON-NLS-1$
- final static String K_SILENT = "silent"; //$NON-NLS-1$
- final static String K_SILVER = "silver"; //$NON-NLS-1$
- final static String K_SLOW = "slow"; //$NON-NLS-1$
- final static String K_SLOWER = "slower"; //$NON-NLS-1$
- final static String K_SMALL = "small"; //$NON-NLS-1$
- final static String K_SMALL_CAPS = "small-caps"; //$NON-NLS-1$
- final static String K_SMALL_CAPTION = "small-caption"; //$NON-NLS-1$
- final static String K_SMALLER = "smaller"; //$NON-NLS-1$
- final static String K_SOFT = "soft"; //$NON-NLS-1$
- final static String K_SOLID = "solid"; //$NON-NLS-1$
- final static String K_SPELL_OUT = "spell-out"; //$NON-NLS-1$
- final static String K_SQUARE = "square"; //$NON-NLS-1$
- final static String K_STATIC = "static"; //$NON-NLS-1$
- final static String K_STATUS_BAR = "status-bar"; //$NON-NLS-1$
- final static String K_SUB = "sub"; //$NON-NLS-1$
- final static String K_SUPER = "super"; //$NON-NLS-1$
- final static String K_SW_RESIZE = "sw-resize"; //$NON-NLS-1$
- final static String K_TABLE = "table"; //$NON-NLS-1$
- final static String K_TABLE_CAPTION = "table-caption"; //$NON-NLS-1$
- final static String K_TABLE_CELL = "table-cell"; //$NON-NLS-1$
- final static String K_TABLE_COLUMN = "table-column"; //$NON-NLS-1$
- final static String K_TABLE_COLUMN_GROUP = "table-column-group"; //$NON-NLS-1$
- final static String K_TABLE_FOOTER_GROUP = "table-footer-group"; //$NON-NLS-1$
- final static String K_TABLE_HEADER_GROUP = "table-header-group"; //$NON-NLS-1$
- final static String K_TABLE_ROW = "table-row"; //$NON-NLS-1$
- final static String K_TABLE_ROW_GROUP = "table-row-group"; //$NON-NLS-1$
- final static String K_TEAL = "teal"; //$NON-NLS-1$
- final static String K_TEXT = "text"; //$NON-NLS-1$
- final static String K_TEXT_TOP = "text-top"; //$NON-NLS-1$
- final static String K_TEXT_BOTTOM = "text-bottom"; //$NON-NLS-1$
- final static String K_THICK = "thick"; //$NON-NLS-1$
- final static String K_THIN = "thin"; //$NON-NLS-1$
- final static String K_THREEDDARKSHADOW = "ThreeDDarkShadow"; //$NON-NLS-1$
- final static String K_THREEDFACE = "ThreeDFace"; //$NON-NLS-1$
- final static String K_THREEDHIGHLIGHT = "ThreeDHighlight"; //$NON-NLS-1$
- final static String K_THREEDLIGHTSHADOW = "ThreeDLightShadow"; //$NON-NLS-1$
- final static String K_THREEDSHADOW = "ThreeDShadow"; //$NON-NLS-1$
- final static String K_TOP = "top"; //$NON-NLS-1$
- final static String K_TRANSPARENT = "transparent"; //$NON-NLS-1$
- final static String K_ULTRA_CONDENSED = "ultra-condensed"; //$NON-NLS-1$
- final static String K_ULTRA_EXPANDED = "ultra-expanded"; //$NON-NLS-1$
- final static String K_UNDERLINE = "underline"; //$NON-NLS-1$
- final static String K_UPPER_ALPHA = "upper-alpha"; //$NON-NLS-1$
- final static String K_UPPER_LATIN = "upper-latin"; //$NON-NLS-1$
- final static String K_UPPER_ROMAN = "upper-roman"; //$NON-NLS-1$
- final static String K_UPPERCASE = "uppercase"; //$NON-NLS-1$
- final static String K_VISIBLE = "visible"; //$NON-NLS-1$
- final static String K_W_RESIZE = "w-resize"; //$NON-NLS-1$
- final static String K_WAIT = "wait"; //$NON-NLS-1$
- final static String K_WHITE = "white"; //$NON-NLS-1$
- final static String K_WIDER = "wider"; //$NON-NLS-1$
- final static String K_WINDOW = "Window"; //$NON-NLS-1$
- final static String K_WINDOWFRAME = "WindowFrame"; //$NON-NLS-1$
- final static String K_WINDOWTEXT = "WindowText"; //$NON-NLS-1$
- final static String K_X_FAST = "x-fast"; //$NON-NLS-1$
- final static String K_X_HIGH = "x-high"; //$NON-NLS-1$
- final static String K_X_LARGE = "x-large"; //$NON-NLS-1$
- final static String K_X_LOUD = "x-loud"; //$NON-NLS-1$
- final static String K_X_LOW = "x-low"; //$NON-NLS-1$
- final static String K_X_SLOW = "x-slow"; //$NON-NLS-1$
- final static String K_X_SMALL = "x-small"; //$NON-NLS-1$
- final static String K_X_SOFT = "x-soft"; //$NON-NLS-1$
- final static String K_XX_SMALL = "xx-small"; //$NON-NLS-1$
- final static String K_XX_LARGE = "xx-large"; //$NON-NLS-1$
- final static String K_YELLOW = "yellow"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMMTypeCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMMTypeCollector.java
deleted file mode 100644
index c26805cff6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMMTypeCollector.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.wst.css.core.internal.metamodel.util;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-
-public class CSSMMTypeCollector extends CSSMetaModelTraverser {
-
- /**
- * Constructor for TypeCollector.
- */
- public CSSMMTypeCollector() {
- super();
- }
-
- public void apply(CSSMMNode node, String type) {
- fType = type;
- fNodes = new ArrayList();
- apply(node);
- }
-
- public void collectNestedType(boolean nested) {
- fNested = nested;
- }
-
- protected short preNode(CSSMMNode node) {
- short rc = TRAV_CONT;
- if (node != null) {
- if (fType == node.getType()) {
- if (!fNodes.contains(node)) {
- fNodes.add(node);
- }
- if (!fNested) {
- rc = TRAV_PRUNE;
- }
- }
- }
- return rc;
- }
-
- public Iterator getNodes() {
- return fNodes.iterator();
- }
-
-
- private boolean fNested = false;
- private String fType = null;
- List fNodes = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMediaGroupID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMediaGroupID.java
deleted file mode 100644
index b78cf7e8f6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMediaGroupID.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel.util;
-
-public interface CSSMediaGroupID {
-
- final static String M_CONTINUOUS = "continuous"; //$NON-NLS-1$
- final static String M_PAGED = "paged"; //$NON-NLS-1$
-
- final static String M_VISUAL = "visual"; //$NON-NLS-1$
- final static String M_AURAL = "aural"; //$NON-NLS-1$
- final static String M_TACTILE = "tactile"; //$NON-NLS-1$
-
- final static String M_GRID = "grid"; //$NON-NLS-1$
- final static String M_BITMAP = "bitmap"; //$NON-NLS-1$
-
- final static String M_INTERACTIVE = "interactive"; //$NON-NLS-1$
- final static String M_STATIC = "static"; //$NON-NLS-1$
-
- final static String M_ALL = "all"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelFinder.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelFinder.java
deleted file mode 100644
index 75da697df2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelFinder.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.wst.css.core.internal.metamodel.util;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-
-public class CSSMetaModelFinder {
- /**
- * Constructor for CSSMetaModelFinder.
- */
- private CSSMetaModelFinder() {
- super();
- }
-
- static synchronized public CSSMetaModelFinder getInstance() {
- if (fInstance == null) {
- fInstance = new CSSMetaModelFinder();
- }
- return fInstance;
- }
-
- public CSSMetaModel findMetaModelFor(ICSSNode node) {
- return CSSProfileFinder.getInstance().findProfileFor(node).getMetaModel();
- }
-
- public CSSMetaModel findMetaModelFor(IStructuredModel model) {
- return CSSProfileFinder.getInstance().findProfileFor(model).getMetaModel();
-
- }
-
- // findMetaModelFor(Node) is not used.
- // Even if it is used, it can be replaced with
- // findMetaModelFor(IStructuredModel) easily
-
- public CSSMetaModel findMetaModelFor(String baseLocation) {
- return CSSProfileFinder.getInstance().findProfileFor(baseLocation).getMetaModel();
- }
-
- static private CSSMetaModelFinder fInstance = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelTraverser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelTraverser.java
deleted file mode 100644
index cabedfe569..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelTraverser.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel.util;
-
-import java.util.Iterator;
-import java.util.Stack;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-
-
-abstract public class CSSMetaModelTraverser {
-
- /**
- * Constructor for Traverser.
- */
- public CSSMetaModelTraverser() {
- super();
- }
-
- public final void apply(CSSMMNode node) {
- fTravStack = new Stack();
-
- begin(node);
- traverse(node);
- end(node);
- }
-
- private final short traverse(CSSMMNode node) {
- if (node == null) {
- return TRAV_CONT;
- }
-
- fTravStack.push(node);
-
- short rc;
- rc = preNode(node);
-
- if (rc == TRAV_CONT) {
- Iterator i = node.getChildNodes();
- while (i.hasNext()) {
- CSSMMNode child = (CSSMMNode) i.next();
- short rcChild = traverse(child);
- if (rcChild == TRAV_STOP) {
- fTravStack.pop();
- return TRAV_STOP;
- }
- }
- }
- else if (rc == TRAV_STOP) {
- fTravStack.pop();
- return TRAV_STOP;
- }
-
- rc = postNode(node);
-
- fTravStack.pop();
- return (rc == TRAV_PRUNE) ? TRAV_CONT : rc;
- }
-
- protected void begin(CSSMMNode node) {
-
- }
-
- protected void end(CSSMMNode node) {
-
- }
-
- protected short preNode(CSSMMNode node) {
- return TRAV_CONT;
- }
-
- protected short postNode(CSSMMNode node) {
- return TRAV_CONT;
- }
-
-
- Stack fTravStack = null;
-
- protected static final short TRAV_CONT = 0;
- protected static final short TRAV_STOP = 1;
- protected static final short TRAV_PRUNE = 2;
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelUtil.java
deleted file mode 100644
index 33a75ca9aa..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelUtil.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.wst.css.core.internal.metamodel.util;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMDescriptor;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMProperty;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.w3c.dom.css.CSSFontFaceRule;
-
-
-public class CSSMetaModelUtil {
- public CSSMetaModelUtil(CSSMetaModel metamodel) {
- super();
- fMetaModel = metamodel;
- }
-
- public Iterator getProperties() {
- return collectNodesByType(CSSMMNode.TYPE_PROPERTY);
- }
-
- public Iterator getDescriptors() {
- return collectNodesByType(CSSMMNode.TYPE_DESCRIPTOR);
- }
-
- public Iterator collectNodesByType(String type) {
- CSSMMTypeCollector collector = new CSSMMTypeCollector();
- collector.apply(fMetaModel, type);
- return collector.getNodes();
- }
-
- public CSSMMProperty getProperty(String propertyName) {
- Iterator iProperty = getProperties();
- while (iProperty.hasNext()) {
- CSSMMNode node = (CSSMMNode) iProperty.next();
- if (node.getName().equalsIgnoreCase(propertyName)) {
- return (CSSMMProperty) node;
- }
- }
- return null;
- }
-
- public CSSMMDescriptor getDescriptor(String descriptorName) {
- Iterator iDescriptor = getDescriptors();
- while (iDescriptor.hasNext()) {
- CSSMMNode node = (CSSMMNode) iDescriptor.next();
- if (node.getName().equalsIgnoreCase(descriptorName)) {
- return (CSSMMDescriptor) node;
- }
- }
- return null;
- }
-
- public CSSMMNode getMetaModelNodeFor(ICSSNode node) {
- if (node instanceof ICSSStyleDeclaration) {
- node = node.getParentNode();
- }
- if (node instanceof ICSSStyleDeclItem) {
- ICSSNode parent = node.getParentNode();
- if (parent != null) {
- parent = parent.getParentNode();
- }
- if (parent instanceof ICSSStyleRule) {
- return getProperty(((ICSSStyleDeclItem) node).getPropertyName());
- }
- else if (parent instanceof CSSFontFaceRule) {
- return getDescriptor(((ICSSStyleDeclItem) node).getPropertyName());
- }
- }
- if (node == null) {
- return null;
- }
-
- if (fTypeMap == null) {
- fTypeMap = new HashMap();
- fTypeMap.put(new Short(ICSSNode.STYLERULE_NODE), CSSMMNode.TYPE_STYLE_RULE);
- fTypeMap.put(new Short(ICSSNode.FONTFACERULE_NODE), CSSMMNode.TYPE_FONT_FACE_RULE);
- fTypeMap.put(new Short(ICSSNode.PAGERULE_NODE), CSSMMNode.TYPE_PAGE_RULE);
- }
-
- String nodeType = (String) fTypeMap.get(new Short(node.getNodeType()));
- if (nodeType == null) {
- return null;
- }
-
- Iterator iNodes = collectNodesByType(nodeType);
- if (iNodes.hasNext()) {
- CSSMMNode targetNode = (CSSMMNode) iNodes.next();
- if (!iNodes.hasNext()) { // it's only one
- return targetNode;
- }
- }
-
- return null;
- }
-
- public CSSMetaModel getMetaModel() {
- return fMetaModel;
- }
-
-
- private CSSMetaModel fMetaModel = null;
- private Map fTypeMap = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSNumberID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSNumberID.java
deleted file mode 100644
index bef698372d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSNumberID.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.wst.css.core.internal.metamodel.util;
-
-public interface CSSNumberID {
-
- final static java.lang.String N_ANGLE = "angle";//$NON-NLS-1$
- final static java.lang.String N_FREQUENCY = "frequency";//$NON-NLS-1$
- final static java.lang.String N_INTEGER = "integer";//$NON-NLS-1$
- final static java.lang.String N_LENGTH = "length";//$NON-NLS-1$
- final static java.lang.String N_PERCENTAGE = "percentage";//$NON-NLS-1$
- final static java.lang.String N_TIME = "time";//$NON-NLS-1$
- final static java.lang.String N_HASH = "hash"; //$NON-NLS-1$
- final static java.lang.String N_NUM = "number";//$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSProfileFinder.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSProfileFinder.java
deleted file mode 100644
index 6d7f528521..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSProfileFinder.java
+++ /dev/null
@@ -1,90 +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.wst.css.core.internal.metamodel.util;
-
-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.css.core.internal.contentproperties.CSSContentProperties;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfile;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfileRegistry;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-
-public class CSSProfileFinder {
- /**
- * Constructor for CSSProfileFinder.
- */
- private CSSProfileFinder() {
- super();
- }
-
- static synchronized public CSSProfileFinder getInstance() {
- if (fInstance == null) {
- fInstance = new CSSProfileFinder();
- }
- return fInstance;
- }
-
- public CSSProfile findProfileFor(ICSSNode node) {
- ICSSModel model = null;
- if (node != null) {
- ICSSDocument doc = node.getOwnerDocument();
- if (doc != null) {
- model = doc.getModel();
- }
- }
- return findProfileFor(model);
- }
-
- public CSSProfile findProfileFor(IStructuredModel model) {
- String baseLocation = null;
- if (model instanceof ICSSModel) {
- Object modelType = ((ICSSModel) model).getStyleSheetType();
- if (modelType == ICSSModel.EXTERNAL) {
- baseLocation = model.getBaseLocation();
- }
- else if (modelType == ICSSModel.EMBEDDED || modelType == ICSSModel.INLINE) {
- baseLocation = model.getBaseLocation(); // may be null
- }
- }
- else if (model != null) {
- baseLocation = model.getBaseLocation();
- }
- return findProfileFor(baseLocation);
- }
-
- public CSSProfile findProfileFor(String baseLocation) {
- CSSProfileRegistry reg = CSSProfileRegistry.getInstance();
- CSSProfile profile = null;
-
- if (baseLocation != null) {
- IPath path = new Path(baseLocation);
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
- if (resource == null && path.segmentCount() > 1)
- resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (resource != null) {
- String profileID = CSSContentProperties.getProperty(CSSContentProperties.CSS_PROFILE, resource, true);
- if (profileID != null && 0 < profileID.length()) {
- profile = reg.getProfile(profileID);
- }
- }
- }
-
- return (profile != null) ? profile : reg.getDefaultProfile();
- }
-
- static private CSSProfileFinder fInstance = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSPropertyID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSPropertyID.java
deleted file mode 100644
index 550e8e7139..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSPropertyID.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodel.util;
-
-public interface CSSPropertyID {
-
- final static String P_AZIMUTH = "azimuth"; //$NON-NLS-1$
- final static String P_BG = "background"; //$NON-NLS-1$
- final static String P_BG_ATTACHMENT = "background-attachment"; //$NON-NLS-1$
- final static String P_BG_COLOR = "background-color"; //$NON-NLS-1$
- final static String P_BG_IMAGE = "background-image"; //$NON-NLS-1$
- final static String P_BG_POSITION = "background-position"; //$NON-NLS-1$
- final static String P_BG_REPEAT = "background-repeat"; //$NON-NLS-1$
- final static String P_BORDER = "border"; //$NON-NLS-1$
- final static String P_BORDER_COLLAPSE = "border-collapse"; //$NON-NLS-1$
- final static String P_BORDER_COLOR = "border-color"; //$NON-NLS-1$
- final static String P_BORDER_SPACING = "border-spacing"; //$NON-NLS-1$
- final static String P_BORDER_STYLE = "border-style"; //$NON-NLS-1$
- final static String P_BORDER_TOP = "border-top"; //$NON-NLS-1$
- final static String P_BORDER_RIGHT = "border-right"; //$NON-NLS-1$
- final static String P_BORDER_BOTTOM = "border-bottom"; //$NON-NLS-1$
- final static String P_BORDER_LEFT = "border-left"; //$NON-NLS-1$
- final static String P_BORDER_TOP_COLOR = "border-top-color"; //$NON-NLS-1$
- final static String P_BORDER_RIGHT_COLOR = "border-right-color"; //$NON-NLS-1$
- final static String P_BORDER_BOTTOM_COLOR = "border-bottom-color"; //$NON-NLS-1$
- final static String P_BORDER_LEFT_COLOR = "border-left-color"; //$NON-NLS-1$
- final static String P_BORDER_TOP_STYLE = "border-top-style"; //$NON-NLS-1$
- final static String P_BORDER_RIGHT_STYLE = "border-right-style"; //$NON-NLS-1$
- final static String P_BORDER_BOTTOM_STYLE = "border-bottom-style"; //$NON-NLS-1$
- final static String P_BORDER_LEFT_STYLE = "border-left-style"; //$NON-NLS-1$
- final static String P_BORDER_TOP_WIDTH = "border-top-width"; //$NON-NLS-1$
- final static String P_BORDER_RIGHT_WIDTH = "border-right-width"; //$NON-NLS-1$
- final static String P_BORDER_BOTTOM_WIDTH = "border-bottom-width"; //$NON-NLS-1$
- final static String P_BORDER_LEFT_WIDTH = "border-left-width"; //$NON-NLS-1$
- final static String P_BORDER_WIDTH = "border-width"; //$NON-NLS-1$
- final static String P_BOTTOM = "bottom"; //$NON-NLS-1$
- final static String P_CAPTION_SIDE = "caption-side"; //$NON-NLS-1$
- final static String P_CLEAR = "clear"; //$NON-NLS-1$
- final static String P_CLIP = "clip"; //$NON-NLS-1$
- final static String P_COLOR = "color"; //$NON-NLS-1$
- final static String P_CONTENT = "content"; //$NON-NLS-1$
- final static String P_COUNTER_INCREMENT = "counter-increment"; //$NON-NLS-1$
- final static String P_COUNTER_RESET = "counter-reset"; //$NON-NLS-1$
- final static String P_CUE = "cue"; //$NON-NLS-1$
- final static String P_CUE_AFTER = "cue-after"; //$NON-NLS-1$
- final static String P_CUE_BEFORE = "cue-before"; //$NON-NLS-1$
- final static String P_CURSOR = "cursor"; //$NON-NLS-1$
- final static String P_DIRECTION = "direction"; //$NON-NLS-1$
- final static String P_DISPLAY = "display"; //$NON-NLS-1$
- final static String P_ELEVATION = "elevation"; //$NON-NLS-1$
- final static String P_EMPTY_CELLS = "empty-cells"; //$NON-NLS-1$
- final static String P_FLOAT = "float"; //$NON-NLS-1$
- final static String P_FONT = "font"; //$NON-NLS-1$
- final static String P_FONT_FAMILY = "font-family"; //$NON-NLS-1$
- final static String P_FONT_SIZE = "font-size"; //$NON-NLS-1$
- final static String P_FONT_SIZE_ADJUST = "font-size-adjust"; //$NON-NLS-1$
- final static String P_FONT_STRETCH = "font-stretch"; //$NON-NLS-1$
- final static String P_FONT_STYLE = "font-style"; //$NON-NLS-1$
- final static String P_FONT_VARIANT = "font-variant"; //$NON-NLS-1$
- final static String P_FONT_WEIGHT = "font-weight"; //$NON-NLS-1$
- final static String P_HEIGHT = "height"; //$NON-NLS-1$
- final static String P_LEFT = "left"; //$NON-NLS-1$
- final static String P_LETTER_SPACING = "letter-spacing"; //$NON-NLS-1$
- final static String P_LINE_HEIGHT = "line-height"; //$NON-NLS-1$
- final static String P_LIST_STYLE = "list-style"; //$NON-NLS-1$
- final static String P_LIST_STYLE_IMAGE = "list-style-image"; //$NON-NLS-1$
- final static String P_LIST_STYLE_POSITION = "list-style-position"; //$NON-NLS-1$
- final static String P_LIST_STYLE_TYPE = "list-style-type"; //$NON-NLS-1$
- final static String P_MARGIN = "margin"; //$NON-NLS-1$
- final static String P_MARGIN_TOP = "margin-top"; //$NON-NLS-1$
- final static String P_MARGIN_RIGHT = "margin-right"; //$NON-NLS-1$
- final static String P_MARGIN_BOTTOM = "margin-bottom"; //$NON-NLS-1$
- final static String P_MARGIN_LEFT = "margin-left"; //$NON-NLS-1$
- final static String P_MARKER_OFFSET = "marker-offset"; //$NON-NLS-1$
- final static String P_MARKS = "marks"; //$NON-NLS-1$
- final static String P_MAX_HEIGHT = "max-height"; //$NON-NLS-1$
- final static String P_MAX_WIDTH = "max-width"; //$NON-NLS-1$
- final static String P_MIN_HEIGHT = "min-height"; //$NON-NLS-1$
- final static String P_MIN_WIDTH = "min-width"; //$NON-NLS-1$
- final static String P_ORPHANS = "orphans"; //$NON-NLS-1$
- final static String P_OUTLINE = "outline"; //$NON-NLS-1$
- final static String P_OUTLINE_COLOR = "outline-color"; //$NON-NLS-1$
- final static String P_OUTLINE_STYLE = "outline-style"; //$NON-NLS-1$
- final static String P_OUTLINE_WIDTH = "outline-width"; //$NON-NLS-1$
- final static String P_OVERFLOW = "overflow"; //$NON-NLS-1$
- final static String P_PADDING = "padding"; //$NON-NLS-1$
- final static String P_PADDING_TOP = "padding-top"; //$NON-NLS-1$
- final static String P_PADDING_RIGHT = "padding-right"; //$NON-NLS-1$
- final static String P_PADDING_BOTTOM = "padding-bottom"; //$NON-NLS-1$
- final static String P_PADDING_LEFT = "padding-left"; //$NON-NLS-1$
- final static String P_PAGE = "page"; //$NON-NLS-1$
- final static String P_PAGE_BREAK_AFTER = "page-break-after"; //$NON-NLS-1$
- final static String P_PAGE_BREAK_BEFORE = "page-break-before"; //$NON-NLS-1$
- final static String P_PAGE_BREAK_INSIDE = "page-break-inside"; //$NON-NLS-1$
- final static String P_PAUSE = "pause"; //$NON-NLS-1$
- final static String P_PAUSE_AFTER = "pause-after"; //$NON-NLS-1$
- final static String P_PAUSE_BEFORE = "pause-before"; //$NON-NLS-1$
- final static String P_PITCH = "pitch"; //$NON-NLS-1$
- final static String P_PITCH_RANGE = "pitch-range"; //$NON-NLS-1$
- final static String P_PLAY_DURING = "play-during"; //$NON-NLS-1$
- final static String P_POSITION = "position"; //$NON-NLS-1$
- final static String P_QUOTES = "quotes"; //$NON-NLS-1$
- final static String P_RICHNESS = "richness"; //$NON-NLS-1$
- final static String P_RIGHT = "right"; //$NON-NLS-1$
- final static String P_SIZE = "size"; //$NON-NLS-1$
- final static String P_SPEAK = "speak"; //$NON-NLS-1$
- final static String P_SPEAK_HEADER = "speak-header"; //$NON-NLS-1$
- final static String P_SPEAK_NUMERAL = "speak-numeral"; //$NON-NLS-1$
- final static String P_SPEAK_PUNCTUATION = "speak-punctuation"; //$NON-NLS-1$
- final static String P_SPEECH_RATE = "speech-rate"; //$NON-NLS-1$
- final static String P_STRESS = "stress"; //$NON-NLS-1$
- final static String P_TABLE_LAYOUT = "table-layout"; //$NON-NLS-1$
- final static String P_TEXT_ALIGN = "text-align"; //$NON-NLS-1$
- final static String P_TEXT_DECORATION = "text-decoration"; //$NON-NLS-1$
- final static String P_TEXT_INDENT = "text-indent"; //$NON-NLS-1$
- final static String P_TEXT_SHADOW = "text-shadow"; //$NON-NLS-1$
- final static String P_TEXT_TRANSFORM = "text-transform"; //$NON-NLS-1$
- final static String P_TOP = "top"; //$NON-NLS-1$
- final static String P_UNICODE_BIDI = "unicode-bidi"; //$NON-NLS-1$
- final static String P_VERTICAL_ALIGN = "vertical-align"; //$NON-NLS-1$
- final static String P_VISIBILITY = "visibility"; //$NON-NLS-1$
- final static String P_VOICE_FAMILY = "voice-family"; //$NON-NLS-1$
- final static String P_VOLUME = "volume"; //$NON-NLS-1$
- final static String P_WHITE_SPACE = "white-space"; //$NON-NLS-1$
- final static String P_WIDOWS = "widows"; //$NON-NLS-1$
- final static String P_WIDTH = "width"; //$NON-NLS-1$
- final static String P_WORD_SPACING = "word-spacing"; //$NON-NLS-1$
- final static String P_Z_INDEX = "z-index"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSStringID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSStringID.java
deleted file mode 100644
index 6522cfbc0a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSStringID.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.wst.css.core.internal.metamodel.util;
-
-public interface CSSStringID {
-
- final static String S_ANY = "any"; //$NON-NLS-1$
- final static String S_COUNTER_IDENTIFIER = "counter-identifier"; //$NON-NLS-1$
- final static String S_FAMILY_NAME = "family-name"; //$NON-NLS-1$
- final static String S_FONT_FACE_NAME = "font-face-name"; //$NON-NLS-1$
- final static String S_PAGE_IDENTIFIER = "page-identifier"; //$NON-NLS-1$
- final static String S_SPECIFIC_VOICE = "specific-voice"; //$NON-NLS-1$
- final static String S_URANGE = "urange"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSUnitID.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSUnitID.java
deleted file mode 100644
index 0f46d32adc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSUnitID.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.wst.css.core.internal.metamodel.util;
-
-public interface CSSUnitID {
-
- final static String U_CM = "cm";//$NON-NLS-1$
- final static String U_DEG = "deg";//$NON-NLS-1$
- final static String U_EMS = "em";//$NON-NLS-1$
- final static String U_EXS = "ex";//$NON-NLS-1$
- final static String U_GRAD = "grad";//$NON-NLS-1$
- final static String U_HASH = "#";//$NON-NLS-1$
- final static String U_HZ = "Hz";//$NON-NLS-1$
- final static String U_IN = "in";//$NON-NLS-1$
- // final static String U_INTEGER = "INTEGER";//$NON-NLS-1$
- final static String U_KHZ = "kHz";//$NON-NLS-1$
- final static String U_MM = "mm";//$NON-NLS-1$
- final static String U_MS = "ms";//$NON-NLS-1$
- // final static String U_NUMBER = "NUMBER";//$NON-NLS-1$
- final static String U_PC = "pc";//$NON-NLS-1$
- final static String U_PERCENTAGE = "%";//$NON-NLS-1$
- final static String U_PT = "pt";//$NON-NLS-1$
- final static String U_PX = "px";//$NON-NLS-1$
- final static String U_RAD = "rad";//$NON-NLS-1$
- final static String U_S = "s";//$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMCategoryImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMCategoryImpl.java
deleted file mode 100644
index 34b0e6d3ba..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMCategoryImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMCategory;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-class CSSMMCategoryImpl extends CSSMMNodeImpl implements CSSMMCategory {
-
- public CSSMMCategoryImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_CATEGORY;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- public String getCaption() {
- return fCaption;
- }
-
- void setCaption(String caption) {
- fCaption = caption;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getCaption() == null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getCaption();
- }
-
-
- private String fCaption = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMCharsetRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMCharsetRuleImpl.java
deleted file mode 100644
index a064b514ed..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMCharsetRuleImpl.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.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMCharsetRule;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-class CSSMMCharsetRuleImpl extends CSSMMNodeImpl implements CSSMMCharsetRule {
-
-
- public CSSMMCharsetRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_CHARSET_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- return MetaModelErrors.NO_ERROR;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMContainerImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMContainerImpl.java
deleted file mode 100644
index eae79eae69..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMContainerImpl.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.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMContainer;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-class CSSMMContainerImpl extends CSSMMNodeImpl implements CSSMMContainer {
-
-
- public CSSMMContainerImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_CONTAINER;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_NUMBER || type == TYPE_KEYWORD || type == TYPE_FUNCTION || type == TYPE_CONTAINER);
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMDescriptorImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMDescriptorImpl.java
deleted file mode 100644
index 811d66494b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMDescriptorImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMDescriptor;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-
-class CSSMMDescriptorImpl extends CSSMMNodeImpl implements CSSMMDescriptor {
-
-
- public CSSMMDescriptorImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_DESCRIPTOR;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_NUMBER || type == TYPE_KEYWORD || type == TYPE_FUNCTION || type == TYPE_CONTAINER || type == TYPE_STRING || type == TYPE_SEPARATOR);
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- /*
- * @see CSSMMDescriptor#getValues()
- */
- public Iterator getValues() {
- ValueCollector collector = new ValueCollector();
- collector.apply(this);
- return collector.getNodes();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMFontFaceRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMFontFaceRuleImpl.java
deleted file mode 100644
index 71d1ca95f3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMFontFaceRuleImpl.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.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMFontFaceRule;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-class CSSMMFontFaceRuleImpl extends CSSMMNodeImpl implements CSSMMFontFaceRule {
-
-
- public CSSMMFontFaceRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_FONT_FACE_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return (child != null && child.getType() == TYPE_DESCRIPTOR);
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- return MetaModelErrors.NO_ERROR;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMFunctionImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMFunctionImpl.java
deleted file mode 100644
index 567f2169e8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMFunctionImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMFunction;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-class CSSMMFunctionImpl extends CSSMMNodeImpl implements CSSMMFunction {
-
- public CSSMMFunctionImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_FUNCTION;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- public String getFunctionString() {
- return fValue;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#postSetAttribute()
- */
- // void postSetAttribute() throws BadInitializationException {
- // super.postSetAttribute();
- // String name = getName();
- // if (name == null) { throw new BadInitializationException(); }
- //
- // List list = new ArrayList();
- // list.add(CSSFunctionID.F_ATTR);
- // list.add(CSSFunctionID.F_COUNTER);
- // list.add(CSSFunctionID.F_RGB);
- // list.add(CSSFunctionID.F_RECT);
- // list.add(CSSFunctionID.F_URI);
- // list.add(CSSFunctionID.F_FORMAT);
- // list.add(CSSFunctionID.F_LOCAL);
- //
- // if (! list.contains(name.toLowerCase())) {
- // throw new BadInitializationException();
- // }
- // }
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getFunctionString();
- }
-
- void setFunctionString(String value) {
- fValue = value;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getFunctionString() == null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
-
- private String fValue = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMImportRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMImportRuleImpl.java
deleted file mode 100644
index cadfe85b53..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMImportRuleImpl.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMImportRule;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-class CSSMMImportRuleImpl extends CSSMMNodeImpl implements CSSMMImportRule {
-
-
- public CSSMMImportRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_IMPORT_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- return MetaModelErrors.NO_ERROR;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMKeywordImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMKeywordImpl.java
deleted file mode 100644
index f8b5594006..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMKeywordImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMKeyword;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-class CSSMMKeywordImpl extends CSSMMNodeImpl implements CSSMMKeyword {
-
- public CSSMMKeywordImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_KEYWORD;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMKeyword#getKeywordString()
- */
- public String getKeywordString() {
- return fValue;
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getKeywordString();
- }
-
- void setKeywordString(String value) {
- fValue = value;
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getKeywordString() == null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
-
- private String fValue = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMMediaRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMMediaRuleImpl.java
deleted file mode 100644
index 2dee90727b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMMediaRuleImpl.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.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMMediaRule;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-class CSSMMMediaRuleImpl extends CSSMMNodeImpl implements CSSMMMediaRule {
-
-
- public CSSMMMediaRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_MEDIA_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- short getError() {
- return MetaModelErrors.NO_ERROR;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMNodeImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMNodeImpl.java
deleted file mode 100644
index 923d7f7922..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMNodeImpl.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-
-
-abstract class CSSMMNodeImpl implements CSSMMNode {
-
- public CSSMMNodeImpl() {
- super();
- }
-
- public abstract String getType();
-
- public String getDescription() {
- return fDescription;
- }
-
- public String getAttribute(String name) {
- if (fAttributes == null) {
- return null;
- }
- return (String) fAttributes.get(name);
- }
-
- public Iterator getChildNodes() {
- if (fChildNodes == null) {
- return Collections.EMPTY_LIST.iterator();
- }
- else {
- return Collections.unmodifiableCollection(fChildNodes).iterator();
- }
- }
-
- public Iterator getDescendants() {
- List descendants = new ArrayList();
- Iterator iChild = getChildNodes();
- while (iChild.hasNext()) {
- CSSMMNode child = (CSSMMNode) iChild.next();
- Iterator iDescendant = child.getDescendants();
- if (iDescendant.hasNext()) {
- while (iDescendant.hasNext()) {
- CSSMMNode descendant = (CSSMMNode) iDescendant.next();
- if (!descendants.contains(descendant)) {
- descendants.add(descendant);
- }
- }
- }
- else {
- if (!descendants.contains(child)) {
- descendants.add(child);
- }
- }
- }
- return Collections.unmodifiableCollection(descendants).iterator();
- }
-
- void appendChild(CSSMMNode child) {
- if (child == null) {
- return;
- }
- if (fChildNodes == null) {
- fChildNodes = new ArrayList();
- }
- if (!fChildNodes.contains(child)) {
- fChildNodes.add(child);
- ((CSSMMNodeImpl) child).fRefCount++;
- }
- }
-
- void removeChild(CSSMMNode child) {
- if (child == null || fChildNodes == null) {
- return;
- }
- Iterator i = fChildNodes.iterator();
- while (i.hasNext()) {
- if (i.next() == child) {
- i.remove();
- ((CSSMMNodeImpl) child).fRefCount--;
- return;
- }
- }
- }
-
- void removeAllChildNodes() {
- if (fChildNodes == null) {
- return;
- }
- Iterator i = fChildNodes.iterator();
- while (i.hasNext()) {
- ((CSSMMNodeImpl) i.next()).fRefCount--;
- }
- fChildNodes.clear();
- }
-
- abstract boolean canContain(CSSMMNode child);
-
- void initializeAttribute(Map attributes) throws IllegalArgumentException {
- if (fAttributes == null) {
- fAttributes = new HashMap();
- }
- fAttributes.putAll(attributes);
- postSetAttribute();
- }
-
- void setDescription(String description) {
- fDescription = description;
- }
-
- void postSetAttribute() throws IllegalArgumentException {
- // default : nop
- }
-
- abstract short getError();
-
- int getChildCount() {
- return (fChildNodes != null) ? fChildNodes.size() : 0;
- }
-
- int getReferenceCount() {
- return fRefCount;
- }
-
-
- private List fChildNodes = null;
- private String fDescription = null;
- private Map fAttributes = null;
- private int fRefCount = 0; // for error check
-
- static final String ATTR_NAME = "name"; //$NON-NLS-1$
- static final String NAME_NOT_AVAILABLE = ""; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMNumberImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMNumberImpl.java
deleted file mode 100644
index 3aae3e439f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMNumberImpl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNumber;
-
-class CSSMMNumberImpl extends CSSMMNodeImpl implements CSSMMNumber {
-
-
- public CSSMMNumberImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_NUMBER;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return (child != null && child.getType() == TYPE_UNIT);
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPageRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPageRuleImpl.java
deleted file mode 100644
index e28ccecd32..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPageRuleImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMPageRule;
-
-class CSSMMPageRuleImpl extends CSSMMNodeImpl implements CSSMMPageRule {
-
-
- public CSSMMPageRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_PAGE_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_PROPERTY || type == TYPE_SELECTOR);
- }
-
- short getError() {
- if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPropertyImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPropertyImpl.java
deleted file mode 100644
index 4b529fdac8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPropertyImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMProperty;
-
-
-class CSSMMPropertyImpl extends CSSMMNodeImpl implements CSSMMProperty {
- public CSSMMPropertyImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_PROPERTY;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_NUMBER || type == TYPE_KEYWORD || type == TYPE_FUNCTION || type == TYPE_CONTAINER || type == TYPE_STRING || type == TYPE_SEPARATOR || type == TYPE_PROPERTY);
- }
-
- /*
- * @see CSSMMProperty#getCategoryName()
- */
- public String getCategoryName() {
- return getAttribute(ATTR_CATEGORY);
- }
-
- public Iterator getValues() {
- ValueCollector collector = new ValueCollector();
- collector.apply(this);
- return collector.getNodes();
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
-
- static final String ATTR_CATEGORY = "category"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPseudoClassImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPseudoClassImpl.java
deleted file mode 100644
index a495981cac..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPseudoClassImpl.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.wst.css.core.internal.metamodelimpl;
-
-class CSSMMPseudoClassImpl extends CSSMMSelectorImpl {
-
-
- /**
- * Constructor for CSSMMPseudoClassImpl.
- */
- public CSSMMPseudoClassImpl() {
- super();
- }
-
- /*
- * @see CSSMMSelector#getSelectorType()
- */
- public String getSelectorType() {
- return TYPE_PSEUDO_CLASS;
- }
-
- void setSelectorString(String value) {
- fValue = ":" + value; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPseudoElementImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPseudoElementImpl.java
deleted file mode 100644
index eebe91731e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPseudoElementImpl.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.wst.css.core.internal.metamodelimpl;
-
-public class CSSMMPseudoElementImpl extends CSSMMSelectorImpl {
-
-
- /**
- * Constructor for CSSMMPseudoElementImpl.
- */
- public CSSMMPseudoElementImpl() {
- super();
- }
-
- /*
- * @see CSSMMSelector#getSelectorType()
- */
- public String getSelectorType() {
- return TYPE_PSEUDO_ELEMENT;
- }
-
- void setSelectorString(String value) {
- fValue = ":" + value; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMSelectorExpressionImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMSelectorExpressionImpl.java
deleted file mode 100644
index c45b4ce298..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMSelectorExpressionImpl.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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-class CSSMMSelectorExpressionImpl extends CSSMMSelectorImpl {
-
- public CSSMMSelectorExpressionImpl() {
- super();
- }
-
- /*
- * @see CSSMMSelector#getSelectorType()
- */
- public String getSelectorType() {
- return TYPE_EXPRESSION;
- }
-
- void postSetAttribute() throws IllegalArgumentException {
- super.postSetAttribute();
- String name = getName();
- if (name == null) {
- throw new IllegalArgumentException();
- }
-
- Map map = new HashMap();
- map.put(EXPRESSION_ADJACENT.toLowerCase(), "+"); //$NON-NLS-1$
- map.put(EXPRESSION_ATTRIBUTE.toLowerCase(), "[]"); //$NON-NLS-1$
- map.put(EXPRESSION_CHILD.toLowerCase(), ">"); //$NON-NLS-1$
- map.put(EXPRESSION_DESCENDANT.toLowerCase(), "' '"); //$NON-NLS-1$
- map.put(EXPRESSION_UNIVERSAL.toLowerCase(), "*"); //$NON-NLS-1$
-
- fValue = (String) map.get(name.toLowerCase());
- if (fValue == null) {
- throw new IllegalArgumentException();
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMSelectorImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMSelectorImpl.java
deleted file mode 100644
index aaf243c055..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMSelectorImpl.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.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMSelector;
-
-
-abstract class CSSMMSelectorImpl extends CSSMMNodeImpl implements CSSMMSelector {
-
- /**
- * Constructor for CSSMMSelectorImpl.
- */
- public CSSMMSelectorImpl() {
- super();
- }
-
- /*
- * @see CSSMMNode#getName()
- */
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNode#getType()
- */
- public String getType() {
- return TYPE_SELECTOR;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#getError()
- */
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- /*
- * @see CSSMMSelector#getSelectorString()
- */
- public String getSelectorString() {
- return fValue;
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getSelectorString();
- }
-
-
- protected String fValue = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStringImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStringImpl.java
deleted file mode 100644
index c8cde45bab..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStringImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMString;
-
-class CSSMMStringImpl extends CSSMMNodeImpl implements CSSMMString {
-
-
- public CSSMMStringImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_STRING;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
- /*
- * @see CSSMMNodeImpl#postSetAttribute()
- */
- // void postSetAttribute() throws BadInitializationException {
- // super.postSetAttribute();
- // String name = getName();
- // if (name == null) { throw new BadInitializationException(); }
- //
- // Map map = new HashMap();
- // map.put(CSSStringID.S_ANY.toLowerCase(), "<any>"); //$NON-NLS-1$
- // map.put(CSSStringID.S_COUNTER_IDENTIFIER.toLowerCase(), "<counter>");
- // //$NON-NLS-1$
- // map.put(CSSStringID.S_FAMILY_NAME.toLowerCase(), "<family-name>");
- // //$NON-NLS-1$
- // map.put(CSSStringID.S_FONT_FACE_NAME.toLowerCase(),
- // "<font-face-name>"); //$NON-NLS-1$
- // map.put(CSSStringID.S_PAGE_IDENTIFIER.toLowerCase(),
- // "<page-identifier>"); //$NON-NLS-1$
- // map.put(CSSStringID.S_SPECIFIC_VOICE.toLowerCase(),
- // "<specific-voice>"); //$NON-NLS-1$
- // map.put(CSSStringID.S_URANGE.toLowerCase(), "<urange>"); //$NON-NLS-1$
- //
- // fValue = (String)map.get(name.toLowerCase());
- // if (fValue == null) { throw new BadInitializationException(); }
- // }
- //
- // /*
- // * @see Object#toString()
- // */
- // public String toString() {
- // return fValue;
- // }
- //
- // private String fValue = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStyleRuleImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStyleRuleImpl.java
deleted file mode 100644
index 2c257c3f67..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStyleRuleImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMStyleRule;
-
-class CSSMMStyleRuleImpl extends CSSMMNodeImpl implements CSSMMStyleRule {
-
-
- public CSSMMStyleRuleImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_STYLE_RULE;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_PROPERTY || type == TYPE_SELECTOR);
- }
-
- short getError() {
- if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStyleSheetImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStyleSheetImpl.java
deleted file mode 100644
index 4d7fd006e3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStyleSheetImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMStyleSheet;
-
-class CSSMMStyleSheetImpl extends CSSMMNodeImpl implements CSSMMStyleSheet {
-
-
- public CSSMMStyleSheetImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_STYLE_SHEET;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_CHARSET_RULE || type == TYPE_IMPORT_RULE || type == TYPE_PAGE_RULE || type == TYPE_MEDIA_RULE || type == TYPE_FONT_FACE_RULE || type == TYPE_STYLE_RULE);
- }
-
- short getError() {
- if (getChildCount() == 0) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMUnitImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMUnitImpl.java
deleted file mode 100644
index 9c154a77ff..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMUnitImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMUnit;
-
-/**
- * CSSMMUnit : embedded type
- */
-class CSSMMUnitImpl extends CSSMMNodeImpl implements CSSMMUnit {
-
- public CSSMMUnitImpl() {
- super();
- }
-
- public String getType() {
- return TYPE_UNIT;
- }
-
- public String getName() {
- String name = getAttribute(ATTR_NAME);
- if (name != null) {
- return name.toLowerCase();
- }
- else {
- return null;
- }
- }
-
- /*
- * @see CSSMMUnit#getUnitString()
- */
- public String getUnitString() {
- return fValue;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- return false;
- }
-
- /*
- * @see CSSMMNodeImpl#postSetAttribute()
- */
- // void postSetAttribute() throws BadInitializationException {
- // super.postSetAttribute();
- // String name = getName();
- // if (name == null) { throw new BadInitializationException(); }
- // Map map = new HashMap();
- // map.put(CSSUnitID.U_CM.toLowerCase(), "cm");//$NON-NLS-1$
- // map.put(CSSUnitID.U_DEG.toLowerCase(), "deg");//$NON-NLS-1$
- // map.put(CSSUnitID.U_EMS.toLowerCase(), "em");//$NON-NLS-1$
- // map.put(CSSUnitID.U_EXS.toLowerCase(), "ex");//$NON-NLS-1$
- // map.put(CSSUnitID.U_GRAD.toLowerCase(), "grad");//$NON-NLS-1$
- // map.put(CSSUnitID.U_HASH.toLowerCase(), "#");//$NON-NLS-1$
- // map.put(CSSUnitID.U_HZ.toLowerCase(), "Hz");//$NON-NLS-1$
- // map.put(CSSUnitID.U_IN.toLowerCase(), "in");//$NON-NLS-1$
- // // map.put(CSSUnitID.U_INTEGER.toLowerCase(),
- // "(integer)");//$NON-NLS-1$
- // map.put(CSSUnitID.U_KHZ.toLowerCase(), "kHz");//$NON-NLS-1$
- // map.put(CSSUnitID.U_MM.toLowerCase(), "mm");//$NON-NLS-1$
- // map.put(CSSUnitID.U_MS.toLowerCase(), "ms");//$NON-NLS-1$
- // // map.put(CSSUnitID.U_NUMBER.toLowerCase(), "(number)");//$NON-NLS-1$
- // map.put(CSSUnitID.U_PC.toLowerCase(), "pc");//$NON-NLS-1$
- // map.put(CSSUnitID.U_PERCENTAGE.toLowerCase(), "%");//$NON-NLS-1$
- // map.put(CSSUnitID.U_PT.toLowerCase(), "pt");//$NON-NLS-1$
- // map.put(CSSUnitID.U_PX.toLowerCase(), "px");//$NON-NLS-1$
- // map.put(CSSUnitID.U_RAD.toLowerCase(), "rad");//$NON-NLS-1$
- // map.put(CSSUnitID.U_S.toLowerCase(), "s");//$NON-NLS-1$
- // fValue = (String)map.get(name.toLowerCase());
- // if (fValue == null) { throw new BadInitializationException(); }
- // }
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getUnitString();
- }
-
- void setUnitString(String value) {
- fValue = value;
- }
-
- short getError() {
- if (getName() == null) {
- return MetaModelErrors.ERROR_NOT_DEFINED;
- }
- else if (getUnitString() == null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- private String fValue = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMetaModelImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMetaModelImpl.java
deleted file mode 100644
index 2240db14ee..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMetaModelImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMStyleSheet;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-
-
-class CSSMetaModelImpl extends CSSMMNodeImpl implements CSSMetaModel {
- // class CSSMetaModelImpl implements CSSMetaModel {
- public CSSMetaModelImpl() {
- super();
- fNodePool = new NodePool();
- }
-
- public String getType() {
- return TYPE_META_MODEL;
- }
-
- public String getName() {
- return NAME_NOT_AVAILABLE;
- }
-
- /*
- * @see CSSMMNodeImpl#canContain(CSSMMNode)
- */
- boolean canContain(CSSMMNode child) {
- if (child == null) {
- return false;
- }
- String type = child.getType();
- return (type == TYPE_STYLE_SHEET || type == TYPE_CATEGORY);
- }
-
- public CSSMMStyleSheet getStyleSheet() {
- Iterator i = getChildNodes();
- while (i.hasNext()) {
- CSSMMNode node = (CSSMMNode) i.next();
- if (node.getType() == TYPE_STYLE_SHEET) {
- return (CSSMMStyleSheet) node;
- }
- }
- return null;
- // return fStyleSheet;
- }
-
- public Iterator getCategories() {
- List categories = new ArrayList();
- Iterator i = getChildNodes();
- while (i.hasNext()) {
- CSSMMNode node = (CSSMMNode) i.next();
- if (node.getType() == TYPE_CATEGORY) {
- categories.add(node);
- }
- }
- return categories.iterator();
- }
-
- void loadCompleted() {
- fNodePool = null;
- }
-
- // List fCategories = null;
- /*
- * @see CSSMMNodeImpl#isValid()
- */
- short getError() {
- if (getStyleSheet() != null) {
- return MetaModelErrors.ERROR_NO_CHILD;
- }
- else {
- return MetaModelErrors.NO_ERROR;
- }
- }
-
- NodePool getNodePool() {
- return fNodePool;
- }
-
-
- private NodePool fNodePool = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSProfileImpl.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSProfileImpl.java
deleted file mode 100644
index 9c45f443a5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSProfileImpl.java
+++ /dev/null
@@ -1,263 +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.wst.css.core.internal.metamodelimpl;
-
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Locale;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfile;
-import org.osgi.framework.Bundle;
-
-
-
-class CSSProfileImpl implements CSSProfile {
-
- /**
- * Constructor for CSSMetaModelProfileInfoImpl.
- */
- private CSSProfileImpl() {
- super();
- }
-
- /**
- * Constructor for CSSMetaModelProfileInfoImpl.
- */
- public CSSProfileImpl(String id, URL url) {
- this();
- fID = id;
- fURL = url;
- }
-
- /**
- * Constructor for CSSMetaModelProfileInfoImpl.
- */
- CSSProfileImpl(String id, URL url, String relativeURI) {
- super();
- fID = id;
- fURL = url;
- fRelativeURI = relativeURI;
- }
-
- /*
- * @see CSSMetaModelProfileInfo#getProfileID()
- */
- public String getProfileID() {
- return fID;
- }
-
- /*
- * @see CSSMetaModelProfileInfo#getProfileName()
- */
- public String getProfileName() {
- return (fName == null) ? fID : fName;
- }
-
- public CSSMetaModel getMetaModel() {
- if (fMetaModel == null) {
- try {
- InputStream input = getProfileURL().openStream();
- ProfileLoader loader = new ProfileLoader(getResourceBundle(), getLogging());
- fMetaModel = loader.loadProfile(input);
- }
- catch (IOException e) {
- Logger.logException("Cannot open stream for profile", e); //$NON-NLS-1$
- }
- }
- return fMetaModel;
- }
-
- private ResourceBundle getResourceBundle() {
- ResourceBundle resourceBundle = null;
-
- Bundle bundle = null;
- String pluginID = getOwnerPluginID();
- if (pluginID != null) {
- bundle = Platform.getBundle(pluginID);
- if (bundle != null) {
- // needed to work around FileLocator.openStream not looking for
- // files with Java naming conventions (BUG103345)
- IPath[] paths = getResourceBundlePaths();
- if (paths != null) {
- InputStream inStream = null;
- int i = 0;
- while (i < paths.length && inStream == null) {
- IPath path = paths[i];
- try {
- inStream = FileLocator.openStream(bundle, path, true);
- if (inStream != null)
- resourceBundle = new PropertyResourceBundle(inStream);
- else
- ++i;
- }
- catch (IOException e) {
- // unable to open stream with current path so just
- // try next path
- ++i;
- }
- finally {
- if (inStream != null)
- try {
- inStream.close();
- }
- catch (IOException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
- }
- }
- }
- return resourceBundle;
- }
-
- /**
- * Returns an array of potential resource bundle paths or null if there
- * are none
- *
- * @return IPath[] or null
- */
- private IPath[] getResourceBundlePaths() {
- IPath[] paths = new IPath[0];
-
- if (fRelativeURI != null) {
- // original path = location of profile.xml - profile.xml
- IPath originalPath = Path.fromOSString(fRelativeURI).removeLastSegments(1);
-
- String baseName = "cssprofile"; //$NON-NLS-1$
- Vector names = calculateBundleNames(baseName, Locale.getDefault());
-
- int a = 0;
- paths = new IPath[names.size()];
- for (int i = names.size(); i > 0; --i) {
- String bundleName = (String) names.get(i - 1);
- IPath path = originalPath.append(bundleName).addFileExtension("properties"); //$NON-NLS-1$
- paths[a] = path;
- ++a;
- }
- }
- return paths;
- }
-
- /**
- * Calculate the bundles along the search path from the base bundle to the
- * bundle specified by baseName and locale.<br />
- *
- * @param baseName
- * the base bundle name
- * @param locale
- * the locale
- * @param names
- * the vector used to return the names of the bundles along the
- * search path.
- *
- */
- private Vector calculateBundleNames(String baseName, Locale locale) {
- // this method can be deleted after BUG103345 is fixed
- final Vector result = new Vector(4); // default size 4
- final String language = locale.getLanguage();
- final int languageLength = language.length();
- final String country = locale.getCountry();
- final int countryLength = country.length();
- final String variant = locale.getVariant();
- final int variantLength = variant.length();
-
- result.addElement(baseName); // at least add base name
- if (languageLength + countryLength + variantLength == 0) {
- // The locale is "", "", "".
- return result;
- }
- final StringBuffer temp = new StringBuffer(baseName);
- temp.append('_');
- temp.append(language);
- if (languageLength > 0) {
- result.addElement(temp.toString());
- }
-
- if (countryLength + variantLength == 0) {
- return result;
- }
- temp.append('_');
- temp.append(country);
- if (countryLength > 0) {
- result.addElement(temp.toString());
- }
-
- if (variantLength == 0) {
- return result;
- }
- temp.append('_');
- temp.append(variant);
- result.addElement(temp.toString());
-
- return result;
- }
-
- /*
- * @see CSSMetaModelProfileInfo#getProfileURL()
- */
- public URL getProfileURL() {
- return fURL;
- }
-
- void setProfileName(String name) {
- fName = name;
- }
-
- public boolean isDefault() {
- return fDefault;
- }
-
- void setDefault(boolean isDefault) {
- fDefault = isDefault;
- }
-
- public String getOwnerPluginID() {
- return fOwnerPluginID;
- }
-
- void setOwnerPluginID(String pluginID) {
- fOwnerPluginID = pluginID;
- }
-
- /**
- * hidden option : logging
- */
- void setLogging(boolean logging) {
- fLogging = logging;
- }
-
- boolean getLogging() {
- return fLogging;
- }
-
-
- String fID = null;
- String fName = null;
- URL fURL = null;
- CSSMetaModel fMetaModel = null;
- String fOwnerPluginID = null;
- boolean fDefault = false;
- boolean fLogging = false;
- private String fRelativeURI = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSProfileTest.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSProfileTest.java
deleted file mode 100644
index 9ab5e320d9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSProfileTest.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.wst.css.core.internal.metamodelimpl;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfile;
-
-
-class CSSProfileTest {
-
-
- /**
- * Test use only
- */
- public static void main(String[] args) {
- if (args.length == 0)
- return;
- CSSMetaModel metamodel = null;
- try {
- CSSProfile profile = new CSSProfileImpl("test", new URL(args[0])); //$NON-NLS-1$
- metamodel = profile.getMetaModel();
- }
- catch (MalformedURLException e) {
- Logger.logException(e);
- }
- if (metamodel == null) {
- return;
- }
- /*
- * CSSMMTypeCollector collector = new CSSMMTypeCollector();
- * collector.apply(metamodel, CSSMMNode.TYPE_PROPERTY); Iterator
- * iProperty = collector.getNodes(); while (iProperty.hasNext()) {
- * CSSMMNode node = (CSSMMNode)iProperty.next();
- * System.out.println("Property " + node.getName() + " can contain:");
- * //$NON-NLS-2$ //$NON-NLS-1$ Iterator iValue =
- * node.getDescendants(); while (iValue.hasNext()) {
- * debugOut((CSSMMNode)iValue.next(), 0, false); } }
- */
- debugOut(metamodel, 0, true);
- }
-
- static void debugOut(CSSMMNode node, int depth, boolean recursive) {
- String type = node.getType();
- for (int i = 0; i < depth; i++) {
- System.out.print("\t"); //$NON-NLS-1$
- }
- System.out.print("[ " + node.getName() + "(" + type + ") ]"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- if (type == CSSMMNode.TYPE_UNIT || type == CSSMMNode.TYPE_KEYWORD || type == CSSMMNode.TYPE_FUNCTION || type == CSSMMNode.TYPE_SELECTOR) {
- System.out.print(" -> " + node.toString()); //$NON-NLS-1$
- }
- System.out.println();
-
- if (recursive) {
- java.util.Iterator iNode = node.getChildNodes();
- while (iNode.hasNext()) {
- debugOut((CSSMMNode) iNode.next(), depth + 1, true);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/MetaModelErrors.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/MetaModelErrors.java
deleted file mode 100644
index 5ca381e5a7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/MetaModelErrors.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.wst.css.core.internal.metamodelimpl;
-
-interface MetaModelErrors {
-
- static final short NO_ERROR = 0;
-
- // MASK
- static final short MASK_WARNING = 0x1000;
- static final short MASK_ERROR = 0x2000;
-
- // ERROR
- static final short ERROR_NOT_DEFINED = MASK_ERROR + 0x01;
- static final short ERROR_INVALID_NAME = MASK_ERROR + 0x04;
- static final short ERROR_INVAILD_CHILD = MASK_ERROR + 0x02;
- static final short ERROR_NO_CHILD = MASK_ERROR + 0x08;
- // static final short ERROR_NO_ESSENTIAL_CHILD = MASK_ERROR + 0x10
-
- // WARNING
- static final short WARNING_HAS_NO_CHILD = MASK_WARNING + 0x01;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/NodePool.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/NodePool.java
deleted file mode 100644
index f5cb56817e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/NodePool.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.internal.Logger;
-
-
-
-class NodePool {
-
- NodePool() {
- super();
- initializeClassNameTable();
- }
-
- CSSMMNodeImpl getNode(String tagName, String nodeName) {
- if (nodeName != null) {
- nodeName = nodeName.toLowerCase();
- }
- String className = (String) classNames.get(tagName);
- if (className == null) {
- return null;
- }
- Map nodes = (Map) nodeRegistry.get(className);
- if (nodes == null) {
- nodes = new HashMap();
- nodeRegistry.put(className, nodes);
- }
- CSSMMNodeImpl node = (CSSMMNodeImpl) nodes.get(nodeName);
- if (node == null) {
- node = createNewNode(className);
- nodes.put(nodeName, node);
- }
- return node;
- }
-
- private CSSMMNodeImpl createNewNode(String className) {
- CSSMMNodeImpl node = null;
- if (className != null) {
- className = getPackageName() + "." + className; //$NON-NLS-1$
- try {
- node = (CSSMMNodeImpl) Class.forName(className).newInstance();
- }
- catch (IllegalAccessException e) {
- Logger.logException(e);
- }
- catch (InstantiationException e) {
- Logger.logException(e);
- }
- catch (ClassNotFoundException e) {
- Logger.logException(e);
- }
- }
- // System.out.println(className + " is Created");
- return node;
- }
-
- /**
- * Error check function: find nodes that are not referred by any node
- */
- Iterator getStrayNodes() {
- List strayNodes = new ArrayList();
- Iterator iMap = nodeRegistry.values().iterator();
- while (iMap.hasNext()) {
- Map nodes = (Map) iMap.next();
- Iterator iNode = nodes.values().iterator();
- while (iNode.hasNext()) {
- CSSMMNodeImpl node = (CSSMMNodeImpl) iNode.next();
- if (node.getReferenceCount() == 0) {
- strayNodes.add(node);
- }
- }
- }
- return strayNodes.iterator();
- }
-
- // This class must not be inner class :)
- private String getPackageName() {
- if (fPackageName == null) {
- String className = getClass().getName();
- int pos = className.lastIndexOf('.');
- if (0 < pos) {
- fPackageName = className.substring(0, pos);
- }
- else {
- fPackageName = ""; //$NON-NLS-1$
- }
- }
- return fPackageName;
- }
-
- void initializeClassNameTable() {
- classNames.put(ProfileKeywords.STYLESHEET_DEF, CLASS_STYLE_SHEET);
- classNames.put(ProfileKeywords.CHARSET_RULE_DEF, CLASS_CHARSET_RULE);
- classNames.put(ProfileKeywords.CHARSET_RULE, CLASS_CHARSET_RULE);
- classNames.put(ProfileKeywords.FONTFACE_RULE_DEF, CLASS_FONT_FACE_RULE);
- classNames.put(ProfileKeywords.FONTFACE_RULE, CLASS_FONT_FACE_RULE);
- classNames.put(ProfileKeywords.IMPORT_RULE_DEF, CLASS_IMPORT_RULE);
- classNames.put(ProfileKeywords.IMPORT_RULE, CLASS_IMPORT_RULE);
- classNames.put(ProfileKeywords.MEDIA_RULE_DEF, CLASS_MEDIA_RULE);
- classNames.put(ProfileKeywords.MEDIA_RULE, CLASS_MEDIA_RULE);
- classNames.put(ProfileKeywords.PAGE_RULE_DEF, CLASS_PAGE_RULE);
- classNames.put(ProfileKeywords.PAGE_RULE, CLASS_PAGE_RULE);
- classNames.put(ProfileKeywords.STYLE_RULE_DEF, CLASS_STYLE_RULE);
- classNames.put(ProfileKeywords.STYLE_RULE, CLASS_STYLE_RULE);
- classNames.put(ProfileKeywords.PROPERTY_DEF, CLASS_PROPERTY);
- classNames.put(ProfileKeywords.PROPERTY, CLASS_PROPERTY);
- classNames.put(ProfileKeywords.DESCRIPTOR_DEF, CLASS_DESCRIPTOR);
- classNames.put(ProfileKeywords.DESCRIPTOR, CLASS_DESCRIPTOR);
- classNames.put(ProfileKeywords.CONTAINER_DEF, CLASS_CONTAINER);
- classNames.put(ProfileKeywords.CONTAINER, CLASS_CONTAINER);
- classNames.put(ProfileKeywords.NUMBER_DEF, CLASS_NUMBER);
- classNames.put(ProfileKeywords.NUMBER, CLASS_NUMBER);
- classNames.put(ProfileKeywords.KEYWORD_DEF, CLASS_KEYWORD);
- classNames.put(ProfileKeywords.KEYWORD, CLASS_KEYWORD);
- classNames.put(ProfileKeywords.UNIT, CLASS_UNIT);
- classNames.put(ProfileKeywords.UNIT_DEF, CLASS_UNIT);
- classNames.put(ProfileKeywords.FUNCTION, CLASS_FUNCTION);
- classNames.put(ProfileKeywords.FUNCTION_DEF, CLASS_FUNCTION);
- classNames.put(ProfileKeywords.SELECTOR_EXPRESSION, CLASS_SELECTOR_EXPRESSION);
- classNames.put(ProfileKeywords.PSEUDO_ELEMENT, CLASS_PSEUDO_ELEMENT);
- classNames.put(ProfileKeywords.PSEUDO_ELEMENT_DEF, CLASS_PSEUDO_ELEMENT);
- classNames.put(ProfileKeywords.PSEUDO_CLASS, CLASS_PSEUDO_CLASS);
- classNames.put(ProfileKeywords.PSEUDO_CLASS_DEF, CLASS_PSEUDO_CLASS);
- classNames.put(ProfileKeywords.STRING, CLASS_STRING);
- classNames.put(ProfileKeywords.CATEGORY_DEF, CLASS_CATEGORY);
- }
-
-
- private String fPackageName;
- /*
- * Conversion Tables nodeRegistry : class name -> hash of node instances
- * classNames : Profile Tag name -> java class name
- */
- private Map nodeRegistry = new HashMap();
- private Map classNames = new HashMap();
-
- private final static String CLASS_STYLE_SHEET = "CSSMMStyleSheetImpl"; //$NON-NLS-1$
- private final static String CLASS_CHARSET_RULE = "CSSMMCharsetRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_FONT_FACE_RULE = "CSSMMFontFaceRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_IMPORT_RULE = "CSSMMImportRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_MEDIA_RULE = "CSSMMMediaRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_PAGE_RULE = "CSSMMPageRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_STYLE_RULE = "CSSMMStyleRuleImpl"; //$NON-NLS-1$
- private final static String CLASS_PROPERTY = "CSSMMPropertyImpl"; //$NON-NLS-1$
- private final static String CLASS_DESCRIPTOR = "CSSMMDescriptorImpl"; //$NON-NLS-1$
- private final static String CLASS_CONTAINER = "CSSMMContainerImpl"; //$NON-NLS-1$
- private final static String CLASS_NUMBER = "CSSMMNumberImpl"; //$NON-NLS-1$
- private final static String CLASS_KEYWORD = "CSSMMKeywordImpl"; //$NON-NLS-1$
- private final static String CLASS_UNIT = "CSSMMUnitImpl"; //$NON-NLS-1$
- private final static String CLASS_FUNCTION = "CSSMMFunctionImpl"; //$NON-NLS-1$
- private final static String CLASS_STRING = "CSSMMStringImpl"; //$NON-NLS-1$
- private final static String CLASS_CATEGORY = "CSSMMCategoryImpl"; //$NON-NLS-1$
- private final static String CLASS_SELECTOR_EXPRESSION = "CSSMMSelectorExpressionImpl"; //$NON-NLS-1$
- private final static String CLASS_PSEUDO_CLASS = "CSSMMPseudoClassImpl"; //$NON-NLS-1$
- private final static String CLASS_PSEUDO_ELEMENT = "CSSMMPseudoElementImpl"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileHandler.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileHandler.java
deleted file mode 100644
index 82a6b33948..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileHandler.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Stack;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMSelector;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfile;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfileRegistry;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-
-class ProfileHandler extends DefaultHandler {
-
- public ProfileHandler(CSSMetaModelImpl metamodel, ResourceBundle resourceBundle, boolean logging) {
- super();
- fMetaModel = metamodel;
- fNodePool = metamodel.getNodePool();
- fResourceBundle = resourceBundle;
- fLogging = logging;
- }
-
- public ProfileHandler(CSSMetaModelImpl metamodel, ResourceBundle resourceBundle) {
- super();
- fMetaModel = metamodel;
- fNodePool = metamodel.getNodePool();
- fResourceBundle = resourceBundle;
- fLogging = false;
- }
-
- private String getResourceString(String key) {
- if (key.equals("%")) { //$NON-NLS-1$
- return key;
- }
- if (!key.startsWith("%")) { //$NON-NLS-1$
- return key;
- }
- if (key.startsWith("%%")) { //$NON-NLS-1$
- return key.substring(1);
- }
-
- if (fResourceBundle != null) {
- return fResourceBundle.getString(key.substring(1));
- }
- else {
- return key;
- }
- }
-
- public void startDocument() throws SAXException {
- // System.out.println("startDocument");
- // fNodeStack.push(metamodel);
- // fCurrentNode = null;
- }
-
- public void endDocument() throws SAXException {
- new ErrorCorrector().doCorrect(fMetaModel);
- if (fLogging) {
- Iterator i = fNodePool.getStrayNodes();
- while (i.hasNext()) {
- CSSMMNode node = (CSSMMNode) i.next();
- String str = "[CSSProfile Warning] " + node.getName(); //$NON-NLS-1$
- str += "(" + node.getType() + ") is not referred by any node."; //$NON-NLS-1$ //$NON-NLS-2$
- Logger.log(Logger.WARNING, str);
- // System.out.println(str);
- }
- }
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- TagNode tagNode = null;
- CSSMMNodeImpl parentNode = null;
- if (0 < fNodeStack.size()) {
- tagNode = (TagNode) fNodeStack.peek();
- parentNode = tagNode.node;
- }
-
- CSSMMNodeImpl node = null;
- if (qName.equals(ProfileKeywords.PROFILE_IMPORT)) { // import
- String profileName = attributes.getValue(ATTR_NAME_REFERENCE);
- importProfile(profileName);
- }
- else if (isDefinition(qName)) { // node creation
- String nodeName = attributes.getValue(ATTR_NAME_DEFINITION);
- node = fNodePool.getNode(qName, nodeName);
- if (node != null) {
- String overwrite = attributes.getValue(ATTR_OVERWRITE);
- if (overwrite == null || overwrite.equals(ATTR_VALUE_OVERWRITE_FALSE)) {
- node.removeAllChildNodes();
- }
- Map attrMap = new HashMap();
- for (int i = 0; i < attributes.getLength(); i++) {
- attrMap.put(attributes.getQName(i), attributes.getValue(i));
- }
- try {
- node.initializeAttribute(attrMap);
- }
- catch (IllegalArgumentException e) {
- Logger.logException(e);
- }
- }
- }
- else if (node == null) { // node reference
- String nodeName = attributes.getValue(ATTR_NAME_REFERENCE);
- node = fNodePool.getNode(qName, nodeName);
- }
-
- if (node != null) {
- if (parentNode != null && parentNode.canContain(node)) {
- String enabled = attributes.getValue(ATTR_ENABLED);
- if (enabled != null && enabled.equals(ATTR_VALUE_ENABLED_FALSE)) {
- parentNode.removeChild(node);
- }
- else {
- parentNode.appendChild(node);
- }
- }
- else if (node.getType() == CSSMMNode.TYPE_STYLE_SHEET || node.getType() == CSSMMNode.TYPE_CATEGORY) {
- fMetaModel.appendChild(node);
- }
- else {
- if (fLogging && parentNode != null) {
- Logger.log(Logger.ERROR, parentNode.getType() + " cannot contain " + //$NON-NLS-1$
- node.getType() + " (" + qName + ")"); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
- }
-
- fNodeStack.push(new TagNode(qName, (node != null) ? node : parentNode));
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- fNodeStack.pop();
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- TagNode tagNode = (TagNode) fNodeStack.peek();
- String tagName = tagNode.tag;
- if (tagName.equals(ProfileKeywords.KEYWORD_VALUE) || tagName.equals(ProfileKeywords.UNIT_VALUE) || tagName.equals(ProfileKeywords.FUNCTION_VALUE) || tagName.equals(ProfileKeywords.SELECTOR_VALUE) || tagName.equals(ProfileKeywords.DESCRIPTION) || tagName.equals(ProfileKeywords.CAPTION)) {
- StringBuffer buf = new StringBuffer(length);
- for (int i = 0; i < length; i++) {
- buf.append(ch[start + i]);
- }
- String value = getResourceString(buf.toString().trim());
- CSSMMNodeImpl node = tagNode.node;
- if (node != null) {
- if (node.getType() == CSSMMNode.TYPE_KEYWORD && tagName.equals(ProfileKeywords.KEYWORD_VALUE)) {
- ((CSSMMKeywordImpl) node).setKeywordString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_UNIT && tagName.equals(ProfileKeywords.UNIT_VALUE)) {
- ((CSSMMUnitImpl) node).setUnitString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_FUNCTION && tagName.equals(ProfileKeywords.FUNCTION_VALUE)) {
- ((CSSMMFunctionImpl) node).setFunctionString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_SELECTOR && ((CSSMMSelector) node).getSelectorType() == CSSMMSelector.TYPE_PSEUDO_ELEMENT) {
- ((CSSMMPseudoElementImpl) node).setSelectorString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_SELECTOR && ((CSSMMSelector) node).getSelectorType() == CSSMMSelector.TYPE_PSEUDO_CLASS) {
- ((CSSMMPseudoClassImpl) node).setSelectorString(value);
- }
- else if (node.getType() == CSSMMNode.TYPE_CATEGORY && tagName.equals(ProfileKeywords.CAPTION)) {
- ((CSSMMCategoryImpl) node).setCaption(value);
- }
- else if (tagName.equals(ProfileKeywords.DESCRIPTION)) {
- node.setDescription(value);
- }
- }
- }
- }
-
- private boolean isDefinition(String tagName) {
- return (tagName.equals(ProfileKeywords.STYLESHEET_DEF) || tagName.equals(ProfileKeywords.CHARSET_RULE_DEF) || tagName.equals(ProfileKeywords.IMPORT_RULE_DEF) || tagName.equals(ProfileKeywords.PAGE_RULE_DEF) || tagName.equals(ProfileKeywords.MEDIA_RULE_DEF) || tagName.equals(ProfileKeywords.FONTFACE_RULE_DEF) || tagName.equals(ProfileKeywords.STYLE_RULE_DEF) || tagName.equals(ProfileKeywords.KEYWORD_DEF) || tagName.equals(ProfileKeywords.NUMBER_DEF) || tagName.equals(ProfileKeywords.PROPERTY_DEF) || tagName.equals(ProfileKeywords.DESCRIPTOR_DEF) || tagName.equals(ProfileKeywords.CONTAINER_DEF) || tagName.equals(ProfileKeywords.UNIT_DEF) || tagName.equals(ProfileKeywords.FUNCTION_DEF) || tagName.equals(ProfileKeywords.STRING) || tagName.equals(ProfileKeywords.CATEGORY_DEF) || tagName.equals(ProfileKeywords.PSEUDO_CLASS_DEF) || tagName.equals(ProfileKeywords.PSEUDO_ELEMENT_DEF) || tagName.equals(ProfileKeywords.SELECTOR_EXPRESSION) || tagName.equals(ProfileKeywords.SEPARATOR));
- }
-
- private void importProfile(String profileName) {
- URL profileURL = null;
- CSSProfileRegistry reg = CSSProfileRegistry.getInstance();
- CSSProfile profile = reg.getProfile(profileName);
- if (profile != null) {
- // first: find URL by ID
- profileURL = profile.getProfileURL();
- }
- else {
- // second: find URL by filename of profile URL
- Iterator i = reg.getProfiles();
- while (i.hasNext()) {
- profile = (CSSProfile) i.next();
- URL url = profile.getProfileURL();
- if (url.getFile().endsWith(profileName)) {
- profileURL = url;
- break;
- }
- }
- }
- if (profileURL == null) {
- // final: it may be url itself
- try {
- profileURL = new URL(profileName);
- }
- catch (MalformedURLException e) {
- Logger.logException(e);
- }
- }
- if (profileURL != null) {
- try {
- ProfileLoader.loadProfile(fMetaModel, profileURL.openStream(), fResourceBundle, fLogging);
- }
- catch (IOException e) {
- Logger.logException("Cannot open stream for profile", //$NON-NLS-1$
- e);
- }
- }
- }
-
- class TagNode {
-
- String tag = null;
- CSSMMNodeImpl node = null;
-
- TagNode(String tag, CSSMMNodeImpl node) {
- this.tag = tag;
- this.node = node;
- }
- }
-
- class ErrorCorrector {
-
- void doCorrect(CSSMMNodeImpl node) {
- Iterator i = node.getChildNodes();
- ArrayList errorNodes = new ArrayList();
- while (i.hasNext()) {
- CSSMMNodeImpl child = (CSSMMNodeImpl) i.next();
- doCorrect(child);
- short error = child.getError();
- if (error != MetaModelErrors.NO_ERROR) {
- // node.removeChild(child);
- errorNodes.add(child);
-
- String str = "[CSSProfile Error] " + node.getName(); //$NON-NLS-1$
- str += "(" + node.getType() + ") contains error node: "; //$NON-NLS-1$ //$NON-NLS-2$
- str += child.getName() + "(" + child.getType() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- str += " - error code = " + error; //$NON-NLS-1$
- if (fLogging) {
- Logger.log(Logger.ERROR, str);
- // System.out.println(str);
- }
- }
- }
- int errorSize = errorNodes.size();
- if (errorSize > 0) {
- for (int j = 0; j < errorSize; j++) {
- CSSMMNodeImpl errorNode = (CSSMMNodeImpl) errorNodes.get(j);
- node.removeChild(errorNode);
- }
- }
- }
- }
-
-
- private CSSMetaModelImpl fMetaModel = null;
- private NodePool fNodePool = null;
- private Stack fNodeStack = new Stack();
- boolean fLogging = false;
- private ResourceBundle fResourceBundle = null;
-
- private final static String ATTR_NAME_DEFINITION = "name"; //$NON-NLS-1$
- private final static String ATTR_NAME_REFERENCE = "name"; //$NON-NLS-1$
- private final static String ATTR_OVERWRITE = "overwrite"; //$NON-NLS-1$
- private final static String ATTR_ENABLED = "enabled"; //$NON-NLS-1$
- private final static String ATTR_VALUE_OVERWRITE_FALSE = "false"; //$NON-NLS-1$
- private final static String ATTR_VALUE_ENABLED_FALSE = "false"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileKeywords.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileKeywords.java
deleted file mode 100644
index a377136edb..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileKeywords.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.wst.css.core.internal.metamodelimpl;
-
-interface ProfileKeywords {
-
- final static String CSS_PROFILE = "css-profile"; //$NON-NLS-1$
- final static String PROFILE_IMPORT = "profile-import"; //$NON-NLS-1$
- final static String STYLESHEET_DEF = "stylesheet-def"; //$NON-NLS-1$
- final static String CHARSET_RULE = "charset-rule"; //$NON-NLS-1$
- final static String IMPORT_RULE = "import-rule"; //$NON-NLS-1$
- final static String PAGE_RULE = "page-rule"; //$NON-NLS-1$
- final static String MEDIA_RULE = "media-rule"; //$NON-NLS-1$
- final static String FONTFACE_RULE = "fontface-rule"; //$NON-NLS-1$
- final static String STYLE_RULE = "style-rule"; //$NON-NLS-1$
- final static String CHARSET_RULE_DEF = "charset-rule-def"; //$NON-NLS-1$
- final static String IMPORT_RULE_DEF = "import-rule-def"; //$NON-NLS-1$
- final static String PAGE_RULE_DEF = "page-rule-def"; //$NON-NLS-1$
- final static String MEDIA_RULE_DEF = "media-rule-def"; //$NON-NLS-1$
- final static String FONTFACE_RULE_DEF = "fontface-rule-def"; //$NON-NLS-1$
- final static String STYLE_RULE_DEF = "style-rule-def"; //$NON-NLS-1$
- final static String FUNCTION_DEF = "function-def"; //$NON-NLS-1$
- final static String FUNCTION_VALUE = "function-value"; //$NON-NLS-1$
- final static String KEYWORD_DEF = "keyword-def"; //$NON-NLS-1$
- final static String KEYWORD_VALUE = "keyword-value"; //$NON-NLS-1$
- final static String DESCRIPTION = "description"; //$NON-NLS-1$
- final static String NUMBER_DEF = "number-def"; //$NON-NLS-1$
- final static String UNIT = "unit"; //$NON-NLS-1$
- final static String UNIT_DEF = "unit-def"; //$NON-NLS-1$
- final static String UNIT_VALUE = "unit-value"; //$NON-NLS-1$
- final static String CONTAINER_DEF = "container-def"; //$NON-NLS-1$
- final static String CATEGORY_DEF = "category-def"; //$NON-NLS-1$
- final static String CAPTION = "caption"; //$NON-NLS-1$
- final static String PROPERTY_DEF = "property-def"; //$NON-NLS-1$
- final static String DESCRIPTOR_DEF = "descriptor-def"; //$NON-NLS-1$
- final static String SELECTOR_EXPRESSION = "selector-expression"; //$NON-NLS-1$
- final static String PSEUDO_CLASS = "pseudo-class"; //$NON-NLS-1$
- final static String PSEUDO_ELEMENT = "pseudo-element"; //$NON-NLS-1$
- final static String PSEUDO_CLASS_DEF = "pseudo-class-def"; //$NON-NLS-1$
- final static String PSEUDO_ELEMENT_DEF = "pseudo-element-def"; //$NON-NLS-1$
- final static String SELECTOR_VALUE = "selector-value"; //$NON-NLS-1$
- final static String NUMBER = "number"; //$NON-NLS-1$
- final static String KEYWORD = "keyword"; //$NON-NLS-1$
- final static String FUNCTION = "function"; //$NON-NLS-1$
- final static String CONTAINER = "container"; //$NON-NLS-1$
- final static String STRING = "string"; //$NON-NLS-1$
- final static String SEPARATOR = "separator"; //$NON-NLS-1$
- final static String PROPERTY = "property"; //$NON-NLS-1$
- final static String DESCRIPTOR = "descriptor"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileLoader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileLoader.java
deleted file mode 100644
index 3442ab8483..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileLoader.java
+++ /dev/null
@@ -1,72 +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.wst.css.core.internal.metamodelimpl;
-
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ResourceBundle;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-
-
-class ProfileLoader {
-
-
- /**
- * Constructor for ProfileLoader.
- */
- private ProfileLoader() {
- super();
- }
-
- ProfileLoader(ResourceBundle resourceBundle, boolean logging) {
- this();
- fResourceBundle = resourceBundle;
- fLogging = logging;
- }
-
- static void loadProfile(CSSMetaModelImpl metamodel, InputStream input, ResourceBundle resourceBundle, boolean logging) {
- try {
- XMLReader xmlReader = XMLReaderUtil.createXMLReader(PARSER_NAME);
- // XMLReaderFactory.createXMLReader(PARSER_NAME);
- xmlReader.setContentHandler(new ProfileHandler(metamodel, resourceBundle, logging));
- xmlReader.parse(new InputSource(input));
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (SAXException e) {
- Logger.logException(e);
- }
- }
-
- CSSMetaModel loadProfile(InputStream input) {
- if (fMetaModel == null) {
- fMetaModel = new CSSMetaModelImpl();
- }
- loadProfile(fMetaModel, input, fResourceBundle, fLogging);
- fMetaModel.loadCompleted();
- return fMetaModel;
- }
-
-
- CSSMetaModelImpl fMetaModel = null;
- private final static String PARSER_NAME = "org.apache.xerces.parsers.SAXParser"; //$NON-NLS-1$
- private ResourceBundle fResourceBundle = null;
- private boolean fLogging = false;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/RegistryReader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/RegistryReader.java
deleted file mode 100644
index e4483df1d8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/RegistryReader.java
+++ /dev/null
@@ -1,113 +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.wst.css.core.internal.metamodelimpl;
-
-
-
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfile;
-import org.osgi.framework.Bundle;
-
-
-
-public class RegistryReader {
-
- //
- private String PLUGIN_ID = "org.eclipse.wst.sse.core"; //$NON-NLS-1$
- private String EXTENSION_POINT_ID = "cssprofile"; //$NON-NLS-1$
- private String TAG_NAME = "profile"; //$NON-NLS-1$
- private String ATT_ID = "id"; //$NON-NLS-1$
- private String ATT_NAME = "name"; //$NON-NLS-1$
- private String ATT_URI = "uri"; //$NON-NLS-1$
- private String ATT_DEFAULT = "default"; //$NON-NLS-1$
- private String ATT_LOGGING = "logging"; // Hidden Option //$NON-NLS-1$
-
- /**
- * Constructor for CSSMetaModelRegistryReader.
- */
- public RegistryReader() {
- super();
- }
-
- /**
- *
- */
- protected CSSProfile readElement(IConfigurationElement element) {
- CSSProfileImpl info = null;
- if (element.getName().equals(TAG_NAME)) {
- String strID = element.getAttribute(ATT_ID);
- String strNAME = element.getAttribute(ATT_NAME);
- String strURI = element.getAttribute(ATT_URI);
-
- if (strID != null || strURI != null) {
- Bundle bundle = null;
- String pluginId = element.getContributor().getName();
- bundle = Platform.getBundle(pluginId);
- if (bundle != null) {
- Path path = new Path(strURI);
- URL url = FileLocator.find(bundle, path, null);
- if (url != null) {
- try {
- url = FileLocator.toFileURL(url);
- info = new CSSProfileImpl(strID, url, strURI);
- info.setProfileName(strNAME);
- info.setDefault((element.getAttribute(ATT_DEFAULT) != null));
- info.setLogging((element.getAttribute(ATT_LOGGING) != null));
- info.setOwnerPluginID(pluginId);
- }
- catch (java.io.IOException e) {
- // through
- }
- }
- }
- }
-
- if (info == null) {
- Logger.log(Logger.ERROR, "Error reading CSS Profile: " + strID); //$NON-NLS-1$
- }
- }
- return info;
- }
-
- /**
- * We simply require an 'add' method, of what ever it is we are to read
- * into
- */
- public Iterator enumProfiles() {
- Set set = new HashSet();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint point = registry.getExtensionPoint(PLUGIN_ID, EXTENSION_POINT_ID);
- if (point != null) {
- IConfigurationElement[] elements = point.getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- CSSProfile info = readElement(elements[i]);
- // null can be returned if there's an error reading the
- // element
- if (info != null) {
- set.add(info);
- }
- }
- }
- return set.iterator();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ValueCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ValueCollector.java
deleted file mode 100644
index 7bb47ace80..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ValueCollector.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.metamodelimpl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelTraverser;
-
-
-
-class ValueCollector extends CSSMetaModelTraverser {
- public void begin(CSSMMNode node) {
- fNodes = new ArrayList();
- }
-
- protected short preNode(CSSMMNode node) {
- short rc = TRAV_CONT;
- if (node != null) {
- String type = node.getType();
- if (type == CSSMMNode.TYPE_PROPERTY || type == CSSMMNode.TYPE_DESCRIPTOR || type == CSSMMNode.TYPE_CONTAINER) {
- rc = TRAV_CONT;
- }
- else {
- if (!fNodes.contains(node)) {
- fNodes.add(node);
- rc = TRAV_PRUNE;
- }
- }
- }
- return rc;
- }
-
- public Iterator getNodes() {
- return fNodes.iterator();
- }
-
-
- private List fNodes = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/XMLReaderUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/XMLReaderUtil.java
deleted file mode 100644
index b303190221..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/XMLReaderUtil.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.wst.css.core.internal.metamodelimpl;
-
-
-
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-
-class XMLReaderUtil {
-
- static public XMLReader createXMLReader(String className) throws SAXException {
- try {
- return SAXParserFactory.newInstance().newSAXParser().getXMLReader();
- }
- catch (ParserConfigurationException e) {
- Logger.logException(e);
- }
- catch (FactoryConfigurationError e) {
- Logger.logException(e);
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/modelhandler/CSSModelLoader.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/modelhandler/CSSModelLoader.java
deleted file mode 100644
index 122a3060f6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/modelhandler/CSSModelLoader.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.wst.css.core.internal.modelhandler;
-
-
-import org.eclipse.wst.css.core.internal.document.CSSModelImpl;
-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.model.AbstractModelLoader;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-
-/**
- *
- */
-public class CSSModelLoader extends AbstractModelLoader {
- /**
- * CSSLoader constructor comment.
- */
- public CSSModelLoader() {
- super();
- }
-
- /*
- * @see IModelLoader#newModel()
- */
- public IStructuredModel newModel() {
- IStructuredModel model = new CSSModelImpl();
- // now done in create
- // model.setStructuredDocument(createNewStructuredDocument());
- // model.setFactoryRegistry(defaultFactoryRegistry());
- return model;
- }
-
- public IModelLoader newInstance() {
- return new CSSModelLoader();
- }
-
- public IDocumentLoader getDocumentLoader() {
- if (documentLoaderInstance == null) {
- documentLoaderInstance = new CSSDocumentLoader();
- }
- return documentLoaderInstance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/modelhandler/ModelHandlerForCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/modelhandler/ModelHandlerForCSS.java
deleted file mode 100644
index 42003b49be..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/modelhandler/ModelHandlerForCSS.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.wst.css.core.internal.modelhandler;
-
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentCharsetDetector;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-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 ModelHandlerForCSS extends AbstractModelHandler implements IModelHandler {
-
- /**
- * 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.wst.css.core.csssource"; //$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.wst.css.core.modelhandler"; //$NON-NLS-1$
-
- public ModelHandlerForCSS() {
- super();
- setId(ModelHandlerID);
- setAssociatedContentTypeId(AssociatedContentTypeID);
- }
-
- public IDocumentCharsetDetector getEncodingDetector() {
- return new CSSDocumentCharsetDetector();
- }
-
- public IDocumentLoader getDocumentLoader() {
- return new CSSDocumentLoader();
- }
-
- /*
- * @see ContentTypeDescription#getModelLoader()
- */
- public IModelLoader getModelLoader() {
- return new CSSModelLoader();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSRegionUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSRegionUtil.java
deleted file mode 100644
index 1f12b959cd..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSRegionUtil.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.wst.css.core.internal.parser;
-
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-
-
-public class CSSRegionUtil {
-
- /**
- */
- public static boolean isDeclarationValueType(String type) {
- return (type == CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION || type == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION || type == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH || type == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || type == CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT || type == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR || type == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE || type == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE || type == CSSRegionContexts.CSS_DECLARATION_VALUE_S || type == CSSRegionContexts.CSS_DECLARATION_VALUE_STRING || type == CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE || type == CSSRegionContexts.CSS_DECLARATION_VALUE_URI);
- }
-
- /**
- * these type can be beggining of selector
- */
- public static boolean isSelectorBegginingType(String type) {
- return (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);
- }
-
-
- /**
- *
- * @param type
- * @return
- */
- public static boolean isDeclarationType(String type) {
- return (type == CSSRegionContexts.CSS_DECLARATION_PROPERTY || type == CSSRegionContexts.CSS_DECLARATION_SEPARATOR || isDeclarationValueType(type) || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER);
- }
-
- /**
- * These types consist selector region
- *
- * @param type
- * @return
- */
- public static boolean isSelectorType(String type) {
- return (type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE || type == CSSRegionContexts.CSS_SELECTOR_CLASS || type == CSSRegionContexts.CSS_SELECTOR_COMBINATOR || type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_ID || type == CSSRegionContexts.CSS_SELECTOR_PSEUDO || type == CSSRegionContexts.CSS_SELECTOR_SEPARATOR || type == CSSRegionContexts.CSS_SELECTOR_UNIVERSAL);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSSourceParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSSourceParser.java
deleted file mode 100644
index 831336f3ba..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSSourceParser.java
+++ /dev/null
@@ -1,255 +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.wst.css.core.internal.parser;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-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.Debug;
-
-
-public class CSSSourceParser implements RegionParser {
- public static final int MODE_STYLESHEET = 0;
- public static final int MODE_DECLARATION = 1;
- public static final int MODE_DECLARATION_VALUE = 2;
-
- private long fStartTime;
- private long fStopTime;
- private ICSSTokenizer fTokenizer;
-
- public void setParserMode(int mode) {
- int initialState;
- int bufsize;
- switch (mode) {
- case MODE_STYLESHEET :
- initialState = CSSTokenizer.YYINITIAL;
- bufsize = CSSTokenizer.BUFFER_SIZE_NORMAL;
- break;
- case MODE_DECLARATION :
- initialState = CSSTokenizer.ST_DECLARATION;
- bufsize = CSSTokenizer.BUFFER_SIZE_NORMAL;
- break;
- case MODE_DECLARATION_VALUE :
- initialState = CSSTokenizer.ST_DECLARATION_PRE_VALUE;
- bufsize = CSSTokenizer.BUFFER_SIZE_SMALL;
- break;
- default :
- return;
- }
- if (0 < initialState) {
- ICSSTokenizer tokenizer = getTokenizer();
- tokenizer.setInitialState(initialState);
- tokenizer.setInitialBufferSize(bufsize);
- }
- }
-
- public IStructuredDocumentRegion getDocumentRegions() {
- IStructuredDocumentRegion headnode = null;
- if (headnode == null) {
- if (Debug.perfTest) {
- fStartTime = System.currentTimeMillis();
- }
- headnode = parseNodes();
- if (Debug.perfTest) {
- fStopTime = System.currentTimeMillis();
- System.out.println(" -- creating nodes of IStructuredDocument -- "); //$NON-NLS-1$
- System.out.println(" Time parse and init all regions: " + (fStopTime - fStartTime) + " (msecs)"); //$NON-NLS-2$//$NON-NLS-1$
- // System.out.println(" for " + fRegions.size() + "
- // Regions");//$NON-NLS-2$//$NON-NLS-1$
- System.out.println(" and " + _countNodes(headnode) + " Nodes"); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return headnode;
- }
-
- public List getRegions() {
- IStructuredDocumentRegion headNode = null;
- if (!getTokenizer().isEOF()) {
- headNode = getDocumentRegions();
- // throw new IllegalStateException("parsing has not finished");
- }
- // for memory recovery, we assume if someone
- // requests all regions, we can reset our big
- // memory consuming objects
- // but the new "getRegions" method is then more expensive.
- // I don't think its used much, though.
- List localRegionsList = getRegions(headNode);
- primReset();
- return localRegionsList;
- }
-
- /**
- * Method getRegions.
- *
- * @param headNode
- * @return List
- */
- protected List getRegions(IStructuredDocumentRegion headNode) {
- List allRegions = new ArrayList();
- IStructuredDocumentRegion currentNode = headNode;
- while (currentNode != null) {
- ITextRegionList nodeRegions = currentNode.getRegions();
- for (int i = 0; i < nodeRegions.size(); i++) {
- allRegions.add(nodeRegions.get(i));
- }
- currentNode = currentNode.getNext();
- }
- return allRegions;
- }
-
- public void reset(Reader reader) {
- primReset();
- getTokenizer().reset(reader, 0);
- }
-
- public void reset(Reader reader, int offset) {
- reset(reader);
- }
-
- public void reset(String input) {
- reset(new StringReader(input));
- }
-
- public void reset(String input, int offset) {
- reset(input);
- }
-
- public RegionParser newInstance() {
- return new CSSSourceParser();
- }
-
- private 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;
- IStructuredDocumentRegion currentNode = null;
- String type = null;
- String currentRegionType = null;
-
- while ((region = getNextRegion()) != null) {
- type = region.getType();
- if (mustBeStart(type, currentRegionType) && currentNode != null) {
- currentNode.setEnded(true);
- }
-
- if ((currentNode != null && currentNode.isEnded()) || currentNode == null) {
- if (currentNode != null && !currentNode.isEnded()) {
- currentNode.setEnded(true);
- }
- lastNode = currentNode;
- currentNode = createStructuredDocumentRegion(type);
- currentRegionType = 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());
-
- if (mustBeEnd(type)) {
- currentNode.setEnded(true);
- }
-
- if (headNode == null && currentNode != null) {
- headNode = currentNode;
- }
- }
-
- if (currentNode != null && !currentNode.isEnded()) {
- currentNode.setEnded(true);
- }
-
- primReset();
- return headNode;
- }
-
- private IStructuredDocumentRegion createStructuredDocumentRegion(String type) {
- return CSSStructuredDocumentRegionFactory.createRegion(type);
- }
- /**
- * currently public but may be made default access protected in future.
- */
- protected boolean mustBeStart(String type, String docRegionType) {
- return ((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)));
- }
- /**
- * currently public but may be made default access protected in future.
- */
- protected boolean mustBeEnd(String type) {
- return (type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER);
- }
-
- private ITextRegion getNextRegion() {
- ITextRegion region = null;
- try {
- region = getTokenizer().getNextToken();
- // DMW: 2/12/03 Removed state
- // if (region != null) {
- // fRegions.add(region);
- // }
- return region;
- }
- catch (StackOverflowError e) {
- Logger.logException(getClass().getName() + ": input could not be parsed correctly at position " + getTokenizer().getOffset(), e); //$NON-NLS-1$
- throw e;
- }
- catch (Exception e) {
- Logger.logException(getClass().getName() + ": input could not be parsed correctly at position " + getTokenizer().getOffset() + " (" + e.getLocalizedMessage() + ")", e); //$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- }
- return null;
- }
-
- private void primReset() {
-
- getTokenizer().reset(new char[0]);
- }
- /**
- * currently public but may be made default access protected in future.
- */
- public ICSSTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new CSSTokenizer();
- }
- return fTokenizer;
- }
-
-
- /**
- * This is a simple utility to count nodes. Used only for debug
- * statements.
- */
- private int _countNodes(IStructuredDocumentRegion nodes) {
- int result = 0;
- IStructuredDocumentRegion countNode = nodes;
- while (countNode != null) {
- result++;
- countNode = countNode.getNext();
- }
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSStructuredDocumentRegionFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSStructuredDocumentRegionFactory.java
deleted file mode 100644
index bd9f233c5d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSStructuredDocumentRegionFactory.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.wst.css.core.internal.parser;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-
-public class CSSStructuredDocumentRegionFactory {
- public static IStructuredDocumentRegion createRegion(String type) {
- IStructuredDocumentRegion instance = null;
- if (type != null) {
- instance = new BasicStructuredDocumentRegion();
- }
- else {
-
- }
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSTokenizer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSTokenizer.java
deleted file mode 100644
index 81e724e12d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSTokenizer.java
+++ /dev/null
@@ -1,1205 +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
- *******************************************************************************/
-/* The following code was generated by JFlex 1.2.2 on 4/28/08 5:12 PM */
-/*nlsXXX*/
-package org.eclipse.wst.css.core.internal.parser;
-
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.parser.regions.CSSTextRegionFactory;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-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.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2
- * on 4/28/08 5:12 PM from the specification file
- * <tt>file:/D:/workspaces/css/cssFormatting/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/CSSTokenizer.jflex</tt>
- */
-public class CSSTokenizer implements CSSRegionContexts, ICSSTokenizer {
-
- /** this character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** lexical states */
- final public static int ST_SELECTOR_ATTRIBUTE_NAME = 11;
- final public static int ST_IMPORT_DELIMITER = 5;
- final public static int ST_DECLARATION_PRE_VALUE = 17;
- final public static int ST_SELECTOR = 0;
- final public static int ST_CHARSET_DELIMITER = 2;
- final public static int ST_DECLARATION_VALUE = 18;
- final public static int ST_PAGE_PSEUDO_PAGE = 8;
- final public static int ST_IMPORT_URI = 3;
- final public static int ST_SELECTOR_ATTRIBUTE_END = 14;
- final public static int ST_SELECTOR_ATTRIBUTE_OPERATOR = 12;
- final public static int ST_DECLARATION = 15;
- final public static int ST_PAGE_DELIMITER = 9;
- final public static int ST_SELECTOR_ATTRIBUTE_VALUE = 13;
- final public static int ST_MEDIA_MEDIUM = 6;
- final public static int ST_CHARSET_NAME = 1;
- final public static int ST_IMPORT_MEDIUM = 4;
- final public static int ST_DECLARATION_SEPARATOR = 16;
- final public static int ST_FONT_FACE_DELIMITER = 9;
- final public static int ST_MEDIA_DELIMITER = 7;
- final public static int ST_SELECTOR_MODIFIER = 10;
- final public static int YYINITIAL = 0;
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed = "\11\0\1\12\1\17\1\0\1\4\1\20\22\0\1\6\1\31\1\11" + "\1\21\1\16\1\72\1\16\1\5\1\25\1\13\1\35\1\14\1\55" + "\1\10\1\15\1\34\12\1\1\62\1\50\1\30\1\67\1\32\1\27" + "\1\36\1\43\1\26\1\40\1\57\1\46\1\64\1\61\1\41\1\51" + "\2\2\1\24\1\52\1\65\1\54\1\53\1\2\1\23\1\44\1\47" + "\1\22\5\2\1\66\1\3\1\71\1\16\1\2\1\16\1\42\1\7" + "\1\37\1\56\1\45\1\63\1\61\1\41\1\51\2\2\1\24\1\52" + "\1\65\1\54\1\53\1\2\1\23\1\44\1\47\1\22\5\2\1\60" + "\1\70\1\33\1\70\1\0\uff80\2";
-
- /**
- * 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, 59, 118, 177, 236, 295, 354, 413, 472, 531, 590, 649, 708, 767, 826, 885, 944, 1003, 1062, 1121, 1180, 1239, 1298, 1357, 1416, 1475, 1534, 1121, 1593, 1121, 1652, 1711, 1121, 1770, 1829, 1888, 1121, 1947, 2006, 2065, 2124, 2183, 2242, 1121, 2301, 2360, 2419, 1121, 1121, 2478, 2537, 2596, 1121, 2655, 2714, 1121, 1121, 2773, 2832, 2891, 1121, 2950, 1121, 3009, 3068, 3127, 3186, 3245, 3304, 3363, 3422, 1121, 1121, 3481, 3540, 3599, 3658, 3717, 3776, 1121, 3835, 3894, 3953, 4012, 4071, 1593, 1121, 4130, 1239, 4189, 4248, 1416, 4307, 1475, 4366, 4425, 4484, 4543, 4602, 4661, 4720, 4779, 4838, 4897, 4956, 1770, 5015, 1121, 1888, 5074, 1947, 5133, 1121, 2006, 5192, 5251, 2183, 5310, 2360, 5369, 2537, 5428, 5487, 1121, 2714, 2832, 5546, 3068, 5605, 3127, 5664, 1121, 3245, 5723, 3363, 5782, 5841, 5900, 5959, 3894, 1121, 3599, 1121, 6018, 3658, 6077, 1121, 3776, 6136, 6195, 3953, 6254, 6313, 6372, 4071, 6431, 1121, 4130, 6490, 1121, 6549, 6608,
- 6667, 6726, 6785, 6844, 6903, 6962, 7021, 7080, 7139, 7198, 1770, 7257, 7316, 1888, 7375, 7434, 1947, 7493, 7552, 2006, 7611, 7670, 7729, 7788, 7847, 7906, 7965, 8024, 3127, 8083, 8142, 3245, 8201, 8260, 8319, 8378, 8437, 3658, 8496, 8555, 3776, 8614, 8673, 8732, 8791, 8850, 8909, 8968, 9027, 1121, 1121, 9086, 9145, 9204, 9263, 9322, 9381, 9440, 9499, 9558, 9617, 9676, 9735, 9794, 9853, 9912, 9971, 10030, 10089, 10148, 10207, 10266, 10325, 10384, 10443, 10502, 10561, 10620, 10679, 10738, 10797, 10856, 10915, 10974, 11033, 11092, 11151, 11210, 1121, 11269, 11328, 1121, 11387, 11446, 11505, 11564, 11623, 11682, 11741, 11800, 11859, 11918, 1121, 11977, 12036, 12095, 12154, 12213, 12272, 12331, 12390, 12449, 12508, 12567, 12626, 12685, 12744, 12803, 12862, 12921, 10797, 12980, 13039, 1121, 13098, 13157, 13216, 13275, 13334, 13393, 1121, 13452, 13511, 13570, 13629, 13688, 13747, 13806, 13865, 13924, 11741, 13983, 14042, 14101, 14160, 14219, 14278, 14337, 14396, 14455,
- 14514, 14573, 14632, 14691, 14750, 14809, 14868, 14927, 14986, 15045, 12862, 15104, 15163, 15222, 15281, 15340, 15399, 15458, 1121, 15517, 15576, 15635, 15694, 15753, 15812, 15871, 15930, 15989, 16048, 16107, 16166, 16225, 16284, 16343, 16402, 16461, 16520, 16579, 16638, 16697, 16756, 16815, 16874, 16933, 16992, 17051, 17110, 17169, 17228, 17287, 17346, 17405, 17464, 17523, 17582, 17641, 17700, 17759, 1121, 17818, 17877, 17936, 17995, 18054, 18113, 18172, 18231, 18290, 11859, 18349, 11918, 18408, 18467, 18526, 18585, 18644, 18703, 18762, 18821, 18880, 18939, 12980, 18998, 13039, 19057, 19116, 19175, 19234, 19293, 19352, 19411, 19470, 19529, 19588, 19647, 1121, 19706, 19765, 19824, 19883, 1121, 19942, 20001, 20060, 1121, 20119, 20178, 20237, 20296, 20355, 20414, 20473, 20532, 20591, 20650};
-
- /**
- * The packed transition table of the DFA
- */
- final private static String yy_packed = "\2\24\1\25\1\26\1\27\1\24\1\27\1\25\1\30" + "\1\24\1\27\2\24\1\31\1\24\2\27\1\32\3\25" + "\1\24\1\25\1\24\1\33\2\24\1\34\1\35\1\36" + "\1\37\11\25\1\24\4\25\1\24\2\25\1\24\1\25" + "\1\40\3\25\1\41\10\24\1\27\1\42\1\27\1\24" + "\1\43\1\44\1\27\4\24\2\27\7\24\1\33\2\24" + "\1\34\1\35\1\24\1\37\40\24\1\27\1\24\1\27" + "\1\24\1\43\1\24\1\27\4\24\2\27\7\24\1\33" + "\2\24\1\34\1\35\1\24\1\37\11\24\1\45\26\24" + "\1\27\1\46\1\27\1\24\1\43\1\47\1\27\4\24" + "\2\27\1\24\1\50\5\24\1\33\2\24\1\34\1\35" + "\1\24\1\37\11\24\1\45\24\24\1\51\1\52\1\27" + "\1\24\1\27\1\51\1\53\1\24\1\27\4\24\2\27" + "\1\24\3\51\1\24\1\51\1\24\1\33\2\24\1\34" + "\1\35\1\24\1\37\11\51\1\45\4\51\1\24\2\51" + "\1\24\1\51\1\24\3\51\11\24\1\27\1\24\1\27" + "\1\24\1\43\1\24\1\27\4\24\2\27\7\24\1\33" + "\2\24\1\34\1\35\1\24\1\37\11\24\1\45\4\24" + "\1\54\17\24\1\55\1\56\1\27\1\24\1\27\1\55" + "\1\57\1\24\1\27\4\24\2\27\1\24\3\55\1\24" + "\1\55\1\24\1\33\2\24\1\34\1\35\1\24\1\37"
- + "\11\55\1\24\4\55\1\24\2\55\1\24\1\55\1\24" + "\3\55\11\24\1\27\1\24\1\27\1\24\1\43\1\24" + "\1\27\4\24\2\27\7\24\1\33\2\24\1\34\1\35" + "\1\24\1\37\16\24\1\60\2\24\1\61\14\24\1\62" + "\1\63\1\27\1\24\1\27\1\62\1\64\1\24\1\27" + "\4\24\2\27\1\24\3\62\1\24\1\62\1\24\1\33" + "\2\24\1\34\1\35\1\24\1\37\11\62\1\24\4\62" + "\1\24\2\62\1\65\1\62\1\66\3\62\11\24\1\27" + "\1\24\1\27\1\24\1\43\1\24\1\27\4\24\2\27" + "\7\24\1\33\2\24\1\34\1\35\1\24\1\37\21\24" + "\1\65\16\24\1\67\1\24\1\67\1\24\1\43\1\24" + "\1\67\1\24\1\70\1\31\1\24\2\67\1\32\6\24" + "\1\33\1\24\1\70\1\34\1\35\1\36\1\37\16\24" + "\1\71\2\24\1\65\1\24\1\40\3\24\1\41\6\24" + "\1\72\1\73\1\27\1\24\1\27\1\72\1\74\1\24" + "\1\27\4\24\2\27\1\24\3\72\1\24\1\72\1\24" + "\1\33\2\24\1\34\1\35\1\24\1\37\11\72\1\24" + "\4\72\1\24\2\72\1\24\1\72\1\24\3\72\11\24" + "\1\27\1\24\1\27\1\24\1\43\1\24\1\27\4\24" + "\2\27\7\24\1\33\2\24\1\34\1\35\1\24\1\37" + "\30\24\1\75\1\76\1\77\3\24\1\100\1\101\1\27"
- + "\1\102\1\27\1\100\1\103\1\104\1\27\4\24\2\27" + "\1\24\3\100\1\24\1\100\1\24\1\33\2\24\1\34" + "\1\35\1\24\1\37\11\100\1\24\4\100\1\24\2\100" + "\1\24\1\100\1\24\3\100\11\24\1\27\1\24\1\27" + "\1\24\1\43\1\24\1\27\4\24\2\27\7\24\1\33" + "\2\24\1\34\1\35\1\24\1\37\32\24\1\77\3\24" + "\1\105\1\106\1\27\1\24\1\27\1\105\1\107\1\24" + "\1\27\4\24\2\27\1\24\3\105\1\24\1\105\1\24" + "\1\33\2\24\1\34\1\35\1\24\1\37\11\105\1\110" + "\4\105\1\24\2\105\1\24\1\105\1\24\3\105\11\24" + "\1\27\1\24\1\27\1\24\1\43\1\24\1\27\4\24" + "\2\27\7\24\1\33\2\24\1\34\1\35\1\24\1\37" + "\11\24\1\110\11\24\1\111\11\24\1\112\1\113\1\114" + "\1\27\1\115\1\27\1\113\1\116\1\117\1\27\1\120" + "\1\121\1\122\1\24\2\27\1\123\1\124\2\113\1\24" + "\1\113\1\24\1\33\1\125\1\24\1\34\1\126\1\24" + "\1\37\11\113\1\110\4\113\1\127\2\113\1\24\1\113" + "\1\24\3\113\6\24\1\112\1\113\1\114\1\130\1\115" + "\1\130\1\113\1\116\1\117\1\130\1\120\1\121\1\122" + "\1\24\2\130\1\123\1\124\2\113\1\24\1\113\1\24"
- + "\1\33\1\125\1\24\1\34\1\126\1\24\1\37\11\113" + "\1\110\4\113\1\127\2\113\1\24\1\113\1\24\3\113" + "\5\24\74\0\2\25\1\131\3\0\2\25\11\0\3\25" + "\1\0\1\25\10\0\11\25\1\0\4\25\1\0\2\25" + "\1\0\1\25\1\0\3\25\6\0\1\132\2\25\1\0" + "\2\25\1\132\2\25\1\0\4\25\2\0\16\25\1\132" + "\2\25\1\132\2\25\1\132\10\25\1\132\4\25\1\132" + "\7\25\4\0\1\27\1\0\1\27\3\0\1\27\4\0" + "\2\27\54\0\1\25\1\131\3\0\1\25\1\133\11\0" + "\3\25\1\0\1\25\10\0\11\25\1\0\4\25\1\0" + "\2\25\1\0\1\25\1\0\3\25\6\0\2\134\1\135" + "\3\0\2\134\11\0\3\134\1\0\1\134\10\0\11\134" + "\1\0\4\134\1\0\2\134\1\0\1\134\1\0\3\134" + "\6\0\2\136\1\137\3\0\2\136\11\0\3\136\1\0" + "\1\136\10\0\11\136\1\0\4\136\1\0\2\136\1\0" + "\1\136\1\0\3\136\36\0\1\140\76\0\1\141\74\0" + "\2\142\10\0\1\143\1\144\1\145\7\0\2\146\10\0" + "\1\147\1\150\3\0\1\147\1\151\11\0\3\147\1\0" + "\1\147\10\0\11\147\1\0\4\147\1\0\2\147\1\0" + "\1\147\1\0\3\147\6\0\2\152\1\153\1\0\1\154" + "\11\152\2\0\52\152\10\0\1\133\63\0\2\155\1\156"
- + "\1\0\4\155\1\154\5\155\2\0\52\155\1\0\2\157" + "\1\160\1\0\1\161\11\157\2\0\52\157\1\0\2\162" + "\1\163\1\0\4\162\1\161\5\162\2\0\52\162\23\0" + "\1\164\50\0\2\51\1\165\3\0\2\51\11\0\3\51" + "\1\0\1\51\10\0\11\51\1\0\4\51\1\0\2\51" + "\1\0\1\51\1\0\3\51\6\0\1\166\2\51\1\0" + "\2\51\1\166\2\51\1\0\4\51\2\0\16\51\1\166" + "\2\51\1\166\2\51\1\166\10\51\1\166\4\51\1\166" + "\7\51\2\0\1\51\1\165\3\0\1\51\1\133\11\0" + "\3\51\1\0\1\51\10\0\11\51\1\0\4\51\1\0" + "\2\51\1\0\1\51\1\0\3\51\6\0\2\55\1\167" + "\3\0\2\55\11\0\3\55\1\0\1\55\10\0\11\55" + "\1\0\4\55\1\0\2\55\1\0\1\55\1\0\3\55" + "\6\0\1\170\2\55\1\0\2\55\1\170\2\55\1\0" + "\4\55\2\0\16\55\1\170\2\55\1\170\2\55\1\170" + "\10\55\1\170\4\55\1\170\7\55\2\0\1\55\1\167" + "\3\0\1\55\1\133\11\0\3\55\1\0\1\55\10\0" + "\11\55\1\0\4\55\1\0\2\55\1\0\1\55\1\0" + "\3\55\6\0\2\62\1\171\3\0\2\62\11\0\3\62" + "\1\0\1\62\10\0\11\62\1\0\4\62\1\0\2\62" + "\1\0\1\62\1\0\3\62\6\0\1\172\2\62\1\0"
- + "\2\62\1\172\2\62\1\0\4\62\2\0\16\62\1\172" + "\2\62\1\172\2\62\1\172\10\62\1\172\4\62\1\172" + "\7\62\2\0\1\62\1\171\3\0\1\62\1\133\11\0" + "\3\62\1\0\1\62\10\0\11\62\1\0\4\62\1\0" + "\2\62\1\0\1\62\1\0\3\62\7\0\1\62\1\171" + "\3\0\1\62\1\173\11\0\3\62\1\0\1\62\10\0" + "\11\62\1\0\4\62\1\0\2\62\1\0\1\62\1\0" + "\3\62\5\0\4\174\1\175\1\174\1\175\3\174\1\175" + "\1\174\1\0\2\174\2\175\11\174\1\0\1\174\1\0" + "\23\174\1\0\12\174\1\0\2\72\1\176\3\0\2\72" + "\11\0\3\72\1\0\1\72\10\0\11\72\1\0\4\72" + "\1\0\2\72\1\0\1\72\1\0\3\72\6\0\1\177" + "\2\72\1\0\2\72\1\177\2\72\1\0\4\72\2\0" + "\16\72\1\177\2\72\1\177\2\72\1\177\10\72\1\177" + "\4\72\1\177\7\72\2\0\1\72\1\176\3\0\1\72" + "\1\133\11\0\3\72\1\0\1\72\10\0\11\72\1\0" + "\4\72\1\0\2\72\1\0\1\72\1\0\3\72\74\0" + "\1\75\4\0\2\100\1\200\3\0\2\100\11\0\3\100" + "\1\0\1\100\10\0\11\100\1\0\4\100\1\0\2\100" + "\1\0\1\100\1\0\3\100\6\0\1\201\2\100\1\0" + "\2\100\1\201\2\100\1\0\4\100\2\0\16\100\1\201"
- + "\2\100\1\201\2\100\1\201\10\100\1\201\4\100\1\201" + "\7\100\1\0\2\202\1\203\1\0\1\204\11\202\2\0" + "\52\202\2\0\1\100\1\200\3\0\1\100\1\133\11\0" + "\3\100\1\0\1\100\10\0\11\100\1\0\4\100\1\0" + "\2\100\1\0\1\100\1\0\3\100\6\0\2\205\1\206" + "\1\0\4\205\1\204\5\205\2\0\52\205\1\0\2\105" + "\1\207\3\0\2\105\11\0\3\105\1\0\1\105\10\0" + "\11\105\1\0\4\105\1\0\2\105\1\0\1\105\1\0" + "\3\105\6\0\1\210\2\105\1\0\2\105\1\210\2\105" + "\1\0\4\105\2\0\16\105\1\210\2\105\1\210\2\105" + "\1\210\10\105\1\210\4\105\1\210\7\105\2\0\1\105" + "\1\207\3\0\1\105\1\133\11\0\3\105\1\0\1\105" + "\10\0\11\105\1\0\4\105\1\0\2\105\1\0\1\105" + "\1\0\3\105\6\0\1\112\1\211\1\212\3\0\1\211" + "\1\213\4\0\1\214\4\0\3\211\1\0\1\211\10\0" + "\11\211\1\0\4\211\1\0\2\211\1\0\1\211\1\0" + "\3\211\4\0\1\215\1\0\2\113\1\216\3\0\2\113" + "\11\0\3\113\1\217\1\113\10\0\11\113\1\0\4\113" + "\1\0\2\113\1\0\1\113\1\0\3\113\6\0\1\220" + "\2\113\1\0\2\113\1\220\2\113\1\0\4\113\2\0"
- + "\16\113\1\220\2\113\1\220\2\113\1\220\10\113\1\220" + "\4\113\1\220\7\113\1\0\2\221\1\222\1\0\1\223" + "\11\221\2\0\52\221\1\0\1\112\1\113\1\216\3\0" + "\1\113\1\133\4\0\1\214\4\0\3\113\1\0\1\113" + "\10\0\11\113\1\0\4\113\1\0\2\113\1\0\1\113" + "\1\0\3\113\6\0\2\224\1\225\1\0\4\224\1\223" + "\5\224\2\0\52\224\1\0\1\112\13\0\1\214\56\0" + "\1\226\72\0\2\227\1\230\3\0\2\227\11\0\3\227" + "\1\0\1\227\10\0\11\227\1\0\4\227\1\0\2\227" + "\1\0\1\227\1\0\3\227\6\0\2\113\1\216\3\0" + "\2\113\3\0\1\231\5\0\1\113\1\232\1\113\1\217" + "\1\113\10\0\11\113\1\0\4\113\1\0\2\113\1\0" + "\1\113\1\0\3\113\11\0\1\233\1\0\1\233\3\0" + "\1\233\4\0\2\233\30\0\1\234\21\0\4\235\1\236" + "\1\235\1\236\3\235\1\236\4\235\2\236\12\235\1\0" + "\14\235\1\0\22\235\1\0\1\237\1\25\1\131\1\25" + "\1\0\1\25\1\237\1\25\1\0\1\25\4\0\2\25" + "\1\0\3\25\1\0\1\25\10\0\1\237\2\25\1\237" + "\2\25\1\237\2\25\1\0\4\25\1\0\1\237\1\25" + "\1\0\1\25\1\0\1\237\2\25\37\0\1\240\41\0"
- + "\1\241\2\134\1\0\2\134\1\241\2\134\1\0\4\134" + "\2\0\16\134\1\241\2\134\1\241\2\134\1\241\10\134" + "\1\241\4\134\1\241\7\134\1\0\1\242\2\136\1\0" + "\2\136\1\242\2\136\1\0\4\136\2\0\16\136\1\242" + "\2\136\1\242\2\136\1\242\10\136\1\242\4\136\1\242" + "\7\136\10\0\1\243\62\0\35\141\1\244\35\141\41\0" + "\1\245\103\0\1\246\65\0\2\247\66\0\2\250\103\0" + "\1\251\17\0\2\147\1\150\3\0\2\147\11\0\3\147" + "\1\252\1\147\10\0\11\147\1\0\4\147\1\0\2\147" + "\1\0\1\147\1\0\3\147\6\0\1\253\2\147\1\0" + "\2\147\1\253\2\147\1\0\4\147\2\0\16\147\1\253" + "\2\147\1\253\2\147\1\253\10\147\1\253\4\147\1\253" + "\7\147\2\0\1\147\1\150\3\0\1\147\12\0\3\147" + "\1\0\1\147\10\0\11\147\1\0\4\147\1\0\2\147" + "\1\0\1\147\1\0\3\147\6\0\1\254\1\152\1\153" + "\1\152\1\255\1\152\1\254\10\152\1\256\16\152\1\254" + "\2\152\1\254\2\152\1\254\10\152\1\254\4\152\1\254" + "\7\152\1\0\1\257\1\155\1\156\3\155\1\257\1\155" + "\1\260\6\155\1\261\16\155\1\257\2\155\1\257\2\155"
- + "\1\257\10\155\1\257\4\155\1\257\7\155\1\0\1\262" + "\1\157\1\160\1\157\1\263\1\157\1\262\10\157\1\264" + "\16\157\1\262\2\157\1\262\2\157\1\262\10\157\1\262" + "\4\157\1\262\7\157\1\0\1\265\1\162\1\163\3\162" + "\1\265\1\162\1\266\6\162\1\267\16\162\1\265\2\162" + "\1\265\2\162\1\265\10\162\1\265\4\162\1\265\7\162" + "\24\0\1\270\47\0\1\271\1\51\1\165\1\51\1\0" + "\1\51\1\271\1\51\1\0\1\51\4\0\2\51\1\0" + "\3\51\1\0\1\51\10\0\1\271\2\51\1\271\2\51" + "\1\271\2\51\1\0\4\51\1\0\1\271\1\51\1\0" + "\1\51\1\0\1\271\2\51\6\0\1\272\1\55\1\167" + "\1\55\1\0\1\55\1\272\1\55\1\0\1\55\4\0" + "\2\55\1\0\3\55\1\0\1\55\10\0\1\272\2\55" + "\1\272\2\55\1\272\2\55\1\0\4\55\1\0\1\272" + "\1\55\1\0\1\55\1\0\1\272\2\55\6\0\1\273" + "\1\62\1\171\1\62\1\0\1\62\1\273\1\62\1\0" + "\1\62\4\0\2\62\1\0\3\62\1\0\1\62\10\0" + "\1\273\2\62\1\273\2\62\1\273\2\62\1\0\4\62" + "\1\0\1\273\1\62\1\0\1\62\1\0\1\273\2\62" + "\7\0\1\62\1\171\3\0\1\62\12\0\3\62\1\0"
- + "\1\62\10\0\11\62\1\0\4\62\1\0\2\62\1\0" + "\1\62\1\0\3\62\6\0\1\274\1\72\1\176\1\72" + "\1\0\1\72\1\274\1\72\1\0\1\72\4\0\2\72" + "\1\0\3\72\1\0\1\72\10\0\1\274\2\72\1\274" + "\2\72\1\274\2\72\1\0\4\72\1\0\1\274\1\72" + "\1\0\1\72\1\0\1\274\2\72\6\0\1\275\1\100" + "\1\200\1\100\1\0\1\100\1\275\1\100\1\0\1\100" + "\4\0\2\100\1\0\3\100\1\0\1\100\10\0\1\275" + "\2\100\1\275\2\100\1\275\2\100\1\0\4\100\1\0" + "\1\275\1\100\1\0\1\100\1\0\1\275\2\100\6\0" + "\1\276\1\202\1\203\1\202\1\277\1\202\1\276\10\202" + "\1\300\16\202\1\276\2\202\1\276\2\202\1\276\10\202" + "\1\276\4\202\1\276\7\202\1\0\1\301\1\205\1\206" + "\3\205\1\301\1\205\1\302\6\205\1\303\16\205\1\301" + "\2\205\1\301\2\205\1\301\10\205\1\301\4\205\1\301" + "\7\205\1\0\1\304\1\105\1\207\1\105\1\0\1\105" + "\1\304\1\105\1\0\1\105\4\0\2\105\1\0\3\105" + "\1\0\1\105\10\0\1\304\2\105\1\304\2\105\1\304" + "\2\105\1\0\4\105\1\0\1\304\1\105\1\0\1\105" + "\1\0\1\304\2\105\6\0\2\211\1\212\3\0\2\211"
- + "\11\0\3\211\1\0\1\211\10\0\11\211\1\0\4\211" + "\1\0\2\211\1\0\1\211\1\0\3\211\6\0\1\305" + "\2\211\1\0\2\211\1\305\2\211\1\0\4\211\2\0" + "\16\211\1\305\2\211\1\305\2\211\1\305\10\211\1\305" + "\4\211\1\305\7\211\2\0\1\211\1\212\3\0\1\211" + "\12\0\3\211\1\0\1\211\10\0\11\211\1\0\4\211" + "\1\0\2\211\1\0\1\211\1\0\3\211\6\0\1\306" + "\1\113\1\216\1\113\1\0\1\113\1\306\1\113\1\0" + "\1\113\4\0\2\113\1\0\3\113\1\217\1\113\10\0" + "\1\306\2\113\1\306\2\113\1\306\2\113\1\0\4\113" + "\1\0\1\306\1\113\1\0\1\113\1\0\1\306\2\113" + "\6\0\1\307\1\221\1\222\1\221\1\310\1\221\1\307" + "\10\221\1\311\16\221\1\307\2\221\1\307\2\221\1\307" + "\10\221\1\307\4\221\1\307\7\221\1\0\1\312\1\224" + "\1\225\3\224\1\312\1\224\1\313\6\224\1\314\16\224" + "\1\312\2\224\1\312\2\224\1\312\10\224\1\312\4\224" + "\1\312\7\224\1\0\1\226\1\211\1\212\3\0\1\211" + "\1\213\11\0\3\211\1\0\1\211\10\0\11\211\1\0" + "\4\211\1\0\2\211\1\0\1\211\1\0\3\211\4\0"
- + "\1\215\1\0\1\315\2\227\1\0\2\227\1\315\2\227" + "\1\0\4\227\2\0\16\227\1\315\2\227\1\315\2\227" + "\1\315\10\227\1\315\4\227\1\315\7\227\1\0\1\316" + "\5\0\1\316\16\0\2\316\7\0\2\316\1\0\2\316" + "\1\0\2\316\7\0\2\316\3\0\2\316\7\0\2\113" + "\1\216\3\0\2\113\11\0\2\113\1\317\1\217\1\113" + "\10\0\11\113\1\0\4\113\1\0\2\113\1\0\1\113" + "\1\0\3\113\57\0\1\320\21\0\1\321\1\25\1\131" + "\1\25\1\0\1\25\1\321\1\25\1\0\1\25\4\0" + "\2\25\1\0\3\25\1\0\1\25\10\0\1\321\2\25" + "\1\321\2\25\1\321\2\25\1\0\4\25\1\0\1\321" + "\1\25\1\0\1\25\1\0\1\321\2\25\6\0\1\322" + "\1\134\1\135\1\134\1\0\1\134\1\322\1\134\1\0" + "\1\134\4\0\2\134\1\0\3\134\1\0\1\134\10\0" + "\1\322\2\134\1\322\2\134\1\322\2\134\1\0\4\134" + "\1\0\1\322\1\134\1\0\1\134\1\0\1\322\2\134" + "\6\0\1\323\1\136\1\137\1\136\1\0\1\136\1\323" + "\1\136\1\0\1\136\4\0\2\136\1\0\3\136\1\0" + "\1\136\10\0\1\323\2\136\1\323\2\136\1\323\2\136" + "\1\0\4\136\1\0\1\323\1\136\1\0\1\136\1\0"
- + "\1\323\2\136\15\0\1\324\62\0\34\141\1\325\1\244" + "\35\141\42\0\2\326\102\0\1\327\75\0\2\330\74\0" + "\1\331\76\0\1\332\7\0\1\333\1\334\1\252\1\0" + "\1\252\1\333\1\335\1\0\1\252\4\0\2\252\1\0" + "\3\333\1\0\1\333\10\0\11\333\1\0\4\333\1\0" + "\2\333\1\0\1\333\1\0\3\333\6\0\1\336\1\147" + "\1\150\1\147\1\0\1\147\1\336\1\147\1\0\1\147" + "\4\0\2\147\1\0\3\147\1\252\1\147\10\0\1\336" + "\2\147\1\336\2\147\1\336\2\147\1\0\4\147\1\0" + "\1\336\1\147\1\0\1\147\1\0\1\336\2\147\6\0" + "\1\337\1\152\1\153\1\152\1\154\1\152\1\337\27\152" + "\1\337\2\152\1\337\2\152\1\337\10\152\1\337\4\152" + "\1\337\7\152\1\0\2\152\1\153\1\0\1\154\12\152" + "\1\0\52\152\1\0\1\340\1\155\1\156\3\155\1\340" + "\1\155\1\154\25\155\1\340\2\155\1\340\2\155\1\340" + "\10\155\1\340\4\155\1\340\7\155\1\0\2\155\1\156" + "\1\0\4\155\1\154\6\155\1\0\52\155\1\0\1\341" + "\1\157\1\160\1\157\1\161\1\157\1\341\27\157\1\341" + "\2\157\1\341\2\157\1\341\10\157\1\341\4\157\1\341"
- + "\7\157\1\0\2\157\1\160\1\0\1\161\12\157\1\0" + "\52\157\1\0\1\342\1\162\1\163\3\162\1\342\1\162" + "\1\161\25\162\1\342\2\162\1\342\2\162\1\342\10\162" + "\1\342\4\162\1\342\7\162\1\0\2\162\1\163\1\0" + "\4\162\1\161\6\162\1\0\52\162\25\0\1\343\46\0" + "\1\344\1\51\1\165\1\51\1\0\1\51\1\344\1\51" + "\1\0\1\51\4\0\2\51\1\0\3\51\1\0\1\51" + "\10\0\1\344\2\51\1\344\2\51\1\344\2\51\1\0" + "\4\51\1\0\1\344\1\51\1\0\1\51\1\0\1\344" + "\2\51\6\0\1\345\1\55\1\167\1\55\1\0\1\55" + "\1\345\1\55\1\0\1\55\4\0\2\55\1\0\3\55" + "\1\0\1\55\10\0\1\345\2\55\1\345\2\55\1\345" + "\2\55\1\0\4\55\1\0\1\345\1\55\1\0\1\55" + "\1\0\1\345\2\55\6\0\1\346\1\62\1\171\1\62" + "\1\0\1\62\1\346\1\62\1\0\1\62\4\0\2\62" + "\1\0\3\62\1\0\1\62\10\0\1\346\2\62\1\346" + "\2\62\1\346\2\62\1\0\4\62\1\0\1\346\1\62" + "\1\0\1\62\1\0\1\346\2\62\6\0\1\347\1\72" + "\1\176\1\72\1\0\1\72\1\347\1\72\1\0\1\72" + "\4\0\2\72\1\0\3\72\1\0\1\72\10\0\1\347" + "\2\72\1\347\2\72\1\347\2\72\1\0\4\72\1\0"
- + "\1\347\1\72\1\0\1\72\1\0\1\347\2\72\6\0" + "\1\350\1\100\1\200\1\100\1\0\1\100\1\350\1\100" + "\1\0\1\100\4\0\2\100\1\0\3\100\1\0\1\100" + "\10\0\1\350\2\100\1\350\2\100\1\350\2\100\1\0" + "\4\100\1\0\1\350\1\100\1\0\1\100\1\0\1\350" + "\2\100\6\0\1\351\1\202\1\203\1\202\1\204\1\202" + "\1\351\27\202\1\351\2\202\1\351\2\202\1\351\10\202" + "\1\351\4\202\1\351\7\202\1\0\2\202\1\203\1\0" + "\1\204\12\202\1\0\52\202\1\0\1\352\1\205\1\206" + "\3\205\1\352\1\205\1\204\25\205\1\352\2\205\1\352" + "\2\205\1\352\10\205\1\352\4\205\1\352\7\205\1\0" + "\2\205\1\206\1\0\4\205\1\204\6\205\1\0\52\205" + "\1\0\1\353\1\105\1\207\1\105\1\0\1\105\1\353" + "\1\105\1\0\1\105\4\0\2\105\1\0\3\105\1\0" + "\1\105\10\0\1\353\2\105\1\353\2\105\1\353\2\105" + "\1\0\4\105\1\0\1\353\1\105\1\0\1\105\1\0" + "\1\353\2\105\6\0\1\354\1\211\1\212\1\211\1\0" + "\1\211\1\354\1\211\1\0\1\211\4\0\2\211\1\0" + "\3\211\1\0\1\211\10\0\1\354\2\211\1\354\2\211" + "\1\354\2\211\1\0\4\211\1\0\1\354\1\211\1\0"
- + "\1\211\1\0\1\354\2\211\6\0\1\355\1\113\1\216" + "\1\113\1\0\1\113\1\355\1\113\1\0\1\113\4\0" + "\2\113\1\0\3\113\1\217\1\113\10\0\1\355\2\113" + "\1\355\2\113\1\355\2\113\1\0\4\113\1\0\1\355" + "\1\113\1\0\1\113\1\0\1\355\2\113\6\0\1\356" + "\1\221\1\222\1\221\1\223\1\221\1\356\27\221\1\356" + "\2\221\1\356\2\221\1\356\10\221\1\356\4\221\1\356" + "\7\221\1\0\2\221\1\222\1\0\1\223\12\221\1\0" + "\52\221\1\0\1\357\1\224\1\225\3\224\1\357\1\224" + "\1\223\25\224\1\357\2\224\1\357\2\224\1\357\10\224" + "\1\357\4\224\1\357\7\224\1\0\2\224\1\225\1\0" + "\4\224\1\223\6\224\1\0\52\224\1\0\1\360\1\227" + "\1\230\1\227\1\0\1\227\1\360\1\227\1\0\1\227" + "\4\0\2\227\1\0\3\227\1\0\1\227\10\0\1\360" + "\2\227\1\360\2\227\1\360\2\227\1\0\4\227\1\0" + "\1\360\1\227\1\0\1\227\1\0\1\360\2\227\6\0" + "\1\361\5\0\1\361\1\362\15\0\2\361\7\0\2\361" + "\1\0\2\361\1\0\2\361\7\0\2\361\3\0\2\361" + "\7\0\2\113\1\216\3\0\2\113\11\0\3\113\1\363" + "\1\113\10\0\11\113\1\0\4\113\1\0\2\113\1\0"
- + "\1\113\1\0\3\113\60\0\1\364\20\0\1\365\1\25" + "\1\131\1\25\1\0\1\25\1\365\1\25\1\0\1\25" + "\4\0\2\25\1\0\3\25\1\0\1\25\10\0\1\365" + "\2\25\1\365\2\25\1\365\2\25\1\0\4\25\1\0" + "\1\365\1\25\1\0\1\25\1\0\1\365\2\25\6\0" + "\1\366\1\134\1\135\1\134\1\0\1\134\1\366\1\134" + "\1\0\1\134\4\0\2\134\1\0\3\134\1\0\1\134" + "\10\0\1\366\2\134\1\366\2\134\1\366\2\134\1\0" + "\4\134\1\0\1\366\1\134\1\0\1\134\1\0\1\366" + "\2\134\6\0\1\367\1\136\1\137\1\136\1\0\1\136" + "\1\367\1\136\1\0\1\136\4\0\2\136\1\0\3\136" + "\1\0\1\136\10\0\1\367\2\136\1\367\2\136\1\367" + "\2\136\1\0\4\136\1\0\1\367\1\136\1\0\1\136" + "\1\0\1\367\2\136\30\0\1\370\123\0\1\371\67\0" + "\1\372\66\0\2\373\73\0\1\374\24\0\2\333\1\334" + "\1\375\1\0\1\375\2\333\1\0\1\375\1\376\3\0" + "\2\375\1\0\3\333\1\0\1\333\10\0\11\333\1\0" + "\4\333\1\0\2\333\1\0\1\333\1\0\3\333\6\0" + "\1\377\2\333\1\0\2\333\1\377\2\333\1\0\4\333" + "\2\0\16\333\1\377\2\333\1\377\2\333\1\377\10\333"
- + "\1\377\4\333\1\377\7\333\2\0\1\333\1\334\3\0" + "\1\333\12\0\3\333\1\0\1\333\10\0\11\333\1\0" + "\4\333\1\0\2\333\1\0\1\333\1\0\3\333\6\0" + "\1\u0100\1\147\1\150\1\147\1\0\1\147\1\u0100\1\147" + "\1\0\1\147\4\0\2\147\1\0\3\147\1\252\1\147" + "\10\0\1\u0100\2\147\1\u0100\2\147\1\u0100\2\147\1\0" + "\4\147\1\0\1\u0100\1\147\1\0\1\147\1\0\1\u0100" + "\2\147\6\0\1\u0101\1\152\1\153\1\152\1\154\1\152" + "\1\u0101\27\152\1\u0101\2\152\1\u0101\2\152\1\u0101\10\152" + "\1\u0101\4\152\1\u0101\7\152\1\0\1\u0102\1\155\1\156" + "\3\155\1\u0102\1\155\1\154\25\155\1\u0102\2\155\1\u0102" + "\2\155\1\u0102\10\155\1\u0102\4\155\1\u0102\7\155\1\0" + "\1\u0103\1\157\1\160\1\157\1\161\1\157\1\u0103\27\157" + "\1\u0103\2\157\1\u0103\2\157\1\u0103\10\157\1\u0103\4\157" + "\1\u0103\7\157\1\0\1\u0104\1\162\1\163\3\162\1\u0104" + "\1\162\1\161\25\162\1\u0104\2\162\1\u0104\2\162\1\u0104" + "\10\162\1\u0104\4\162\1\u0104\7\162\1\0\2\u0105\1\u0106"
- + "\1\343\1\u0107\1\343\2\u0105\1\u0108\1\343\1\u0109\3\u0105" + "\2\343\4\u0105\1\0\45\u0105\1\0\1\u010a\1\51\1\165" + "\1\51\1\0\1\51\1\u010a\1\51\1\0\1\51\4\0" + "\2\51\1\0\3\51\1\0\1\51\10\0\1\u010a\2\51" + "\1\u010a\2\51\1\u010a\2\51\1\0\4\51\1\0\1\u010a" + "\1\51\1\0\1\51\1\0\1\u010a\2\51\6\0\1\u010b" + "\1\55\1\167\1\55\1\0\1\55\1\u010b\1\55\1\0" + "\1\55\4\0\2\55\1\0\3\55\1\0\1\55\10\0" + "\1\u010b\2\55\1\u010b\2\55\1\u010b\2\55\1\0\4\55" + "\1\0\1\u010b\1\55\1\0\1\55\1\0\1\u010b\2\55" + "\6\0\1\u010c\1\62\1\171\1\62\1\0\1\62\1\u010c" + "\1\62\1\0\1\62\4\0\2\62\1\0\3\62\1\0" + "\1\62\10\0\1\u010c\2\62\1\u010c\2\62\1\u010c\2\62" + "\1\0\4\62\1\0\1\u010c\1\62\1\0\1\62\1\0" + "\1\u010c\2\62\6\0\1\u010d\1\72\1\176\1\72\1\0" + "\1\72\1\u010d\1\72\1\0\1\72\4\0\2\72\1\0" + "\3\72\1\0\1\72\10\0\1\u010d\2\72\1\u010d\2\72" + "\1\u010d\2\72\1\0\4\72\1\0\1\u010d\1\72\1\0" + "\1\72\1\0\1\u010d\2\72\6\0\1\u010e\1\100\1\200" + "\1\100\1\0\1\100\1\u010e\1\100\1\0\1\100\4\0"
- + "\2\100\1\0\3\100\1\0\1\100\10\0\1\u010e\2\100" + "\1\u010e\2\100\1\u010e\2\100\1\0\4\100\1\0\1\u010e" + "\1\100\1\0\1\100\1\0\1\u010e\2\100\6\0\1\u010f" + "\1\202\1\203\1\202\1\204\1\202\1\u010f\27\202\1\u010f" + "\2\202\1\u010f\2\202\1\u010f\10\202\1\u010f\4\202\1\u010f" + "\7\202\1\0\1\u0110\1\205\1\206\3\205\1\u0110\1\205" + "\1\204\25\205\1\u0110\2\205\1\u0110\2\205\1\u0110\10\205" + "\1\u0110\4\205\1\u0110\7\205\1\0\1\u0111\1\105\1\207" + "\1\105\1\0\1\105\1\u0111\1\105\1\0\1\105\4\0" + "\2\105\1\0\3\105\1\0\1\105\10\0\1\u0111\2\105" + "\1\u0111\2\105\1\u0111\2\105\1\0\4\105\1\0\1\u0111" + "\1\105\1\0\1\105\1\0\1\u0111\2\105\6\0\1\u0112" + "\1\211\1\212\1\211\1\0\1\211\1\u0112\1\211\1\0" + "\1\211\4\0\2\211\1\0\3\211\1\0\1\211\10\0" + "\1\u0112\2\211\1\u0112\2\211\1\u0112\2\211\1\0\4\211" + "\1\0\1\u0112\1\211\1\0\1\211\1\0\1\u0112\2\211" + "\6\0\1\u0113\1\113\1\216\1\113\1\0\1\113\1\u0113" + "\1\113\1\0\1\113\4\0\2\113\1\0\3\113\1\217"
- + "\1\113\10\0\1\u0113\2\113\1\u0113\2\113\1\u0113\2\113" + "\1\0\4\113\1\0\1\u0113\1\113\1\0\1\113\1\0" + "\1\u0113\2\113\6\0\1\u0114\1\221\1\222\1\221\1\223" + "\1\221\1\u0114\27\221\1\u0114\2\221\1\u0114\2\221\1\u0114" + "\10\221\1\u0114\4\221\1\u0114\7\221\1\0\1\u0115\1\224" + "\1\225\3\224\1\u0115\1\224\1\223\25\224\1\u0115\2\224" + "\1\u0115\2\224\1\u0115\10\224\1\u0115\4\224\1\u0115\7\224" + "\1\0\1\u0116\1\227\1\230\1\227\1\0\1\227\1\u0116" + "\1\227\1\0\1\227\4\0\2\227\1\0\3\227\1\0" + "\1\227\10\0\1\u0116\2\227\1\u0116\2\227\1\u0116\2\227" + "\1\0\4\227\1\0\1\u0116\1\227\1\0\1\227\1\0" + "\1\u0116\2\227\6\0\1\u0117\5\0\1\u0117\1\362\15\0" + "\2\u0117\7\0\2\u0117\1\0\2\u0117\1\0\2\u0117\7\0" + "\2\u0117\3\0\2\u0117\7\0\1\u0118\5\0\1\u0118\16\0" + "\2\u0118\7\0\2\u0118\1\0\2\u0118\1\0\2\u0118\7\0" + "\2\u0118\3\0\2\u0118\7\0\2\u0119\1\u011a\1\u011b\1\u011c" + "\1\u011b\2\u0119\1\u011d\1\u011b\1\u011e\3\u0119\2\u011b\4\u0119"
- + "\1\0\45\u0119\54\0\1\u011f\17\0\1\u0120\1\25\1\131" + "\1\25\1\0\1\25\1\u0120\1\25\1\0\1\25\4\0" + "\2\25\1\0\3\25\1\0\1\25\10\0\1\u0120\2\25" + "\1\u0120\2\25\1\u0120\2\25\1\0\4\25\1\0\1\u0120" + "\1\25\1\0\1\25\1\0\1\u0120\2\25\6\0\1\u0121" + "\1\134\1\135\1\134\1\0\1\134\1\u0121\1\134\1\0" + "\1\134\4\0\2\134\1\0\3\134\1\0\1\134\10\0" + "\1\u0121\2\134\1\u0121\2\134\1\u0121\2\134\1\0\4\134" + "\1\0\1\u0121\1\134\1\0\1\134\1\0\1\u0121\2\134" + "\6\0\1\u0122\1\136\1\137\1\136\1\0\1\136\1\u0122" + "\1\136\1\0\1\136\4\0\2\136\1\0\3\136\1\0" + "\1\136\10\0\1\u0122\2\136\1\u0122\2\136\1\u0122\2\136" + "\1\0\4\136\1\0\1\u0122\1\136\1\0\1\136\1\0" + "\1\u0122\2\136\51\0\1\u0123\51\0\1\u0124\111\0\2\u0125" + "\37\0\1\u0126\66\0\1\375\1\0\1\375\3\0\1\375" + "\1\376\3\0\2\375\53\0\1\u0127\1\333\1\334\1\333" + "\1\0\1\333\1\u0127\1\333\1\0\1\333\1\376\3\0" + "\2\333\1\0\3\333\1\0\1\333\10\0\1\u0127\2\333" + "\1\u0127\2\333\1\u0127\2\333\1\0\4\333\1\0\1\u0127"
- + "\1\333\1\0\1\333\1\0\1\u0127\2\333\6\0\1\u0128" + "\1\147\1\150\1\147\1\0\1\147\1\u0128\1\147\1\0" + "\1\147\4\0\2\147\1\0\3\147\1\252\1\147\10\0" + "\1\u0128\2\147\1\u0128\2\147\1\u0128\2\147\1\0\4\147" + "\1\0\1\u0128\1\147\1\0\1\147\1\0\1\u0128\2\147" + "\6\0\1\u0129\1\152\1\153\1\152\1\154\1\152\1\u0129" + "\27\152\1\u0129\2\152\1\u0129\2\152\1\u0129\10\152\1\u0129" + "\4\152\1\u0129\7\152\1\0\1\u012a\1\155\1\156\3\155" + "\1\u012a\1\155\1\154\25\155\1\u012a\2\155\1\u012a\2\155" + "\1\u012a\10\155\1\u012a\4\155\1\u012a\7\155\1\0\1\u012b" + "\1\157\1\160\1\157\1\161\1\157\1\u012b\27\157\1\u012b" + "\2\157\1\u012b\2\157\1\u012b\10\157\1\u012b\4\157\1\u012b" + "\7\157\1\0\1\u012c\1\162\1\163\3\162\1\u012c\1\162" + "\1\161\25\162\1\u012c\2\162\1\u012c\2\162\1\u012c\10\162" + "\1\u012c\4\162\1\u012c\7\162\1\0\2\u0105\1\u0106\1\u012d" + "\1\0\3\u0105\1\0\1\u012d\1\u0109\3\u0105\2\u012d\4\u0105" + "\1\0\45\u0105\1\0\1\u012e\1\u0105\1\u0106\1\u012d\2\u0105"
- + "\1\u012e\2\u0105\1\u012d\1\u012f\3\u0105\2\u012d\16\u0105\1\u012e" + "\2\u0105\1\u012e\2\u0105\1\u012e\10\u0105\1\u012e\4\u0105\1\u012e" + "\7\u0105\1\0\2\u0107\1\u0130\1\0\1\u012d\11\u0107\2\0" + "\52\u0107\1\0\2\u0108\1\u0131\1\0\4\u0108\1\u012d\5\u0108" + "\2\0\52\u0108\1\0\1\u0132\1\51\1\165\1\51\1\0" + "\1\51\1\u0132\1\51\1\0\1\51\4\0\2\51\1\0" + "\3\51\1\0\1\51\10\0\1\u0132\2\51\1\u0132\2\51" + "\1\u0132\2\51\1\0\4\51\1\0\1\u0132\1\51\1\0" + "\1\51\1\0\1\u0132\2\51\6\0\1\u0133\1\55\1\167" + "\1\55\1\0\1\55\1\u0133\1\55\1\0\1\55\4\0" + "\2\55\1\0\3\55\1\0\1\55\10\0\1\u0133\2\55" + "\1\u0133\2\55\1\u0133\2\55\1\0\4\55\1\0\1\u0133" + "\1\55\1\0\1\55\1\0\1\u0133\2\55\6\0\1\u0134" + "\1\62\1\171\1\62\1\0\1\62\1\u0134\1\62\1\0" + "\1\62\4\0\2\62\1\0\3\62\1\0\1\62\10\0" + "\1\u0134\2\62\1\u0134\2\62\1\u0134\2\62\1\0\4\62" + "\1\0\1\u0134\1\62\1\0\1\62\1\0\1\u0134\2\62" + "\6\0\1\u0135\1\72\1\176\1\72\1\0\1\72\1\u0135" + "\1\72\1\0\1\72\4\0\2\72\1\0\3\72\1\0"
- + "\1\72\10\0\1\u0135\2\72\1\u0135\2\72\1\u0135\2\72" + "\1\0\4\72\1\0\1\u0135\1\72\1\0\1\72\1\0" + "\1\u0135\2\72\6\0\1\u0136\1\100\1\200\1\100\1\0" + "\1\100\1\u0136\1\100\1\0\1\100\4\0\2\100\1\0" + "\3\100\1\0\1\100\10\0\1\u0136\2\100\1\u0136\2\100" + "\1\u0136\2\100\1\0\4\100\1\0\1\u0136\1\100\1\0" + "\1\100\1\0\1\u0136\2\100\6\0\1\u0137\1\202\1\203" + "\1\202\1\204\1\202\1\u0137\27\202\1\u0137\2\202\1\u0137" + "\2\202\1\u0137\10\202\1\u0137\4\202\1\u0137\7\202\1\0" + "\1\u0138\1\205\1\206\3\205\1\u0138\1\205\1\204\25\205" + "\1\u0138\2\205\1\u0138\2\205\1\u0138\10\205\1\u0138\4\205" + "\1\u0138\7\205\1\0\1\u0139\1\105\1\207\1\105\1\0" + "\1\105\1\u0139\1\105\1\0\1\105\4\0\2\105\1\0" + "\3\105\1\0\1\105\10\0\1\u0139\2\105\1\u0139\2\105" + "\1\u0139\2\105\1\0\4\105\1\0\1\u0139\1\105\1\0" + "\1\105\1\0\1\u0139\2\105\6\0\1\u013a\1\211\1\212" + "\1\211\1\0\1\211\1\u013a\1\211\1\0\1\211\4\0" + "\2\211\1\0\3\211\1\0\1\211\10\0\1\u013a\2\211"
- + "\1\u013a\2\211\1\u013a\2\211\1\0\4\211\1\0\1\u013a" + "\1\211\1\0\1\211\1\0\1\u013a\2\211\6\0\1\u013b" + "\1\113\1\216\1\113\1\0\1\113\1\u013b\1\113\1\0" + "\1\113\4\0\2\113\1\0\3\113\1\217\1\113\10\0" + "\1\u013b\2\113\1\u013b\2\113\1\u013b\2\113\1\0\4\113" + "\1\0\1\u013b\1\113\1\0\1\113\1\0\1\u013b\2\113" + "\6\0\1\u013c\1\221\1\222\1\221\1\223\1\221\1\u013c" + "\27\221\1\u013c\2\221\1\u013c\2\221\1\u013c\10\221\1\u013c" + "\4\221\1\u013c\7\221\1\0\1\u013d\1\224\1\225\3\224" + "\1\u013d\1\224\1\223\25\224\1\u013d\2\224\1\u013d\2\224" + "\1\u013d\10\224\1\u013d\4\224\1\u013d\7\224\1\0\1\u013e" + "\1\227\1\230\1\227\1\0\1\227\1\u013e\1\227\1\0" + "\1\227\4\0\2\227\1\0\3\227\1\0\1\227\10\0" + "\1\u013e\2\227\1\u013e\2\227\1\u013e\2\227\1\0\4\227" + "\1\0\1\u013e\1\227\1\0\1\227\1\0\1\u013e\2\227" + "\6\0\1\u013f\5\0\1\u013f\1\362\15\0\2\u013f\7\0" + "\2\u013f\1\0\2\u013f\1\0\2\u013f\7\0\2\u013f\3\0" + "\2\u013f\7\0\1\u0140\5\0\1\u0140\16\0\2\u0140\7\0"
- + "\2\u0140\1\0\2\u0140\1\0\2\u0140\7\0\2\u0140\3\0" + "\2\u0140\7\0\2\u0119\1\u011a\1\u0141\1\0\3\u0119\1\0" + "\1\u0141\1\u011e\3\u0119\2\u0141\4\u0119\1\0\45\u0119\1\0" + "\1\u0142\1\u0119\1\u011a\1\u0141\2\u0119\1\u0142\2\u0119\1\u0141" + "\1\u0143\3\u0119\2\u0141\16\u0119\1\u0142\2\u0119\1\u0142\2\u0119" + "\1\u0142\10\u0119\1\u0142\4\u0119\1\u0142\7\u0119\1\0\2\u011c" + "\1\u0144\1\0\1\u0141\11\u011c\2\0\52\u011c\1\0\2\u011d" + "\1\u0145\1\0\4\u011d\1\u0141\5\u011d\2\0\52\u011d\23\0" + "\1\u0146\50\0\1\u0147\1\25\1\131\1\25\1\0\1\25" + "\1\u0147\1\25\1\0\1\25\4\0\2\25\1\0\3\25" + "\1\0\1\25\10\0\1\u0147\2\25\1\u0147\2\25\1\u0147" + "\2\25\1\0\4\25\1\0\1\u0147\1\25\1\0\1\25" + "\1\0\1\u0147\2\25\6\0\1\u0148\1\134\1\135\1\134" + "\1\0\1\134\1\u0148\1\134\1\0\1\134\4\0\2\134" + "\1\0\3\134\1\0\1\134\10\0\1\u0148\2\134\1\u0148" + "\2\134\1\u0148\2\134\1\0\4\134\1\0\1\u0148\1\134" + "\1\0\1\134\1\0\1\u0148\2\134\6\0\1\u0149\1\136"
- + "\1\137\1\136\1\0\1\136\1\u0149\1\136\1\0\1\136" + "\4\0\2\136\1\0\3\136\1\0\1\136\10\0\1\u0149" + "\2\136\1\u0149\2\136\1\u0149\2\136\1\0\4\136\1\0" + "\1\u0149\1\136\1\0\1\136\1\0\1\u0149\2\136\52\0" + "\2\u014a\73\0\1\u014b\106\0\2\u014c\7\0\1\u014d\1\333" + "\1\334\1\333\1\0\1\333\1\u014d\1\333\1\0\1\333" + "\1\376\3\0\2\333\1\0\3\333\1\0\1\333\10\0" + "\1\u014d\2\333\1\u014d\2\333\1\u014d\2\333\1\0\4\333" + "\1\0\1\u014d\1\333\1\0\1\333\1\0\1\u014d\2\333" + "\6\0\1\u014e\1\147\1\150\1\147\1\0\1\147\1\u014e" + "\1\147\1\0\1\147\4\0\2\147\1\0\3\147\1\252" + "\1\147\10\0\1\u014e\2\147\1\u014e\2\147\1\u014e\2\147" + "\1\0\4\147\1\0\1\u014e\1\147\1\0\1\147\1\0" + "\1\u014e\2\147\6\0\1\u014f\1\152\1\153\1\152\1\154" + "\1\152\1\u014f\27\152\1\u014f\2\152\1\u014f\2\152\1\u014f" + "\10\152\1\u014f\4\152\1\u014f\7\152\1\0\1\u0150\1\155" + "\1\156\3\155\1\u0150\1\155\1\154\25\155\1\u0150\2\155" + "\1\u0150\2\155\1\u0150\10\155\1\u0150\4\155\1\u0150\7\155"
- + "\1\0\1\u0151\1\157\1\160\1\157\1\161\1\157\1\u0151" + "\27\157\1\u0151\2\157\1\u0151\2\157\1\u0151\10\157\1\u0151" + "\4\157\1\u0151\7\157\1\0\1\u0152\1\162\1\163\3\162" + "\1\u0152\1\162\1\161\25\162\1\u0152\2\162\1\u0152\2\162" + "\1\u0152\10\162\1\u0152\4\162\1\u0152\7\162\4\0\1\u012d" + "\1\0\1\u012d\3\0\1\u012d\1\u0109\3\0\2\u012d\53\0" + "\1\u0153\1\u0105\1\u0106\1\u0105\1\0\1\u0105\1\u0153\1\u0105" + "\1\0\1\u0105\1\u0109\11\u0105\1\0\11\u0105\1\u0153\2\u0105" + "\1\u0153\2\u0105\1\u0153\10\u0105\1\u0153\4\u0105\1\u0153\7\u0105" + "\1\0\1\u0154\1\u0107\1\u0130\1\u0107\1\u0155\1\u0107\1\u0154" + "\10\u0107\1\u0156\16\u0107\1\u0154\2\u0107\1\u0154\2\u0107\1\u0154" + "\10\u0107\1\u0154\4\u0107\1\u0154\7\u0107\1\0\1\u0157\1\u0108" + "\1\u0131\3\u0108\1\u0157\1\u0108\1\u0158\6\u0108\1\u0159\16\u0108" + "\1\u0157\2\u0108\1\u0157\2\u0108\1\u0157\10\u0108\1\u0157\4\u0108" + "\1\u0157\7\u0108\1\0\1\u015a\1\51\1\165\1\51\1\0"
- + "\1\51\1\u015a\1\51\1\0\1\51\4\0\2\51\1\0" + "\3\51\1\0\1\51\10\0\1\u015a\2\51\1\u015a\2\51" + "\1\u015a\2\51\1\0\4\51\1\0\1\u015a\1\51\1\0" + "\1\51\1\0\1\u015a\2\51\6\0\1\u015b\1\55\1\167" + "\1\55\1\0\1\55\1\u015b\1\55\1\0\1\55\4\0" + "\2\55\1\0\3\55\1\0\1\55\10\0\1\u015b\2\55" + "\1\u015b\2\55\1\u015b\2\55\1\0\4\55\1\0\1\u015b" + "\1\55\1\0\1\55\1\0\1\u015b\2\55\6\0\1\u015c" + "\1\62\1\171\1\62\1\0\1\62\1\u015c\1\62\1\0" + "\1\62\4\0\2\62\1\0\3\62\1\0\1\62\10\0" + "\1\u015c\2\62\1\u015c\2\62\1\u015c\2\62\1\0\4\62" + "\1\0\1\u015c\1\62\1\0\1\62\1\0\1\u015c\2\62" + "\6\0\1\u015d\1\72\1\176\1\72\1\0\1\72\1\u015d" + "\1\72\1\0\1\72\4\0\2\72\1\0\3\72\1\0" + "\1\72\10\0\1\u015d\2\72\1\u015d\2\72\1\u015d\2\72" + "\1\0\4\72\1\0\1\u015d\1\72\1\0\1\72\1\0" + "\1\u015d\2\72\6\0\1\u015e\1\100\1\200\1\100\1\0" + "\1\100\1\u015e\1\100\1\0\1\100\4\0\2\100\1\0" + "\3\100\1\0\1\100\10\0\1\u015e\2\100\1\u015e\2\100" + "\1\u015e\2\100\1\0\4\100\1\0\1\u015e\1\100\1\0"
- + "\1\100\1\0\1\u015e\2\100\6\0\1\u015f\1\202\1\203" + "\1\202\1\204\1\202\1\u015f\27\202\1\u015f\2\202\1\u015f" + "\2\202\1\u015f\10\202\1\u015f\4\202\1\u015f\7\202\1\0" + "\1\u0160\1\205\1\206\3\205\1\u0160\1\205\1\204\25\205" + "\1\u0160\2\205\1\u0160\2\205\1\u0160\10\205\1\u0160\4\205" + "\1\u0160\7\205\1\0\1\u0161\1\105\1\207\1\105\1\0" + "\1\105\1\u0161\1\105\1\0\1\105\4\0\2\105\1\0" + "\3\105\1\0\1\105\10\0\1\u0161\2\105\1\u0161\2\105" + "\1\u0161\2\105\1\0\4\105\1\0\1\u0161\1\105\1\0" + "\1\105\1\0\1\u0161\2\105\6\0\1\u0162\1\211\1\212" + "\1\211\1\0\1\211\1\u0162\1\211\1\0\1\211\4\0" + "\2\211\1\0\3\211\1\0\1\211\10\0\1\u0162\2\211" + "\1\u0162\2\211\1\u0162\2\211\1\0\4\211\1\0\1\u0162" + "\1\211\1\0\1\211\1\0\1\u0162\2\211\6\0\1\u0163" + "\1\113\1\216\1\113\1\0\1\113\1\u0163\1\113\1\0" + "\1\113\4\0\2\113\1\0\3\113\1\217\1\113\10\0" + "\1\u0163\2\113\1\u0163\2\113\1\u0163\2\113\1\0\4\113" + "\1\0\1\u0163\1\113\1\0\1\113\1\0\1\u0163\2\113"
- + "\6\0\1\u0164\1\221\1\222\1\221\1\223\1\221\1\u0164" + "\27\221\1\u0164\2\221\1\u0164\2\221\1\u0164\10\221\1\u0164" + "\4\221\1\u0164\7\221\1\0\1\u0165\1\224\1\225\3\224" + "\1\u0165\1\224\1\223\25\224\1\u0165\2\224\1\u0165\2\224" + "\1\u0165\10\224\1\u0165\4\224\1\u0165\7\224\1\0\1\u0166" + "\1\227\1\230\1\227\1\0\1\227\1\u0166\1\227\1\0" + "\1\227\4\0\2\227\1\0\3\227\1\0\1\227\10\0" + "\1\u0166\2\227\1\u0166\2\227\1\u0166\2\227\1\0\4\227" + "\1\0\1\u0166\1\227\1\0\1\227\1\0\1\u0166\2\227" + "\6\0\1\u0167\5\0\1\u0167\1\362\15\0\2\u0167\7\0" + "\2\u0167\1\0\2\u0167\1\0\2\u0167\7\0\2\u0167\3\0" + "\2\u0167\7\0\1\u0168\5\0\1\u0168\16\0\2\u0168\7\0" + "\2\u0168\1\0\2\u0168\1\0\2\u0168\7\0\2\u0168\3\0" + "\2\u0168\12\0\1\u0141\1\0\1\u0141\3\0\1\u0141\1\u011e" + "\3\0\2\u0141\53\0\1\u0169\1\u0119\1\u011a\1\u0119\1\0" + "\1\u0119\1\u0169\1\u0119\1\0\1\u0119\1\u011e\11\u0119\1\0" + "\11\u0119\1\u0169\2\u0119\1\u0169\2\u0119\1\u0169\10\u0119\1\u0169"
- + "\4\u0119\1\u0169\7\u0119\1\0\1\u016a\1\u011c\1\u0144\1\u011c" + "\1\u016b\1\u011c\1\u016a\10\u011c\1\u016c\16\u011c\1\u016a\2\u011c" + "\1\u016a\2\u011c\1\u016a\10\u011c\1\u016a\4\u011c\1\u016a\7\u011c" + "\1\0\1\u016d\1\u011d\1\u0145\3\u011d\1\u016d\1\u011d\1\u016e" + "\6\u011d\1\u016f\16\u011d\1\u016d\2\u011d\1\u016d\2\u011d\1\u016d" + "\10\u011d\1\u016d\4\u011d\1\u016d\7\u011d\47\0\1\u0170\24\0" + "\2\25\1\131\1\25\1\0\3\25\1\0\1\25\4\0" + "\2\25\1\0\3\25\1\0\1\25\10\0\11\25\1\0" + "\4\25\1\0\2\25\1\0\1\25\1\0\3\25\6\0" + "\1\u0171\1\134\1\135\1\134\1\0\1\134\1\u0171\1\134" + "\1\0\1\134\4\0\2\134\1\0\3\134\1\0\1\134" + "\10\0\1\u0171\2\134\1\u0171\2\134\1\u0171\2\134\1\0" + "\4\134\1\0\1\u0171\1\134\1\0\1\134\1\0\1\u0171" + "\2\134\6\0\1\u0172\1\136\1\137\1\136\1\0\1\136" + "\1\u0172\1\136\1\0\1\136\4\0\2\136\1\0\3\136" + "\1\0\1\136\10\0\1\u0172\2\136\1\u0172\2\136\1\u0172" + "\2\136\1\0\4\136\1\0\1\u0172\1\136\1\0\1\136"
- + "\1\0\1\u0172\2\136\54\0\1\u0173\65\0\2\u0174\30\0" + "\1\u0175\1\333\1\334\1\333\1\0\1\333\1\u0175\1\333" + "\1\0\1\333\1\376\3\0\2\333\1\0\3\333\1\0" + "\1\333\10\0\1\u0175\2\333\1\u0175\2\333\1\u0175\2\333" + "\1\0\4\333\1\0\1\u0175\1\333\1\0\1\333\1\0" + "\1\u0175\2\333\6\0\1\u0176\1\147\1\150\1\147\1\0" + "\1\147\1\u0176\1\147\1\0\1\147\4\0\2\147\1\0" + "\3\147\1\252\1\147\10\0\1\u0176\2\147\1\u0176\2\147" + "\1\u0176\2\147\1\0\4\147\1\0\1\u0176\1\147\1\0" + "\1\147\1\0\1\u0176\2\147\6\0\1\u0177\1\152\1\153" + "\1\152\1\154\1\152\1\u0177\27\152\1\u0177\2\152\1\u0177" + "\2\152\1\u0177\10\152\1\u0177\4\152\1\u0177\7\152\1\0" + "\1\u0178\1\155\1\156\3\155\1\u0178\1\155\1\154\25\155" + "\1\u0178\2\155\1\u0178\2\155\1\u0178\10\155\1\u0178\4\155" + "\1\u0178\7\155\1\0\1\u0179\1\157\1\160\1\157\1\161" + "\1\157\1\u0179\27\157\1\u0179\2\157\1\u0179\2\157\1\u0179" + "\10\157\1\u0179\4\157\1\u0179\7\157\1\0\1\u017a\1\162"
- + "\1\163\3\162\1\u017a\1\162\1\161\25\162\1\u017a\2\162" + "\1\u017a\2\162\1\u017a\10\162\1\u017a\4\162\1\u017a\7\162" + "\1\0\1\u017b\1\u0105\1\u0106\1\u0105\1\0\1\u0105\1\u017b" + "\1\u0105\1\0\1\u0105\1\u0109\11\u0105\1\0\11\u0105\1\u017b" + "\2\u0105\1\u017b\2\u0105\1\u017b\10\u0105\1\u017b\4\u0105\1\u017b" + "\7\u0105\1\0\1\u017c\1\u0107\1\u0130\1\u0107\1\u012d\1\u0107" + "\1\u017c\27\u0107\1\u017c\2\u0107\1\u017c\2\u0107\1\u017c\10\u0107" + "\1\u017c\4\u0107\1\u017c\7\u0107\1\0\2\u0107\1\u0130\2\u012d" + "\1\u0155\3\u0107\1\u0155\1\u017d\3\u0107\2\u012d\52\u0107\1\0" + "\2\u0107\1\u0130\1\0\1\u012d\12\u0107\1\0\52\u0107\1\0" + "\1\u017e\1\u0108\1\u0131\3\u0108\1\u017e\1\u0108\1\u012d\25\u0108" + "\1\u017e\2\u0108\1\u017e\2\u0108\1\u017e\10\u0108\1\u017e\4\u0108" + "\1\u017e\7\u0108\1\0\2\u0108\1\u0131\1\u012d\1\u0108\1\u0158" + "\2\u0108\1\u012d\1\u0158\1\u017f\3\u0108\2\u012d\52\u0108\1\0" + "\2\u0108\1\u0131\1\0\4\u0108\1\u012d\6\u0108\1\0\52\u0108"
- + "\1\0\2\51\1\165\1\51\1\0\3\51\1\0\1\51" + "\4\0\2\51\1\0\3\51\1\0\1\51\10\0\11\51" + "\1\0\4\51\1\0\2\51\1\0\1\51\1\0\3\51" + "\6\0\2\55\1\167\1\55\1\0\3\55\1\0\1\55" + "\4\0\2\55\1\0\3\55\1\0\1\55\10\0\11\55" + "\1\0\4\55\1\0\2\55\1\0\1\55\1\0\3\55" + "\6\0\2\62\1\171\1\62\1\0\3\62\1\0\1\62" + "\4\0\2\62\1\0\3\62\1\0\1\62\10\0\11\62" + "\1\0\4\62\1\0\2\62\1\0\1\62\1\0\3\62" + "\6\0\2\72\1\176\1\72\1\0\3\72\1\0\1\72" + "\4\0\2\72\1\0\3\72\1\0\1\72\10\0\11\72" + "\1\0\4\72\1\0\2\72\1\0\1\72\1\0\3\72" + "\6\0\2\100\1\200\1\100\1\0\3\100\1\0\1\100" + "\4\0\2\100\1\0\3\100\1\0\1\100\10\0\11\100" + "\1\0\4\100\1\0\2\100\1\0\1\100\1\0\3\100" + "\6\0\1\u0180\1\202\1\203\1\202\1\204\1\202\1\u0180" + "\27\202\1\u0180\2\202\1\u0180\2\202\1\u0180\10\202\1\u0180" + "\4\202\1\u0180\7\202\1\0\1\u0181\1\205\1\206\3\205" + "\1\u0181\1\205\1\204\25\205\1\u0181\2\205\1\u0181\2\205" + "\1\u0181\10\205\1\u0181\4\205\1\u0181\7\205\1\0\2\105"
- + "\1\207\1\105\1\0\3\105\1\0\1\105\4\0\2\105" + "\1\0\3\105\1\0\1\105\10\0\11\105\1\0\4\105" + "\1\0\2\105\1\0\1\105\1\0\3\105\6\0\1\u0182" + "\1\211\1\212\1\211\1\0\1\211\1\u0182\1\211\1\0" + "\1\211\4\0\2\211\1\0\3\211\1\0\1\211\10\0" + "\1\u0182\2\211\1\u0182\2\211\1\u0182\2\211\1\0\4\211" + "\1\0\1\u0182\1\211\1\0\1\211\1\0\1\u0182\2\211" + "\6\0\2\113\1\216\1\113\1\0\3\113\1\0\1\113" + "\4\0\2\113\1\0\3\113\1\217\1\113\10\0\11\113" + "\1\0\4\113\1\0\2\113\1\0\1\113\1\0\3\113" + "\6\0\1\u0183\1\221\1\222\1\221\1\223\1\221\1\u0183" + "\27\221\1\u0183\2\221\1\u0183\2\221\1\u0183\10\221\1\u0183" + "\4\221\1\u0183\7\221\1\0\1\u0184\1\224\1\225\3\224" + "\1\u0184\1\224\1\223\25\224\1\u0184\2\224\1\u0184\2\224" + "\1\u0184\10\224\1\u0184\4\224\1\u0184\7\224\1\0\1\u0185" + "\1\227\1\230\1\227\1\0\1\227\1\u0185\1\227\1\0" + "\1\227\4\0\2\227\1\0\3\227\1\0\1\227\10\0" + "\1\u0185\2\227\1\u0185\2\227\1\u0185\2\227\1\0\4\227"
- + "\1\0\1\u0185\1\227\1\0\1\227\1\0\1\u0185\2\227" + "\6\0\1\u0186\5\0\1\u0186\1\362\15\0\2\u0186\7\0" + "\2\u0186\1\0\2\u0186\1\0\2\u0186\7\0\2\u0186\3\0" + "\2\u0186\7\0\1\u0187\5\0\1\u0187\16\0\2\u0187\7\0" + "\2\u0187\1\0\2\u0187\1\0\2\u0187\7\0\2\u0187\3\0" + "\2\u0187\7\0\1\u0188\1\u0119\1\u011a\1\u0119\1\0\1\u0119" + "\1\u0188\1\u0119\1\0\1\u0119\1\u011e\11\u0119\1\0\11\u0119" + "\1\u0188\2\u0119\1\u0188\2\u0119\1\u0188\10\u0119\1\u0188\4\u0119" + "\1\u0188\7\u0119\1\0\1\u0189\1\u011c\1\u0144\1\u011c\1\u0141" + "\1\u011c\1\u0189\27\u011c\1\u0189\2\u011c\1\u0189\2\u011c\1\u0189" + "\10\u011c\1\u0189\4\u011c\1\u0189\7\u011c\1\0\2\u011c\1\u0144" + "\2\u0141\1\u016b\3\u011c\1\u016b\1\u018a\3\u011c\2\u0141\52\u011c" + "\1\0\2\u011c\1\u0144\1\0\1\u0141\12\u011c\1\0\52\u011c" + "\1\0\1\u018b\1\u011d\1\u0145\3\u011d\1\u018b\1\u011d\1\u0141" + "\25\u011d\1\u018b\2\u011d\1\u018b\2\u011d\1\u018b\10\u011d\1\u018b"
- + "\4\u011d\1\u018b\7\u011d\1\0\2\u011d\1\u0145\1\u0141\1\u011d" + "\1\u016e\2\u011d\1\u0141\1\u016e\1\u018c\3\u011d\2\u0141\52\u011d" + "\1\0\2\u011d\1\u0145\1\0\4\u011d\1\u0141\6\u011d\1\0" + "\52\u011d\42\0\2\u018d\30\0\2\134\1\135\1\134\1\0" + "\3\134\1\0\1\134\4\0\2\134\1\0\3\134\1\0" + "\1\134\10\0\11\134\1\0\4\134\1\0\2\134\1\0" + "\1\134\1\0\3\134\6\0\2\136\1\137\1\136\1\0" + "\3\136\1\0\1\136\4\0\2\136\1\0\3\136\1\0" + "\1\136\10\0\11\136\1\0\4\136\1\0\2\136\1\0" + "\1\136\1\0\3\136\44\0\2\u018e\33\0\1\u018f\1\333" + "\1\334\1\333\1\0\1\333\1\u018f\1\333\1\0\1\333" + "\1\376\3\0\2\333\1\0\3\333\1\0\1\333\10\0" + "\1\u018f\2\333\1\u018f\2\333\1\u018f\2\333\1\0\4\333" + "\1\0\1\u018f\1\333\1\0\1\333\1\0\1\u018f\2\333" + "\6\0\2\147\1\150\1\147\1\0\3\147\1\0\1\147" + "\4\0\2\147\1\0\3\147\1\252\1\147\10\0\11\147" + "\1\0\4\147\1\0\2\147\1\0\1\147\1\0\3\147" + "\6\0\2\152\1\153\1\152\1\154\65\152\1\0\2\155" + "\1\156\5\155\1\154\61\155\1\0\2\157\1\160\1\157"
- + "\1\161\65\157\1\0\2\162\1\163\5\162\1\161\61\162" + "\1\0\1\u0190\1\u0105\1\u0106\1\u0105\1\0\1\u0105\1\u0190" + "\1\u0105\1\0\1\u0105\1\u0109\11\u0105\1\0\11\u0105\1\u0190" + "\2\u0105\1\u0190\2\u0105\1\u0190\10\u0105\1\u0190\4\u0105\1\u0190" + "\7\u0105\1\0\1\u0191\1\u0107\1\u0130\1\u0107\1\u012d\1\u0107" + "\1\u0191\27\u0107\1\u0191\2\u0107\1\u0191\2\u0107\1\u0191\10\u0107" + "\1\u0191\4\u0107\1\u0191\7\u0107\1\0\1\u0192\1\u0108\1\u0131" + "\3\u0108\1\u0192\1\u0108\1\u012d\25\u0108\1\u0192\2\u0108\1\u0192" + "\2\u0108\1\u0192\10\u0108\1\u0192\4\u0108\1\u0192\7\u0108\1\0" + "\2\202\1\203\1\202\1\204\65\202\1\0\2\205\1\206" + "\5\205\1\204\61\205\1\0\2\211\1\212\1\211\1\0" + "\3\211\1\0\1\211\4\0\2\211\1\0\3\211\1\0" + "\1\211\10\0\11\211\1\0\4\211\1\0\2\211\1\0" + "\1\211\1\0\3\211\6\0\2\221\1\222\1\221\1\223" + "\65\221\1\0\2\224\1\225\5\224\1\223\61\224\1\0" + "\2\227\1\230\1\227\1\0\3\227\1\0\1\227\4\0" + "\2\227\1\0\3\227\1\0\1\227\10\0\11\227\1\0"
- + "\4\227\1\0\2\227\1\0\1\227\1\0\3\227\15\0" + "\1\362\63\0\1\u0193\5\0\1\u0193\16\0\2\u0193\7\0" + "\2\u0193\1\0\2\u0193\1\0\2\u0193\7\0\2\u0193\3\0" + "\2\u0193\7\0\1\u0194\1\u0119\1\u011a\1\u0119\1\0\1\u0119" + "\1\u0194\1\u0119\1\0\1\u0119\1\u011e\11\u0119\1\0\11\u0119" + "\1\u0194\2\u0119\1\u0194\2\u0119\1\u0194\10\u0119\1\u0194\4\u0119" + "\1\u0194\7\u0119\1\0\1\u0195\1\u011c\1\u0144\1\u011c\1\u0141" + "\1\u011c\1\u0195\27\u011c\1\u0195\2\u011c\1\u0195\2\u011c\1\u0195" + "\10\u011c\1\u0195\4\u011c\1\u0195\7\u011c\1\0\1\u0196\1\u011d" + "\1\u0145\3\u011d\1\u0196\1\u011d\1\u0141\25\u011d\1\u0196\2\u011d" + "\1\u0196\2\u011d\1\u0196\10\u011d\1\u0196\4\u011d\1\u0196\7\u011d" + "\65\0\1\u0197\52\0\2\u0198\25\0\1\u0199\1\333\1\334" + "\1\333\1\0\1\333\1\u0199\1\333\1\0\1\333\1\376" + "\3\0\2\333\1\0\3\333\1\0\1\333\10\0\1\u0199" + "\2\333\1\u0199\2\333\1\u0199\2\333\1\0\4\333\1\0" + "\1\u0199\1\333\1\0\1\333\1\0\1\u0199\2\333\6\0"
- + "\1\u019a\1\u0105\1\u0106\1\u0105\1\0\1\u0105\1\u019a\1\u0105" + "\1\0\1\u0105\1\u0109\11\u0105\1\0\11\u0105\1\u019a\2\u0105" + "\1\u019a\2\u0105\1\u019a\10\u0105\1\u019a\4\u0105\1\u019a\7\u0105" + "\1\0\1\u019b\1\u0107\1\u0130\1\u0107\1\u012d\1\u0107\1\u019b" + "\27\u0107\1\u019b\2\u0107\1\u019b\2\u0107\1\u019b\10\u0107\1\u019b" + "\4\u0107\1\u019b\7\u0107\1\0\1\u019c\1\u0108\1\u0131\3\u0108" + "\1\u019c\1\u0108\1\u012d\25\u0108\1\u019c\2\u0108\1\u019c\2\u0108" + "\1\u019c\10\u0108\1\u019c\4\u0108\1\u019c\7\u0108\1\0\1\u019d" + "\5\0\1\u019d\16\0\2\u019d\7\0\2\u019d\1\0\2\u019d" + "\1\0\2\u019d\7\0\2\u019d\3\0\2\u019d\7\0\1\u019e" + "\1\u0119\1\u011a\1\u0119\1\0\1\u0119\1\u019e\1\u0119\1\0" + "\1\u0119\1\u011e\11\u0119\1\0\11\u0119\1\u019e\2\u0119\1\u019e" + "\2\u0119\1\u019e\10\u0119\1\u019e\4\u0119\1\u019e\7\u0119\1\0" + "\1\u019f\1\u011c\1\u0144\1\u011c\1\u0141\1\u011c\1\u019f\27\u011c" + "\1\u019f\2\u011c\1\u019f\2\u011c\1\u019f\10\u011c\1\u019f\4\u011c"
- + "\1\u019f\7\u011c\1\0\1\u01a0\1\u011d\1\u0145\3\u011d\1\u01a0" + "\1\u011d\1\u0141\25\u011d\1\u01a0\2\u011d\1\u01a0\2\u011d\1\u01a0" + "\10\u011d\1\u01a0\4\u011d\1\u01a0\7\u011d\47\0\1\u01a1\24\0" + "\2\333\1\334\1\333\1\0\3\333\1\0\1\333\1\376" + "\3\0\2\333\1\0\3\333\1\0\1\333\10\0\11\333" + "\1\0\4\333\1\0\2\333\1\0\1\333\1\0\3\333" + "\6\0\1\u01a2\1\u0105\1\u0106\1\u0105\1\0\1\u0105\1\u01a2" + "\1\u0105\1\0\1\u0105\1\u0109\11\u0105\1\0\11\u0105\1\u01a2" + "\2\u0105\1\u01a2\2\u0105\1\u01a2\10\u0105\1\u01a2\4\u0105\1\u01a2" + "\7\u0105\1\0\1\u01a3\1\u0107\1\u0130\1\u0107\1\u012d\1\u0107" + "\1\u01a3\27\u0107\1\u01a3\2\u0107\1\u01a3\2\u0107\1\u01a3\10\u0107" + "\1\u01a3\4\u0107\1\u01a3\7\u0107\1\0\1\u01a4\1\u0108\1\u0131" + "\3\u0108\1\u01a4\1\u0108\1\u012d\25\u0108\1\u01a4\2\u0108\1\u01a4" + "\2\u0108\1\u01a4\10\u0108\1\u01a4\4\u0108\1\u01a4\7\u0108\1\0" + "\1\u01a5\1\u0119\1\u011a\1\u0119\1\0\1\u0119\1\u01a5\1\u0119"
- + "\1\0\1\u0119\1\u011e\11\u0119\1\0\11\u0119\1\u01a5\2\u0119" + "\1\u01a5\2\u0119\1\u01a5\10\u0119\1\u01a5\4\u0119\1\u01a5\7\u0119" + "\1\0\1\u01a6\1\u011c\1\u0144\1\u011c\1\u0141\1\u011c\1\u01a6" + "\27\u011c\1\u01a6\2\u011c\1\u01a6\2\u011c\1\u01a6\10\u011c\1\u01a6" + "\4\u011c\1\u01a6\7\u011c\1\0\1\u01a7\1\u011d\1\u0145\3\u011d" + "\1\u01a7\1\u011d\1\u0141\25\u011d\1\u01a7\2\u011d\1\u01a7\2\u011d" + "\1\u01a7\10\u011d\1\u01a7\4\u011d\1\u01a7\7\u011d\1\0\2\u0105" + "\1\u0106\1\u0105\1\0\3\u0105\1\0\1\u0105\1\u0109\11\u0105" + "\1\0\45\u0105\1\0\1\u01a8\1\u0107\1\u0130\1\u0107\1\u012d" + "\1\u0107\1\u01a8\27\u0107\1\u01a8\2\u0107\1\u01a8\2\u0107\1\u01a8" + "\10\u0107\1\u01a8\4\u0107\1\u01a8\7\u0107\1\0\1\u01a9\1\u0108" + "\1\u0131\3\u0108\1\u01a9\1\u0108\1\u012d\25\u0108\1\u01a9\2\u0108" + "\1\u01a9\2\u0108\1\u01a9\10\u0108\1\u01a9\4\u0108\1\u01a9\7\u0108" + "\1\0\2\u0119\1\u011a\1\u0119\1\0\3\u0119\1\0\1\u0119"
- + "\1\u011e\11\u0119\1\0\45\u0119\1\0\1\u01aa\1\u011c\1\u0144" + "\1\u011c\1\u0141\1\u011c\1\u01aa\27\u011c\1\u01aa\2\u011c\1\u01aa" + "\2\u011c\1\u01aa\10\u011c\1\u01aa\4\u011c\1\u01aa\7\u011c\1\0" + "\1\u01ab\1\u011d\1\u0145\3\u011d\1\u01ab\1\u011d\1\u0141\25\u011d" + "\1\u01ab\2\u011d\1\u01ab\2\u011d\1\u01ab\10\u011d\1\u01ab\4\u011d" + "\1\u01ab\7\u011d\1\0\2\u0107\1\u0130\1\u0107\1\u012d\65\u0107" + "\1\0\2\u0108\1\u0131\5\u0108\1\u012d\61\u0108\1\0\2\u011c" + "\1\u0144\1\u011c\1\u0141\65\u011c\1\0\2\u011d\1\u0145\5\u011d" + "\1\u0141\61\u011d";
-
- /**
- * 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", "Internal error: unknown state", "Error: could not match input", "Error: pushback value was too large"};
-
- /**
- * YY_ATTRIBUTE[aState] contains the attributes of state
- * <code>aState</code>
- */
- private final static byte YY_ATTRIBUTE[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 1, 1, 1, 1, 1, 9, 1, 9, 1, 1, 9, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 9, 9, 1, 1, 1, 9, 1, 3, 9, 9, 1, 1, 1, 9, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 3, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 9, 0, 0, 0, 0, 9, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 13, 7, 0, 1, 0, 1, 0, 0, 9, 0, 0, 0, 1, 1, 0, 0, 0, 9, 0, 9, 1, 0, 0, 9, 0, 0, 1, 1, 0, 0, 1, 0, 0, 13, 7, 1, 9, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 9, 0, 0, 9, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 9, 0, 1, 1, 1, 0, 0, 9, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0,
- 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 9, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 9, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 9, 0, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
- /** 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;
-
- /* 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 == 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 yy_atEOF;
- }
-
- /* 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 */
- yy_reader = in;
-
- /** the current state of the DFA */
- yy_state = 0;
-
- /** the current lexical state */
- yy_lexical_state = fInitialState; // YYINITIAL;
-
- /**
- * this buffer contains the current text to be matched and is the
- * source of the yytext() string
- */
- if (yy_buffer.length != fInitialBufferSize) {
- yy_buffer = new char[fInitialBufferSize];
- }
- 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;
-
- /**
- * 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
- */
- // yy_atBOL = false;
- /** yy_atEOF == true <=> the scanner has returned a value for EOF */
- yy_atEOF = false;
-
- /* user variables */
- // fUndefined.delete(0, fUndefined.length());
- }
-
- /* user method */
- public CSSTokenizer() {
- super();
- }
-
-
-
- /**
- * 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 CSSTokenizer(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 CSSTokenizer(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[20709];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 13396) {
- 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 < 170) {
- 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.
- *
- * @param errorCode
- * the code of the errormessage to display
- */
- private void yy_ScanError(int errorCode) {
- try {
- System.out.println(YY_ERROR_MSG[errorCode]);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println(YY_ERROR_MSG[YY_UNKNOWN_ERROR]);
- }
-
-
- }
-
-
- /**
- * 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()!
- */
- // private void yypushback(int number) {
- // if ( number > yylength() )
- // yy_ScanError(YY_PUSHBACK_2BIG);
- //
- // yy_markedPos -= 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 IOException
- * if any I/O-Error occurs
- */
- public String primGetNextToken() throws java.io.IOException {
- int yy_input;
- int yy_action;
-
- yy_pushbackPos = -1;
- boolean yy_was_pushback;
-
- while (true) {
-
- yychar += yylength();
-
- boolean yy_counted = false;
- for (yy_currentPos = yy_startRead; yy_currentPos < yy_markedPos; yy_currentPos++) {
- switch (yy_buffer[yy_currentPos]) {
- case '\r' :
- yyline++;
- yy_counted = true;
- break;
- case '\n' :
- if (yy_counted)
- yy_counted = false;
- else {
- yyline++;
- }
- break;
- default :
- yy_counted = false;
- }
- }
-
- if (yy_counted) {
- if (yy_advance() == '\n')
- yyline--;
- if (!yy_atEOF)
- yy_currentPos--;
- }
-
- yy_action = -1;
-
- yy_currentPos = yy_startRead = yy_markedPos;
-
- yy_state = yy_lexical_state;
-
- yy_was_pushback = false;
-
- yy_forAction : {
- while (true) {
-
- yy_input = yy_advance();
-
- if (yy_input == YYEOF)
- break yy_forAction;
-
- int yy_next = yytrans[yy_rowMap[yy_state] + yycmap[yy_input]];
- if (yy_next == -1)
- break yy_forAction;
- yy_state = yy_next;
-
- int yy_attributes = YY_ATTRIBUTE[yy_state];
- if ((yy_attributes & 2) > 0)
- yy_pushbackPos = yy_currentPos;
-
- if ((yy_attributes & 1) > 0) {
- yy_was_pushback = (yy_attributes & 4) > 0;
- yy_action = yy_state;
- yy_markedPos = yy_currentPos;
- if ((yy_attributes & 8) > 0)
- break yy_forAction;
- }
-
- }
- }
-
- if (yy_was_pushback)
- yy_markedPos = yy_pushbackPos;
-
- switch (yy_action) {
-
- case 416 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_IMPORTANT;
- }
- case 428 :
- break;
- case 407 : {
- yybegin(ST_FONT_FACE_DELIMITER);
- return CSS_FONT_FACE;
- }
- case 429 :
- break;
- case 370 : {
- yybegin(ST_CHARSET_NAME);
- return CSS_CHARSET;
- }
- case 430 :
- break;
- case 330 : {
- yybegin(ST_IMPORT_URI);
- return CSS_IMPORT;
- }
- case 431 :
- break;
- case 292 : {
- yybegin(ST_MEDIA_MEDIUM);
- return CSS_MEDIA;
- }
- case 432 :
- break;
- case 285 :
- case 322 :
- case 393 :
- case 395 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_URI;
- }
- case 433 :
- break;
- case 264 :
- case 302 :
- case 380 :
- case 382 : {
- yybegin(ST_IMPORT_MEDIUM);
- return CSS_URI;
- }
- case 434 :
- break;
- case 250 : {
- yybegin(ST_PAGE_PSEUDO_PAGE);
- return CSS_PAGE;
- }
- case 435 :
- break;
- case 212 : {
- return CSS_COMMENT;
- }
- case 436 :
- break;
- case 211 : {
- return CSS_CDO;
- }
- case 437 :
- break;
- case 205 :
- case 240 :
- case 278 :
- case 279 :
- case 318 :
- case 319 :
- case 358 :
- case 359 :
- case 389 :
- case 390 :
- case 402 :
- case 412 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_UNICODE_RANGE;
- }
- case 438 :
- break;
- case 159 : {
- return CSS_CDC;
- }
- case 439 :
- break;
- case 156 : {
- return CSS_DECLARATION_VALUE_S;
- }
- case 440 :
- break;
- case 150 :
- case 204 :
- case 239 :
- case 277 :
- case 317 :
- case 357 :
- case 388 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_HASH;
- }
- case 441 :
- break;
- case 146 :
- case 199 :
- case 202 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_STRING;
- }
- case 442 :
- break;
- case 57 :
- case 126 :
- case 187 :
- case 230 :
- case 268 :
- case 308 :
- case 348 : {
- yybegin(ST_SELECTOR_ATTRIBUTE_OPERATOR);
- return CSS_SELECTOR_ATTRIBUTE_NAME;
- }
- case 443 :
- break;
- case 56 : {
- yybegin(ST_SELECTOR);
- return CSS_SELECTOR_SEPARATOR;
- }
- case 444 :
- break;
- case 55 :
- case 123 : {
- yybegin(ST_SELECTOR);
- return CSS_SELECTOR_COMBINATOR;
- }
- case 445 :
- break;
- case 52 : {
- yybegin(ST_DECLARATION);
- return CSS_LBRACE;
- }
- case 446 :
- break;
- case 49 :
- case 121 :
- case 186 :
- case 229 :
- case 267 :
- case 307 :
- case 347 : {
- yybegin(ST_PAGE_DELIMITER);
- return CSS_PAGE_SELECTOR;
- }
- case 447 :
- break;
- case 48 : {
- yybegin(YYINITIAL);
- return CSS_LBRACE;
- }
- case 448 :
- break;
- case 47 : {
- yybegin(ST_MEDIA_MEDIUM);
- return CSS_MEDIA_SEPARATOR;
- }
- case 449 :
- break;
- case 44 :
- case 119 :
- case 185 :
- case 228 :
- case 266 :
- case 306 :
- case 346 : {
- yybegin(ST_MEDIA_DELIMITER);
- return CSS_MEDIUM;
- }
- case 450 :
- break;
- case 43 : {
- yybegin(ST_IMPORT_MEDIUM);
- return CSS_MEDIA_SEPARATOR;
- }
- case 451 :
- break;
- case 20 :
- case 89 :
- case 158 :
- case 208 :
- case 244 :
- case 287 :
- case 326 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_ELEMENT_NAME;
- }
- case 452 :
- break;
- case 22 :
- case 54 :
- case 87 :
- case 124 :
- case 157 : {
- return CSS_S;
- }
- case 453 :
- break;
- case 27 : {
- yybegin(YYINITIAL);
- return CSS_RBRACE;
- }
- case 454 :
- break;
- case 29 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_UNIVERSAL;
- }
- case 455 :
- break;
- case 32 : {
- yybegin(ST_SELECTOR_ATTRIBUTE_NAME);
- return CSS_SELECTOR_ATTRIBUTE_START;
- }
- case 456 :
- break;
- case 36 : {
- yybegin(YYINITIAL);
- return CSS_DELIMITER;
- }
- case 457 :
- break;
- case 40 :
- case 117 :
- case 184 :
- case 227 :
- case 265 :
- case 305 :
- case 345 : {
- yybegin(ST_IMPORT_DELIMITER);
- return CSS_MEDIUM;
- }
- case 458 :
- break;
- case 60 : {
- yybegin(ST_SELECTOR_ATTRIBUTE_VALUE);
- return CSS_SELECTOR_ATTRIBUTE_OPERATOR;
- }
- case 459 :
- break;
- case 62 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_ATTRIBUTE_END;
- }
- case 460 :
- break;
- case 63 :
- case 128 :
- case 131 :
- case 188 :
- case 190 :
- case 193 :
- case 231 :
- case 269 :
- case 309 :
- case 349 : {
- yybegin(ST_SELECTOR_ATTRIBUTE_END);
- return CSS_SELECTOR_ATTRIBUTE_VALUE;
- }
- case 461 :
- break;
- case 68 :
- case 135 :
- case 195 :
- case 234 :
- case 272 :
- case 312 :
- case 352 : {
- yybegin(ST_DECLARATION_SEPARATOR);
- return CSS_DECLARATION_PROPERTY;
- }
- case 462 :
- break;
- case 71 : {
- yybegin(ST_DECLARATION);
- return CSS_DECLARATION_DELIMITER;
- }
- case 463 :
- break;
- case 72 : {
- yybegin(ST_DECLARATION_PRE_VALUE);
- return CSS_DECLARATION_SEPARATOR;
- }
- case 464 :
- break;
- case 73 :
- case 149 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_NUMBER;
- }
- case 465 :
- break;
- case 74 :
- case 83 :
- case 143 :
- case 153 :
- case 197 :
- case 206 :
- case 236 :
- case 274 :
- case 314 :
- case 354 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_IDENT;
- }
- case 466 :
- break;
- case 79 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE;
- }
- case 467 :
- break;
- case 85 :
- case 86 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_OPERATOR;
- }
- case 468 :
- break;
- case 91 :
- case 160 :
- case 209 :
- case 245 :
- case 288 :
- case 327 :
- case 368 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_CLASS;
- }
- case 469 :
- break;
- case 93 :
- case 161 :
- case 210 :
- case 246 :
- case 289 :
- case 328 :
- case 369 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_ID;
- }
- case 470 :
- break;
- case 102 :
- case 170 :
- case 221 :
- case 253 :
- case 255 :
- case 295 :
- case 333 :
- case 373 : {
- yybegin(ST_SELECTOR_MODIFIER);
- return CSS_SELECTOR_PSEUDO;
- }
- case 471 :
- break;
- case 107 :
- case 172 :
- case 175 : {
- yybegin(ST_CHARSET_DELIMITER);
- return CSS_STRING;
- }
- case 472 :
- break;
- case 112 :
- case 178 :
- case 181 : {
- yybegin(ST_IMPORT_MEDIUM);
- return CSS_STRING;
- }
- case 473 :
- break;
- case 136 :
- case 196 :
- case 235 :
- case 273 :
- case 313 :
- case 353 :
- case 385 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_DIMENSION;
- }
- case 474 :
- break;
- case 140 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_PERCENTAGE;
- }
- case 475 :
- break;
- case 142 :
- case 242 : {
- yybegin(ST_DECLARATION_VALUE);
- return CSS_DECLARATION_VALUE_FUNCTION;
- }
- case 476 :
- break;
- case 19 :
- case 21 :
- case 23 :
- case 24 :
- case 25 :
- case 26 :
- case 28 :
- case 30 :
- case 31 :
- case 33 :
- case 34 :
- case 35 :
- case 37 :
- case 38 :
- case 39 :
- case 41 :
- case 42 :
- case 45 :
- case 46 :
- case 50 :
- case 51 :
- case 53 :
- case 58 :
- case 59 :
- case 61 :
- case 64 :
- case 65 :
- case 66 :
- case 67 :
- case 69 :
- case 70 :
- case 75 :
- case 76 :
- case 77 :
- case 78 :
- case 80 :
- case 81 :
- case 82 :
- case 84 : {
- return UNDEFINED;
- }
- case 477 :
- break;
- default :
- if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
- yy_atEOF = true;
- return null;
- }
- else {
- yy_ScanError(YY_NO_MATCH);
- }
- }
- }
- }
-
- /**
- * Runs the scanner on input files.
- *
- * This main method is the debugging routine for the scanner. It prints
- * each returned token to System.out until the end of file is reached, or
- * an error occured.
- *
- * @param argv
- * the command line, contains the filenames to run the scanner
- * on.
- */
- public static void main(String argv[]) {
- for (int i = 0; i < argv.length; i++) {
- CSSTokenizer scanner = null;
- try {
- scanner = new CSSTokenizer(new java.io.FileReader(argv[i]));
- }
- catch (java.io.FileNotFoundException e) {
- System.out.println("File not found : \"" + argv[i] + "\"");
- }
- // catch (java.io.IOException e) {
- // System.out.println("Error opening file \""+argv[i]+"\"");
- //
- // }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println("Usage : java CSSTokenizer <inputfile>");
- }
-
- try {
- do {
- System.out.println(scanner.primGetNextToken());
- }
- while (!scanner.yy_atEOF);
-
- }
- catch (java.io.IOException e) {
- System.out.println("An I/O error occured while scanning :");
- System.out.println(e);
-
- }
- catch (Exception e) {
- e.printStackTrace();
-
- }
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/ICSSTokenizer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/ICSSTokenizer.java
deleted file mode 100644
index 9715ecb0b9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/ICSSTokenizer.java
+++ /dev/null
@@ -1,37 +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.wst.css.core.internal.parser;
-
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-/**
- * currently provide this interface but may be removed in future.
- */
-public interface ICSSTokenizer {
-
- void setInitialState(int initialState);
-
- void setInitialBufferSize(int bufsize);
-
- boolean isEOF();
-
- void reset(Reader reader, int i);
-
- ITextRegion getNextToken() throws IOException;
-
- void reset(char[] cs);
-
- int getOffset();
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSTextRegionFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSTextRegionFactory.java
deleted file mode 100644
index 927ff40312..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSTextRegionFactory.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.parser.regions;
-
-import org.eclipse.wst.sse.core.internal.parser.ContextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-public class CSSTextRegionFactory {
- public synchronized static CSSTextRegionFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CSSTextRegionFactory();
- }
- return fInstance;
- }
-
- public ITextRegion createRegion(String context, int start, int textLength, int length) {
- ITextRegion region = null;
- region = new ContextRegion(context, start, textLength, length);
- return region;
- }
-
- private CSSTextRegionFactory() {
- super();
- }
-
- private static CSSTextRegionFactory fInstance = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSRegionContexts.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSRegionContexts.java
deleted file mode 100644
index 0027359cb5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSRegionContexts.java
+++ /dev/null
@@ -1,80 +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.wst.css.core.internal.parserz;
-
-/**
- */
-public interface CSSRegionContexts {
- public static final String CSS_COMMENT = "COMMENT"; //$NON-NLS-1$
- public static final String CSS_CDO = "CDO"; //$NON-NLS-1$
- public static final String CSS_CDC = "CDC"; //$NON-NLS-1$
- public static final String CSS_S = "S"; //$NON-NLS-1$
-
- public static final String CSS_DELIMITER = "DELIMITER"; //$NON-NLS-1$
- public static final String CSS_LBRACE = "LBRACE"; //$NON-NLS-1$
- public static final String CSS_RBRACE = "RBRACE"; //$NON-NLS-1$
-
- public static final String CSS_IMPORT = "IMPORT"; //$NON-NLS-1$
- public static final String CSS_PAGE = "PAGE"; //$NON-NLS-1$
- public static final String CSS_MEDIA = "MEDIA"; //$NON-NLS-1$
- public static final String CSS_FONT_FACE = "FONT_FACE"; //$NON-NLS-1$
- public static final String CSS_CHARSET = "CHARSET"; //$NON-NLS-1$
- public static final String CSS_ATKEYWORD = "ATKEYWORD"; //$NON-NLS-1$
-
- public static final String CSS_STRING = "STRING"; //$NON-NLS-1$
- public static final String CSS_URI = "URI"; //$NON-NLS-1$
- public static final String CSS_MEDIUM = "MEDIUM"; //$NON-NLS-1$
- public static final String CSS_MEDIA_SEPARATOR = "MEDIA_SEPARATOR"; //$NON-NLS-1$
-
- public static final String CSS_CHARSET_NAME = "CHARSET_NAME"; //$NON-NLS-1$
-
- public static final String CSS_PAGE_SELECTOR = "CSS_PAGE_SELECTOR"; //$NON-NLS-1$
-
- public static final String CSS_SELECTOR_ELEMENT_NAME = "SELECTOR_ELEMENT_NAME"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_UNIVERSAL = "SELECTOR_UNIVERSAL"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_PSEUDO = "SELECTOR_PSEUDO"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_CLASS = "SELECTOR_CLASS"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ID = "SELECTOR_ID"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_COMBINATOR = "SELECTOR_COMBINATOR"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_SEPARATOR = "SELECTOR_SEPARATOR"; //$NON-NLS-1$
-
- public static final String CSS_SELECTOR_ATTRIBUTE_START = "SELECTOR_ATTRIBUTE_START"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ATTRIBUTE_END = "SELECTOR_ATTRIBUTE_END"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ATTRIBUTE_NAME = "SELECTOR_ATTRIBUTE_NAME"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ATTRIBUTE_VALUE = "SELECTOR_ATTRIBUTE_VALUE"; //$NON-NLS-1$
- public static final String CSS_SELECTOR_ATTRIBUTE_OPERATOR = "SELECTOR_ATTRIBUTE_OPERATOR"; //$NON-NLS-1$
-
- public static final String CSS_DECLARATION_PROPERTY = "DECLARATION_PROPERTY"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_SEPARATOR = "DECLARATION_SEPARATOR"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_DELIMITER = "DECLARATION_DELIMITER"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_IDENT = "DECLARATION_VALUE_IDENT"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_DIMENSION = "DECLARATION_VALUE_DIMENSION"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_PERCENTAGE = "DECLARATION_VALUE_PERCENTAGE"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_NUMBER = "DECLARATION_VALUE_NUMBER"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_FUNCTION = "DECLARATION_VALUE_FUNCTION"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE = "DECLARATION_VALUE_PARENTHESIS_CLOSE"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_STRING = "DECLARATION_VALUE_STRING"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_URI = "DECLARATION_VALUE_URI"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_HASH = "DECLARATION_VALUE_HASH"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_UNICODE_RANGE = "DECLARATION_VALUE_UNICODE_RANGE"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_IMPORTANT = "CSS_DECLARATION_VALUE_IMPORTANT"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_OPERATOR = "DECLARATION_VALUE_OPERATOR"; //$NON-NLS-1$
- public static final String CSS_DECLARATION_VALUE_S = "DECLARATION_VALUE_S"; //$NON-NLS-1$
-
- public static final String CSS_UNKNOWN = "UNKNOWN"; //$NON-NLS-1$
-
- // For null object : CSSTokenizer never set this value
- public static final String CSS_UNDEFINED = "UNDEFINED"; //$NON-NLS-1$
- /**
- * currently provided this field but may be removed in future.
- */
- public static final String CSS_FOREIGN_ELEMENT = "FOREIGN_ELEMENT"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSTextParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSTextParser.java
deleted file mode 100644
index 1253614ec5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSTextParser.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.parserz;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.parser.CSSTokenizer;
-
-
-
-public class CSSTextParser {
- public static final int MODE_STYLESHEET = 0;
- public static final int MODE_DECLARATION = 1;
- public static final int MODE_DECLARATION_VALUE = 2;
-
- public CSSTextParser(int parserMode) {
- initializeParserMode(parserMode);
- }
-
- public CSSTextParser(int parserMode, Reader reader) {
- initializeParserMode(parserMode);
- reset(reader);
- }
-
- public CSSTextParser(int parserMode, String input) {
- initializeParserMode(parserMode);
- reset(input);
- }
-
- public void reset(Reader reader) {
- getTokenizer().reset(reader, 0);
- }
-
- public void reset(String input) {
- getTokenizer().reset(new StringReader(input), 0);
- }
-
- public CSSTextToken[] getTokens() {
- List tokenList = getTokenList();
- CSSTextToken[] tokens = new CSSTextToken[tokenList.size()];
- return (CSSTextToken[]) tokenList.toArray(tokens);
- }
-
- public List getTokenList() {
- List tokens;
- try {
- tokens = getTokenizer().parseText();
- }
- catch (IOException e) {
- tokens = Collections.EMPTY_LIST;
- }
- return tokens;
- }
-
- private void initializeParserMode(int parserMode) {
- int initialState;
- int bufsize;
- switch (parserMode) {
- case MODE_STYLESHEET :
- initialState = CSSTokenizer.YYINITIAL;
- bufsize = CSSTokenizer.BUFFER_SIZE_NORMAL;
- break;
- case MODE_DECLARATION :
- initialState = CSSTokenizer.ST_DECLARATION;
- bufsize = CSSTokenizer.BUFFER_SIZE_NORMAL;
- break;
- case MODE_DECLARATION_VALUE :
- initialState = CSSTokenizer.ST_DECLARATION_PRE_VALUE;
- bufsize = CSSTokenizer.BUFFER_SIZE_SMALL;
- break;
- default :
- return;
- }
- if (0 < initialState) {
- CSSTokenizer tokenizer = getTokenizer();
- tokenizer.setInitialState(initialState);
- tokenizer.setInitialBufferSize(bufsize);
- }
- }
-
- private CSSTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new CSSTokenizer();
- }
- return fTokenizer;
- }
-
- private CSSTokenizer fTokenizer = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSTextToken.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSTextToken.java
deleted file mode 100644
index fcc9078c1a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSTextToken.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.wst.css.core.internal.parserz;
-
-
-public class CSSTextToken {
- public String kind;
- public String image;
- public int start;
- public int length;
-
- public String toString() {
- return (image != null) ? image : ""; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceInitializer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceInitializer.java
deleted file mode 100644
index 20562881cb..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceInitializer.java
+++ /dev/null
@@ -1,72 +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.wst.css.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.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.sse.core.internal.encoding.CommonCharsetNames;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-
-/**
- * Sets default values for CSS Core preferences
- */
-public class CSSCorePreferenceInitializer extends AbstractPreferenceInitializer {
-
- public void initializeDefaultPreferences() {
- IEclipsePreferences node = new DefaultScope().getNode(CSSCorePlugin.getDefault().getBundle().getSymbolicName());
-
- // formatting preferences
- node.putInt(CSSCorePreferenceNames.LINE_WIDTH, 72);
- node.putBoolean(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES, false);
- node.put(CSSCorePreferenceNames.INDENTATION_CHAR, CSSCorePreferenceNames.TAB);
- node.putInt(CSSCorePreferenceNames.INDENTATION_SIZE, 1);
-
- // cleanup preferences
- node.putBoolean(CSSCorePreferenceNames.QUOTE_ATTR_VALUES, true);
- node.putBoolean(CSSCorePreferenceNames.FORMAT_SOURCE, true);
-
- // code generation preferences
- node.put(CommonEncodingPreferenceNames.INPUT_CODESET, ""); //$NON-NLS-1$
- String defaultEnc = "UTF-8";//$NON-NLS-1$
- String systemEnc = System.getProperty("file.encoding"); //$NON-NLS-1$
- if (systemEnc != null) {
- defaultEnc = CommonCharsetNames.getPreferredDefaultIanaName(systemEnc, "UTF-8");//$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(CSSCorePreferenceNames.DEFAULT_EXTENSION, "css"); //$NON-NLS-1$
-
- // additional css core preferences
- node.putInt(CSSCorePreferenceNames.FORMAT_PROP_PRE_DELIM, 0);
- node.putInt(CSSCorePreferenceNames.FORMAT_PROP_POST_DELIM, 1);
- node.put(CSSCorePreferenceNames.FORMAT_QUOTE, "\"");//$NON-NLS-1$
- node.put(CSSCorePreferenceNames.FORMAT_BETWEEN_VALUE, " ");//$NON-NLS-1$
- node.putBoolean(CSSCorePreferenceNames.FORMAT_QUOTE_IN_URI, true);
- node.putBoolean(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE, true);
- node.putBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR, true);
- node.putBoolean(CSSCorePreferenceNames.WRAPPING_NEWLINE_ON_OPEN_BRACE, false);
- node.putInt(CSSCorePreferenceNames.CASE_IDENTIFIER, CSSCorePreferenceNames.UPPER);
- node.putInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME, CSSCorePreferenceNames.LOWER);
- node.putInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE, CSSCorePreferenceNames.LOWER);
-
- // CSS cleanup preferences
- node.putInt(CSSCorePreferenceNames.CLEANUP_CASE_IDENTIFIER, CSSCorePreferenceNames.ASIS);
- node.putInt(CSSCorePreferenceNames.CLEANUP_CASE_PROPERTY_NAME, CSSCorePreferenceNames.ASIS);
- node.putInt(CSSCorePreferenceNames.CLEANUP_CASE_PROPERTY_VALUE, CSSCorePreferenceNames.ASIS);
- node.putInt(CSSCorePreferenceNames.CLEANUP_CASE_SELECTOR, CSSCorePreferenceNames.ASIS);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java
deleted file mode 100644
index d3fa08deea..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java
+++ /dev/null
@@ -1,143 +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.wst.css.core.internal.preferences;
-
-/**
- * CSS core preference keys.
- *
- * @plannedfor 1.0
- */
-public class CSSCorePreferenceNames {
- private CSSCorePreferenceNames() {
- // empty private constructor so users cannot instantiate class
- }
-
- public static final String CASE_IDENTIFIER = "identifierCase"; //$NON-NLS-1$
- public static final String CASE_PROPERTY_NAME = "propNameCase"; //$NON-NLS-1$
- public static final String CASE_PROPERTY_VALUE = "propValueCase"; //$NON-NLS-1$
- public static final String FORMAT_BETWEEN_VALUE = "betweenValue"; //$NON-NLS-1$
- public static final String FORMAT_PROP_POST_DELIM = "postDelim"; //$NON-NLS-1$
- public static final String FORMAT_PROP_PRE_DELIM = "preDelim"; //$NON-NLS-1$
- public static final String FORMAT_QUOTE = "quote"; //$NON-NLS-1$
- public static final String FORMAT_QUOTE_IN_URI = "quoteInURI"; //$NON-NLS-1$
- public static final String WRAPPING_NEWLINE_ON_OPEN_BRACE = "newLineOnOpenBrace"; //$NON-NLS-1$
- public static final String WRAPPING_ONE_PER_LINE = "onePropertyPerLine"; //$NON-NLS-1$
- public static final String WRAPPING_PROHIBIT_WRAP_ON_ATTR = "prohibitWrapOnAttr"; //$NON-NLS-1$
-
- // CSS cleanup preference names
- public static final String CLEANUP_CASE_IDENTIFIER = "cleanupIdentifierCase"; //$NON-NLS-1$
- public static final String CLEANUP_CASE_PROPERTY_NAME = "cleanupPropNameCase"; //$NON-NLS-1$
- public static final String CLEANUP_CASE_PROPERTY_VALUE = "cleanupPropValueCase"; //$NON-NLS-1$
- public static final String CLEANUP_CASE_SELECTOR = "cleanupSelectorCase"; //$NON-NLS-1$
-
- /**
- * The default extension to use when none is specified in the New CSS File
- * Wizard.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$
-
- /**
- * The maximum width of a line before a line split is needed.
- * <p>
- * Value is of type <code>Integer</code>.
- * </p>
- */
- public static final String LINE_WIDTH = "lineWidth";//$NON-NLS-1$
-
- /**
- * Indicates if all blanks lines should be cleared during formatting.
- * Blank lines will be kept when false.
- * <p>
- * Value is of type <code>Boolean</code>.
- * </p>
- */
- public static final String CLEAR_ALL_BLANK_LINES = "clearAllBlankLines";//$NON-NLS-1$
-
- /**
- * The number of #INDENTATION_CHAR for 1 indentation.
- * <p>
- * Value is of type <code>Integer</code>.
- * </p>
- */
- public static final String INDENTATION_SIZE = "indentationSize";//$NON-NLS-1$
-
- /**
- * The character used for indentation.
- * <p>
- * Value is of type <code>String</code>.<br />
- * Possible values: {TAB, SPACE}
- * </p>
- */
- public static final String INDENTATION_CHAR = "indentationChar";//$NON-NLS-1$
-
- /**
- * Possible value for the preference #INDENTATION_CHAR. Indicates to use
- * tab character when formatting.
- *
- * @see #SPACE
- * @see #INDENTATION_CHAR
- */
- public static final String TAB = "tab"; //$NON-NLS-1$
-
- /**
- * Possible value for the preference #INDENTATION_CHAR. Indicates to use
- * space character when formatting.
- *
- * @see #TAB
- * @see #INDENTATION_CHAR
- */
- public static final String SPACE = "space"; //$NON-NLS-1$
-
- /**
- * Indicates whether or not to quote all attribute values during cleanup.
- * <p>
- * Value is of type <code>Boolean</code>.
- * </p>
- */
- public static final String QUOTE_ATTR_VALUES = "quoteAttrValues";//$NON-NLS-1$
-
- /**
- * Indicates whether or not cleanup processor should format source.
- * <p>
- * Value is of type <code>Boolean</code>.
- * </p>
- */
- public static final String FORMAT_SOURCE = "formatSource";//$NON-NLS-1$
-
- /**
- * Possible value for the case preferences Indicates to leave case as is.
- *
- * @see #LOWER
- * @see #UPPER
- */
- public static final int ASIS = 0;
-
- /**
- * Possible value for the case preferences Indicates to make name
- * lowercase.
- *
- * @see #ASIS
- * @see #UPPER
- */
- public static final int LOWER = 1;
-
- /**
- * Possible value for the case preferences Indicates to make name
- * uppercase.
- *
- * @see #LOWER
- * @see #ASIS
- */
- public static final int UPPER = 2;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/ICSSModelAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/ICSSModelAdapter.java
deleted file mode 100644
index f018816052..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/ICSSModelAdapter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.adapters;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-
-
-/**
- */
-public interface ICSSModelAdapter extends INodeAdapter {
-
- ICSSModel getModel();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IModelProvideAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IModelProvideAdapter.java
deleted file mode 100644
index d1f94d2882..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IModelProvideAdapter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.adapters;
-
-
-
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-/**
- *
- */
-public interface IModelProvideAdapter extends INodeAdapter {
-
- /**
- *
- */
- void modelProvided(IStructuredModel newModel);
-
- /**
- */
- void modelReleased(IStructuredModel newModel);
-
- /**
- */
- void modelRemoved(IStructuredModel newModel);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleDeclarationAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleDeclarationAdapter.java
deleted file mode 100644
index 436a937f76..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleDeclarationAdapter.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.wst.css.core.internal.provisional.adapters;
-
-
-
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-
-/**
- */
-public interface IStyleDeclarationAdapter extends ICSSModelAdapter {
-
- /**
- */
- public CSSStyleDeclaration getStyle();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSelectorAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSelectorAdapter.java
deleted file mode 100644
index d0e29778bf..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSelectorAdapter.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.wst.css.core.internal.provisional.adapters;
-
-
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSimpleSelector;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.w3c.dom.Element;
-
-
-/**
- *
- */
-public interface IStyleSelectorAdapter extends INodeAdapter {
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- * @param pseudoName
- * java.lang.String
- */
- boolean match(ICSSSimpleSelector selector, Element element, String pseudoName);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSheetAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSheetAdapter.java
deleted file mode 100644
index 814752d427..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSheetAdapter.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.wst.css.core.internal.provisional.adapters;
-
-
-
-import org.w3c.dom.Element;
-import org.w3c.dom.stylesheets.StyleSheet;
-
-/**
- */
-public interface IStyleSheetAdapter extends ICSSModelAdapter {
-
- /**
- * Returns HTML/XML element that is the owner of this adapter
- */
- Element getElement();
-
- /**
- * Returns CSS document that is related to this element
- */
- public StyleSheet getSheet();
-
- /**
- * This is called at the time of releasing HTML/XML model
- */
- public void released();
-
- /**
- * This is called at the time of removing this Element from the document
- */
- public void removed();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSheetListAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSheetListAdapter.java
deleted file mode 100644
index 8e63889c1d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSheetListAdapter.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.wst.css.core.internal.provisional.adapters;
-
-
-
-import java.util.Enumeration;
-
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.w3c.dom.Element;
-import org.w3c.dom.css.CSSStyleDeclaration;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- */
-public interface IStyleSheetListAdapter extends INodeAdapter {
-
- /**
- */
- Enumeration getClasses();
-
- /**
- */
- public CSSStyleDeclaration getOverrideStyle(Element element, String pseudoName);
-
- /**
- */
- public StyleSheetList getStyleSheets();
-
- /**
- */
- public void releaseStyleSheets();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/contenttype/ContentTypeIdForCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/contenttype/ContentTypeIdForCSS.java
deleted file mode 100644
index 79622cf86c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/contenttype/ContentTypeIdForCSS.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.wst.css.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 ContentTypeIdForCSS {
- /**
- * 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_CSS = getConstantString();
-
- /**
- * Don't allow instantiation.
- */
- private ContentTypeIdForCSS() {
- super();
- }
-
- static String getConstantString() {
- return "org.eclipse.wst.css.core.csssource"; //$NON-NLS-1$
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSAccess.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSAccess.java
deleted file mode 100644
index 9d2afa2899..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSAccess.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.wst.css.core.internal.provisional.document;
-
-
-
-import java.util.Vector;
-
-/**
- *
- */
-public interface ICSSAccess {
-
- /**
- * @return java.util.Vector
- */
- Vector getClassNames();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSAttr.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSAttr.java
deleted file mode 100644
index cd80a8c059..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSAttr.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.wst.css.core.internal.provisional.document;
-
-
-
-/**
- *
- */
-public interface ICSSAttr extends ICSSNode {
-
- /**
- * @return java.lang.String
- */
- String getName();
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- */
- ICSSNode getOwnerCSSNode();
-
- /**
- * @return java.lang.String
- */
- String getValue();
-
- /**
- * @param newValue
- * java.lang.String
- */
- void setValue(String newValue);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSCharsetRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSCharsetRule.java
deleted file mode 100644
index 1a34ed19c5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSCharsetRule.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSCharsetRule;
-
-/**
- *
- */
-public interface ICSSCharsetRule extends ICSSNode, CSSCharsetRule {
-
- java.lang.String ENCODING = "encoding"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSDocument.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSDocument.java
deleted file mode 100644
index a56c0d927b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSDocument.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.css.CSSUnknownRule;
-import org.w3c.dom.stylesheets.MediaList;
-
-/**
- *
- */
-public interface ICSSDocument extends ICSSNode {
-
- /**
- * @return org.w3c.dom.css.CSSCharsetRule
- */
- ICSSCharsetRule createCSSCharsetRule();
-
- /**
- * @return org.w3c.dom.css.CSSFontFaceRule
- */
- CSSFontFaceRule createCSSFontFaceRule();
-
- /**
- * @return org.w3c.dom.css.CSSImportRule
- */
- ICSSImportRule createCSSImportRule();
-
- /**
- * @return org.w3c.dom.css.ICSSMediaRule
- */
- ICSSMediaRule createCSSMediaRule();
-
- /**
- * @return org.w3c.dom.css.CSSPageRule
- */
- ICSSPageRule createCSSPageRule();
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- */
- ICSSPrimitiveValue createCSSPrimitiveValue(short primitiveType);
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * java.lang.String
- */
- CSSRule createCSSRule(String rule);
-
- /**
- * @return org.w3c.dom.css.CSSStyleDeclaration
- */
- ICSSStyleDeclaration createCSSStyleDeclaration();
-
- /**
- * @param propertyName
- * java.lang.String
- */
- ICSSStyleDeclItem createCSSStyleDeclItem(String propertyName);
-
- /**
- * @return org.w3c.dom.css.CSSStyleRule
- */
- ICSSStyleRule createCSSStyleRule();
-
- /**
- * @return org.w3c.dom.css.CSSUnknownRule
- */
- CSSUnknownRule createCSSUnknownRule();
-
- /**
- * @return org.w3c.dom.stylesheets.MediaList
- */
- MediaList createMediaList();
-
- ICSSModel getModel();
-
- /**
- * @return boolean
- */
- boolean isDocument();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSImportRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSImportRule.java
deleted file mode 100644
index 21d90d110b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSImportRule.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSImportRule;
-
-/**
- *
- */
-public interface ICSSImportRule extends ICSSNode, CSSImportRule {
-
- java.lang.String HREF = "href"; //$NON-NLS-1$
-
- /**
- *
- */
- void refreshStyleSheet();
-
- /**
- * @param href
- * java.lang.String
- */
- void setHref(String href);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSMediaRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSMediaRule.java
deleted file mode 100644
index c840336b41..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSMediaRule.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSMediaRule;
-
-/**
- *
- */
-public interface ICSSMediaRule extends ICSSNode, ICSSRuleContainer, CSSMediaRule {
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSModel.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSModel.java
deleted file mode 100644
index 596e571f2a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSModel.java
+++ /dev/null
@@ -1,46 +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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-import org.eclipse.wst.css.core.internal.event.ICSSStyleNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.w3c.dom.Node;
-
-
-/**
- *
- */
-public interface ICSSModel extends ICSSStyleNotifier, IStructuredModel {
-
- public static final String EXTERNAL = "externalCSS"; //$NON-NLS-1$
- public static final String EMBEDDED = "embeddedCSS"; //$NON-NLS-1$
- public static final String INLINE = "inlineCSS"; //$NON-NLS-1$
-
- ICSSDocument getDocument();
-
- /**
- * @return org.w3c.dom.Node
- */
- Node getOwnerDOMNode();
-
- /**
- *
- * @return java.lang.Object
- */
- Object getStyleSheetType();
-
- /**
- * cleanup -> rebuild CSS Nodes This is pre-beta fix for 178176.
- */
- void refreshNodes();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNamedNodeMap.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNamedNodeMap.java
deleted file mode 100644
index 82869c24c8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNamedNodeMap.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.wst.css.core.internal.provisional.document;
-
-
-
-/**
- *
- */
-public interface ICSSNamedNodeMap extends ICSSNodeList {
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNode
- * @param name
- * java.lang.String
- */
- ICSSNode getNamedItem(String name);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNode.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNode.java
deleted file mode 100644
index eb17e537b5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNode.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-/**
- *
- */
-public interface ICSSNode {
-
- short ATTR_NODE = -1;
- short UNKNOWNRULE_NODE = 0;
- short STYLERULE_NODE = 1;
- short CHARSETRULE_NODE = 2;
- short IMPORTRULE_NODE = 3;
- short MEDIARULE_NODE = 4;
- short FONTFACERULE_NODE = 5;
- short PAGERULE_NODE = 6;
- short STYLESHEET_NODE = 7;
- short STYLEDECLARATION_NODE = 8;
- short STYLEDECLITEM_NODE = 9;
- short VALUELIST_NODE = 10;
- short PRIMITIVEVALUE_NODE = 11;
- short MEDIALIST_NODE = 12;
- short DOCUMENTCSSSTYLE_NODE = 13;
- short LINKSTYLE_NODE = 14;
- short ELEMENTCSSINLINESTYLE_NODE = 15;
-
- ICSSNode cloneNode(boolean deep);
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSNamedNodeMap
- */
- ICSSNamedNodeMap getAttributes();
-
- ICSSNodeList getChildNodes();
-
- ICSSNode getFirstChild();
-
- ICSSNode getLastChild();
-
- ICSSNode getNextSibling();
-
- /**
- * @return short
- */
- short getNodeType();
-
- ICSSDocument getOwnerDocument();
-
- ICSSNode getParentNode();
-
- ICSSNode getPreviousSibling();
-
- /**
- * @return boolean
- */
- boolean hasChildNodes();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNodeList.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNodeList.java
deleted file mode 100644
index 310dfbb627..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNodeList.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.wst.css.core.internal.provisional.document;
-
-
-
-/**
- *
- */
-public interface ICSSNodeList {
-
- /**
- * @return int
- */
- int getLength();
-
- ICSSNode item(int index);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSPageRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSPageRule.java
deleted file mode 100644
index 96a24a01e3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSPageRule.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSPageRule;
-
-public interface ICSSPageRule extends ICSSNode, CSSPageRule {
-
- java.lang.String SELECTOR = "selector"; //$NON-NLS-1$
-
- ICSSSelectorList getSelectors();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSPrimitiveValue.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSPrimitiveValue.java
deleted file mode 100644
index ebeacb809e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSPrimitiveValue.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSPrimitiveValue;
-
-/**
- *
- */
-public interface ICSSPrimitiveValue extends ICSSNode, ICSSValue, CSSPrimitiveValue {
-
- short CSS_INTEGER = 26;
- short CSS_HASH = 27;
- short CSS_URANGE = 28;
- short CSS_FORMAT = 29;
- short CSS_LOCAL = 30;
- short CSS_SLASH = 31;
- short CSS_COMMA = 32;
- short CSS_INHERIT_PRIMITIVE = 33;
-
- /**
- * @param floatValue
- * float
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setValue(float floatValue) throws org.w3c.dom.DOMException;
-
- /**
- * @param stringValue
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setValue(String stringValue) throws org.w3c.dom.DOMException;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSRuleContainer.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSRuleContainer.java
deleted file mode 100644
index 29ae5966c8..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSRuleContainer.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.css.CSSRule;
-
-/**
- *
- */
-public interface ICSSRuleContainer {
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- CSSRule appendRule(CSSRule rule) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newRule
- * org.w3c.dom.css.CSSRule
- * @param refRule
- * org.w3c.dom.css.CSSRule
- */
- CSSRule insertRuleBefore(CSSRule newRule, CSSRule refRule) throws DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param rule
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- CSSRule removeRule(CSSRule rule) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSRule
- * @param newChild
- * org.w3c.dom.css.CSSRule
- * @param oldChild
- * org.w3c.dom.css.CSSRule
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- CSSRule replaceRule(CSSRule newRule, CSSRule oldRule) throws org.w3c.dom.DOMException;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelector.java
deleted file mode 100644
index 3e9541cdf6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelector.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.wst.css.core.internal.provisional.document;
-
-
-
-import java.util.Iterator;
-
-import org.w3c.dom.Element;
-
-/**
- *
- */
-public interface ICSSSelector {
-
- ICSSSelectorItem getItem(int index);
-
- /**
- * @return java.util.Iterator
- */
- Iterator getIterator();
-
- /**
- * @return int
- */
- int getLength();
-
- /**
- * @return int
- */
- int getSpecificity();
-
- /**
- * @return java.lang.String
- */
- String getString();
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- */
- boolean match(Element element, String pseudoName);
-
- /**
- *
- */
- Iterator getErrors();
-
- /**
- *
- */
- int getErrorCount();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorCombinator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorCombinator.java
deleted file mode 100644
index fe443c0d36..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorCombinator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-/**
- *
- */
-public interface ICSSSelectorCombinator extends ICSSSelectorItem {
-
- public static final char DESCENDANT = ' ';
- public static final char CHILD = '>';
- public static final char ADJACENT = '+';
- public static final char UNKNOWN = '?'; // error case
-
- /**
- * @return int
- */
- char getCombinatorType();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorItem.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorItem.java
deleted file mode 100644
index 34fe8f8871..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorItem.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.wst.css.core.internal.provisional.document;
-
-
-
-/**
- *
- */
-public interface ICSSSelectorItem {
-
- public static final int SIMPLE = 1;
- public static final int COMBINATOR = 2;
-
- /**
- * @return int
- */
- int getItemType();
-
- /**
- * @return java.lang.String
- */
- String getString();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorList.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorList.java
deleted file mode 100644
index 077fd0c420..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorList.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.wst.css.core.internal.provisional.document;
-
-
-
-import java.util.Iterator;
-
-import org.w3c.dom.Element;
-
-/**
- *
- */
-public interface ICSSSelectorList {
-
- /**
- * @return java.util.Iterator
- */
- Iterator getIterator();
-
- /**
- * @return int
- */
- int getLength();
-
- /**
- * @return java.util.Vector
- * @param index
- * int
- */
- ICSSSelector getSelector(int index);
-
- /**
- * @return java.lang.String
- */
- String getString();
-
- /**
- *
- */
- int getErrorCount();
-
- /**
- *
- */
- Iterator getErrors();
-
- /**
- * @return boolean
- * @param element
- * org.w3c.dom.Element
- */
- boolean match(Element element, String pseudoName);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSimpleSelector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSimpleSelector.java
deleted file mode 100644
index 5d9fb82ae3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSimpleSelector.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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-/**
- *
- */
-public interface ICSSSimpleSelector extends ICSSSelectorItem {
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- String getAttribute(int index);
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- String getClass(int index);
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- String getID(int index);
-
- /**
- * @return java.lang.String
- */
- String getName();
-
- /**
- * @return boolean
- */
- int getNumOfAttributes();
-
- /**
- * @return boolean
- */
- int getNumOfClasses();
-
- /**
- * @return boolean
- */
- int getNumOfIDs();
-
- /**
- * @return boolean
- */
- int getNumOfPseudoNames();
-
- /**
- * @return java.lang.String
- * @param index
- * int
- */
- String getPseudoName(int index);
-
- /**
- * @return boolean
- */
- boolean isUniversal();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleDeclItem.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleDeclItem.java
deleted file mode 100644
index 029cd6bec7..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleDeclItem.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSValue;
-
-/**
- *
- */
-public interface ICSSStyleDeclItem extends ICSSNode, ICSSValueList {
-
- java.lang.String IMPORTANT = "important"; //$NON-NLS-1$
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSPrimitiveValue appendValue(ICSSPrimitiveValue value) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSValue
- */
- CSSValue getCSSValue();
-
- /**
- * @return java.lang.String
- */
- String getPriority();
-
- /**
- * @return java.lang.String
- */
- String getPropertyName();
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSPrimitiveValue removeValue(ICSSPrimitiveValue value) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param newValue
- * org.w3c.dom.css.CSSPrimitiveValue
- * @param oldValue
- * org.w3c.dom.css.CSSPrimitiveValue
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- ICSSPrimitiveValue replaceValue(ICSSPrimitiveValue newValue, ICSSPrimitiveValue oldValue) throws org.w3c.dom.DOMException;
-
- /**
- * @param priority
- * java.lang.String
- */
- void setPriority(String priority);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleDeclaration.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleDeclaration.java
deleted file mode 100644
index 7e8736675a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleDeclaration.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-public interface ICSSStyleDeclaration extends ICSSDocument, CSSStyleDeclaration {
-
- ICSSStyleDeclItem getDeclItemNode(String propertyName);
-
- ICSSStyleDeclItem removeDeclItemNode(ICSSStyleDeclItem oldDecl) throws org.w3c.dom.DOMException;
-
- ICSSStyleDeclItem setDeclItemNode(ICSSStyleDeclItem newDecl) throws org.w3c.dom.DOMException;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleRule.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleRule.java
deleted file mode 100644
index ac4e1a6964..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleRule.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSStyleRule;
-
-public interface ICSSStyleRule extends ICSSNode, CSSStyleRule {
-
- java.lang.String SELECTOR = "selector"; //$NON-NLS-1$
-
- ICSSSelectorList getSelectors();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleSheet.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleSheet.java
deleted file mode 100644
index 0240eb2c7f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleSheet.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.css.CSSRuleList;
-import org.w3c.dom.css.CSSStyleSheet;
-import org.w3c.dom.stylesheets.StyleSheetList;
-
-/**
- *
- */
-public interface ICSSStyleSheet extends ICSSDocument, ICSSRuleContainer, CSSStyleSheet {
-
- /**
- * @return org.w3c.dom.NodeList
- */
- NodeList getOwnerNodes();
-
- /**
- * @return org.w3c.dom.NodeList
- * @param doc
- * org.w3c.dom.Document
- */
- NodeList getOwnerNodes(Document doc);
-
- /**
- * @return org.w3c.dom.css.CSSRuleList
- */
- CSSRuleList getOwnerRules();
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheetList
- */
- StyleSheetList getParentStyleSheets();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSValue.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSValue.java
deleted file mode 100644
index 1769140fb3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSValue.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSValue;
-
-/**
- *
- */
-public interface ICSSValue extends CSSValue {
-
- /**
- * @return java.lang.String
- */
- String getCSSValueText();
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSValueList.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSValueList.java
deleted file mode 100644
index b49c575f02..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSValueList.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.CSSValueList;
-
-/**
- *
- */
-public interface ICSSValueList extends ICSSValue, CSSValueList {
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- ICSSPrimitiveValue appendValue(ICSSPrimitiveValue value);
-
- /**
- * @return org.w3c.dom.css.CSSPrimitiveValue
- * @param value
- * org.w3c.dom.css.CSSPrimitiveValue
- */
- ICSSPrimitiveValue removeValue(ICSSPrimitiveValue value);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICounter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICounter.java
deleted file mode 100644
index ff824b8284..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICounter.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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.Counter;
-
-/**
- *
- */
-public interface ICounter extends ICSSNode, Counter {
-
- java.lang.String IDENTIFIER = "identifier"; //$NON-NLS-1$
- java.lang.String LISTSTYLE = "liststyle"; //$NON-NLS-1$
- java.lang.String SEPARATOR = "separator"; //$NON-NLS-1$
-
- /**
- * @param identifier
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setIdentifier(String identifier) throws org.w3c.dom.DOMException;
-
- /**
- * @param listStyle
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setListStyle(String listStyle) throws org.w3c.dom.DOMException;
-
- /**
- * @param Separator
- * java.lang.String
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- void setSeparator(String separator) throws org.w3c.dom.DOMException;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/IDOMImplementationCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/IDOMImplementationCSS.java
deleted file mode 100644
index dc44e98e2f..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/IDOMImplementationCSS.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.css.DOMImplementationCSS;
-
-/**
- *
- */
-public interface IDOMImplementationCSS extends DOMImplementationCSS {
-
- ICSSStyleDeclaration createCSSStyleDeclaration() throws org.w3c.dom.DOMException;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/IDocumentStyle.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/IDocumentStyle.java
deleted file mode 100644
index 6a4606666b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/IDocumentStyle.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.wst.css.core.internal.provisional.document;
-
-
-
-import org.w3c.dom.stylesheets.DocumentStyle;
-import org.w3c.dom.stylesheets.StyleSheet;
-
-/**
- *
- */
-public interface IDocumentStyle extends DocumentStyle {
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheet
- * @param newSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- StyleSheet appendSheet(StyleSheet newSheet) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheet
- * @param newSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @param refSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- StyleSheet insertSheetBefore(StyleSheet newSheet, StyleSheet refSheet) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheet
- * @param oldSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- StyleSheet removeSheet(StyleSheet oldSheet) throws org.w3c.dom.DOMException;
-
- /**
- * @return org.w3c.dom.stylesheets.StyleSheet
- * @param newSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @param oldSheet
- * org.w3c.dom.stylesheets.StyleSheet
- * @exception org.w3c.dom.DOMException
- * The exception description.
- */
- StyleSheet replaceSheet(StyleSheet newSheet, StyleSheet oldSheet) throws org.w3c.dom.DOMException;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/preferences/CSSPreferenceHelper.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/preferences/CSSPreferenceHelper.java
deleted file mode 100644
index e1fafe6f0e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/preferences/CSSPreferenceHelper.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.provisional.preferences;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-
-/**
- * @deprecated just access preferences directly
- */
-public class CSSPreferenceHelper {
-
- /**
- *
- */
- public synchronized static CSSPreferenceHelper getInstance() {
- if (fInstance == null) {
- fInstance = new CSSPreferenceHelper();
- }
- return fInstance;
- }
-
- /**
- *
- */
- public String getBetweenValueString() {
- return getPreferences().getString(CSSCorePreferenceNames.FORMAT_BETWEEN_VALUE);
- }
-
- /**
- *
- */
- public String getIndentString() {
- StringBuffer indent = new StringBuffer();
-
- Preferences preferences = getPreferences();
- if (preferences != null) {
- char indentChar = ' ';
- String indentCharPref = preferences.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
- if (CSSCorePreferenceNames.TAB.equals(indentCharPref)) {
- indentChar = '\t';
- }
- int indentationWidth = preferences.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
-
- for (int i = 0; i < indentationWidth; i++) {
- indent.append(indentChar);
- }
- }
- return indent.toString();
- }
-
- /**
- *
- */
- public int getMaxLineWidth() {
- Preferences prefs = getPreferences();
- return prefs.getInt(CSSCorePreferenceNames.LINE_WIDTH);
- }
-
- /**
- *
- */
- public String getQuoteString(ICSSModel model) {
- // nakamori_TODO css pref transition
- return getPreferences().getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- }
-
- /**
- *
- */
- public int getSpacesPostDelimiter() {
- return getPreferences().getInt(CSSCorePreferenceNames.FORMAT_PROP_POST_DELIM);
- }
-
- /**
- *
- */
- public int getSpacesPreDelimiter() {
- return getPreferences().getInt(CSSCorePreferenceNames.FORMAT_PROP_PRE_DELIM);
- }
-
- /**
- *
- */
- public boolean isIdentUpperCase() {
- if (getPreferences().getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER)
- return true;
- return false;
- }
-
- /**
- *
- */
- public boolean isNewLineOnOpenBrace() {
- return getPreferences().getBoolean(CSSCorePreferenceNames.WRAPPING_NEWLINE_ON_OPEN_BRACE);
- }
-
- /**
- *
- */
- public boolean isOnePropertyPerLine() {
- return getPreferences().getBoolean(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE);
- }
-
- /**
- *
- */
- public boolean isProhibitWrapOnAttr() {
- return getPreferences().getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR);
- }
-
- /**
- *
- */
- public boolean isPropNameUpperCase() {
- if (getPreferences().getInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.UPPER)
- return true;
- return false;
- }
-
- /**
- *
- */
- public boolean isPropValueUpperCase() {
- if (getPreferences().getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER)
- return true;
- return false;
- }
-
- /**
- *
- */
- public boolean isQuoteInURI() {
- return getPreferences().getBoolean(CSSCorePreferenceNames.FORMAT_QUOTE_IN_URI);
- }
-
- /**
- *
- */
- protected void setBetweenValueString(String newBetweenValueString) {
- getPreferences().setValue(CSSCorePreferenceNames.FORMAT_BETWEEN_VALUE, newBetweenValueString);
- }
-
- /**
- *
- */
- protected void setIdentUpperCase(boolean newIdentUpperCase) {
- int theCase = CSSCorePreferenceNames.LOWER;
- if (newIdentUpperCase)
- theCase = CSSCorePreferenceNames.UPPER;
- getPreferences().setValue(CSSCorePreferenceNames.CASE_IDENTIFIER, theCase);
- }
-
- /**
- *
- */
- protected void setOnePropertyPerLine(boolean newOnePropertyPerLine) {
- getPreferences().setValue(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE, newOnePropertyPerLine);
- }
-
- /**
- *
- */
- protected void setProhibitWrapOnAttr(boolean newProhibitWrapOnAttr) {
- getPreferences().setValue(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR, newProhibitWrapOnAttr);
- }
-
- /**
- *
- */
- protected void setPropNameUpperCase(boolean newPropNameUpperCase) {
- int theCase = CSSCorePreferenceNames.LOWER;
- if (newPropNameUpperCase)
- theCase = CSSCorePreferenceNames.UPPER;
- getPreferences().setValue(CSSCorePreferenceNames.CASE_PROPERTY_NAME, theCase);
- }
-
- /**
- *
- */
- protected void setPropValueUpperCase(boolean newPropValueUpperCase) {
- int theCase = CSSCorePreferenceNames.LOWER;
- if (newPropValueUpperCase)
- theCase = CSSCorePreferenceNames.UPPER;
- getPreferences().setValue(CSSCorePreferenceNames.CASE_PROPERTY_VALUE, theCase);
- }
-
- /**
- *
- */
- public void setQuoteString(String quote) {
- getPreferences().setValue(CSSCorePreferenceNames.FORMAT_QUOTE, quote);
- }
-
- /**
- *
- */
- public void setSpacesPostDelimiter(int num) {
- getPreferences().setValue(CSSCorePreferenceNames.FORMAT_PROP_POST_DELIM, num);
- }
-
- /**
- *
- */
- public void setSpacesPreDelimiter(int num) {
- getPreferences().setValue(CSSCorePreferenceNames.FORMAT_PROP_PRE_DELIM, num);
- }
-
- private Preferences getPreferences() {
- CSSCorePlugin cssModelPlugin = CSSCorePlugin.getDefault();
- return cssModelPlugin.getPluginPreferences();
- }
-
- private CSSPreferenceHelper() {
- super();
- }
-
- private static CSSPreferenceHelper fInstance = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/text/ICSSPartitionTypes.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/text/ICSSPartitionTypes.java
deleted file mode 100644
index 54fcf463fd..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/text/ICSSPartitionTypes.java
+++ /dev/null
@@ -1,25 +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.wst.css.core.internal.provisional.text;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitionTypes;
-
-/**
- * This interface is not intended to be implemented. It defines the
- * partitioning for CSS and all its partitions. Clients should reference the
- * partition type Strings defined here directly.
- *
- * @deprecated org.eclipse.wst.css.core.text.ICSSPartitions
- */
-public interface ICSSPartitionTypes extends IStructuredPartitionTypes {
-
- String STYLE = "org.eclipse.wst.css.STYLE"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/tasks/CSSFileTaskScanner.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/tasks/CSSFileTaskScanner.java
deleted file mode 100644
index db9bfc601d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/tasks/CSSFileTaskScanner.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.tasks;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-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.tasks.StructuredFileTaskScanner;
-
-public class CSSFileTaskScanner extends StructuredFileTaskScanner {
- public CSSFileTaskScanner() {
- super();
- }
-
- protected String getCommentedText(IDocument document, int begin, int length) throws BadLocationException {
- String text = super.getCommentedText(document, begin, length);
- if (text != null && text.endsWith("*/")) { //$NON-NLS-1$
- text = text.substring(0, text.length() - 2);
- }
- return text;
- }
-
- protected boolean isCommentRegion(IStructuredDocumentRegion region, ITextRegion textRegion) {
- return textRegion.getType().equals(CSSRegionContexts.CSS_COMMENT);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentReParser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentReParser.java
deleted file mode 100644
index d4a42371d0..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentReParser.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.text;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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.IStructuredTextReParser;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser;
-
-
-/**
- * This class provides a centralized place to put "reparsing" logic. This is
- * the logic that reparses the text incrementally, as a user types in new
- * characters, or DOM nodes are inserted or deleted. Note: it is not a thread
- * safe class.
- */
-public class CSSStructuredDocumentReParser extends StructuredDocumentReParser {
-
- class ReparseRange {
- ReparseRange() {
- reset();
- }
-
- ReparseRange(int start, int end) {
- fRangeStart = start;
- fRangeEnd = end;
- }
-
- void setStart(int start) {
- fRangeStart = start;
- }
-
- void setEnd(int end) {
- fRangeEnd = end;
- }
-
- int getStart() {
- return fRangeStart;
- }
-
- int getEnd() {
- return fRangeEnd;
- }
-
- boolean isValid() {
- return (0 < fRangeEnd - fRangeStart) ? true : false;
- }
-
- void reset() {
- fRangeStart = Integer.MAX_VALUE;
- fRangeEnd = 0;
- }
-
- void expand(ReparseRange range) {
- if (range == null || !range.isValid()) {
- return;
- }
- int start = range.getStart();
- if (start < fRangeStart) {
- fRangeStart = start;
- }
- int end = range.getEnd();
- if (fRangeEnd < end) {
- fRangeEnd = end;
- }
- }
-
- private int fRangeStart;
- private int fRangeEnd;
- }
-
- /**
- *
- */
- public CSSStructuredDocumentReParser() {
- super();
- }
-
- /**
- *
- */
- // public StructuredDocumentEvent
- // checkForCrossStructuredDocumentRegionBoundryCases2() {
- // StructuredDocumentEvent result = specialPositionUpdate(fStart, fStart +
- // fLengthToReplace - 1);
- // if (result == null) {
- // result = checkInsideBrace();
- // }
- // return result;
- // }
- protected StructuredDocumentEvent checkForCrossStructuredDocumentRegionSyntax() {
- int checkStart = fStart;
- int checkEnd = fStart + fLengthToReplace - 1;
- IStructuredDocumentRegion endRegion = fStructuredDocument.getRegionAtCharacterOffset(checkEnd);
- if (endRegion != null) {
- checkEnd = endRegion.getEndOffset();
- }
-
- ReparseRange range = new ReparseRange(checkStart, checkEnd);
-
- range.expand(getUpdateRangeForDelimiter(range.getStart(), range.getEnd()));
- range.expand(getUpdateRangeForUnknownRegion(range.getStart(), range.getEnd()));
-
- range.expand(getUpdateRangeForQuotes(range.getStart(), range.getEnd()));
- range.expand(getUpdateRangeForComments(range.getStart(), range.getEnd()));
- range.expand(getUpdateRangeForBraces(range.getStart(), range.getEnd()));
-
- StructuredDocumentEvent result;
-
- result = checkInsideBrace(range.getStart(), range.getEnd());
-
- if (result == null) {
- result = reparse(range.getStart(), range.getEnd());
- }
-
- return result;
- }
-
- private ReparseRange getUpdateRangeForUnknownRegion(int start, int end) {
- int newStart = start;
- RegionIterator iterator = new RegionIterator(fStructuredDocument, start - 1);
- if (iterator.hasPrev()) {
- iterator.prev(); // skip myself
- }
- while (iterator.hasPrev()) {
- ITextRegion region = iterator.prev();
- if (region != null && region.getType() == CSSRegionContexts.CSS_UNKNOWN) {
- newStart = iterator.getStructuredDocumentRegion().getStartOffset(region);
- }
- else {
- break;
- }
- }
-
- if (start != newStart) {
- return new ReparseRange(newStart, end);
- }
-
- return null;
- }
-
- private ReparseRange getUpdateRangeForDelimiter(int start, int end) {
- if (dirtyStart != null && dirtyStart.getStart() < start) {
- start = dirtyStart.getStart();
- }
- IStructuredDocumentRegion docRegion = fStructuredDocument.getRegionAtCharacterOffset(start);
- if (docRegion == null) {
- return null;
- }
- if (docRegion.getType() == CSSRegionContexts.CSS_DELIMITER) {
- IStructuredDocumentRegion prevRegion = docRegion.getPrevious();
- if (prevRegion != null) {
- return new ReparseRange(prevRegion.getStart(), end);
- }
- }
-
- return null;
- }
-
- private ReparseRange getUpdateRangeForQuotes(int start, int end) {
- ReparseRange range = new ReparseRange();
-
- range.expand(getUpdateRangeForPair(start, end, "\"", "\"")); //$NON-NLS-2$//$NON-NLS-1$
- range.expand(getUpdateRangeForPair(start, end, "\'", "\'")); //$NON-NLS-2$//$NON-NLS-1$
-
- return (range.isValid()) ? range : null;
- }
-
- private ReparseRange getUpdateRangeForComments(int start, int end) {
- ReparseRange range = new ReparseRange();
-
- range.expand(getUpdateRangeForPair(start, end, "/*", "*/")); //$NON-NLS-2$//$NON-NLS-1$
- range.expand(getUpdateRangeForPair(start, end, "<%", "%>")); //$NON-NLS-2$//$NON-NLS-1$
-
- return (range.isValid()) ? range : null;
- }
-
- private ReparseRange getUpdateRangeForBraces(int start, int end) {
- ReparseRange range = new ReparseRange();
-
- range.expand(getUpdateRangeForPair(start, end, "[", "]")); //$NON-NLS-2$//$NON-NLS-1$
- range.expand(getUpdateRangeForPair(start, end, "(", ")")); //$NON-NLS-2$//$NON-NLS-1$
- range.expand(getUpdateRangeForPair(start, end, "{", "}")); //$NON-NLS-2$//$NON-NLS-1$
-
- return (range.isValid()) ? range : null;
- }
-
- private StructuredDocumentEvent checkInsideBrace(int start, int end) {
- StructuredDocumentEvent result = null;
- IStructuredDocumentRegion region = fStructuredDocument.getRegionAtCharacterOffset(start);
- if (region == null) {
- return null;
- }
- boolean bDeclaration = false;
- String type = region.getType();
- if (CSSRegionUtil.isDeclarationType(type) || type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE) {
- bDeclaration = true;
- }
- if (!bDeclaration) {
- IStructuredDocumentRegion prevRegion = CSSUtil.findPreviousSignificantNode(region);
- if (prevRegion != null) {
- type = prevRegion.getType();
- if (CSSRegionUtil.isDeclarationType(type) || type == CSSRegionContexts.CSS_LBRACE) {
- bDeclaration = true;
- }
- }
- }
- if (!bDeclaration) {
- IStructuredDocumentRegion nextRegion = CSSUtil.findNextSignificantNode(region);
- if (nextRegion != null) {
- type = nextRegion.getType();
- if (CSSRegionUtil.isDeclarationType(type) || type == CSSRegionContexts.CSS_RBRACE) {
- bDeclaration = true;
- }
- }
- }
-
- if (bDeclaration) {
- IStructuredDocumentRegion startRegion = findRuleStart(region);
- if (startRegion != null) {
- IStructuredDocumentRegion endRegion = fStructuredDocument.getRegionAtCharacterOffset(end);
- if (endRegion != null) {
- result = reparse(startRegion, endRegion);
- }
- }
- }
- return result;
- }
-
- private IStructuredDocumentRegion findRuleStart(IStructuredDocumentRegion startRegion) {
- IStructuredDocumentRegion region = startRegion;
- // find '{'
- while (region != null && region.getType() != CSSRegionContexts.CSS_LBRACE) {
- region = region.getPrevious();
- }
- // if (region == startRegion) {
- // return null;
- // }
- // else
- if (region != null) { // '{' is found
- region = region.getPrevious();
- if (isLeadingDeclarationType(region.getType())) {
- return region;
- }
- }
- return null;
- }
-
- private boolean isLeadingDeclarationType(String type) {
- return (type == CSSRegionContexts.CSS_PAGE || type == CSSRegionContexts.CSS_FONT_FACE || CSSRegionUtil.isSelectorType(type));
- }
-
- // public StructuredDocumentEvent
- // checkForCrossStructuredDocumentRegionBoundryCases() {
- // return specialPositionUpdate(fStart, fStart + fLengthToReplace - 1);
- // }
- /**
- *
- */
- private ReparseRange getUpdateRangeForPair(int start, int end, String opener, String closer) {
- StringBuffer deletionBuf = new StringBuffer();
- StringBuffer insertionBuf = new StringBuffer();
- int quoteLen = Math.max(opener.length(), closer.length());
- if (1 < quoteLen) {
- /**
- * ex) opener = "ABC", closer = "XYZ" model: ABCDEF.......UVWXYZ
- * deletion: CDEF.......UVWX pre/post: AB / YZ
- */
- int addStart = start - (quoteLen - 1);
- if (0 <= addStart) {
- String addStr = fStructuredDocument.get(addStart, quoteLen - 1);
- deletionBuf.append(addStr);
- insertionBuf.append(addStr);
- }
- deletionBuf.append(fDeletedText);
- insertionBuf.append(fChanges);
- if (end + (quoteLen - 1) < fStructuredDocument.getLength()) {
- String addStr = fStructuredDocument.get(end + 1, quoteLen - 1);
- deletionBuf.append(addStr);
- insertionBuf.append(addStr);
- }
- }
- else {
- deletionBuf.append(fDeletedText);
- insertionBuf.append(fChanges);
- }
- String deletion = deletionBuf.toString();
- String insertion = insertionBuf.toString();
-
- int rangeStart = start;
- int rangeEnd = end;
-
- if (0 <= deletion.indexOf(opener) || 0 <= deletion.indexOf(closer) || 0 <= insertion.indexOf(opener) || 0 <= insertion.indexOf(closer)) {
- int s, e;
- try {
- if (start <= fStructuredDocument.getLength()) {
- IRegion startRegion = getFindReplaceDocumentAdapter().find(start - 1, opener, false, false, false, false);
- if (startRegion != null) {
- s = startRegion.getOffset();
- }
- else {
- s = -1;
- }
- }
- else {
- s = -1;
- }
- if (end < fStructuredDocument.getLength() - 1) {
- IRegion endRegion = getFindReplaceDocumentAdapter().find(end + 1, closer, true, false, false, false);
- if (endRegion != null) {
- e = endRegion.getOffset();
- }
- else {
- e = -1;
- }
- }
- else {
- e = -1;
- }
- }
- catch (BadLocationException ex) {
- Logger.logException(ex);
- return null;
- }
- if (0 <= s) {
- rangeStart = Math.min(rangeStart, s);
- }
- if (0 <= e) {
- rangeEnd = Math.max(rangeEnd, e);
- }
- }
-
- if (rangeStart < start || end < rangeEnd) {
- return new ReparseRange(rangeStart, rangeEnd);
- }
- else {
- return null;
- }
- }
-
- public IStructuredTextReParser newInstance() {
- return new CSSStructuredDocumentReParser();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentRegionFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentRegionFactory.java
deleted file mode 100644
index 6dc83a1d5c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentRegionFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.text;
-
-
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-
-/**
- *
- */
-public class CSSStructuredDocumentRegionFactory {
-
- public static final int CSS_GENERIC = 101109;
-
- /**
- *
- */
- public static IStructuredDocumentRegion createStructuredDocumentRegion(int type) {
- IStructuredDocumentRegion instance = null;
- switch (type) {
- case CSS_GENERIC :
- instance = new BasicStructuredDocumentRegion();
- break;
- default :
- break;
- }
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredDocumentWalker.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredDocumentWalker.java
deleted file mode 100644
index 10d8142443..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredDocumentWalker.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.text;
-
-
-
-import java.util.Enumeration;
-
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentRegionsReplacedEvent;
-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.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.internal.util.Utilities;
-
-public class StructuredDocumentWalker {
-
- IStructuredDocumentRegionList fOldStructuredDocumentRegionList = null;
- IStructuredDocument fStructuredDocument = null;
- String fOriginalChanges = null;
- int fOriginalOffset = 0;
- int fOriginalLengthToReplace = 0;
- int fLengthDifference = 0;
-
- /**
- *
- */
- public StructuredDocumentWalker() {
- }
-
- /**
- *
- */
- public StructuredDocumentWalker(StructuredDocumentEvent event) {
- initialize(event);
- }
-
- /**
- *
- */
- public IStructuredDocument getStructuredDocument() {
- return fStructuredDocument;
- }
-
- /**
- * Old Nodes: --[O1]--[O2]--[O3]--- : / \ Current Nodes:
- * ---[C1]-----[C2]-----[C3]-----[C4]---
- *
- * Input: O1 -> Output: O2 Input: O2 -> Output: O3 Input: O3 -> Output: C4
- * Input: Cn -> Output: Cn+1
- */
- public IStructuredDocumentRegion getNextNode(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion nextNode = null;
- if (node != null) {
- nextNode = node.getNext();
- if (nextNode == null) {
- if (isOldNode(node)) {
- // this may be the end of old flatnodes
- int newStart = node.getEnd() - fLengthDifference;
- nextNode = fStructuredDocument.getRegionAtCharacterOffset(newStart);
- }
- }
- }
- return nextNode;
- }
-
- /**
- * Old Nodes: --[O1]--[O2]--[O3]--- : / \ Current Nodes:
- * ---[C1]-----[C2]-----[C3]-----[C4]---
- *
- * Input: O* -> Output: C4 Input: Cn -> Output: Cn+1
- */
- public IStructuredDocumentRegion getNextNodeInCurrent(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion nextNode = null;
- if (isOldNode(node)) {
- IStructuredDocumentRegion oldEndNode = fOldStructuredDocumentRegionList.item(fOldStructuredDocumentRegionList.getLength() - 1);
- int newStart = oldEndNode.getEnd() - fLengthDifference;
- nextNode = fStructuredDocument.getRegionAtCharacterOffset(newStart);
- }
- else if (node != null) {
- nextNode = node.getNext();
- }
- return nextNode;
- }
-
- /**
- * Old Nodes: --[O1]--[O2]--[O3]--- : / \ Current Nodes:
- * ---[C1]-----[C2]-----[C3]-----[C4]---
- *
- * Input: O1 -> Output: C1 Input: O2 -> Output: O1 Input: O3 -> Output: O2
- * Input: Cn -> Output: Cn-1
- */
- public IStructuredDocumentRegion getPrevNode(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion prevNode = null;
- if (node != null) {
- prevNode = node.getPrevious();
- if (prevNode == null) {
- if (isOldNode(node)) {
- // this may be the start of old flatnodes
- int newEnd = node.getStart() - 1;
- prevNode = fStructuredDocument.getRegionAtCharacterOffset(newEnd);
- }
- }
- }
- return prevNode;
- }
-
- /**
- * Old Nodes: --[O1]--[O2]--[O3]--- : / \ Current Nodes:
- * ---[C1]-----[C2]-----[C3]-----[C4]---
- *
- * Input: O* -> Output: C1 Input: Cn -> Output: Cn-1
- */
- public IStructuredDocumentRegion getPrevNodeInCurrent(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion prevNode = null;
- if (isOldNode(node)) {
- IStructuredDocumentRegion oldStartNode = fOldStructuredDocumentRegionList.item(0);
- int newEnd = oldStartNode.getStart() - 1;
- prevNode = fStructuredDocument.getRegionAtCharacterOffset(newEnd);
- }
- else if (node != null) {
- prevNode = node.getPrevious();
- }
- return prevNode;
- }
-
- /**
- *
- */
- public void initialize(StructuredDocumentEvent event) {
- fStructuredDocument = event.getStructuredDocument();
- fOriginalChanges = event.getText();
- fOriginalOffset = event.getOffset();
- fOriginalLengthToReplace = event.getLength();
- fLengthDifference = Utilities.calculateLengthDifference(fOriginalChanges, fOriginalLengthToReplace);
-
- if (event instanceof StructuredDocumentRegionsReplacedEvent) {
- fOldStructuredDocumentRegionList = ((StructuredDocumentRegionsReplacedEvent) event).getOldStructuredDocumentRegions();
- }
- else {
- fOldStructuredDocumentRegionList = null;
- }
- }
-
- /**
- *
- */
- public boolean isOldNode(IStructuredDocumentRegion node) {
- boolean bOld = false;
- if (fOldStructuredDocumentRegionList != null) {
- Enumeration e = fOldStructuredDocumentRegionList.elements();
- while (e.hasMoreElements()) {
- if (e.nextElement() == node) {
- bOld = true;
- break;
- }
- }
- }
- return bOld;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredTextPartitionerForCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredTextPartitionerForCSS.java
deleted file mode 100644
index 98d53c15d4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredTextPartitionerForCSS.java
+++ /dev/null
@@ -1,37 +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.wst.css.core.internal.text;
-
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.wst.css.core.text.ICSSPartitions;
-import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.sse.core.text.IStructuredPartitions;
-
-public class StructuredTextPartitionerForCSS extends StructuredTextPartitioner {
-
- public final static String[] legalTypes = new String[]{ICSSPartitions.STYLE, IStructuredPartitions.DEFAULT_PARTITION};
-
- public StructuredTextPartitionerForCSS() {
- super();
- }
-
- public String getDefaultPartitionType() {
- return ICSSPartitions.STYLE;
- }
-
- public String[] getLegalContentTypes() {
- return legalTypes;
- }
-
- public IDocumentPartitioner newInstance() {
- return new StructuredTextPartitionerForCSS();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/AbstractCssTraverser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/AbstractCssTraverser.java
deleted file mode 100644
index c611b586a2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/AbstractCssTraverser.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-import java.util.ArrayList;
-import java.util.Stack;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-
-
-
-/**
- *
- */
-public abstract class AbstractCssTraverser {
-
- public static short TRAV_CONT = 0;
- public static short TRAV_PRUNE = 1;
- public static short TRAV_STOP = 2;
- protected java.util.Stack travStack;
- private boolean fTraverseImported = false;
- private boolean fTraverseImportFirst = false;
- private java.util.Vector traversedSheets;
-
- /**
- * CssPropCMNode constructor comment.
- */
- public AbstractCssTraverser() {
- super();
- }
-
- /**
- * @param model
- * org.eclipse.wst.css.core.model.interfaces.ICSSModel
- */
- public final void apply(ICSSModel model) {
- apply(model.getDocument());
- }
-
- public final void apply(ICSSNode root) {
- travStack = new Stack();
- if (fTraverseImported) {
- traversedSheets = new Vector();
- if (root != null && root.getOwnerDocument() != null && root.getOwnerDocument().getNodeType() == ICSSNode.STYLESHEET_NODE) {
- traversedSheets.add(root.getOwnerDocument());
- }
- }
-
- // first call begin()
- begin(root);
-
- // traverse
- traverse(root);
-
- // last call end()
- end(root);
- }
-
-
- protected void begin(ICSSNode node) {
- }
-
-
- protected void end(ICSSNode node) {
- }
-
- /**
- * @return boolean
- */
- public final boolean isTraverseImported() {
- return fTraverseImported;
- }
-
-
- protected short postNode(ICSSNode node) {
- return (short) 0;
- }
-
-
- protected short preNode(ICSSNode node) {
- return (short) 0;
- }
-
- /**
- * @param newTraverseImported
- * boolean
- */
- public final void setTraverseImported(boolean newTraverseImported) {
- fTraverseImported = newTraverseImported;
- }
-
- /**
- * @param newTraverseImportFirst
- * boolean
- */
- public final void setTraverseImportFirst(boolean newTraverseImportFirst) {
- fTraverseImportFirst = newTraverseImportFirst;
- }
-
-
- private final short traverse(ICSSNode node) {
- if (node == null)
- return TRAV_CONT;
-
- travStack.push(node);
-
- // pre-action
- short ret = preNode(node);
-
- if (ret == TRAV_CONT) {
- if (fTraverseImported && (node.getNodeType() == ICSSNode.IMPORTRULE_NODE)) {
- ICSSImportRule rule = (ICSSImportRule) node;
- // traverse external style-sheet
- ICSSStyleSheet sheet = (ICSSStyleSheet) rule.getStyleSheet();
- if (sheet != null && !traversedSheets.contains(sheet)) { // prevent
- // loop
- traversedSheets.add(sheet);
- short retExt = traverse(sheet);
- if (retExt == TRAV_STOP) {
- travStack.pop();
- return retExt;
- }
- }
- }
-
- // collect children
- ArrayList children = new ArrayList();
- ICSSNode child = node.getFirstChild();
- if (fTraverseImportFirst) {
- ArrayList others = new ArrayList();
-
- while (child != null) {
- if (child.getNodeType() == ICSSNode.IMPORTRULE_NODE)
- children.add(child);
- else
- others.add(child);
- child = child.getNextSibling();
- }
- children.addAll(others);
- }
- else {
- while (child != null) {
- children.add(child);
- child = child.getNextSibling();
- }
- }
-
- // traverse children
- for (int i = 0; i < children.size(); i++) {
- child = (ICSSNode) children.get(i);
- short retChild = traverse(child);
- if (retChild == TRAV_STOP) {
- travStack.pop();
- return retChild;
- }
- }
- }
- else if (ret == TRAV_STOP) {
- travStack.pop();
- return ret;
- }
-
- // post-action
- ret = postNode(node);
-
- travStack.pop();
- return (ret == TRAV_PRUNE) ? TRAV_CONT : ret;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSClassTraverser.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSClassTraverser.java
deleted file mode 100644
index 87a353d8b3..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSClassTraverser.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSimpleSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-
-
-/**
- *
- */
-public class CSSClassTraverser extends AbstractCssTraverser {
-
- ArrayList fClassNames;
-
- /**
- *
- */
- public CSSClassTraverser() {
- super();
- }
-
- /**
- *
- */
- private void addClassNames(ICSSStyleRule rule) {
- ICSSSelectorList selectorList = rule.getSelectors();
- Iterator iSelector = selectorList.getIterator();
- while (iSelector.hasNext()) {
- ICSSSelector selector = (ICSSSelector) iSelector.next();
- Iterator iItem = selector.getIterator();
- while (iItem.hasNext()) {
- ICSSSelectorItem item = (ICSSSelectorItem) iItem.next();
- if (item.getItemType() == ICSSSelectorItem.SIMPLE) {
- ICSSSimpleSelector sel = (ICSSSimpleSelector) item;
- int nClasses = sel.getNumOfClasses();
- for (int iClass = 0; iClass < nClasses; iClass++) {
- String className = sel.getClass(iClass);
- if (!fClassNames.contains(className))
- fClassNames.add(className);
- }
- }
- }
- }
- }
-
- /**
- *
- */
- protected void begin(ICSSNode node) {
- if (fClassNames == null)
- fClassNames = new ArrayList();
- }
-
- /**
- *
- */
- protected void end(ICSSNode node) {
- }
-
- /**
- *
- */
- public Collection getClassNames() {
- return (fClassNames != null) ? fClassNames : Collections.EMPTY_LIST;
- }
-
- /**
- *
- */
- protected short postNode(ICSSNode node) {
- return TRAV_CONT;
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- short ret;
- if (node instanceof ICSSStyleRule) {
- addClassNames((ICSSStyleRule) node);
- ret = TRAV_PRUNE;
- }
- else if (node instanceof ICSSStyleSheet || node instanceof ICSSMediaRule || node instanceof ICSSImportRule) {
- ret = TRAV_CONT;
- }
- else {
- ret = TRAV_PRUNE;
- }
- return ret;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSLinkConverter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSLinkConverter.java
deleted file mode 100644
index 377dcd38cc..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSLinkConverter.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- *
- */
-public class CSSLinkConverter extends org.eclipse.wst.css.core.internal.util.AbstractCssTraverser {
- private static final String URL_BEGIN = "url("; //$NON-NLS-1$
- private static final String URL_END = ")"; //$NON-NLS-1$
- private static final String EMPTY = ""; //$NON-NLS-1$
- private static final String D_QUOTE = "\""; //$NON-NLS-1$
- private static final String S_QUOTE = "\'"; //$NON-NLS-1$
-
- IStructuredModel baseModel;
-
- /**
- *
- */
- public CSSLinkConverter(IStructuredModel model) {
- super();
- baseModel = model;
- if (model instanceof ICSSModel && ((ICSSModel) model).getStyleSheetType() != ICSSModel.EXTERNAL) {
- IDOMNode node = (IDOMNode) ((ICSSModel) model).getOwnerDOMNode();
- baseModel = node.getModel();
- }
- }
-
- /**
- *
- */
- public static String addFunc(String value) {
- if (!value.trim().toLowerCase().startsWith(URL_BEGIN)) {
- // pa_TODO css pref
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
-
- String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- value = CSSUtil.stripQuotes(value);
- quote = CSSUtil.detectQuote(value, quote);
- String str = URL_BEGIN;
- if (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER)
- str = str.toUpperCase();
- StringBuffer buf = new StringBuffer(str);
- buf.append(quote);
- buf.append(value);
- buf.append(quote);
- buf.append(URL_END);
- return buf.toString();
- }
- return value;
- }
-
-
-
- /**
- *
- */
- protected void begin(ICSSNode node) {
- if (baseModel == null) {
- baseModel = node.getOwnerDocument().getModel();
- if (baseModel instanceof ICSSModel && ((ICSSModel) baseModel).getStyleSheetType() != ICSSModel.EXTERNAL) {
- IDOMNode xmlNode = (IDOMNode) ((ICSSModel) baseModel).getOwnerDOMNode();
- baseModel = xmlNode.getModel();
- }
- }
- }
-
- /**
- *
- */
- private static boolean isUrl(String source) {
- if (source == null)
- return false;
- source = source.trim().toLowerCase();
- return source.startsWith(URL_BEGIN);
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- if (node.getNodeType() == ICSSNode.PRIMITIVEVALUE_NODE) {
- toAbsolute((CSSValue) node);
- } else if (node.getNodeType() == ICSSNode.IMPORTRULE_NODE) {
- ICSSImportRule iRule = (ICSSImportRule) node;
- iRule.setHref(toAbsolute(addFunc(iRule.getHref())));
- }
- return TRAV_CONT;
- }
-
- /**
- *
- * @return java.lang.String
- * @param value
- * java.lang.String
- */
- public static String removeFunc(String value) {
- if (value == null)
- return EMPTY;
- String field = value.trim();
- // first : tear "url(....)"
- if (field.toLowerCase().startsWith(URL_BEGIN)) {
- int url = field.toLowerCase().indexOf(URL_BEGIN);
- int endParenthesis = field.lastIndexOf(URL_END);
- if (endParenthesis > url) {
- field = field.substring(url + 4, endParenthesis);
- } else
- field = field.substring(url + 4);
- }
- return field.trim();
- }
-
- /**
- *
- */
- public static String stripFunc(String value) {
- if (value == null)
- return EMPTY;
- // first : tear "url(....)"
- String field = removeFunc(value);
- // second : tear quotations
- if (field.toLowerCase().startsWith(D_QUOTE)) {
- int quote = field.indexOf(D_QUOTE);
- int end = field.lastIndexOf(D_QUOTE);
- if (end > quote) {
- field = field.substring(quote + 1, end);
- } else
- field = field.substring(quote + 1);
- } else if (field.toLowerCase().startsWith(S_QUOTE)) {
- int quote = field.indexOf(S_QUOTE);
- int end = field.lastIndexOf(S_QUOTE);
- if (end > quote) {
- field = field.substring(quote + 1, end);
- } else
- field = field.substring(quote + 1);
- }
-
- return field.trim();
- }
-
- /**
- *
- */
- public String toAbsolute(String source) {
- if (isUrl(source)) {
- String url = CSSPathService.getAbsoluteURL(baseModel, stripFunc(source));
- return (url != null) ? addFunc(url) : (URL_BEGIN + URL_END);
- }
- return source;
- }
-
- /**
- *
- */
- public boolean toAbsolute(CSSValue node) {
- if (node instanceof ICSSPrimitiveValue) {
- ICSSPrimitiveValue value = (ICSSPrimitiveValue) node;
- if (value.getPrimitiveType() == CSSPrimitiveValue.CSS_URI) {
- value.setValue(stripFunc(toAbsolute(URL_BEGIN + value.getStringValue() + URL_END)));
- return true;
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSPathService.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSPathService.java
deleted file mode 100644
index 8532819e04..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSPathService.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
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-/**
- *
- */
-public class CSSPathService {
-
- // Constants
- private static final String FILEURLSCHEME = "file";//$NON-NLS-1$
- private static final String URLCOLON = ":"; //$NON-NLS-1$
- private static final String FILEURLPREFIX = FILEURLSCHEME + URLCOLON + "//";//$NON-NLS-1$
- private static final String URLSEPARATOR = "/"; //$NON-NLS-1$
-
- /**
- * @return java.lang.String
- */
- public static String getAbsoluteURL(IStructuredModel baseModel, String ref) {
- String absLink = URLModelProviderCSS.resolveURI(baseModel, ref, true);
- String url = absLink;
- if (absLink != null) { // if it has not scheme, we must add "file"
- // scheme
- try {
- new java.net.URL(absLink);
- }
- catch (java.net.MalformedURLException e) {
- IPath path = new Path(absLink);
- if (path != null)
- url = toURL(path);
- }
- }
- return url;
- }
-
- /**
- *
- * @return org.eclipse.core.resources.IFile
- * @param location
- * java.lang.String
- */
- public static IFile location2File(String location) {
- Path path = new Path(location);
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
- if (file == null && path.segmentCount() > 1)
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- return file;
- }
-
- /**
- * Gets a file URL for the path.
- */
- private static String toURL(IPath path) {
- path = new Path(path.toFile().getAbsolutePath());
- if (path.isUNC() == true) {
- // it's UNC. return file://host/foo/bar/baz.html
- return FILEURLSCHEME + URLCOLON + path.toString();
- }
- return FILEURLPREFIX + URLSEPARATOR + path.toString();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSSelectorListFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSSelectorListFactory.java
deleted file mode 100644
index 82c7b81431..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSSelectorListFactory.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-import org.eclipse.wst.css.core.internal.document.CSSSelectorListImpl;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-
-
-public class CSSSelectorListFactory {
- static synchronized public CSSSelectorListFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CSSSelectorListFactory();
- }
- return fInstance;
- }
-
- public ICSSSelectorList createSelectorList(String selectorString) {
- return new CSSSelectorListImpl(selectorString);
- }
-
-
- private CSSSelectorListFactory() {
- super();
- }
-
- private static CSSSelectorListFactory fInstance;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSStyleDeclarationFactory.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSStyleDeclarationFactory.java
deleted file mode 100644
index ab98a09c37..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSStyleDeclarationFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import org.eclipse.wst.css.core.internal.document.CSSStyleDeclarationFactoryContext;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-
-
-/**
- *
- */
-public class CSSStyleDeclarationFactory extends CSSStyleDeclarationFactoryContext {
-
- private static CSSStyleDeclarationFactory fInstance = null;
-
- /**
- * CSSStyleDeclarationFactory constructor comment.
- */
- private CSSStyleDeclarationFactory() {
- super();
- }
-
- /**
- * @return org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclaration
- * @param decl
- * org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclaration
- */
- public ICSSStyleDeclaration createStyleDeclaration(ICSSStyleDeclaration decl) {
- if (decl == null) {
- return null;
- }
- ICSSStyleDeclaration newNode = createStyleDeclaration();
-
- if (newNode == null) {
- return null;
- }
- fOwnerDocument = newNode;
- cloneChildNodes(decl, newNode);
- return newNode;
- }
-
- /**
- *
- */
- public synchronized static CSSStyleDeclarationFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CSSStyleDeclarationFactory();
- }
- return fInstance;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSUtil.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSUtil.java
deleted file mode 100644
index 237c1b9c74..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSUtil.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.Logger;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-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.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-
-
-public class CSSUtil {
-
- /**
- *
- */
- public static void debugOut(String str) {
- Logger.log(Logger.WARNING, "css warning: " + str); //$NON-NLS-1$
- }
-
- /**
- *
- */
- // public static Vector extractMediaContents(Vector regions) {
- // Vector media = new Vector();
- // if (regions == null) { return media; }
- //
- // boolean bReady = true;
- // for (Iterator i = regions.iterator(); i.hasNext(); ) {
- // ITextRegion region = (ITextRegion)i.next();
- // if (region == null) { continue; }
- // String type = region.getType();
- // if (bReady) {
- // if (type == IDENT) {
- // media.addElement(region.getText());
- // bReady = false;
- // }
- // } else {
- // if (type == COMMA) {
- // bReady = true;
- // }
- // }
- // }
- //
- // return media;
- // }
- /**
- *
- */
- public static String extractStringContents(String text) {
- return stripQuotes(text);
- }
-
- /**
- *
- */
- public static String extractUriContents(String text) {
- String contents = text.trim();
- if (contents.toLowerCase().startsWith("url(") && //$NON-NLS-1$
- contents.toLowerCase().endsWith(")")) {//$NON-NLS-1$
- // strip "url(", ")"
- contents = contents.substring(4, contents.length() - 1);
- }
- contents = stripQuotes(contents);
-
- return contents;
- }
-
- /**
- *
- */
- public static IStructuredDocumentRegion findNextSignificantNode(IStructuredDocumentRegion startNode) {
- if (startNode == null) {
- return null;
- }
- IStructuredDocumentRegion node = startNode.getNext();
- while (node != null) {
- String type = getStructuredDocumentRegionType(node);
- if (type != CSSRegionContexts.CSS_S && type != CSSRegionContexts.CSS_COMMENT && type != CSSRegionContexts.CSS_CDO && type != CSSRegionContexts.CSS_CDC) {
- return node;
- }
- node = node.getNext();
- }
- return null;
- }
-
- /**
- *
- */
- public static IStructuredDocumentRegion findNodeBackward(IStructuredDocumentRegion startNode, IStructuredDocumentRegion endNode, String type) {
- IStructuredDocumentRegion node;
- for (node = startNode; node != null; node = node.getPrevious()) {
- if (node.getStartOffset() < endNode.getStartOffset()) {
- node = null;
- break;
- }
- else if (getStructuredDocumentRegionType(node) == type) {
- break;
- }
- }
- return node;
- }
-
- /**
- *
- */
- public static IStructuredDocumentRegion findNodeForward(IStructuredDocumentRegion startNode, IStructuredDocumentRegion endNode, String type) {
- IStructuredDocumentRegion node;
- for (node = startNode; node != null; node = node.getNext()) {
- if (endNode.getStartOffset() < node.getStartOffset()) {
- node = null;
- break;
- }
- else if (getStructuredDocumentRegionType(node) == type) {
- break;
- }
- }
- return node;
- }
-
- /**
- *
- */
- public static IStructuredDocumentRegion findPreviousSignificantNode(IStructuredDocumentRegion startNode) {
- if (startNode == null) {
- return null;
- }
- IStructuredDocumentRegion node = startNode.getPrevious();
- while (node != null) {
- String type = getStructuredDocumentRegionType(node);
- if (type != CSSRegionContexts.CSS_S && type != CSSRegionContexts.CSS_COMMENT && type != CSSRegionContexts.CSS_CDO && type != CSSRegionContexts.CSS_CDC) {
- return node;
- }
- node = node.getPrevious();
- }
- return null;
- }
-
- /**
- *
- */
- public static String getClassString(Object object) {
- if (object == null) {
- return "null"; //$NON-NLS-1$
- }
- else {
- String name = object.getClass().toString();
- int lastPeriod = name.lastIndexOf('.');
- return name.substring(lastPeriod + 1);
- }
- }
-
- /**
- *
- */
- public static String getStructuredDocumentRegionType(IStructuredDocumentRegion flatNode) {
- if (flatNode == null) {
- return CSSRegionContexts.CSS_UNDEFINED;
- }
- ITextRegionList regions = flatNode.getRegions();
- if (regions == null || regions.size() == 0) {
- return CSSRegionContexts.CSS_UNDEFINED;
- }
- ITextRegion region = regions.get(0);
- return region.getType();
- }
-
- /**
- *
- */
- public static int getLengthDifference(IStructuredDocumentRegionList newNodes, IStructuredDocumentRegionList oldNodes) {
- int newLen = getTextLength(newNodes);
- int oldLen = getTextLength(oldNodes);
- return newLen - oldLen;
- }
-
- /**
- *
- */
- public static String getRegionText(IStructuredDocumentRegion flatNode, ITextRegionList regions) {
- StringBuffer buf = new StringBuffer();
- if (regions != null) {
- for (Iterator i = regions.iterator(); i.hasNext();) {
- ITextRegion region = (ITextRegion) i.next();
- if (region == null) {
- continue;
- }
- buf.append(flatNode.getText(region));
- }
- }
-
- return buf.toString();
- }
-
- /**
- *
- */
- public static int getTextLength(IStructuredDocumentRegionList nodes) {
- int length = 0;
-
- if (nodes != null) {
- for (Enumeration e = nodes.elements(); e.hasMoreElements();) {
- IStructuredDocumentRegion flatNode = (IStructuredDocumentRegion) e.nextElement();
- if (flatNode != null) {
- length += flatNode.getText().length();
- }
- }
- }
-
- return length;
- }
-
- /**
- *
- * @param token
- * @return
- */
- public static boolean isLength(CSSTextToken token) {
- if (token == null)
- return false;
- if (token.kind == CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION)
- return true;
- if (token.kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- double number = Double.parseDouble(token.image);
- if (number == 0.0)
- return true;
- }
- return false;
- }
-
- /**
- *
- */
- public static boolean isSelectorText(IStructuredDocumentRegion region) {
- String type = getStructuredDocumentRegionType(region);
- if (CSSRegionUtil.isSelectorBegginingType(type)) {
- return true;
- }
- else if (type == CSSRegionContexts.CSS_UNKNOWN) {
- // String text = flatNode.getText();
- // if (text != null && text.indexOf('.') == 0) {
- return true;
- // }
- }
-
- return false;
- }
-
- /**
- *
- */
- public static String stripQuotes(String text) {
- if (text == null)
- return null;
- String contents = text.trim();
- if (2 <= contents.length()) {
- char first = contents.charAt(0);
- char last = contents.charAt(contents.length() - 1);
- if ((first == '\"' && last == '\"') || (first == '\'' && last == '\'')) {
- contents = contents.substring(1, contents.length() - 1);
- }
- }
- return contents;
- }
-
- public static String detectQuote(String source, String defaultQuote) {
- if (source == null)
- return defaultQuote;
- final String D_QUOTE = "\""; //$NON-NLS-1$
- final String S_QUOTE = "\'"; //$NON-NLS-1$
-
- int dIndex = source.indexOf(D_QUOTE);
- int sIndex = source.indexOf(S_QUOTE);
- if (dIndex < 0 && sIndex < 0) {
- return defaultQuote;
- }
- else if (dIndex < 0) {
- return D_QUOTE;
- }
- else if (sIndex < 0) {
- return S_QUOTE;
- }
- else if (dIndex < sIndex) {
- return S_QUOTE;
- }
- else {
- return D_QUOTE;
- }
- }
-
- /**
- *
- */
- public static void stripSurroundingSpace(ITextRegionList regions) {
- if (regions == null) {
- return;
- }
- while (!regions.isEmpty()) {
- ITextRegion region = regions.get(0);
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- regions.remove(0);
- }
- else {
- break;
- }
- }
- while (!regions.isEmpty()) {
- ITextRegion region = regions.get(regions.size() - 1);
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- regions.remove(region);
- }
- else {
- break;
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/ImportRuleCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/ImportRuleCollector.java
deleted file mode 100644
index a2c915c515..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/ImportRuleCollector.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.wst.css.core.internal.util;
-
-
-
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-
-
-/**
- *
- */
-public class ImportRuleCollector extends org.eclipse.wst.css.core.internal.util.AbstractCssTraverser {
-
- protected java.util.Vector rules = new Vector();
- protected ICSSStyleSheet target = null;
-
- /**
- *
- */
- public ImportRuleCollector() {
- super();
- setTraverseImported(false);
- }
-
- /**
- *
- */
- public ImportRuleCollector(ICSSStyleSheet sheet) {
- super();
- target = sheet;
- }
-
- /**
- *
- */
- public java.util.Vector getRules() {
- return rules;
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- if (node.getNodeType() == ICSSNode.MEDIARULE_NODE || node.getNodeType() == ICSSNode.STYLESHEET_NODE) {
- return TRAV_CONT;
- }
- if (node.getNodeType() == ICSSNode.IMPORTRULE_NODE) {
- if (target != null) {
- ICSSImportRule imp = (ICSSImportRule) node;
- if (imp.getStyleSheet() != target)
- return TRAV_PRUNE;
- }
- if (!rules.contains(node))
- rules.add(node);
- }
- return TRAV_PRUNE;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/ImportedCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/ImportedCollector.java
deleted file mode 100644
index 1f2a7aa7da..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/ImportedCollector.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-
-/**
- *
- */
-public class ImportedCollector extends org.eclipse.wst.css.core.internal.util.AbstractCssTraverser {
-
- protected java.util.Vector externals = new Vector();
-
- /**
- *
- */
- public ImportedCollector() {
- super();
- setTraverseImported(true);
- }
-
- /**
- *
- */
- public List getExternals() {
- return externals;
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- if (node.getNodeType() == ICSSNode.MEDIARULE_NODE) {
- return TRAV_CONT;
- }
- if (node.getNodeType() == ICSSNode.STYLESHEET_NODE) {
- if (!externals.contains(node)) {
- externals.add(node);
- }
- return TRAV_CONT;
- }
- if (node.getNodeType() == ICSSNode.IMPORTRULE_NODE) {
- return TRAV_CONT;
- }
- return TRAV_PRUNE;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/RegionIterator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/RegionIterator.java
deleted file mode 100644
index 44d0022999..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/RegionIterator.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-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;
-
-/**
- *
- */
-public class RegionIterator {
-
- private IStructuredDocumentRegion documentRegion = null;
- private IStructuredDocumentRegion curDocumentRegion = null;
- private int current = -1;
-
- /**
- *
- */
- public RegionIterator(IStructuredDocument structuredDocument, int index) {
- super();
-
- reset(structuredDocument, index);
- }
-
- /**
- *
- */
- public RegionIterator(IStructuredDocumentRegion flatNode, ITextRegion region) {
- super();
- reset(flatNode, region);
- }
-
- /**
- *
- */
- public IStructuredDocumentRegion getStructuredDocumentRegion() {
- return curDocumentRegion;
- }
-
- /**
- *
- */
- public boolean hasNext() {
- if (documentRegion == null)
- return false;
- if (current < 0)
- return false;
- if (current < documentRegion.getRegions().size())
- return true;
- return false;
- }
-
- /**
- *
- */
- public boolean hasPrev() {
- // the same as hasNext()
- return hasNext();
- }
-
- /**
- *
- */
- public ITextRegion next() {
- if (documentRegion == null)
- return null;
- if (current < 0 || documentRegion.getRegions() == null || documentRegion.getRegions().size() <= current)
- return null;
-
- ITextRegion region = documentRegion.getRegions().get(current);
- curDocumentRegion = documentRegion;
-
- if (current >= documentRegion.getRegions().size() - 1) {
- documentRegion = documentRegion.getNext();
- current = -1;
- }
- current++;
-
- return region;
- }
-
- /**
- *
- */
- public ITextRegion prev() {
- if (documentRegion == null)
- return null;
- if (current < 0 || documentRegion.getRegions() == null || documentRegion.getRegions().size() <= current)
- return null;
-
- ITextRegion region = documentRegion.getRegions().get(current);
- curDocumentRegion = documentRegion;
-
- if (current == 0) {
- documentRegion = documentRegion.getPrevious();
- if (documentRegion != null)
- current = documentRegion.getRegions().size();
- else
- current = 0;
- }
- current--;
-
- return region;
- }
-
- /**
- *
- */
- public void reset(IStructuredDocument structuredDocument, int index) {
- documentRegion = structuredDocument.getRegionAtCharacterOffset(index);
- curDocumentRegion = documentRegion;
- if (documentRegion != null) {
- ITextRegion region = documentRegion.getRegionAtCharacterOffset(index);
- current = documentRegion.getRegions().indexOf(region);
- }
- }
-
- /**
- *
- */
- public void reset(IStructuredDocumentRegion flatNode, ITextRegion region) {
- if (region != null && flatNode != null) {
- this.documentRegion = flatNode;
- curDocumentRegion = flatNode;
- current = flatNode.getRegions().indexOf(region);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectionCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectionCollector.java
deleted file mode 100644
index 2e44ca8863..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectionCollector.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-
-
-/**
- */
-public class SelectionCollector extends org.eclipse.wst.css.core.internal.util.AbstractCssTraverser {
-
- int start, end;
- List selectedNodes;
-
- /**
- * SelectionCollector constructor comment.
- */
- public SelectionCollector() {
- super();
- }
-
- /**
- */
- protected void begin(ICSSNode node) {
- selectedNodes = new ArrayList();
- }
-
- /**
- */
- public List getSelectedNodes() {
- if (selectedNodes == null)
- return new ArrayList();
- else
- return new ArrayList(selectedNodes);
- }
-
- /**
- */
- protected short preNode(ICSSNode node) {
- IndexedRegion iNode = (IndexedRegion) node;
- if (iNode.getStartOffset() <= end && start < iNode.getEndOffset()) {
- if (node.getNodeType() != ICSSNode.STYLESHEET_NODE) {
- IndexedRegion iFirstChild = (IndexedRegion) node.getFirstChild();
- IndexedRegion iLastChild = (IndexedRegion) node.getLastChild();
- if (iFirstChild == null || start < iFirstChild.getStartOffset() || iLastChild.getEndOffset() <= end)
- selectedNodes.add(node);
- }
- return TRAV_CONT;
- }
- if (iNode.getStartOffset() > end)
- return TRAV_STOP;
- else
- return TRAV_PRUNE;
- }
-
- /**
- */
- public void setRegion(int newStart, int newEnd) {
- start = newStart;
- end = newEnd;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectorValidator.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectorValidator.java
deleted file mode 100644
index 0d52e16dc9..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectorValidator.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import org.eclipse.wst.css.core.internal.document.CSSSelectorListImpl;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSimpleSelector;
-
-
-public class SelectorValidator {
-
- /**
- * Constructor for SelectorValidator.
- */
- public SelectorValidator(String text) {
- super();
- fText = text;
- }
-
- /**
- * Returns true if the text consists of one CLASS selector. syntax check
- * is a little loose (.123 is passed)
- *
- * ".class" -> true ".123" -> true ".class , .class2" -> false
- * ".class.class2" -> false ".123{}" -> false
- */
- public boolean isClass() {
- ICSSSimpleSelector selector = getOnlyOneSimpleSelector();
- if (selector != null) {
- return (selector.getName().length() == 0 && selector.getNumOfAttributes() == 0 && selector.getNumOfClasses() == 1 && selector.getNumOfIDs() == 0 && selector.getNumOfPseudoNames() == 0);
- }
- return false;
- }
-
- /**
- * Returns true if the text consists of one ID selector.
- *
- * "#ID" -> true "H1#myID" -> false "#abc{}" -> false
- */
- public boolean isID() {
- ICSSSimpleSelector selector = getOnlyOneSimpleSelector();
- if (selector != null) {
- return (selector.getName().length() == 0 && selector.getNumOfAttributes() == 0 && selector.getNumOfClasses() == 0 && selector.getNumOfIDs() == 1 && selector.getNumOfPseudoNames() == 0);
- }
- return false;
- }
-
- /**
- * overall check
- *
- * "P#hoge98 + *:hover > A:link, A.external:visited" -> true "H1 H2 {}" ->
- * false
- */
- public boolean isValid() {
- parse();
- return (fSelectorList != null && fSelectorList.getErrorCount() == 0);
- }
-
- private ICSSSimpleSelector getOnlyOneSimpleSelector() {
- parse();
- if (fSelectorList != null && fSelectorList.getLength() == 1) {
- ICSSSelector selector = fSelectorList.getSelector(0);
- int nItem = selector.getLength();
- if (nItem == 1) {
- ICSSSelectorItem item = selector.getItem(0);
- if (item instanceof ICSSSimpleSelector) {
- return (ICSSSimpleSelector) item;
- }
- }
- }
- return null;
- }
-
- private void parse() {
- if (fSelectorList == null) {
- if (fText != null) {
- fSelectorList = new CSSSelectorListImpl(fText);
- }
- }
- }
-
-
- private String fText = null;
- private ICSSSelectorList fSelectorList = null;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectorsCollector.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectorsCollector.java
deleted file mode 100644
index 0593ff8d52..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectorsCollector.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-
-
-/**
- *
- */
-public class SelectorsCollector extends AbstractCssTraverser {
-
- protected Vector selectors = new Vector();
- protected Vector selectorsToAvoid = null;
-
- /**
- *
- */
- public SelectorsCollector() {
- super();
- setTraverseImported(false);
- }
-
- /**
- *
- */
- public void addSelectorToAvoid(ICSSSelector selToAvoid) {
- if (selToAvoid == null)
- return;
- if (selectorsToAvoid == null)
- selectorsToAvoid = new Vector();
-
- if (!selectorsToAvoid.contains(selToAvoid))
- selectorsToAvoid.add(selToAvoid);
- }
-
- /**
- *
- */
- public void addSelectorToAvoid(ICSSStyleRule rule) {
- ICSSSelectorList list = rule.getSelectors();
- Iterator it = list.getIterator();
- while (it.hasNext()) {
- ICSSSelector sel = (ICSSSelector) it.next();
- addSelectorToAvoid(sel);
- }
- }
-
- /**
- *
- */
- public java.util.List getSelectors() {
- return selectors;
- }
-
- /**
- *
- */
- protected short preNode(ICSSNode node) {
- if (node.getNodeType() == ICSSNode.STYLERULE_NODE) {
- ICSSStyleRule rule = (ICSSStyleRule) node;
- ICSSSelectorList list = rule.getSelectors();
- Iterator it = list.getIterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (selectorsToAvoid != null && selectorsToAvoid.contains(obj))
- continue;
- if (!selectors.contains(obj))
- selectors.add(obj);
- }
- return TRAV_PRUNE;
- }
- else if (node.getNodeType() == ICSSNode.STYLESHEET_NODE) {
- return TRAV_CONT;
- }
- return TRAV_PRUNE;
- }
-
- /**
- *
- */
- public void setSelectorsToAvoid(java.util.Vector newSelectorsToAvoid) {
- selectorsToAvoid = newSelectorsToAvoid;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/URLHelper.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/URLHelper.java
deleted file mode 100644
index 7d5e106da2..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/URLHelper.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util;
-
-
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.wst.sse.core.internal.util.PathHelper;
-
-/**
- * Hyperlink manager. Proved useful services like link conversion An utility
- * class to help other parsre modules to convert links
- */
-public class URLHelper {
-
- private static final String FILE_PROTOCOL_SEARCH_SIG = "file:/";//$NON-NLS-1$
- private static final String FILE_PROTOCOL_SIG = "file:///";//$NON-NLS-1$
- private static String RELATIVE_PATH_SIG = "..";//$NON-NLS-1$
- private static final String FORWARD_SLASH = "/";//$NON-NLS-1$
- private URL fBaseUrl = null; // base url. assumed to a absulute url
- private String fBaseUrlString = null;
- private URL fDocRoot = null;
- private String fDocRootString = null;
-
- public URLHelper(String baseUrl) {
- initialize(baseUrl, null);
- }
-
- public URLHelper(String baseUrl, String docRoot) {
- initialize(baseUrl, docRoot);
- }
-
- /**
- * Special adujust for file url
- */
- public String adjustFileProtocolUrl(String url) {
- if (url.startsWith(FILE_PROTOCOL_SEARCH_SIG)) {
- url = FILE_PROTOCOL_SIG + url.substring(FILE_PROTOCOL_SEARCH_SIG.length());
- }
- return url;
- }
-
- private String convert(String url, URL baseUrl, String urlString) {
- String absUrl = url;
- if (baseUrl != null) {
- try {
- // do special thing file protocol
- if (baseUrl.getProtocol().equalsIgnoreCase("file")) {//$NON-NLS-1$
- // remove the fist
- if (url.startsWith("/"))//$NON-NLS-1$
- url = url.substring(1);
- // empty string causes malformed exception
- String tempUrl = url;
- if ("".equals(url))//$NON-NLS-1$
- tempUrl = " ";//$NON-NLS-1$
- URL newUrl = new URL(baseUrl, tempUrl);
- // do extra math for file protocol to support ie based
- absUrl = adjustFileProtocolUrl(newUrl.toString());
- }
- else {
- URL newUrl = new URL(fBaseUrl, url);
- absUrl = newUrl.toString();
- }
- }
- catch (MalformedURLException me) {
- }
- // convert everything to forward slash
- absUrl = PathHelper.switchToForwardSlashes(absUrl);
- }
- else {
- // the given may be based on file
- if (urlString != null) {
- // swich the url to proper direction
- url = PathHelper.removeLeadingSeparator(url);
- File fle = new File(urlString, url);
- absUrl = fle.getPath();
-
- }
- // convert everything to forward slash
- absUrl = PathHelper.switchToForwardSlashes(absUrl);
-
- // if the path ends with ".." we need to add a terminating slash
- // or
- // else the link will not be resolved correctly. (it will look
- // like
- // /url/path/to/somewhere/.. instead of /url/path/to/
- if (absUrl.endsWith(FORWARD_SLASH + RELATIVE_PATH_SIG)) {
- absUrl += FORWARD_SLASH;
- }
- }
-
- // resolve relative path to absolute
- absUrl = PathHelper.adjustPath(absUrl);
- return absUrl;
- }
-
- private void initialize(String baseUrl, String docRoot) {
- //
- // Find out whether baes url is a url or file name
- //
- try {
- String temp = PathHelper.appendTrailingURLSlash(baseUrl);
- fBaseUrl = new URL(temp);
- }
- catch (MalformedURLException mue) {
- }
- if (fBaseUrl == null) {
- // it is a file based url
- fBaseUrlString = baseUrl;
- }
-
- // do the same for doc root
- if (docRoot != null) {
- try {
- String temp = PathHelper.appendTrailingURLSlash(docRoot);
- fDocRoot = new URL(temp);
-
- }
- catch (MalformedURLException mue) {
- }
- if (fDocRoot == null) {
- // it is a file based url
- fDocRootString = docRoot;
- }
- }
- }
-
- /**
- * Convert the given url to a abolute url using the base url Input url can
- * be of any othe following format Absolute urls -------------- .
- * http://www.foo.com/ . http://www.foo.com . http://www.foo.com/folder .
- * http://www.foo.com/folder/ . http://www.foo.com/index.html .
- * http://www.foo.com/folder/index.html .
- * http://www.foo.com/folder/../index.html Url relative on document root
- * ------------------------- . / . /folder . /index.html .
- * /folder/index.html . /folder/../index.html
- *
- * Self relative ------------------------- . index.html . ./index.html .
- * ../index.html . folder/index.html . folder/../index.html
- *
- * file based url adds another dimension since it doesn't have a document
- * root So uses fDocRoot if provided
- */
- public String toAbsolute(String url) {
- String absUrl = url;
-
- URL newUrl = null;
- // try to see it is a absolute url
- try {
- newUrl = new URL(url);
- }
- catch (MalformedURLException me) {
- }
- // if document root is provided
- // do special case
- if (newUrl == null) {
- if (fDocRoot == null && fDocRootString == null) {
- // try to check relative url
- absUrl = convert(url, fBaseUrl, fBaseUrlString);
- }
- else {
- // doc root is provided
- // if the url is a doc root based use doc root
-
- if (url.startsWith("/"))//$NON-NLS-1$
- absUrl = convert(url, fDocRoot, fDocRootString);
- else
- absUrl = convert(url, fBaseUrl, fBaseUrlString);
-
- }
- }
- return absUrl;
- }
-
- /**
- * Convert from an absolute url to relative url based on the given url
- * Both are assumed to be ablsute url
- */
- public String toRelative(String url, String documentUrl) {
- String output = url;
- // assuming both urls are absolute
- try {
- URL inputUrl = new URL(url);
- URL docUrl = new URL(documentUrl);
- // filter out if the urls are not fro the same domain
- if (!inputUrl.getProtocol().equals(docUrl.getProtocol()) || !inputUrl.getHost().equals(docUrl.getHost()) || inputUrl.getPort() != docUrl.getPort())
- return output;
- // both url are coming form the same place
- // strip off the domain parts
- String inputName = inputUrl.getFile();
- String docName = docUrl.getFile();
- output = PathHelper.convertToRelative(inputName, docName);
- }
- catch (MalformedURLException me) {
- output = null;
- }
- return output;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/URLModelProviderCSS.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/URLModelProviderCSS.java
deleted file mode 100644
index ef180d7237..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/URLModelProviderCSS.java
+++ /dev/null
@@ -1,387 +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.wst.css.core.internal.util;
-
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.charset.UnsupportedCharsetException;
-
-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.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.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.encoding.EncodingRule;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists;
-import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse;
-import org.eclipse.wst.sse.core.internal.util.PathHelper;
-import org.eclipse.wst.sse.core.internal.util.ProjectResolver;
-import org.eclipse.wst.sse.core.internal.util.URIResolver;
-
-/**
- */
-public class URLModelProviderCSS {
-
- private static final int GET_MODEL_FOR_READ = 1;
- // private static final int GET_NEW_MODEL_FOR_READ = 2;
- private static final int GET_MODEL_FOR_EDIT = 3;
- // private static final int GET_NEW_MODEL_FOR_EDIT = 4;
- // private static final int READ_BUFFER_SIZE = 4096;
- // IModelManager
- private IModelManager modelManager = null;
-
- /**
- */
- public URLModelProviderCSS() {
- super();
-
- // obtain model manager
- modelManager = StructuredModelManager.getModelManager();
- }
-
- /**
- * Calculate ID from a filename. This must be same as
- * FileModelProvider.calculateId(IFile)
- */
- private static String calculateId(IPath fullIPath) {
- return fullIPath.toString();
- }
-
- /**
- * <code>baseModel</code>: the model containing the link
- * <code>ref</code>: the link URL string
- */
- private IStructuredModel getCommonModelFor(final IStructuredModel baseModel, final String ref, final int which) throws IOException {
- // first, create absolute url
- String absURL = resolveURI(baseModel, ref, true);
- if ((absURL == null) || (absURL.length() == 0)) {
- return null;
- }
-
- // need to remove file:// scheme if necessary
- try {
- final URL aURL = new URL(absURL);
- // An actual URL was given, only file:/// is supported
- // resolve it by finding the file it points to
- if (!aURL.getProtocol().equals("platform")) { //$NON-NLS-1$
- if (aURL.getProtocol().equals("file") && (aURL.getHost().equals("localhost") || aURL.getHost().length() == 0)) { //$NON-NLS-2$//$NON-NLS-1$
- absURL = aURL.getFile();
- final IPath ipath = new Path(absURL);
- // if path has a device, and if it begins with
- // IPath.SEPARATOR, remove it
- final String device = ipath.getDevice();
- if ((device != null) && (device.length() > 0)) {
- if (device.charAt(0) == IPath.SEPARATOR) {
- final String newDevice = device.substring(1);
- absURL = ipath.setDevice(newDevice).toString();
- }
- }
-
- }
- }
- }
- catch (MalformedURLException mfuExc) {
- }
-
- // next, decide project
- IProject project = null;
- final IPath fullIPath = new Path(absURL);
- IWorkspaceRoot workspace = ResourcesPlugin.getWorkspace().getRoot();
- IContainer container = workspace.getContainerForLocation(fullIPath);
- if (container != null) {
- // fullIPath doesn't exist in workspace
- project = container.getProject();
- }
-
- // If HTML document has a link to an extern CSS which is not in
- // IProject
- // workspace.getContainerForLoation() may return null. We need to take
- // care
- // of this case
-
- // now, get absURL's IFile
- if ((project != null) && (project.getLocation().isPrefixOf(fullIPath) == false)) {
- // it's at outside of Project
- return null;
- }
-
- IStructuredModel model = null;
- if (project != null) {
- IPath filePath = fullIPath.removeFirstSegments(project.getLocation().segmentCount());
- IFile file = (filePath != null && !filePath.isEmpty()) ? project.getFile(filePath) : null;
- if (file == null) {
- return null;
- }
-
- // obtain model
- if (which == GET_MODEL_FOR_EDIT) {
- model = getModelForEdit(file);
- }
- else if (which == GET_MODEL_FOR_READ) {
- model = getModelForRead(file);
- }
-
- // setting synchronization stamp is IModelManager's client's
- // responsibility
- if (model != null && model.getSynchronizationStamp() == IResource.NULL_STAMP)
- model.resetSynchronizationStamp(file);
- }
- else {
- String id = null;
- InputStream inStream = null;
- // obtain resolver
- URIResolver resolver = (project != null) ? (URIResolver) project.getAdapter(URIResolver.class) : null;
- if (resolver == null) {
- // ProjectResolver can take care of the case if project is
- // null.
- resolver = new ProjectResolver(project);
- }
- if (resolver == null) {
- return null;
- }
-
- // there is no project. we can't expect IProject help to create
- // id/inputStream
- File file = fullIPath.toFile();
-
- // obatin id
- id = calculateId(fullIPath);
-
- // obtain InputStream
- try {
- inStream = new FileInputStream(file);
- }
- catch (FileNotFoundException fnfe) {
- // the file does not exist, or we don't have read permission
- return null;
- }
-
- // obtain model
- try {
- if (which == GET_MODEL_FOR_EDIT) {
- model = getModelManager().getModelForEdit(id, inStream, resolver);
- }
- else if (which == GET_MODEL_FOR_READ) {
- model = getModelManager().getModelForRead(id, inStream, resolver);
- }
- }
- catch (UnsupportedEncodingException ue) {
- }
- catch (IOException ioe) {
- }
- finally {
- // close now !
- if (inStream != null) {
- inStream.close();
- }
- }
- }
-
- // set locationid
- if (model != null && model.getBaseLocation() == null) {
- model.setBaseLocation(fullIPath.toString());
- }
-
- return model;
- }
-
- /**
- * <code>baseModel</code>: the model containing the link
- * <code>ref</code>: the link URL string
- */
- public IStructuredModel getModelForEdit(IStructuredModel baseModel, String ref) throws IOException {
- return getCommonModelFor(baseModel, ref, GET_MODEL_FOR_EDIT);
- }
-
- /**
- */
- private IStructuredModel getModelForEdit(IFile file) throws IOException {
- if (file == null)
- return null;
- IModelManager manager = getModelManager();
-
- // create a fake InputStream
- IStructuredModel model = null;
- try {
- model = manager.getModelForEdit(file);
- }
- catch (UnsupportedCharsetException ex) {
- try {
- model = manager.getModelForEdit(file, EncodingRule.FORCE_DEFAULT);
- }
- catch (IOException ioe) {
- }
- catch (CoreException ce) {
- }
- }
- catch (CoreException ce) {
- }
- return model;
- }
-
- /**
- * <code>baseModel</code>: the model containing the link
- * <code>ref</code>: the link URL string
- */
- public IStructuredModel getModelForRead(IStructuredModel baseModel, String ref) throws UnsupportedEncodingException, IOException {
- return getCommonModelFor(baseModel, ref, GET_MODEL_FOR_READ);
- }
-
- /**
- */
- private IStructuredModel getModelForRead(IFile file) throws IOException {
- if (file == null)
- return null;
- IModelManager manager = getModelManager();
-
- // create a fake InputStream
- IStructuredModel model = null;
- try {
- model = manager.getModelForRead(file);
- }
- catch (UnsupportedCharsetException ex) {
- try {
- model = manager.getModelForRead(file, EncodingRule.FORCE_DEFAULT);
- }
- catch (IOException ioe) {
- }
- catch (CoreException ce) {
- }
- }
- catch (CoreException ce) {
- }
- return model;
- }
-
- /**
- */
- private IModelManager getModelManager() {
- return modelManager;
- }
-
- public IStructuredModel getNewModelForEdit(IFile iFile) {
- if (iFile == null)
- return null;
- IModelManager manager = getModelManager();
- if (manager == null)
- return null;
-
- IStructuredModel model = null;
- try {
- model = manager.getNewModelForEdit(iFile, false);
- }
- catch (IOException ex) {
- }
- catch (ResourceInUse riu) {
- }
- catch (ResourceAlreadyExists rae) {
- }
- catch (CoreException ce) {
- }
- return model;
- }
-
- public IStructuredModel getNewModelForRead(IFile iFile) {
- if (iFile == null)
- return null;
- IModelManager manager = getModelManager();
- if (manager == null)
- return null;
-
- IStructuredModel model = null;
- try {
- model = manager.getNewModelForEdit(iFile, false);
- }
- catch (IOException ex) {
- }
- catch (ResourceInUse riu) {
- }
- catch (ResourceAlreadyExists rae) {
- }
- catch (CoreException ce) {
- }
- return model;
- }
-
- /**
- * <code>baseModel</code>: the model containing the link
- * <code>ref</code>: the link URL string
- * <code>resolveCrossProjectLinks</code>: If resolveCrossProjectLinks
- * is set to true, then this method will properly resolve the URI if it is
- * a valid URI pointing to another (appropriate) project.
- */
- public static String resolveURI(IStructuredModel baseModel, String ref, boolean resolveCrossProjectLinks) {
- if (baseModel == null)
- return null;
-
- // get resolver in Model
- final URIResolver resolver = baseModel.getResolver();
-
- // resolve to absolute url
- final String absurl = (resolver != null) ? resolver.getLocationByURI(ref, resolveCrossProjectLinks) : null;
- if ((resolver != null) && (absurl == null) && (ref != null) && (ref.trim().length() > 0) && (ref.trim().charAt(0) == '/')) {
- // to reach here means :
- // ref is a Docroot relative
- // resolver can't resolve ref
- // so that href is a broken and should not create model
- return null;
- }
- if ((absurl != null) && (absurl.length() > 0)) {
- return absurl;
- }
-
- // maybe ref is at outside of the Project
- // obtain docroot;
- final IContainer container = (resolver != null) ? resolver.getRootLocation() : null;
- String docroot = null;
- if (container != null) {
- docroot = container.getLocation().toString();
- }
- if (docroot == null) {
- docroot = baseModel.getBaseLocation();
- }
- if (docroot == null) {
- // should not be
- return null;
- }
-
- // obtain document url
- String modelBaseLocation = baseModel.getBaseLocation();
- if ((modelBaseLocation == null) || (modelBaseLocation.length() == 0)) {
- // fallback...
- modelBaseLocation = baseModel.getId();
- }
- if ((modelBaseLocation == null) || (modelBaseLocation.length() == 0)) {
- // i can't resolve uri !
- return null;
- }
-
- // resolve url
- URLHelper helper = new URLHelper(PathHelper.getContainingFolderPath(modelBaseLocation), PathHelper.getContainingFolderPath(PathHelper.appendTrailingURLSlash(docroot)));
- return helper.toAbsolute(ref);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundPositionXSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundPositionXSubStyleAdapter.java
deleted file mode 100644
index 968013b517..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundPositionXSubStyleAdapter.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.contentmodel.IValID;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValueList;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- * for horizontal value of 'background-position'
- */
-public class BackgroundPositionXSubStyleAdapter implements ISubPropertyAdapter {
-
- /**
- *
- */
- public BackgroundPositionXSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- protected CSSTextToken[] correctMeaningToken(CSSTextToken[] src) {
- java.util.ArrayList list = new java.util.ArrayList();
- for (int i = 0; i < src.length; i++) {
- if (src[i].kind != CSSRegionContexts.CSS_S && src[i].kind != CSSRegionContexts.CSS_DECLARATION_VALUE_S && src[i].kind != CSSRegionContexts.CSS_COMMENT)
- list.add(src[i]);
- }
- CSSTextToken[] ret = new CSSTextToken[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- /**
- *
- */
- public String get(ICSS2Properties properties) {
- String str = null;
- Object obj = properties.get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION));
- if (obj != null) {
- PropCMProperty propX = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- PropCMProperty propY = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- if (obj instanceof ICSSValueList) {
- ICSSValueList list = (ICSSValueList) obj;
- ICSSValue value = (ICSSValue) list.item(0);
- if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
- ICSSPrimitiveValue prim = (ICSSPrimitiveValue) value;
- if (prim.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
- // check not top or bottom
- if (!propX.canHave(prim.getStringValue()) && propY.canHave(prim.getStringValue())) {
- // case order is vertical -> horizontal
- value = (ICSSValue) list.item(1);
- }
- }
- }
- str = value.getCSSValueText();
- }
- else if (obj instanceof ICSSValue) {
- str = ((ICSSValue) obj).getCSSValueText();
- if (str.equalsIgnoreCase(IValID.V_BOTTOM) || str.equalsIgnoreCase(IValID.V_TOP))
- str = "";//$NON-NLS-1$
- }
- else {
- str = obj.toString();
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, str);
- CSSTextToken[] tokens = parser.getTokens();
-
- tokens = correctMeaningToken(tokens);
- if (tokens.length == 0)
- str = "";//$NON-NLS-1$
- else if (tokens.length == 1 && (tokens[0].image.equalsIgnoreCase(IValID.V_BOTTOM) || tokens[0].image.equalsIgnoreCase(IValID.V_TOP)))
- str = "";//$NON-NLS-1$
- else
- str = tokens[0].image;
- }
- }
- return (str != null) ? str : "";//$NON-NLS-1$
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String newValue = null;
- String valH = value;
- String valV = properties.getBackgroundPositionY();
- if (valV == null || valV.length() == 0)
- newValue = valH;
- else if (valH == null || valH.length() == 0) {
- Collection valX = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X).getValues();
- Collection valY = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y).getValues();
- PropCMUtil.minus(valY, valX);
- Iterator it = valY.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj.toString().equals(valV.toLowerCase())) {
- // need not compensate for ...
- newValue = valV;
- break;
- }
- }
- // compensate for Horizontal value
- if (newValue == null) {
- // check valV is length or not
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, valV.trim());
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens != null && tokens.length > 0 && tokens[0].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- newValue = IValID.V_LEFT + " " + valV;//$NON-NLS-1$
- }
- else
- newValue = "0% " + valV;//$NON-NLS-1$
- }
- }
- else
- newValue = valH + " " + valV;//$NON-NLS-1$
- properties.setBackgroundPosition(newValue);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundPositionYSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundPositionYSubStyleAdapter.java
deleted file mode 100644
index 948df9b194..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundPositionYSubStyleAdapter.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.contentmodel.IValID;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValueList;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- * for vertical value of 'background-position'
- */
-public class BackgroundPositionYSubStyleAdapter implements ISubPropertyAdapter {
-
- /**
- *
- */
- public BackgroundPositionYSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- protected CSSTextToken[] correctMeaningToken(CSSTextToken[] src) {
- java.util.ArrayList list = new java.util.ArrayList();
- for (int i = 0; i < src.length; i++) {
- if (src[i].kind != CSSRegionContexts.CSS_S && src[i].kind != CSSRegionContexts.CSS_DECLARATION_VALUE_S && src[i].kind != CSSRegionContexts.CSS_COMMENT)
- list.add(src[i]);
- }
- CSSTextToken[] ret = new CSSTextToken[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- /**
- *
- */
- public String get(ICSS2Properties properties) {
- String str = null;
- Object obj = properties.get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION));
- if (obj != null) {
- PropCMProperty propX = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- PropCMProperty propY = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- if (obj instanceof ICSSValueList) {
- ICSSValueList list = (ICSSValueList) obj;
- int index = 1;
- ICSSValue value = (ICSSValue) list.item(0);
- if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
- ICSSPrimitiveValue prim = (ICSSPrimitiveValue) value;
- if (prim.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
- // check not top or bottom
- if (!propX.canHave(prim.getStringValue()) && propY.canHave(prim.getStringValue())) {
- // case order is vertical -> horizontal
- index = 0;
- }
- }
- }
- str = ((ICSSValue) list.item(index)).getCSSValueText();
- }
- else if (obj instanceof ICSSValue) {
- str = ((ICSSValue) obj).getCSSValueText();
- if (!str.equalsIgnoreCase(IValID.V_BOTTOM) && !str.equalsIgnoreCase(IValID.V_TOP))
- str = "";//$NON-NLS-1$
- }
- else {
- str = obj.toString();
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, str);
- CSSTextToken[] tokens = parser.getTokens();
-
- tokens = correctMeaningToken(tokens);
- if (tokens.length == 1 && (tokens[0].image.equalsIgnoreCase(IValID.V_BOTTOM) || tokens[0].image.equalsIgnoreCase(IValID.V_TOP)))
- str = tokens[0].image;
- else if (tokens.length > 1)
- str = tokens[1].image;
- else
- str = "";//$NON-NLS-1$
- }
- }
- return (str != null) ? str : "";//$NON-NLS-1$
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String newValue = null;
- String valH = properties.getBackgroundPositionX();
- String valV = value;
- if (valH != null && (valH.trim().equals("0%") /* default value */|| //$NON-NLS-1$
- valH.trim().equalsIgnoreCase(IValID.V_LEFT) /*
- * another
- * default
- * value
- */))
- valH = null;
- if (valV == null || valV.length() == 0)
- newValue = valH;
- else if (valH == null || valH.length() == 0) {
- Collection valX = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X).getValues();
- Collection valY = PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y).getValues();
- PropCMUtil.minus(valY, valX);
- Iterator it = valY.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- if (obj.toString().equals(valV.toLowerCase())) {
- // need not compensate for ...
- newValue = valV;
- break;
- }
- }
- // compensate for Horizontal value
- if (newValue == null) {
- // check valV is length or not
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, valV.trim());
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens != null && tokens.length > 0 && tokens[0].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- newValue = IValID.V_LEFT + " " + valV;//$NON-NLS-1$
- }
- else
- newValue = "0% " + valV;//$NON-NLS-1$
- }
- }
- else
- newValue = valH + " " + valV;//$NON-NLS-1$
- properties.setBackgroundPosition(newValue);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundShorthandAdapter.java
deleted file mode 100644
index 9ead299f2a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundShorthandAdapter.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.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'background' property 'background' will be expanded to
- * 'background-attachment', 'background-color', 'background-image',
- * 'background-position', 'background-repeat',
- */
-public class BackgroundShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BackgroundShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", image = "", repeat = "", attach = "", pos = "";//$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR);
- PropCMProperty propImage = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE);
- PropCMProperty propRepeat = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT);
- PropCMProperty propAttach = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT);
- PropCMProperty propPos = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- else if (propImage.canHave(tokens[i].image))
- image = tokens[i].image;
- else if (propRepeat.canHave(tokens[i].image))
- repeat = tokens[i].image;
- else if (propAttach.canHave(tokens[i].image))
- attach = tokens[i].image;
- else if (propPos.canHave(tokens[i].image)) {
- if (pos == null || pos.length() <= 0)
- pos = tokens[i].image;
- else
- pos = pos + " " + tokens[i].image;//$NON-NLS-1$
- }
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- if (pos == null || pos.length() <= 0)
- pos = tokens[i].image;
- else
- pos = pos + " " + tokens[i].image;//$NON-NLS-1$
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- image = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propImage.getName(), image);
- dest.set(propRepeat.getName(), repeat);
- dest.set(propAttach.getName(), attach);
- dest.set(propPos.getName(), pos);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, image = null, repeat = null, attach = null, pos = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR);
- PropCMProperty propImage = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE);
- PropCMProperty propRepeat = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT);
- PropCMProperty propAttach = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT);
- PropCMProperty propPos = PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- else if (propImage.canHave(tokens[i].image))
- image = tokens[i].image;
- else if (propRepeat.canHave(tokens[i].image))
- repeat = tokens[i].image;
- else if (propAttach.canHave(tokens[i].image))
- attach = tokens[i].image;
- else if (propPos.canHave(tokens[i].image)) {
- if (pos == null)
- pos = tokens[i].image;
- else
- pos = pos + " " + tokens[i].image;//$NON-NLS-1$
- }
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- if (pos == null)
- pos = tokens[i].image;
- else
- pos = pos + " " + tokens[i].image;//$NON-NLS-1$
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- image = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propImage == propDest)
- return image;
- else if (propRepeat == propDest)
- return repeat;
- else if (propAttach == propDest)
- return attach;
- else if (propPos == propDest)
- return pos;
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderBottomShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderBottomShorthandAdapter.java
deleted file mode 100644
index 1107e2744e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderBottomShorthandAdapter.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'border-bottom' property 'border-bottom' will be expanded to
- * 'border-bottom-color', 'border-bottom-style', 'border-bottom-width',
- */
-public class BorderBottomShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderBottomShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderColorShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderColorShorthandAdapter.java
deleted file mode 100644
index d8cc676e9a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderColorShorthandAdapter.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'border-color' property 'border-color' will be expanded to
- * 'border-top-color', 'border-right-color', 'border-bottom-color',
- * 'border-left-color',
- */
-public class BorderColorShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderColorShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH)
- idents[j++] = tokens[i].image;
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- idents[j++] = buf.toString();
- }
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_BORDER_TOP_COLOR, dests[0]);
- dest.set(PropCMProperty.P_BORDER_RIGHT_COLOR, dests[1]);
- dest.set(PropCMProperty.P_BORDER_BOTTOM_COLOR, dests[2]);
- dest.set(PropCMProperty.P_BORDER_LEFT_COLOR, dests[3]);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH)
- idents[j++] = tokens[i].image;
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- idents[j++] = buf.toString();
- }
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_COLOR || propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_COLOR)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_COLOR)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_COLOR)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_COLOR)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_RIGHT_COLOR)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_COLOR)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_BORDER_LEFT_COLOR)
- return idents[3];
- else
- return null;
- }
-
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderLeftShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderLeftShorthandAdapter.java
deleted file mode 100644
index f8b72392a4..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderLeftShorthandAdapter.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'border-left' property 'border-left' will be expanded to
- * 'border-left-color', 'border-left-style', 'border-left-width',
- */
-public class BorderLeftShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderLeftShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderRightShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderRightShorthandAdapter.java
deleted file mode 100644
index 50a5fc6127..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderRightShorthandAdapter.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'border-right' property 'border-right' will be expanded to
- * 'border-right-color', 'border-right-style', 'border-right-width',
- */
-public class BorderRightShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderRightShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderShorthandAdapter.java
deleted file mode 100644
index 12718a1704..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderShorthandAdapter.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'border' property 'border' will be expanded to 'border-color',
- * 'border-style', 'border-width',
- */
-public class BorderShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderStyleShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderStyleShorthandAdapter.java
deleted file mode 100644
index 0e409c15dd..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderStyleShorthandAdapter.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'border-style' property 'border-style' will be expanded to
- * 'border-top-style', 'border-right-style', 'border-bottom-style',
- * 'border-left-style',
- */
-public class BorderStyleShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderStyleShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_BORDER_TOP_STYLE, dests[0]);
- dest.set(PropCMProperty.P_BORDER_RIGHT_STYLE, dests[1]);
- dest.set(PropCMProperty.P_BORDER_BOTTOM_STYLE, dests[2]);
- dest.set(PropCMProperty.P_BORDER_LEFT_STYLE, dests[3]);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_STYLE || propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_STYLE)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_STYLE)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_STYLE)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_STYLE)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_RIGHT_STYLE)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_STYLE)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_BORDER_LEFT_STYLE)
- return idents[3];
- else
- return null;
- }
-
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderTopShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderTopShorthandAdapter.java
deleted file mode 100644
index e8738f759b..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderTopShorthandAdapter.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'border-top' property 'border-top' will be expanded to
- * 'border-top-color', 'border-top-style', 'border-top-width',
- */
-public class BorderTopShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderTopShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String color = "", style = "", width = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- dest.set(propColor.getName(), color);
- dest.set(propStyle.getName(), style);
- dest.set(propWidth.getName(), width);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String color = null, style = null, width = null;
- PropCMProperty propColor = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE);
- PropCMProperty propWidth = PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propWidth.canHave(tokens[i].image))
- width = tokens[i].image;
- else if (propColor.canHave(tokens[i].image))
- color = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER) {
- width = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_HASH) {
- color = tokens[i].image;
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- StringBuffer buf = new StringBuffer();
- while (i < tokens.length) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT) {
- i++;
- continue;
- }
- buf.append(tokens[i].image);
- if (tokens[i++].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- break;
- }
- i--;
- color = buf.toString();
- }
- }
-
- if (propColor == propDest)
- return color;
- else if (propStyle == propDest)
- return style;
- else if (propWidth == propDest)
- return width;
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderWidthShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderWidthShorthandAdapter.java
deleted file mode 100644
index 7198eb1dd1..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderWidthShorthandAdapter.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'border-width' property 'border-width' will be expanded to
- * 'border-top-width', 'border-right-width', 'border-bottom-width',
- * 'border-left-width',
- */
-public class BorderWidthShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public BorderWidthShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_BORDER_TOP_WIDTH, dests[0]);
- dest.set(PropCMProperty.P_BORDER_RIGHT_WIDTH, dests[1]);
- dest.set(PropCMProperty.P_BORDER_BOTTOM_WIDTH, dests[2]);
- dest.set(PropCMProperty.P_BORDER_LEFT_WIDTH, dests[3]);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_WIDTH || propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_WIDTH)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_WIDTH)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_WIDTH)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_BORDER_TOP_WIDTH)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_BORDER_RIGHT_WIDTH)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_BORDER_BOTTOM_WIDTH)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_BORDER_LEFT_WIDTH)
- return idents[3];
- else
- return null;
- }
-
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/CSSPropertyContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/CSSPropertyContext.java
deleted file mode 100644
index 1b83a8fa76..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/CSSPropertyContext.java
+++ /dev/null
@@ -1,2997 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValue;
-import org.w3c.dom.css.CSSValue;
-
-
-/**
- *
- */
-public class CSSPropertyContext implements ICSS2Properties {
-
- protected Hashtable fProperties = new Hashtable();
- HashSet fModified = null;
- private static java.util.Hashtable subPropertyAdapters;
- private static java.util.Hashtable shorthandAdapters;
-
- /**
- *
- */
- public CSSPropertyContext() {
- super();
- initShorthandAdapters();
- initSubPropertyAdapters();
- }
-
- /**
- *
- */
- public CSSPropertyContext(ICSSStyleDeclaration decl) {
- super();
- initShorthandAdapters();
- initSubPropertyAdapters();
- initialize(decl);
- }
-
- /**
- * This function exports all property/value pairs to 'decl' declaration
- */
- public void applyFull(ICSSStyleDeclaration decl) {
- if (decl == null)
- return;
- Enumeration keys = fProperties.keys();
- while (keys.hasMoreElements()) {
- Object key = keys.nextElement();
- Object val = fProperties.get(key);
- String value = (val instanceof ICSSValue) ? ((ICSSValue) val).getCSSValueText() : val.toString();
-
- if (value == null || value.length() <= 0)
- decl.removeProperty(key.toString());
- else
- decl.setProperty(key.toString(), value.trim(), (val instanceof ValueData && ((ValueData) val).important) ? "!important" : "");//$NON-NLS-2$//$NON-NLS-1$
- }
- }
-
- /**
- * This function exports modified property/value pairs to 'decl'
- * declaration
- */
- public void applyModified(ICSSStyleDeclaration decl) {
- if (decl == null || fModified == null)
- return;
- Iterator it = fModified.iterator();
- while (it.hasNext()) {
- Object key = it.next();
- Object val = fProperties.get(key);
- String value = (val instanceof ICSSValue) ? ((ICSSValue) val).getCSSValueText() : ((val != null) ? val.toString() : null);
-
- if (value == null || value.length() <= 0)
- decl.removeProperty(key.toString());
- else
- decl.setProperty(key.toString(), value.trim(), (val instanceof ValueData && ((ValueData) val).important) ? "!important" : "");//$NON-NLS-2$//$NON-NLS-1$
- }
- }
-
- /**
- * create clone of this context
- */
- public Object clone() {
- CSSPropertyContext clone = new CSSPropertyContext();
- if (this.fModified != null)
- clone.fModified = (HashSet) this.fModified.clone();
- else
- clone.fModified = null;
- clone.fProperties = (Hashtable) this.fProperties.clone();
- return clone;
- }
-
- /**
- * This function expands a short-hand property's value to each leaf
- * property's value and set them to 'foreign'
- *
- * For example, given [prop=border-top, value="solid 1px yellow"] will be
- * expanded to [border-top-color=yellow, border-top-style=solid,
- * border-top-width=1px] and they are stored to 'foreign' context.
- *
- * Note that recursively shorthanded property like 'border' will be
- * expanded to all descendant leaf properties like
- * 'border-[top/right/bottom/left]-[color/style/width]'
- *
- * @param prop
- * org.eclipse.wst.css.core.contentmodel.PropCMProperty
- * @param value
- * java.lang.String
- * @param foreign
- * org.eclipse.wst.css.core.util.declaration.CSSPropertyContext
- */
- protected static void expandToLeaf(PropCMProperty prop, String value, CSSPropertyContext foreign) {
- // expand shorthand property
- if (value != null && value.trim().length() > 0) {
- IShorthandAdapter adapter = (IShorthandAdapter) shorthandAdapters.get(prop);
- if (adapter != null) {
- adapter.expand(value, foreign);
- foreign.set(prop.getName(), "");//$NON-NLS-1$
- for (int i = 0; i < prop.getNumChild(); i++) {
- Object obj = prop.getChildAt(i);
- if (obj instanceof PropCMProperty && !(obj instanceof PropCMSubProperty)) {
- PropCMProperty expandedProp = (PropCMProperty) obj;
- value = foreign.get(expandedProp.getName());
- expandToLeaf(expandedProp, value, foreign);
- }
- }
- }
- else if (!value.equals(foreign.get(prop.getName()))) {
- foreign.set(prop.getName(), value);
- }
- }
- }
-
- /**
- * This function returns value of 'prop'. Querying value mechanism checks
- * short-hand properties.
- *
- * For example, given "background=fixed white" is set in this insatnce and
- * param "prop=background-color", the return value will be "white".
- *
- */
- public java.lang.String get(org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty prop) {
- if (prop instanceof PropCMSubProperty) {
- ISubPropertyAdapter adapter = (ISubPropertyAdapter) subPropertyAdapters.get(prop.getName());
- if (adapter != null)
- return adapter.get(this);
- }
- String str = get(prop.getName());
- if ((str == null || str.length() == 0) && prop.getShorthandContainerCount() > 0) {
- // get expanded property
- for (int i = 0; i < prop.getShorthandContainerCount(); i++) {
- PropCMProperty propParent = prop.shorthandContainerAt(i);
- String strParent = get(propParent);
- if (strParent != null && strParent.trim().length() > 0) {
- IShorthandAdapter adapter = (IShorthandAdapter) shorthandAdapters.get(propParent);
- if (adapter != null) {
- String extractedValue = adapter.extract(strParent, prop);
- return (extractedValue != null) ? extractedValue : "";//$NON-NLS-1$
- }
- }
- }
- }
- return str;
- }
-
- /**
- * This function returns value of 'prop'. Querying value mechanism does
- * not care shorthand properties.
- */
- protected String get(String propName) {
- String str = null;
- Object obj = fProperties.get(propName);
- if (obj != null) {
- if (obj instanceof ICSSValue)
- str = ((ICSSValue) obj).getCSSValueText();
- else
- str = obj.toString();
- }
- return (str != null) ? str : "";//$NON-NLS-1$
- }
-
- /**
- * See the azimuth property definition in CSS2.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getAzimuth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_AZIMUTH));
- }
-
- /**
- * See the background property definition in CSS2.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackground() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG));
- }
-
- /**
- * See the background-attachment property definition in CSS2.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundAttachment() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT));
- }
-
- /**
- * See the background-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR));
- }
-
- /**
- * See the background-image property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundImage() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE));
- }
-
- /**
- * See the background-position property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundPosition() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION));
- }
-
- /**
- *
- */
- public java.lang.String getBackgroundPositionX() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X));
- /*
- * String str = null; Object obj =
- * fProperties.get(PropCMProperty.P_BG_POSITION); if (obj != null) {
- * PropCMProperty propX =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- * PropCMProperty propY =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- * if (obj instanceof ICSSValueList) { ICSSValueList list =
- * (ICSSValueList) obj; ICSSValue value = (ICSSValue) list.item(0); if
- * (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
- * ICSSPrimitiveValue prim = (ICSSPrimitiveValue) value; if
- * (prim.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) { // check
- * not top or bottom if (!propX.canHave(prim.getStringValue()) &&
- * propY.canHave(prim.getStringValue())) { // case order is vertical ->
- * horizontal value = (ICSSValue) list.item(1); } } } str =
- * value.getCSSValueText(); } else if (obj instanceof ICSSValue) { str =
- * ((ICSSValue)obj).getCSSValueText(); } else str = obj.toString(); }
- * return (str != null) ? str : "";
- */
- }
-
- /**
- *
- */
- public java.lang.String getBackgroundPositionY() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y));
- /*
- * String str = null; Object obj =
- * fProperties.get(PropCMProperty.P_BG_POSITION); if (obj != null) {
- * PropCMProperty propX =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X);
- * PropCMProperty propY =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y);
- * if (obj instanceof ICSSValueList) { ICSSValueList list =
- * (ICSSValueList) obj; int index = 1; ICSSValue value = (ICSSValue)
- * list.item(0); if (value.getCssValueType() ==
- * CSSValue.CSS_PRIMITIVE_VALUE) { ICSSPrimitiveValue prim =
- * (ICSSPrimitiveValue) value; if (prim.getPrimitiveType() ==
- * CSSPrimitiveValue.CSS_IDENT) { // check not top or bottom if
- * (!propX.canHave(prim.getStringValue()) &&
- * propY.canHave(prim.getStringValue())) { // case order is vertical ->
- * horizontal index = 0; } } } str =
- * ((ICSSValue)list.item(index)).getCSSValueText(); } else if (obj
- * instanceof ICSSValue) { // do nothing --- value is null } else str =
- * obj.toString(); } return (str != null) ? str : "";
- */
- }
-
- /**
- * See the background-repeat property definition in CSS2.
- *
- * @exception org.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBackgroundRepeat() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT));
- }
-
- /**
- * See the border property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorder() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER));
- }
-
- /**
- * See the border-bottom property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottom() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM));
- }
-
- /**
- * See the border-bottom-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR));
- }
-
- /**
- * See the border-bottom-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE));
- }
-
- /**
- * See the border-bottom-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderBottomWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH));
- }
-
- /**
- * See the border-collapse property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderCollapse() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLLAPSE));
- }
-
- /**
- * See the border-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR));
- }
-
- /**
- * See the border-left property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeft() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT));
- }
-
- /**
- * See the border-left-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR));
- }
-
- /**
- * See the border-left-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE));
- }
-
- /**
- * See the border-left-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderLeftWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH));
- }
-
- /**
- * See the border-right property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT));
- }
-
- /**
- * See the border-right-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR));
- }
-
- /**
- * See the border-right-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE));
- }
-
- /**
- * See the border-right-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderRightWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH));
- }
-
- /**
- * See the border-spacing property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderSpacing() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_SPACING));
- }
-
- /**
- * See the border-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE));
- }
-
- /**
- * See the border-top property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTop() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP));
- }
-
- /**
- * See the border-top-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR));
- }
-
- /**
- * See the border-top-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE));
- }
-
- /**
- * See the border-top-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderTopWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH));
- }
-
- /**
- * See the border-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBorderWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH));
- }
-
- /**
- * See the bottom property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getBottom() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_BOTTOM));
- }
-
- /**
- * See the caption-side property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCaptionSide() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CAPTION_SIDE));
- }
-
- /**
- * See the clear property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getClear() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CLEAR));
- }
-
- /**
- * See the clip property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getClip() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- }
-
- /**
- *
- */
- public String getClipBottom() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM));
- }
-
- /**
- *
- */
- public String getClipLeft() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT));
- }
-
- /**
- *
- */
- public String getClipRight() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT));
- }
-
- /**
- *
- */
- public String getClipTop() {
- return get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP));
- }
-
- /**
- * See the color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_COLOR));
- }
-
- /**
- * See the content property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getContent() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CONTENT));
- }
-
- /**
- * See the counter-increment property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCounterIncrement() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_INCREMENT));
- }
-
- /**
- * See the counter-reset property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCounterReset() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_RESET));
- }
-
- /**
- * See the float property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCssFloat() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FLOAT));
- }
-
- /**
- * See the cue property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCue() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE));
- }
-
- /**
- * See the cue-after property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCueAfter() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_AFTER));
- }
-
- /**
- * See the cue-before property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCueBefore() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_BEFORE));
- }
-
- /**
- * See the cursor property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getCursor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_CURSOR));
- }
-
- /**
- * See the direction property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getDirection() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_DIRECTION));
- }
-
- /**
- * See the display property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getDisplay() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_DISPLAY));
- }
-
- /**
- * See the elevation property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getElevation() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_ELEVATION));
- }
-
- /**
- * See the empty-cells property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getEmptyCells() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_EMPTY_CELLS));
- }
-
- /**
- * See the font property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFont() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT));
- }
-
- /**
- * See the font-family property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontFamily() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY));
- }
-
- /**
- * See the font-size property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontSize() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE));
- }
-
- /**
- * See the font-size-adjust property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontSizeAdjust() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE_ADJUST));
- }
-
- /**
- * See the font-stretch property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontStretch() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STRETCH));
- }
-
- /**
- * See the font-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE));
- }
-
- /**
- * See the font-variant property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontVariant() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT));
- }
-
- /**
- * See the font-weight property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getFontWeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT));
- }
-
- /**
- * See the height property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getHeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_HEIGHT));
- }
-
- /**
- * See the left property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLeft() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LEFT));
- }
-
- /**
- * See the letter-spacing property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLetterSpacing() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LETTER_SPACING));
- }
-
- /**
- * See the line-height property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getLineHeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT));
- }
-
- /**
- * See the list-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE));
- }
-
- /**
- * See the list-style-image property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyleImage() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE));
- }
-
- /**
- * See the list-style-position property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStylePosition() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION));
- }
-
- /**
- * See the list-style-type property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getListStyleType() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE));
- }
-
- /**
- * See the margin property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMargin() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN));
- }
-
- /**
- * See the margin-bottom property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginBottom() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_BOTTOM));
- }
-
- /**
- * See the margin-left property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginLeft() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_LEFT));
- }
-
- /**
- * See the margin-right property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginRight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_RIGHT));
- }
-
- /**
- * See the margin-top property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarginTop() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_TOP));
- }
-
- /**
- * See the marker-offset property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarkerOffset() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARKER_OFFSET));
- }
-
- /**
- * See the marks property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMarks() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MARKS));
- }
-
- /**
- * See the max-height property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMaxHeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_HEIGHT));
- }
-
- /**
- * See the max-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMaxWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_WIDTH));
- }
-
- /**
- * See the min-height property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMinHeight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_HEIGHT));
- }
-
- /**
- * See the min-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getMinWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_WIDTH));
- }
-
- /**
- * See the orphans property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOrphans() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_ORPHANS));
- }
-
- /**
- * See the outline property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutline() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE));
- }
-
- /**
- * See the outline-color property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineColor() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_COLOR));
- }
-
- /**
- * See the outline-style property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineStyle() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_STYLE));
- }
-
- /**
- * See the outline-width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOutlineWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_WIDTH));
- }
-
- /**
- * See the overflow property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getOverflow() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_OVERFLOW));
- }
-
- /**
- * See the padding property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPadding() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING));
- }
-
- /**
- * See the padding-bottom property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingBottom() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_BOTTOM));
- }
-
- /**
- * See the padding-left property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingLeft() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_LEFT));
- }
-
- /**
- * See the padding-right property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingRight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_RIGHT));
- }
-
- /**
- * See the padding-top property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPaddingTop() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_TOP));
- }
-
- /**
- * See the page property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPage() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE));
- }
-
- /**
- * See the page-break-after property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakAfter() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_AFTER));
- }
-
- /**
- * See the page-break-before property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakBefore() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_BEFORE));
- }
-
- /**
- * See the page-break-inside property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPageBreakInside() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_INSIDE));
- }
-
- /**
- * See the pause property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPause() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE));
- }
-
- /**
- * See the pause-after property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPauseAfter() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_AFTER));
- }
-
- /**
- * See the pause-before property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPauseBefore() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_BEFORE));
- }
-
- /**
- * See the pitch property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPitch() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH));
- }
-
- /**
- * See the pitch-range property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPitchRange() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH_RANGE));
- }
-
- /**
- * See the play-during property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPlayDuring() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_PLAY_DURING));
- }
-
- /**
- * See the position property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getPosition() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_POSITION));
- }
-
- /**
- * See the quotes property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getQuotes() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_QUOTES));
- }
-
- /**
- * See the richness property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getRichness() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_RICHNESS));
- }
-
- /**
- * See the right property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getRight() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_RIGHT));
- }
-
- /**
- * @return org.eclipse.wst.css.core.util.declaration.IShorthandAdapter
- * @param org.eclipse.wst.css.core.contentmodel.PropCMProperty
- */
- public static IShorthandAdapter getShorthandAdapter(PropCMProperty prop) {
- return (IShorthandAdapter) shorthandAdapters.get(prop);
- }
-
- /**
- * See the size property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSize() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SIZE));
- }
-
- /**
- * See the speak property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeak() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK));
- }
-
- /**
- * See the speak-header property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakHeader() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_HEADER));
- }
-
- /**
- * See the speak-numeral property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakNumeral() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_NUMERAL));
- }
-
- /**
- * See the speak-punctuation property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeakPunctuation() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_PUNCTUATION));
- }
-
- /**
- * See the speech-rate property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getSpeechRate() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEECH_RATE));
- }
-
- /**
- * See the stress property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getStress() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_STRESS));
- }
-
- /**
- * See the table-layout property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTableLayout() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TABLE_LAYOUT));
- }
-
- /**
- * See the text-align property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextAlign() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_ALIGN));
- }
-
- /**
- * See the text-decoration property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextDecoration() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_DECORATION));
- }
-
- /**
- * See the text-indent property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextIndent() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_INDENT));
- }
-
- /**
- * See the text-shadow property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextShadow() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_SHADOW));
- }
-
- /**
- * See the text-transform property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTextTransform() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_TRANSFORM));
- }
-
- /**
- * See the top property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getTop() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_TOP));
- }
-
- /**
- * See the unicode-bidi property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getUnicodeBidi() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_UNICODE_BIDI));
- }
-
- /**
- * See the vertical-align property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVerticalAlign() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_VERTICAL_ALIGN));
- }
-
- /**
- * See the visibility property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVisibility() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_VISIBILITY));
- }
-
- /**
- * See the voice-family property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVoiceFamily() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_VOICE_FAMILY));
- }
-
- /**
- * See the volume property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getVolume() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_VOLUME));
- }
-
- /**
- * See the white-space property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWhiteSpace() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_WHITE_SPACE));
- }
-
- /**
- * See the widows property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWidows() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_WIDOWS));
- }
-
- /**
- * See the width property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWidth() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_WIDTH));
- }
-
- /**
- * See the word-spacing property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getWordSpacing() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_WORD_SPACING));
- }
-
- /**
- * See the z-index property definition in CSS2.
- *
- * @exceptionorg.w3c.dom.DOMException
- * SYNTAX_ERR: Raised if the new value has a syntax error
- * and is unparsable. <br>
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
- * readonly.
- */
- public String getZIndex() {
- return get(PropCMProperty.getInstanceOf(PropCMProperty.P_Z_INDEX));
- }
-
- /**
- *
- */
- public void initialize(ICSSStyleDeclaration decl) {
- fProperties.clear();
- if (fModified != null)
- fModified.clear();
- if (decl == null)
- return;
-
- int nProperties = decl.getLength();
- for (int i = 0; i < nProperties; i++) {
- String propName = decl.item(i);
- if (propName != null) {
- String propN = propName.trim().toLowerCase();
- if (propN.length() != 0) {
- CSSValue val = decl.getPropertyCSSValue(propName);
- if (val != null)
- fProperties.put(propN, val);
- }
- }
- }
- }
-
- /**
- *
- */
- static void initShorthandAdapters() {
- if (shorthandAdapters == null) {
- shorthandAdapters = new Hashtable();
- // register
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BG), new BackgroundShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER), new BorderShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR), new BorderColorShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE), new BorderStyleShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH), new BorderWidthShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP), new BorderTopShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT), new BorderRightShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM), new BorderBottomShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT), new BorderLeftShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT), new FontShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE), new ListStyleShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN), new MarginShorthandAdapter());
- shorthandAdapters.put(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING), new PaddingShorthandAdapter());
-
- }
- }
-
- /**
- *
- */
- static void initSubPropertyAdapters() {
- if (subPropertyAdapters == null) {
- subPropertyAdapters = new Hashtable();
-
- // register
- subPropertyAdapters.put(PropCMSubProperty.PSUB_BG_POSITION_X, new BackgroundPositionXSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_BG_POSITION_Y, new BackgroundPositionYSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_CLIP_TOP, new ClipTopSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_CLIP_RIGHT, new ClipRightSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_CLIP_BOTTOM, new ClipBottomSubStyleAdapter());
- subPropertyAdapters.put(PropCMSubProperty.PSUB_CLIP_LEFT, new ClipLeftSubStyleAdapter());
- }
- }
-
- /**
- *
- */
- public boolean isModified() {
- return (fModified != null && fModified.size() != 0);
- }
-
- /**
- *
- */
- public Enumeration properties() {
- return fProperties.keys();
- }
-
- /**
- *
- */
- public Iterator propertiesModified() {
- if (fModified != null) {
- return ((Collection) fModified.clone()).iterator();
- }
- else
- return new Iterator() {
- public boolean hasNext() {
- return false;
- }
-
- public Object next() {
- return null;
- }
-
- public void remove() {
- }
- };
- }
-
- /**
- * This function expands the value of shorthand 'prop' to 'foreign'
- * context. Note that if this has parent shorthand properties of 'prop',
- * they are all expanded to 'foreign' context.
- */
- protected void recursiveExtract(PropCMProperty prop, CSSPropertyContext foreign) {
- // expand shorthand property
- for (int i = 0; i < prop.getShorthandContainerCount(); i++) {
- recursiveExtract(prop.shorthandContainerAt(i), foreign);
- }
- String str = get(prop.getName());
- if (str == null || str.trim().length() == 0)
- str = foreign.get(prop.getName());
- if (str != null && str.trim().length() > 0) {
- IShorthandAdapter adapter = (IShorthandAdapter) shorthandAdapters.get(prop);
- if (adapter != null) {
- adapter.expand(str, foreign);
- foreign.set(prop.getName(), "");//$NON-NLS-1$
- }
- }
- }
-
- /**
- *
- */
- protected void removeDescendants(PropCMProperty prop) {
- if (prop.isShorthand()) {
- // remove properties
- int n = prop.getNumChild();
- for (int i = 0; i < n; i++) {
- Object obj = prop.getChildAt(i);
- if (obj instanceof PropCMProperty) {
- removeDescendants((PropCMProperty) obj);
-
- String str = get(obj.toString());
- if (str != null && str.length() > 0)
- set(obj.toString(), "");//$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- *
- */
- public void resetModified() {
- if (fModified != null)
- fModified.clear();
- }
-
- /**
- * This function sets the pair of 'prop'/'value'. If shorthand properties
- * related to 'prop' are already defined, they will be expanded to avoid
- * property confliction. If descendant properties of 'prop' are already
- * defined, they will be removed to avoid property confliction.
- *
- */
- public void set(org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty prop, java.lang.String value) throws org.w3c.dom.DOMException {
- if (prop instanceof PropCMSubProperty) {
- ISubPropertyAdapter adapter = (ISubPropertyAdapter) subPropertyAdapters.get(prop.getName());
- if (adapter != null) {
- adapter.set(this, value);
- return;
- }
- }
- if (prop.getShorthandContainerCount() > 0) {
- // expand shorthand property
- CSSPropertyContext context = new CSSPropertyContext();
- for (int i = 0; i < prop.getShorthandContainerCount(); i++) {
- recursiveExtract(prop.shorthandContainerAt(i), context);
- }
- Enumeration properties = context.properties();
- while (properties.hasMoreElements()) {
- String propForeign = properties.nextElement().toString();
- set(propForeign, context.get(propForeign));
- }
- }
-
- removeDescendants(prop);
-
- set(prop.getName(), value);
- }
-
- /**
- * This function sets the pair of 'propName'/'value' regardless of its
- * shorthand properties.
- */
- protected void set(String propName, String value) throws org.w3c.dom.DOMException {
- String key = propName;
- if (value == null)
- fProperties.remove(key);
- else
- fProperties.put(key, value);
- if (fModified == null)
- fModified = new HashSet();
- fModified.add(key);
- }
-
- /**
- *
- */
- public void setAzimuth(String azimuth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_AZIMUTH), azimuth);
- }
-
- /**
- *
- */
- public void setBackground(String background) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG), background);
- }
-
- /**
- *
- */
- public void setBackgroundAttachment(String backgroundAttachment) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_ATTACHMENT), backgroundAttachment);
- }
-
- /**
- *
- */
- public void setBackgroundColor(String backgroundColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_COLOR), backgroundColor);
- }
-
- /**
- *
- */
- public void setBackgroundImage(String backgroundImage) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_IMAGE), backgroundImage);
- }
-
- /**
- *
- */
- public void setBackgroundPosition(String backgroundPosition) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_POSITION), backgroundPosition);
- }
-
- /**
- *
- */
- public void setBackgroundPositionX(java.lang.String backgroundPositionX) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X), backgroundPositionX);
- /*
- * String newValue = null; String valH = backgroundPositionX; String
- * valV = getBackgroundPositionY(); if (valV == null ||
- * valV.length()== 0) newValue = valH; else if (valH == null ||
- * valH.length() == 0) { Collection valX =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X).getValues();
- * Collection valY =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y).getValues();
- * PropCMUtil.minus(valY,valX); Iterator it = valY.iterator();
- * while(it.hasNext()) { Object obj = it.next(); if
- * (obj.toString().equals(valV.toLowerCase())) { // need not
- * compensate for ... newValue = valV; break; } } // compensate for
- * Horizontal value if (newValue == null) newValue = "0% " + valV; }
- * else newValue = valH + " " + valV; setBackgroundPosition(newValue);
- */
- }
-
- /**
- *
- */
- public void setBackgroundPositionY(java.lang.String backgroundPositionY) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y), backgroundPositionY);
- /*
- * String newValue = null; String valH = getBackgroundPositionX();
- * String valV = backgroundPositionY; if (valV == null ||
- * valV.length()== 0) newValue = valH; else if (valH == null ||
- * valH.length() == 0) { Collection valX =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_X).getValues();
- * Collection valY =
- * PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_BG_POSITION_Y).getValues();
- * PropCMUtil.minus(valY,valX); Iterator it = valY.iterator();
- * while(it.hasNext()) { Object obj = it.next(); if
- * (obj.toString().equals(valV.toLowerCase())) { // need not
- * compensate for ... newValue = valV; break; } } // compensate for
- * Horizontal value if (newValue == null) newValue = "0% " + valV; }
- * else newValue = valH + " " + valV; setBackgroundPosition(newValue);
- */
- }
-
- /**
- *
- */
- public void setBackgroundRepeat(String backgroundRepeat) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BG_REPEAT), backgroundRepeat);
- }
-
- /**
- *
- */
- public void setBorder(String border) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER), border);
- }
-
- /**
- *
- */
- public void setBorderBottom(String borderBottom) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM), borderBottom);
- }
-
- /**
- *
- */
- public void setBorderBottomColor(String borderBottomColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_COLOR), borderBottomColor);
- }
-
- /**
- *
- */
- public void setBorderBottomStyle(String borderBottomStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_STYLE), borderBottomStyle);
- }
-
- /**
- *
- */
- public void setBorderBottomWidth(String borderBottomWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_BOTTOM_WIDTH), borderBottomWidth);
- }
-
- /**
- *
- */
- public void setBorderCollapse(String borderCollapse) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLLAPSE), borderCollapse);
- }
-
- /**
- *
- */
- public void setBorderColor(String borderColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_COLOR), borderColor);
- }
-
- /**
- *
- */
- public void setBorderLeft(String borderLeft) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT), borderLeft);
- }
-
- /**
- *
- */
- public void setBorderLeftColor(String borderLeftColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_COLOR), borderLeftColor);
- }
-
- /**
- *
- */
- public void setBorderLeftStyle(String borderLeftStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_STYLE), borderLeftStyle);
- }
-
- /**
- *
- */
- public void setBorderLeftWidth(String borderLeftWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_LEFT_WIDTH), borderLeftWidth);
- }
-
- /**
- *
- */
- public void setBorderRight(String borderRight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT), borderRight);
- }
-
- /**
- *
- */
- public void setBorderRightColor(String borderRightColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_COLOR), borderRightColor);
- }
-
- /**
- *
- */
- public void setBorderRightStyle(String borderRightStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_STYLE), borderRightStyle);
- }
-
- /**
- *
- */
- public void setBorderRightWidth(String borderRightWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_RIGHT_WIDTH), borderRightWidth);
- }
-
- /**
- *
- */
- public void setBorderSpacing(String borderSpacing) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_SPACING), borderSpacing);
- }
-
- /**
- *
- */
- public void setBorderStyle(String borderStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_STYLE), borderStyle);
- }
-
- /**
- *
- */
- public void setBorderTop(String borderTop) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP), borderTop);
- }
-
- /**
- *
- */
- public void setBorderTopColor(String borderTopColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_COLOR), borderTopColor);
- }
-
- /**
- *
- */
- public void setBorderTopStyle(String borderTopStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_STYLE), borderTopStyle);
- }
-
- /**
- *
- */
- public void setBorderTopWidth(String borderTopWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_TOP_WIDTH), borderTopWidth);
- }
-
- /**
- *
- */
- public void setBorderWidth(String borderWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BORDER_WIDTH), borderWidth);
- }
-
- /**
- *
- */
- public void setBottom(String bottom) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_BOTTOM), bottom);
- }
-
- /**
- *
- */
- public void setCaptionSide(String captionSide) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CAPTION_SIDE), captionSide);
- }
-
- /**
- *
- */
- public void setClear(String clear) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CLEAR), clear);
- }
-
- /**
- *
- */
- public void setClip(String clip) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP), clip);
- }
-
- /**
- *
- */
- public void setClipBottom(java.lang.String clip) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM), clip);
- }
-
- /**
- *
- */
- public void setClipLeft(java.lang.String clip) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT), clip);
- }
-
- /**
- *
- */
- public void setClipRight(java.lang.String clip) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT), clip);
- }
-
- /**
- *
- */
- public void setClipTop(java.lang.String clip) throws org.w3c.dom.DOMException {
- set(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP), clip);
- }
-
- /**
- *
- */
- public void setColor(String color) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_COLOR), color);
- }
-
- /**
- *
- */
- public void setContent(String content) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CONTENT), content);
- }
-
- /**
- *
- */
- public void setCounterIncrement(String counterIncrement) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_INCREMENT), counterIncrement);
- }
-
- /**
- *
- */
- public void setCounterReset(String counterReset) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_COUNTER_RESET), counterReset);
- }
-
- /**
- *
- */
- public void setCssFloat(String cssFloat) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FLOAT), cssFloat);
- }
-
- /**
- *
- */
- public void setCue(String cue) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE), cue);
- }
-
- /**
- *
- */
- public void setCueAfter(String cueAfter) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_AFTER), cueAfter);
- }
-
- /**
- *
- */
- public void setCueBefore(String cueBefore) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CUE_BEFORE), cueBefore);
- }
-
- /**
- *
- */
- public void setCursor(String cursor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_CURSOR), cursor);
- }
-
- /**
- *
- */
- public void setDirection(String direction) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_DIRECTION), direction);
- }
-
- /**
- *
- */
- public void setDisplay(String display) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_DISPLAY), display);
- }
-
- /**
- *
- */
- public void setElevation(String elevation) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_ELEVATION), elevation);
- }
-
- /**
- *
- */
- public void setEmptyCells(String emptyCells) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_EMPTY_CELLS), emptyCells);
- }
-
- /**
- *
- */
- public void setFont(String font) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT), font);
- }
-
- /**
- *
- */
- public void setFontFamily(String fontFamily) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY), fontFamily);
- }
-
- /**
- *
- */
- public void setFontSize(String fontSize) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE), fontSize);
- }
-
- /**
- *
- */
- public void setFontSizeAdjust(String fontSizeAdjust) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE_ADJUST), fontSizeAdjust);
- }
-
- /**
- *
- */
- public void setFontStretch(String fontStretch) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STRETCH), fontStretch);
- }
-
- /**
- *
- */
- public void setFontStyle(String fontStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE), fontStyle);
- }
-
- /**
- *
- */
- public void setFontVariant(String fontVariant) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT), fontVariant);
- }
-
- /**
- *
- */
- public void setFontWeight(String fontWeight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT), fontWeight);
- }
-
- /**
- *
- */
- public void setHeight(String height) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_HEIGHT), height);
- }
-
- /**
- *
- */
- public void setLeft(String left) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LEFT), left);
- }
-
- /**
- *
- */
- public void setLetterSpacing(String letterSpacing) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LETTER_SPACING), letterSpacing);
- }
-
- /**
- *
- */
- public void setLineHeight(String lineHeight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT), lineHeight);
- }
-
- /**
- *
- */
- public void setListStyle(String listStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE), listStyle);
- }
-
- /**
- *
- */
- public void setListStyleImage(String listStyleImage) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE), listStyleImage);
- }
-
- /**
- *
- */
- public void setListStylePosition(String listStylePosition) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION), listStylePosition);
- }
-
- /**
- *
- */
- public void setListStyleType(String listStyleType) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE), listStyleType);
- }
-
- /**
- *
- */
- public void setMargin(String margin) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN), margin);
- }
-
- /**
- *
- */
- public void setMarginBottom(String marginBottom) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_BOTTOM), marginBottom);
- }
-
- /**
- *
- */
- public void setMarginLeft(String marginLeft) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_LEFT), marginLeft);
- }
-
- /**
- *
- */
- public void setMarginRight(String marginRight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_RIGHT), marginRight);
- }
-
- /**
- *
- */
- public void setMarginTop(String marginTop) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARGIN_TOP), marginTop);
- }
-
- /**
- *
- */
- public void setMarkerOffset(String markerOffset) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARKER_OFFSET), markerOffset);
- }
-
- /**
- *
- */
- public void setMarks(String marks) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MARKS), marks);
- }
-
- /**
- *
- */
- public void setMaxHeight(String maxHeight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_HEIGHT), maxHeight);
- }
-
- /**
- *
- */
- public void setMaxWidth(String maxWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MAX_WIDTH), maxWidth);
- }
-
- /**
- *
- */
- public void setMinHeight(String minHeight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_HEIGHT), minHeight);
- }
-
- /**
- *
- */
- public void setMinWidth(String minWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_MIN_WIDTH), minWidth);
- }
-
- /**
- *
- */
- public void setOrphans(String orphans) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_ORPHANS), orphans);
- }
-
- /**
- *
- */
- public void setOutline(String outline) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE), outline);
- }
-
- /**
- *
- */
- public void setOutlineColor(String outlineColor) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_COLOR), outlineColor);
- }
-
- /**
- *
- */
- public void setOutlineStyle(String outlineStyle) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_STYLE), outlineStyle);
- }
-
- /**
- *
- */
- public void setOutlineWidth(String outlineWidth) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OUTLINE_WIDTH), outlineWidth);
- }
-
- /**
- *
- */
- public void setOverflow(String overflow) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_OVERFLOW), overflow);
- }
-
- /**
- *
- */
- public void setPadding(String padding) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING), padding);
- }
-
- /**
- *
- */
- public void setPaddingBottom(String paddingBottom) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_BOTTOM), paddingBottom);
- }
-
- /**
- *
- */
- public void setPaddingLeft(String paddingLeft) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_LEFT), paddingLeft);
- }
-
- /**
- *
- */
- public void setPaddingRight(String paddingRight) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_RIGHT), paddingRight);
- }
-
- /**
- *
- */
- public void setPaddingTop(String paddingTop) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PADDING_TOP), paddingTop);
- }
-
- /**
- *
- */
- public void setPage(String page) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE), page);
- }
-
- /**
- *
- */
- public void setPageBreakAfter(String pageBreakAfter) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_AFTER), pageBreakAfter);
- }
-
- /**
- *
- */
- public void setPageBreakBefore(String pageBreakBefore) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_BEFORE), pageBreakBefore);
- }
-
- /**
- *
- */
- public void setPageBreakInside(String pageBreakInside) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAGE_BREAK_INSIDE), pageBreakInside);
- }
-
- /**
- *
- */
- public void setPause(String pause) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE), pause);
- }
-
- /**
- *
- */
- public void setPauseAfter(String pauseAfter) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_AFTER), pauseAfter);
- }
-
- /**
- *
- */
- public void setPauseBefore(String pauseBefore) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PAUSE_BEFORE), pauseBefore);
- }
-
- /**
- *
- */
- public void setPitch(String pitch) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH), pitch);
- }
-
- /**
- *
- */
- public void setPitchRange(String pitchRange) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PITCH_RANGE), pitchRange);
- }
-
- /**
- *
- */
- public void setPlayDuring(String playDuring) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_PLAY_DURING), playDuring);
- }
-
- /**
- *
- */
- public void setPosition(String position) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_POSITION), position);
- }
-
- /**
- *
- */
- public void setQuotes(String quotes) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_QUOTES), quotes);
- }
-
- /**
- *
- */
- public void setRichness(String richness) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_RICHNESS), richness);
- }
-
- /**
- *
- */
- public void setRight(String right) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_RIGHT), right);
- }
-
- /**
- *
- */
- public void setSize(String size) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SIZE), size);
- }
-
- /**
- *
- */
- public void setSpeak(String speak) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK), speak);
- }
-
- /**
- *
- */
- public void setSpeakHeader(String speakHeader) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_HEADER), speakHeader);
- }
-
- /**
- *
- */
- public void setSpeakNumeral(String speakNumeral) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_NUMERAL), speakNumeral);
- }
-
- /**
- *
- */
- public void setSpeakPunctuation(String speakPunctuation) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEAK_PUNCTUATION), speakPunctuation);
- }
-
- /**
- *
- */
- public void setSpeechRate(String speechRate) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_SPEECH_RATE), speechRate);
- }
-
- /**
- *
- */
- public void setStress(String stress) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_STRESS), stress);
- }
-
- /**
- *
- */
- public void setTableLayout(String tableLayout) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TABLE_LAYOUT), tableLayout);
- }
-
- /**
- *
- */
- public void setTextAlign(String textAlign) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_ALIGN), textAlign);
- }
-
- /**
- *
- */
- public void setTextDecoration(String textDecoration) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_DECORATION), textDecoration);
- }
-
- /**
- *
- */
- public void setTextIndent(String textIndent) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_INDENT), textIndent);
- }
-
- /**
- *
- */
- public void setTextShadow(String textShadow) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_SHADOW), textShadow);
- }
-
- /**
- *
- */
- public void setTextTransform(String textTransform) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TEXT_TRANSFORM), textTransform);
- }
-
- /**
- *
- */
- public void setTop(String top) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_TOP), top);
- }
-
- /**
- *
- */
- public void setUnicodeBidi(String unicodeBidi) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_UNICODE_BIDI), unicodeBidi);
- }
-
- /**
- *
- */
- public void setVerticalAlign(String verticalAlign) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_VERTICAL_ALIGN), verticalAlign);
- }
-
- /**
- *
- */
- public void setVisibility(String visibility) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_VISIBILITY), visibility);
- }
-
- /**
- *
- */
- public void setVoiceFamily(String voiceFamily) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_VOICE_FAMILY), voiceFamily);
- }
-
- /**
- *
- */
- public void setVolume(String volume) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_VOLUME), volume);
- }
-
- /**
- *
- */
- public void setWhiteSpace(String whiteSpace) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_WHITE_SPACE), whiteSpace);
- }
-
- /**
- *
- */
- public void setWidows(String widows) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_WIDOWS), widows);
- }
-
- /**
- *
- */
- public void setWidth(String width) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_WIDTH), width);
- }
-
- /**
- *
- */
- public void setWordSpacing(String wordSpacing) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_WORD_SPACING), wordSpacing);
- }
-
- /**
- *
- */
- public void setZIndex(String zIndex) throws org.w3c.dom.DOMException {
- set(PropCMProperty.getInstanceOf(PropCMProperty.P_Z_INDEX), zIndex);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipBottomSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipBottomSubStyleAdapter.java
deleted file mode 100644
index 930dae1b77..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipBottomSubStyleAdapter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-
-/**
- * For bottom value of 'clip' property's rect() function
- */
-public class ClipBottomSubStyleAdapter extends ClipSubStyleAdapter {
-
- /**
- *
- */
- public ClipBottomSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- String get(org.w3c.dom.css.Rect rect) {
- return rect.getBottom().getCssText();
- }
-
- /**
- *
- */
- int index() {
- return 2;
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String top = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP));
- String right = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT));
- String left = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT));
-
- set(properties, top, right, value, left, value == null || value.length() == 0);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipLeftSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipLeftSubStyleAdapter.java
deleted file mode 100644
index 982b994216..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipLeftSubStyleAdapter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-
-/**
- * For left value of 'clip' property's rect() function
- */
-public class ClipLeftSubStyleAdapter extends ClipSubStyleAdapter {
-
- /**
- *
- */
- public ClipLeftSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- String get(org.w3c.dom.css.Rect rect) {
- return rect.getLeft().getCssText();
- }
-
- /**
- *
- */
- int index() {
- return 3;
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String top = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP));
- String right = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT));
- String bottom = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM));
-
- set(properties, top, right, bottom, value, value == null || value.length() == 0);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipRightSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipRightSubStyleAdapter.java
deleted file mode 100644
index cfd1e2379a..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipRightSubStyleAdapter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-
-/**
- * For right value of 'clip' property's rect() function
- */
-public class ClipRightSubStyleAdapter extends ClipSubStyleAdapter {
-
- /**
- *
- */
- public ClipRightSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- String get(org.w3c.dom.css.Rect rect) {
- return rect.getRight().getCssText();
- }
-
- /**
- *
- */
- int index() {
- return 1;
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String top = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_TOP));
- String bottom = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM));
- String left = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT));
-
- set(properties, top, value, bottom, left, value == null || value.length() == 0);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipSubStyleAdapter.java
deleted file mode 100644
index 92e96bd8af..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipSubStyleAdapter.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.IValID;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValue;
-import org.w3c.dom.css.Rect;
-
-
-/**
- * Abstract class for clip sub-properties
- */
-abstract public class ClipSubStyleAdapter implements ISubPropertyAdapter {
-
- /**
- *
- */
- public ClipSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- public String get(ICSS2Properties properties) {
- String str = null;
- Object obj = properties.get(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP));
- if (obj != null) {
- if (obj instanceof org.w3c.dom.css.Rect) {
- str = get((org.w3c.dom.css.Rect) obj);
- }
- else {
- if (obj instanceof ICSSValue) {
- str = ((ICSSValue) obj).getCSSValueText();
- }
- else {
- str = obj.toString();
- }
- str = str.trim().toLowerCase();
- int pos = str.indexOf("rect(");//$NON-NLS-1$
- if (pos >= 0) {
- String subStr = null;
- pos += 5;
- int i = 0;
- do {
- int posEnd = str.indexOf(",", pos);//$NON-NLS-1$
- if (posEnd < 0)
- posEnd = str.indexOf(")", pos);//$NON-NLS-1$
- if (posEnd < 0 && pos < str.length())
- posEnd = str.length();
- if (posEnd >= pos) {
- subStr = str.substring(pos, posEnd);
- pos = posEnd + 1;
- }
- else
- pos = -1;
- }
- while (i++ < index() && pos > 0);
-
- if (pos > 0)
- str = subStr.trim();
- else
- str = null;
- }
- else
- str = null;
- }
- }
- return (str != null) ? str : "";//$NON-NLS-1$
- }
-
- /**
- *
- */
- abstract String get(Rect rect);
-
- /**
- *
- */
- abstract int index();
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/10/04
- * 19:25:46)
- *
- * @param properties
- * org.eclipse.wst.css.core.util.declaration.ICSS2Properties
- * @param top
- * java.lang.String
- * @param right
- * java.lang.String
- * @param bottom
- * java.lang.String
- * @param left
- * java.lang.String
- * @param removeCheck
- * boolean
- */
- void set(ICSS2Properties properties, String top, String right, String bottom, String left, boolean removeCheck) {
- if (top == null || top.length() == 0)
- top = IValID.V_AUTO;
- if (right == null || right.length() == 0)
- right = IValID.V_AUTO;
- if (bottom == null || bottom.length() == 0)
- bottom = IValID.V_AUTO;
- if (left == null || left.length() == 0)
- left = IValID.V_AUTO;
-
- if (removeCheck && top.trim().equalsIgnoreCase(IValID.V_AUTO) && right.trim().equalsIgnoreCase(IValID.V_AUTO) && bottom.trim().equalsIgnoreCase(IValID.V_AUTO) && left.trim().equalsIgnoreCase(IValID.V_AUTO)) {
- properties.set(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP), null);
- }
- else
- properties.set(PropCMProperty.getInstanceOf(PropCMProperty.P_CLIP), "rect(" + top + ", " + right + ", " + bottom + ", " + left + ")");//$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipTopSubStyleAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipTopSubStyleAdapter.java
deleted file mode 100644
index 915c107f64..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipTopSubStyleAdapter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMSubProperty;
-
-/**
- * For top value of 'clip' property's rect() function
- */
-public class ClipTopSubStyleAdapter extends ClipSubStyleAdapter {
-
- /**
- *
- */
- public ClipTopSubStyleAdapter() {
- super();
- }
-
- /**
- *
- */
- String get(org.w3c.dom.css.Rect rect) {
- return rect.getTop().getCssText();
- }
-
- /**
- *
- */
- int index() {
- return 0;
- }
-
- /**
- *
- */
- public void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException {
- String right = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_RIGHT));
- String bottom = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_BOTTOM));
- String left = properties.get(PropCMSubProperty.getInstanceOf(PropCMSubProperty.PSUB_CLIP_LEFT));
-
- set(properties, value, right, bottom, left, value == null || value.length() == 0);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/FontShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/FontShorthandAdapter.java
deleted file mode 100644
index 4e848e34da..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/FontShorthandAdapter.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.IValID;
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'font' property 'font' will be expanded to 'font-family', 'font-size',
- * 'font-style', 'font-variant', 'font-weight', 'line-height',
- */
-public class FontShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public FontShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String style = null, variant = null, weight = null, size = null, height = null, family = null;
- PropCMProperty propFont = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE);
- PropCMProperty propVariant = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT);
- PropCMProperty propWeight = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT);
- PropCMProperty propSize = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE);
- boolean bNormalSpecified = false;
-
- int i = 0;
- for (; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- // first of all, check font idents
- if (i == 0) {
- for (int j = 0; j < propFont.getNumChild(); j++) {
- Object obj = propFont.getChildAt(i);
- if (obj instanceof String && tokens[i].image.compareToIgnoreCase(obj.toString()) == 0)
- return false;
- }
- }
- // value "normal" is shared !!
- if (tokens[i].image.equalsIgnoreCase(IValID.V_NORMAL)) {
- bNormalSpecified = true;
- }
- else {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propVariant.canHave(tokens[i].image))
- variant = tokens[i].image;
- else if (propWeight.canHave(tokens[i].image))
- weight = tokens[i].image;
- else if (propSize.canHave(tokens[i].image)) {
- size = tokens[i].image;
- break; // if size found, break loop
- }
- }
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER && weight == null && propWeight.canHave(tokens[i].image)) {
- weight = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- size = tokens[i].image;
- break; // if size found, break loop
- }
- }
-
- if (bNormalSpecified) {
- if (style == null)
- style = IValID.V_NORMAL;
- if (variant == null)
- variant = IValID.V_NORMAL;
- if (weight == null)
- weight = IValID.V_NORMAL;
- }
-
- // skip whitespace
- for (i++; i < tokens.length; i++) {
- if (tokens[i].kind != CSSRegionContexts.CSS_S || tokens[i].kind != CSSRegionContexts.CSS_DECLARATION_VALUE_S)
- break;
- }
-
- // line-height ?
- if (i < tokens.length && tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && tokens[i].image.equals("/")) { //$NON-NLS-1$
- for (i++; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- height = tokens[i++].image;
- break;
- }
- }
- }
-
- // font-family
- StringBuffer buf = new StringBuffer();
- for (; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT)
- buf.append(" ");//$NON-NLS-1$
- else
- buf.append(tokens[i].image);
- }
- family = buf.toString().trim();
-
- dest.set(PropCMProperty.P_FONT_STYLE, style);
- dest.set(PropCMProperty.P_FONT_VARIANT, variant);
- dest.set(PropCMProperty.P_FONT_WEIGHT, weight);
- dest.set(PropCMProperty.P_FONT_SIZE, size);
- dest.set(PropCMProperty.P_LINE_HEIGHT, height);
- dest.set(PropCMProperty.P_FONT_FAMILY, family);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String style = null, variant = null, weight = null, size = null, height = null, family = null;
- PropCMProperty propFont = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT);
- PropCMProperty propStyle = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_STYLE);
- PropCMProperty propVariant = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_VARIANT);
- PropCMProperty propWeight = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_WEIGHT);
- PropCMProperty propSize = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_SIZE);
- PropCMProperty propHeight = PropCMProperty.getInstanceOf(PropCMProperty.P_LINE_HEIGHT);
- PropCMProperty propFamily = PropCMProperty.getInstanceOf(PropCMProperty.P_FONT_FAMILY);
- boolean bNormalSpecified = false;
-
- int i = 0;
- for (; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- // first of all, check font idents
- if (i == 0) {
- for (int j = 0; j < propFont.getNumChild(); j++) {
- Object obj = propFont.getChildAt(i);
- if (obj instanceof String && tokens[i].image.compareToIgnoreCase(obj.toString()) == 0)
- return null;
- }
- }
- // value "normal" is shared !!
- if (tokens[i].image.equalsIgnoreCase(IValID.V_NORMAL)) {
- bNormalSpecified = true;
- }
- else {
- if (propStyle.canHave(tokens[i].image))
- style = tokens[i].image;
- else if (propVariant.canHave(tokens[i].image))
- variant = tokens[i].image;
- else if (propWeight.canHave(tokens[i].image))
- weight = tokens[i].image;
- else if (propSize.canHave(tokens[i].image)) {
- size = tokens[i].image;
- break; // if size found, break loop
- }
- }
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER && weight == null && propWeight.canHave(tokens[i].image)) {
- weight = tokens[i].image;
- }
- else if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE) {
- size = tokens[i].image;
- break; // if size found, break loop
- }
- }
-
- if (bNormalSpecified) {
- if (style == null)
- style = IValID.V_NORMAL;
- if (variant == null)
- variant = IValID.V_NORMAL;
- if (weight == null)
- weight = IValID.V_NORMAL;
- }
-
- // skip whitespace
- for (i++; i < tokens.length; i++) {
- if (tokens[i].kind != CSSRegionContexts.CSS_S || tokens[i].kind != CSSRegionContexts.CSS_DECLARATION_VALUE_S)
- break;
- }
-
- // line-height ?
- if (i < tokens.length && tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR && tokens[i].image.equals("/")) { //$NON-NLS-1$
- for (i++; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- height = tokens[i++].image;
- break;
- }
- }
- }
-
- // font-family
- StringBuffer buf = new StringBuffer();
- for (; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_COMMENT)
- buf.append(" ");//$NON-NLS-1$
- else
- buf.append(tokens[i].image);
- }
- family = buf.toString().trim();
-
- if (propStyle == propDest)
- return style;
- else if (propVariant == propDest)
- return variant;
- else if (propWeight == propDest)
- return weight;
- else if (propSize == propDest)
- return size;
- else if (propHeight == propDest)
- return height;
- else if (propFamily == propDest)
- return family;
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ICSS2Properties.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ICSS2Properties.java
deleted file mode 100644
index 0bf6432f6d..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ICSS2Properties.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.w3c.dom.css.CSS2Properties;
-
-
-/**
- *
- */
-public interface ICSS2Properties extends CSS2Properties {
-
- /**
- *
- */
- void applyFull(ICSSStyleDeclaration decl);
-
- /**
- *
- */
- void applyModified(ICSSStyleDeclaration decl);
-
- /**
- *
- */
- String get(PropCMProperty prop);
-
- /**
- *
- */
- String getBackgroundPositionX();
-
- /**
- *
- */
- String getBackgroundPositionY();
-
- /**
- *
- */
- String getClipBottom();
-
- /**
- *
- */
- String getClipLeft();
-
- /**
- *
- */
- String getClipRight();
-
- /**
- *
- */
- String getClipTop();
-
- /**
- *
- */
- boolean isModified();
-
- /**
- *
- */
- Enumeration properties();
-
- /**
- *
- */
- Iterator propertiesModified();
-
- /**
- *
- */
- void resetModified();
-
- /**
- *
- */
- void set(PropCMProperty prop, String value) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setBackgroundPositionX(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setBackgroundPositionY(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setClipBottom(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setClipLeft(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setClipRight(String backgroundPosition) throws org.w3c.dom.DOMException;
-
- /**
- *
- */
- void setClipTop(String backgroundPosition) throws org.w3c.dom.DOMException;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/IShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/IShorthandAdapter.java
deleted file mode 100644
index a1d405c97e..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/IShorthandAdapter.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-
-/**
- *
- */
-public interface IShorthandAdapter {
-
- /**
- *
- */
- boolean expand(String source, CSSPropertyContext dest);
-
- /**
- *
- */
- String extract(String source, PropCMProperty propDest);
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ISubPropertyAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ISubPropertyAdapter.java
deleted file mode 100644
index e169f0dd9c..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ISubPropertyAdapter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-/**
- *
- */
-public interface ISubPropertyAdapter {
-
- /**
- *
- */
- String get(ICSS2Properties properties);
-
- /**
- *
- */
- void set(ICSS2Properties properties, String value) throws org.w3c.dom.DOMException;
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ListStyleShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ListStyleShorthandAdapter.java
deleted file mode 100644
index 97132742f5..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ListStyleShorthandAdapter.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'list-style' property 'list-style' will be expanded to
- * 'list-style-image', 'list-style-position', 'list-style-type',
- */
-public class ListStyleShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public ListStyleShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String image = "", pos = "", type = "";//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- PropCMProperty propPos = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION);
- PropCMProperty propType = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE);
- PropCMProperty propImage = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propPos.canHave(tokens[i].image))
- pos = tokens[i].image;
- else { // value="none" is shared !!
- if (propType.canHave(tokens[i].image))
- type = tokens[i].image;
- if (propImage.canHave(tokens[i].image))
- image = tokens[i].image;
- }
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- image = tokens[i].image;
- }
- }
-
- dest.set(propPos.getName(), pos);
- dest.set(propType.getName(), type);
- dest.set(propImage.getName(), image);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String image = null, pos = null, type = null;
- PropCMProperty propPos = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_POSITION);
- PropCMProperty propType = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_TYPE);
- PropCMProperty propImage = PropCMProperty.getInstanceOf(PropCMProperty.P_LIST_STYLE_IMAGE);
-
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT) {
- if (propPos.canHave(tokens[i].image))
- pos = tokens[i].image;
- else { // value="none" is shared !!
- if (propType.canHave(tokens[i].image))
- type = tokens[i].image;
- if (propImage.canHave(tokens[i].image))
- image = tokens[i].image;
- }
- }
- else if (tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_URI) {
- image = tokens[i].image;
- }
- }
-
- if (propPos == propDest)
- return pos;
- else if (propType == propDest)
- return type;
- else if (propImage == propDest)
- return image;
- else
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/MarginShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/MarginShorthandAdapter.java
deleted file mode 100644
index d3cf1e7ccb..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/MarginShorthandAdapter.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'margin' property 'margin' will be expanded to 'margin-top',
- * 'margin-right', 'margin-bottom', 'margin-left',
- */
-public class MarginShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public MarginShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_MARGIN_TOP, dests[0]);
- dest.set(PropCMProperty.P_MARGIN_RIGHT, dests[1]);
- dest.set(PropCMProperty.P_MARGIN_BOTTOM, dests[2]);
- dest.set(PropCMProperty.P_MARGIN_LEFT, dests[3]);
-
- return true;
-
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_MARGIN_TOP || propDest.getName() == PropCMProperty.P_MARGIN_BOTTOM)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_MARGIN_TOP)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_MARGIN_BOTTOM)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_MARGIN_TOP)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_MARGIN_RIGHT)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_MARGIN_BOTTOM)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_MARGIN_LEFT)
- return idents[3];
- else
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/PaddingShorthandAdapter.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/PaddingShorthandAdapter.java
deleted file mode 100644
index ce2436d561..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/PaddingShorthandAdapter.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.core.internal.util.declaration;
-
-
-
-import org.eclipse.wst.css.core.internal.contentmodel.PropCMProperty;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-
-
-/**
- * For 'padding' property 'padding' will be expanded to 'padding-top',
- * 'padding-right', 'padding-bottom', 'padding-left',
- */
-public class PaddingShorthandAdapter implements IShorthandAdapter {
-
- /**
- *
- */
- public PaddingShorthandAdapter() {
- super();
- }
-
- /**
- *
- */
- public boolean expand(String source, CSSPropertyContext dest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return false;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- String[] dests = new String[4];
- if (j == 0)
- return true;
- else if (j == 1) {
- dests[0] = dests[1] = dests[2] = dests[3] = idents[0];
- }
- else if (j == 2) {
- dests[0] = dests[2] = idents[0];
- dests[1] = dests[3] = idents[1];
- }
- else if (j == 3) {
- dests[0] = idents[0];
- dests[1] = dests[3] = idents[1];
- dests[2] = idents[2];
- }
- else {
- for (int k = 0; k < 4; k++)
- dests[k] = idents[k];
- }
- dest.set(PropCMProperty.P_PADDING_TOP, dests[0]);
- dest.set(PropCMProperty.P_PADDING_RIGHT, dests[1]);
- dest.set(PropCMProperty.P_PADDING_BOTTOM, dests[2]);
- dest.set(PropCMProperty.P_PADDING_LEFT, dests[3]);
-
- return true;
- }
-
- /**
- *
- */
- public String extract(String source, PropCMProperty propDest) {
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_DECLARATION_VALUE, source);
- CSSTextToken[] tokens = parser.getTokens();
- if (tokens.length <= 0) {
- return null;
- }
- String[] idents = new String[4];
- int j = 0;
- for (int i = 0; i < tokens.length; i++) {
- if (org.eclipse.wst.css.core.internal.util.CSSUtil.isLength(tokens[i]) || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER || tokens[i].kind == CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE)
- idents[j++] = tokens[i].image;
- if (j == 4)
- break;
- }
-
- if (j == 0)
- return null;
- else if (j == 1)
- return idents[0];
- else if (j == 2) {
- if (propDest.getName() == PropCMProperty.P_PADDING_TOP || propDest.getName() == PropCMProperty.P_PADDING_BOTTOM)
- return idents[0];
- else
- return idents[1];
- }
- else if (j == 3) {
- if (propDest.getName() == PropCMProperty.P_PADDING_TOP)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_PADDING_BOTTOM)
- return idents[2];
- else
- return idents[1];
- }
- else {
- if (propDest.getName() == PropCMProperty.P_PADDING_TOP)
- return idents[0];
- else if (propDest.getName() == PropCMProperty.P_PADDING_RIGHT)
- return idents[1];
- else if (propDest.getName() == PropCMProperty.P_PADDING_BOTTOM)
- return idents[2];
- else if (propDest.getName() == PropCMProperty.P_PADDING_LEFT)
- return idents[3];
- else
- return null;
- }
-
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ValueData.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ValueData.java
deleted file mode 100644
index c5282f80ac..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ValueData.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.wst.css.core.internal.util.declaration;
-
-
-
-/**
- *
- */
-public class ValueData {
-
- public String value;
- public boolean important = false;
-
- /**
- *
- */
- public ValueData() {
- super();
- }
-
- /**
- *
- */
- public ValueData(String val, boolean imp) {
- super();
- value = val;
- important = imp;
- }
-
- /**
- *
- */
- public String toString() {
- return value;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/text/ICSSPartitions.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/text/ICSSPartitions.java
deleted file mode 100644
index e06afcb5f6..0000000000
--- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/text/ICSSPartitions.java
+++ /dev/null
@@ -1,24 +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.wst.css.core.text;
-
-
-/**
- * This interface is not intended to be implemented. It defines the
- * partitioning for CSS and all its partitions. Clients should reference the
- * partition type Strings defined here directly.
- *
- * @since 1.1
- */
-public interface ICSSPartitions {
-
- String STYLE = "org.eclipse.wst.css.STYLE"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.ui/.classpath b/bundles/org.eclipse.wst.css.ui/.classpath
deleted file mode 100644
index 8c862926a0..0000000000
--- a/bundles/org.eclipse.wst.css.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.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible"
- pattern="org/w3c/dom/css/**/*" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/sse/core/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/css/core/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/xml/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/html/core/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/html/core/internal/htmlcss/StyleAdapterFactory" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/sse/internal/contentproperties/IContentSettings" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/common/componentcore/internal/util/IModuleConstants" />
- <accessrule kind="accessible"
- pattern="org/eclipse/jem/internal/util/emf/workbench/nls/EMFWorkbenchResourceHandler" />
- </accessrules>
- </classpathentry>
- <classpathentry kind="con"
- path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4" />
- <classpathentry kind="output" path="bin" />
-</classpath>
diff --git a/bundles/org.eclipse.wst.css.ui/.cvsignore b/bundles/org.eclipse.wst.css.ui/.cvsignore
deleted file mode 100644
index 1037f8b270..0000000000
--- a/bundles/org.eclipse.wst.css.ui/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-csseditor.jar
-temp.folder
-build.xml
-dev.properties
-bin
-@dot
-src.zip
-javaCompiler...args
diff --git a/bundles/org.eclipse.wst.css.ui/.options b/bundles/org.eclipse.wst.css.ui/.options
deleted file mode 100644
index 1af0b5868b..0000000000
--- a/bundles/org.eclipse.wst.css.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.css.ui/projectionperf=false
diff --git a/bundles/org.eclipse.wst.css.ui/.project b/bundles/org.eclipse.wst.css.ui/.project
deleted file mode 100644
index d42035fc37..0000000000
--- a/bundles/org.eclipse.wst.css.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.css.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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index afa5c91352..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.ui/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 7ec5750225..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 4174c191d2..0000000000
--- a/bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,79 +0,0 @@
-#Wed Mar 28 03:20:41 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.wst.css.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 301c7adde6..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.ui/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index c59368c5e1..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fc522bba76..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 19f30e5fad..0000000000
--- a/bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,50 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.css.ui; singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Bundle-Activator: org.eclipse.wst.css.ui.internal.CSSUIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.css.ui,
- org.eclipse.wst.css.ui.internal;x-internal:=true,
- org.eclipse.wst.css.ui.internal.autoedit;x-internal:=true,
- org.eclipse.wst.css.ui.internal.contentassist;x-internal:=true,
- org.eclipse.wst.css.ui.internal.contentoutline;x-internal:=true,
- org.eclipse.wst.css.ui.internal.contentproperties;x-internal:=true,
- org.eclipse.wst.css.ui.internal.contentproperties.ui;x-internal:=true,
- org.eclipse.wst.css.ui.internal.edit.ui;x-internal:=true,
- org.eclipse.wst.css.ui.internal.editor;x-internal:=true,
- org.eclipse.wst.css.ui.internal.handlers;x-internal:=true,
- org.eclipse.wst.css.ui.internal.image;x-internal:=true,
- org.eclipse.wst.css.ui.internal.preferences;x-internal:=true,
- org.eclipse.wst.css.ui.internal.preferences.ui;x-internal:=true,
- org.eclipse.wst.css.ui.internal.projection;x-internal:=true,
- org.eclipse.wst.css.ui.internal.properties;x-internal:=true,
- org.eclipse.wst.css.ui.internal.registry;x-internal:=true,
- org.eclipse.wst.css.ui.internal.selection;x-internal:=true,
- org.eclipse.wst.css.ui.internal.style;x-internal:=true,
- org.eclipse.wst.css.ui.internal.templates;x-internal:=true,
- org.eclipse.wst.css.ui.internal.text;x-internal:=true,
- org.eclipse.wst.css.ui.internal.wizard;x-internal:=true,
- org.eclipse.wst.css.ui.views.contentoutline,
- org.eclipse.wst.css.ui.views.properties
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.views;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.400,1.1.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.css.core;bundle-version="[1.1.200,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.html.core;bundle-version="[1.1.200,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)";resolution:=optional,
- org.eclipse.wst.common.modulecore;bundle-version="[1.1.200,1.2.0)";resolution:=optional,
- com.ibm.icu;bundle-version="[3.8.1,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.wst.css.ui/about.html b/bundles/org.eclipse.wst.css.ui/about.html
deleted file mode 100644
index 2199df3f05..0000000000
--- a/bundles/org.eclipse.wst.css.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.wst.css.ui/build.properties b/bundles/org.eclipse.wst.css.ui/build.properties
deleted file mode 100644
index d5ac96671f..0000000000
--- a/bundles/org.eclipse.wst.css.ui/build.properties
+++ /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
-###############################################################################
-bin.includes = plugin.xml,\
- icons/,\
- plugin.properties,\
- META-INF/,\
- .,\
- .options,\
- templates/,\
- about.html
-bin.excludes = bin/**,\
- @dot/**,\
- temp.folder/**
-src.includes = build.properties
-source.. = src/
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/dtool16/newcss_wiz.gif b/bundles/org.eclipse.wst.css.ui/icons/full/dtool16/newcss_wiz.gif
deleted file mode 100644
index d94f752f10..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/dtool16/newcss_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/etool16/newcss_wiz.gif b/bundles/org.eclipse.wst.css.ui/icons/full/etool16/newcss_wiz.gif
deleted file mode 100644
index ab287a5d2b..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/etool16/newcss_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/aural_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/aural_props.gif
deleted file mode 100644
index df1704e435..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/aural_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/boxmodel_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/boxmodel_props.gif
deleted file mode 100644
index 7c050f5090..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/boxmodel_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/charset_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/charset_rule.gif
deleted file mode 100644
index 0e93844d92..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/charset_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/class_selector.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/class_selector.gif
deleted file mode 100644
index f924d7a684..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/class_selector.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/colback_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/colback_props.gif
deleted file mode 100644
index 5ca230b289..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/colback_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/content_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/content_props.gif
deleted file mode 100644
index 2133ded0bd..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/content_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyname.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyname.gif
deleted file mode 100644
index ede58abb89..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyname.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_function.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_function.gif
deleted file mode 100644
index 6cd12dada0..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_function.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_identifier.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_identifier.gif
deleted file mode 100644
index 2adbdd83b2..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_identifier.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_unit.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_unit.gif
deleted file mode 100644
index 308a3ae841..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_unit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/font_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/font_props.gif
deleted file mode 100644
index aca5f8920b..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/font_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/fontface_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/fontface_rule.gif
deleted file mode 100644
index 71f59e8b7a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/fontface_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/id_selector.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/id_selector.gif
deleted file mode 100644
index f0857d284f..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/id_selector.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_rule.gif
deleted file mode 100644
index 94d89cd59e..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_selector.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_selector.gif
deleted file mode 100644
index d85b78f29d..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_selector.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/media_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/media_rule.gif
deleted file mode 100644
index 3391f19bee..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/media_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/other_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/other_props.gif
deleted file mode 100644
index 920c228d4a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/other_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/page_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/page_rule.gif
deleted file mode 100644
index 525f64bc57..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/page_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pagedmedia_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pagedmedia_props.gif
deleted file mode 100644
index 6b635b03d8..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pagedmedia_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pseudo.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pseudo.gif
deleted file mode 100644
index 1b6a6dc6aa..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/pseudo.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sort.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sort.gif
deleted file mode 100644
index 23c5d0b11c..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sort.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sourceEditor.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sourceEditor.gif
deleted file mode 100644
index 75ebdb8586..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/sourceEditor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/style_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/style_rule.gif
deleted file mode 100644
index 3176ff8c5c..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/style_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/stylesheet.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/stylesheet.gif
deleted file mode 100644
index d8fde00545..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/stylesheet.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/table_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/table_props.gif
deleted file mode 100644
index bcc76cd635..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/table_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag-template.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag-template.gif
deleted file mode 100644
index 5d1f81b6d4..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag-template.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag_selector.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag_selector.gif
deleted file mode 100644
index 69850faf9a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag_selector.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/text_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/text_props.gif
deleted file mode 100644
index abf63f8568..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/text_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/ui_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/ui_props.gif
deleted file mode 100644
index 99a8b96f98..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/ui_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/unknown_rule.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/unknown_rule.gif
deleted file mode 100644
index 857e4e50ee..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/unknown_rule.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/visual_props.gif b/bundles/org.eclipse.wst.css.ui/icons/full/obj16/visual_props.gif
deleted file mode 100644
index c1a8b34ed8..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/obj16/visual_props.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/icons/full/wizban/newcssfile_wiz.png b/bundles/org.eclipse.wst.css.ui/icons/full/wizban/newcssfile_wiz.png
deleted file mode 100644
index c88e63fd29..0000000000
--- a/bundles/org.eclipse.wst.css.ui/icons/full/wizban/newcssfile_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.css.ui/plugin.properties b/bundles/org.eclipse.wst.css.ui/plugin.properties
deleted file mode 100644
index 2b3989c9ab..0000000000
--- a/bundles/org.eclipse.wst.css.ui/plugin.properties
+++ /dev/null
@@ -1,66 +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
-###############################################################################
-providerName=Eclipse.org
-pluginName=SSE CSS Source Editor
-CSS_Source_Page_Editor.name=CSS Editor
-CSS_Files.name=CSS Files
-CSS_Source.name=Editor
-CSS_Styles.name=Styles
-CSS_Templates.name=Templates
-CSS_Syntax_Coloring=Syntax Coloring
-WebContentSettings.name=Web Content Settings
-###############################################################################
-# The following property keys maybe unused. Commented out on 12/7/2004. Uncomment if needed.
-#CSS_Annotations.name=CSS Annotations
-
-
-#org.eclipse.ui.newWizards extension point
-_UI_WIZARD_NAME = CSS
-_UI_WIZARD_CREATE_NEW_FILE = Create a new Cascading Style Sheet
-##
-AddTask.label=Add &Task...
-AddTask.tooltip=Add Task...
-AddBookmark.label=Add Boo&kmark...
-AddBookmark.tooltip=Add Bookmark...
-SelectRuler.label=Select Ruler
-##
-CleanupDocument_label=Cleanup Document...
-CleanupDocument_tooltip=Cleanup Document
-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
-##
-All_CSS_context_type_Extension_Element.name=All CSS
-CSS_New_context_type_Extension_Element.name=New CSS
-##
-preferenceKeywords.files=editor css creating saving files suffix specified encoding iana
-preferenceKeywords.source=editor css source formatting line width insert break properties wrapping style attribute html indent tabs spaces size capitalization identifier property name value uppercase lowercase
-preferenceKeywords.templates=editor css templates snippet macros
-preferenceKeywords.styles=editor css style customize syntax highlighting type text content foreground background bold color
-preferenceKeywords.webcontent=editor css web content settings profile style
-
-scope.structured.text.editor.css.name=Editing CSS Source
-scope.structured.text.editor.css.description=Editing CSS Source
-
-Colors.atmarkRule=At Mark Rule
-Colors.selector=Selector
-Colors.media=Media
-Colors.comment=Comment
-Colors.propertyName=Property Name
-Colors.propertyValue=Property Value
-Colors.uri=URI
-Colors.string=String
-Colors.error=Error
diff --git a/bundles/org.eclipse.wst.css.ui/plugin.xml b/bundles/org.eclipse.wst.css.ui/plugin.xml
deleted file mode 100644
index a0576b49a9..0000000000
--- a/bundles/org.eclipse.wst.css.ui/plugin.xml
+++ /dev/null
@@ -1,479 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.ui.editors">
- <editor
- name="%CSS_Source_Page_Editor.name"
- icon="$nl$/icons/full/obj16/sourceEditor.gif"
- contributorClass="org.eclipse.wst.css.ui.internal.ActionContributorCSS"
- class="org.eclipse.wst.sse.ui.StructuredTextEditor"
- symbolicFontName="org.eclipse.wst.sse.ui.textfont"
- id="org.eclipse.wst.css.core.csssource.source">
- <contentTypeBinding
- contentTypeId="org.eclipse.wst.css.core.csssource" />
- </editor>
- </extension>
-
- <extension point="org.eclipse.wst.sse.ui.editorConfiguration">
- <contentOutlineConfiguration
- class="org.eclipse.wst.css.ui.views.contentoutline.CSSContentOutlineConfiguration"
- target="org.eclipse.wst.css.core.csssource" />
- <sourceViewerConfiguration
- class="org.eclipse.wst.css.ui.StructuredTextViewerConfigurationCSS"
- target="org.eclipse.wst.css.core.csssource" />
- <propertySheetConfiguration
- class="org.eclipse.wst.css.ui.views.properties.CSSPropertySheetConfiguration"
- target="org.eclipse.wst.css.core.csssource" />
- <provisionalConfiguration
- type="characterpairmatcher"
- class="org.eclipse.wst.css.ui.internal.text.CSSDocumentRegionEdgeMatcher"
- target="org.eclipse.wst.css.core.csssource" />
- <provisionalConfiguration
- type="structuredtextfoldingprovider"
- class="org.eclipse.wst.css.ui.internal.projection.StructuredTextFoldingProviderCSS"
- target="org.eclipse.wst.css.core.csssource" />
- <provisionalConfiguration
- type="autoeditstrategy"
- class="org.eclipse.wst.css.ui.internal.autoedit.StructuredAutoEditStrategyCSS"
- target="org.eclipse.wst.css.STYLE" />
- <provisionalDefinition
- type="preferencepages"
- value="org.eclipse.wst.css.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.wst.css.core.csssource" />
- <provisionalDefinition
- type="activecontexts"
- value="org.eclipse.wst.css.core.csssource"
- target="org.eclipse.wst.css.core.csssource" />
- </extension>
-
- <extension point="org.eclipse.ui.contexts">
- <context
- name="%scope.structured.text.editor.css.name"
- parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
- description="%scope.structured.text.editor.css.description"
- id="org.eclipse.wst.css.core.csssource">
- </context>
- </extension>
-
- <extension
- point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
- <adapterFactoryDescription
- class="org.eclipse.wst.css.ui.internal.registry.AdapterFactoryProviderCSS">
- <contentType id="org.eclipse.wst.css.core.csssource" />
- </adapterFactoryDescription>
- </extension>
-
- <extension
- point="org.eclipse.core.filebuffers.annotationModelCreation">
- <factory
- contentTypeId="org.eclipse.wst.css.core.csssource"
- class="org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModelFactory" />
- </extension>
-
- <extension point="org.eclipse.ui.preferencePages">
- <page
- name="%CSS_Files.name"
- category="org.eclipse.wst.html.ui.preferences.web"
- class="org.eclipse.wst.css.ui.internal.preferences.ui.CSSFilesPreferencePage"
- id="org.eclipse.wst.css.ui.preferences.css">
- <keywordReference id="org.eclipse.wst.css.ui.files"/>
- </page>
- <page
- name="%CSS_Source.name"
- category="org.eclipse.wst.css.ui.preferences.css"
- class="org.eclipse.wst.css.ui.internal.preferences.ui.CSSSourcePreferencePage"
- id="org.eclipse.wst.sse.ui.preferences.css.source">
- <keywordReference id="org.eclipse.wst.css.ui.source"/>
- </page>
- <page
- name="%CSS_Templates.name"
- category="org.eclipse.wst.sse.ui.preferences.css.source"
- class="org.eclipse.wst.css.ui.internal.preferences.ui.CSSTemplatePreferencePage"
- id="org.eclipse.wst.css.ui.preferences.templates">
- <keywordReference id="org.eclipse.wst.css.ui.templates"/>
- </page>
- <page
- name="%CSS_Syntax_Coloring"
- category="org.eclipse.wst.sse.ui.preferences.css.source"
- class="org.eclipse.wst.css.ui.internal.preferences.ui.CSSSyntaxColoringPage"
- id="org.eclipse.wst.sse.ui.preferences.css.styles">
- <keywordReference id="org.eclipse.wst.css.ui.styles"/>
- </page>
- </extension>
-
- <!-- CSS Content Settings Property Page -->
- <extension point="org.eclipse.ui.propertyPages">
- <page
- name="%WebContentSettings.name"
- class="org.eclipse.wst.css.ui.internal.contentproperties.ui.CSSWebContentSettingsPropertyPage"
- id="org.eclipse.wst.css.ui.internal.contentproperties.CSSWebContentSettingsPropertyPage.css">
- <enabledWhen>
- <and>
- <adapt type="org.eclipse.core.resources.IFile">
- <or>
- <test
- forcePluginActivation="true"
- property="org.eclipse.core.resources.contentTypeId"
- value="org.eclipse.wst.css.core.csssource" />
- </or>
- </adapt>
- </and>
- </enabledWhen>
- <keywordReference id="org.eclipse.wst.css.ui.webcontent"/>
- </page>
- </extension>
-
- <!-- Keywords for preference and properties pages -->
- <extension point="org.eclipse.ui.keywords">
- <keyword
- label="%preferenceKeywords.files"
- id="org.eclipse.wst.css.ui.files"/>
- <keyword
- label="%preferenceKeywords.source"
- id="org.eclipse.wst.css.ui.source"/>
- <keyword
- label="%preferenceKeywords.templates"
- id="org.eclipse.wst.css.ui.templates"/>
- <keyword
- label="%preferenceKeywords.styles"
- id="org.eclipse.wst.css.ui.styles"/>
- <keyword
- label="%preferenceKeywords.webcontent"
- id="org.eclipse.wst.css.ui.webcontent"/>
- </extension>
-
- <!-- Editor actionsets -->
- <extension point="org.eclipse.ui.actionSetPartAssociations">
- <actionSetPartAssociation
- targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
- <part id="org.eclipse.wst.css.core.csssource.source"></part>
- </actionSetPartAssociation>
- <actionSetPartAssociation
- targetID="org.eclipse.ui.NavigateActionSet">
- <part id="org.eclipse.wst.css.core.csssource.source"></part>
- </actionSetPartAssociation>
- </extension>
-
- <!-- initialize css ui preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.wst.css.ui.internal.preferences.CSSUIPreferenceInitializer" />
- </extension>
-
- <!-- New CSS wizard -->
- <extension point="org.eclipse.ui.newWizards">
- <wizard
- id="org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard"
- name="%_UI_WIZARD_NAME"
- class="org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard"
- category="org.eclipse.wst.web.ui"
- icon="$nl$/icons/full/etool16/newcss_wiz.gif">
- <description>%_UI_WIZARD_CREATE_NEW_FILE</description>
- <selection class="org.eclipse.core.resources.IResource" />
- </wizard>
- </extension>
-
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="menu:edit?after=additions">
- <command commandId="org.eclipse.ui.edit.text.contentAssist.proposals" id="CSSContentAssist" style="push">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"></reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <viewerContribution
- targetID="org.eclipse.wst.css.core.csssource.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>
- <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">
- </action>
- </viewerContribution>
- </extension>
-
- <!-- Templates -->
- <extension point="org.eclipse.ui.editors.templates">
- <contextType
- name="%All_CSS_context_type_Extension_Element.name"
- class="org.eclipse.wst.css.ui.internal.templates.TemplateContextTypeCSS"
- id="css_all">
- </contextType>
- <contextType
- name="%CSS_New_context_type_Extension_Element.name"
- class="org.eclipse.wst.css.ui.internal.templates.TemplateContextTypeCSS"
- id="css_new">
- </contextType>
- <include
- file="templates/cssdefault-templates.xml"
- translations="$nl$/templates/cssdefault-templates.properties">
- </include>
- </extension>
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.wst.css.ui.internal.handlers.CleanupDocumentHandler"
- commandId="org.eclipse.wst.sse.ui.cleanup.document">
- <activeWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </activeWhen>
- <enabledWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.wst.css.ui.internal.handlers.StructuredSelectEnclosingHandler"
- commandId="org.eclipse.wst.sse.ui.structure.select.enclosing">
- <activeWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </activeWhen>
- <enabledWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.wst.css.ui.internal.handlers.StructuredSelectNextHandler"
- commandId="org.eclipse.wst.sse.ui.structure.select.next">
- <activeWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </activeWhen>
- <enabledWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.wst.css.ui.internal.handlers.StructuredSelectPreviousHandler"
- commandId="org.eclipse.wst.sse.ui.structure.select.previous">
- <activeWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </activeWhen>
- <enabledWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </enabledWhen>
- </handler>
- <!-- TODO Use the handler from SSE or XML's declaration -->
- <handler
- class="org.eclipse.wst.sse.ui.internal.handlers.StructuredSelectHistoryHandler"
- commandId="org.eclipse.wst.sse.ui.structure.select.last">
- <activeWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </activeWhen>
- <enabledWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssSourceContributions.definition"/>
- </enabledWhen>
- </handler>
- </extension>
- <!-- CSS editor actions -->
- <extension point="org.eclipse.ui.editorActions">
- <!--<editorContribution
- id="org.eclipse.wst.css.core.csssource.source.editorActions"
- targetID="org.eclipse.wst.css.core.csssource.source">
- <action
- id="CleanupDocument"
- label="%CleanupDocument_label"
- definitionId="org.eclipse.wst.sse.ui.cleanup.document"
- tooltip="%CleanupDocument_tooltip"
- class="org.eclipse.wst.css.ui.internal.edit.ui.CleanupActionCSSDelegate"
- actionID="CleanupDocument">
- </action>
- <action
- id="StructureSelectEnclosing"
- label="%StructureSelectEnclosing_label"
- definitionId="org.eclipse.wst.sse.ui.structure.select.enclosing"
- tooltip="%StructureSelectEnclosing_tooltip"
- class="org.eclipse.wst.css.ui.internal.selection.StructuredSelectEnclosingCSSActionDelegate"
- 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.css.ui.internal.selection.StructuredSelectNextCSSActionDelegate"
- 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.css.ui.internal.selection.StructuredSelectPreviousCSSActionDelegate"
- 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.wst.css.core.csssource.source"
- id="org.eclipse.wst.css.core.csssource.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.core.expressions.definitions">
- <definition id="org.eclipse.wst.css.ui.cssSourceContributions.definition">
- <with variable="activeContexts">
- <iterate operator="or">
- <equals value="org.eclipse.wst.css.core.csssource"/>
- </iterate>
- </with>
- </definition>
- </extension>
-
- <!-- Define theme -->
- <extension
- point="org.eclipse.ui.themes">
- <theme
- id="org.eclipse.ui.ide.systemDefault">
- <colorOverride
- id="ATMARK_RULE"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="SELECTOR"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="MEDIA"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="COMMENT"
- value="COLOR_LIST_SELECTION">
- </colorOverride>
- <colorOverride
- id="PROPERTY_NAME"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="PROPERTY_VALUE"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="URI"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="STRING"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="ERROR"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- </theme>
- <colorDefinition
- id="ATMARK_RULE"
- isEditable="false"
- label="%Colors.atmarkRule"
- value="63, 127, 127">
- </colorDefinition>
- <colorDefinition
- id="SELECTOR"
- isEditable="false"
- label="%Colors.selector"
- value="63, 127, 127">
- </colorDefinition>
- <colorDefinition
- id="MEDIA"
- isEditable="false"
- label="%Colors.media"
- value="42, 0, 225">
- </colorDefinition>
- <colorDefinition
- id="COMMENT"
- isEditable="false"
- label="%Colors.comment"
- value="63, 95, 191">
- </colorDefinition>
- <colorDefinition
- id="PROPERTY_NAME"
- isEditable="false"
- label="%Colors.propertyName"
- value="127, 0, 127">
- </colorDefinition>
- <colorDefinition
- id="PROPERTY_VALUE"
- isEditable="false"
- label="%Colors.propertyValue"
- value="42, 0, 225">
- </colorDefinition>
- <colorDefinition
- id="URI"
- isEditable="false"
- label="%Colors.uri"
- value="42, 0, 225">
- </colorDefinition>
- <colorDefinition
- id="STRING"
- isEditable="false"
- label="%Colors.string"
- value="42, 0, 225">
- </colorDefinition>
- <colorDefinition
- id="ERROR"
- isEditable="false"
- label="%Colors.error"
- value="191, 63, 63">
- </colorDefinition>
- </extension>
-
- <!-- Enable the FormatHandler for CSS 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.css.ui.cssContentType.definition"></reference>
- </activeWhen>
- <enabledWhen>
- <reference definitionId="org.eclipse.wst.css.ui.cssContentType.definition"></reference>
- </enabledWhen>
- </handler>
- </extension>
-
- <!-- Set up a definition for CSS Content Types -->
- <extension point="org.eclipse.core.expressions.definitions">
- <definition id="org.eclipse.wst.css.ui.cssContentType.definition">
- <iterate ifEmpty="false">
- <adapt type="org.eclipse.core.resources.IFile">
- <test property="org.eclipse.wst.sse.core.resources.contentTypeId"
- value="org.eclipse.wst.css.core.csssource"/>
- </adapt>
- </iterate>
- </definition>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.java
deleted file mode 100644
index b470936831..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.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.wst.css.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.formatter.IContentFormatter;
-import org.eclipse.jface.text.formatter.MultiPassContentFormatter;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.format.FormatProcessorCSS;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.text.ICSSPartitions;
-import org.eclipse.wst.css.ui.internal.contentassist.CSSContentAssistProcessor;
-import org.eclipse.wst.css.ui.internal.style.LineStyleProviderForCSS;
-import org.eclipse.wst.sse.core.text.IStructuredPartitions;
-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;
-
-/**
- * Configuration for a source viewer which shows CSS.
- * <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 StructuredTextViewerConfigurationCSS 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 fLineStyleProviderForCSS;
-
- /**
- * Create new instance of StructuredTextViewerConfigurationCSS
- */
- public StructuredTextViewerConfigurationCSS() {
- // Must have empty constructor to createExecutableExtension
- super();
- }
-
- public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
- List allStrategies = new ArrayList(0);
-
- IAutoEditStrategy[] superStrategies = super.getAutoEditStrategies(sourceViewer, contentType);
- for (int i = 0; i < superStrategies.length; i++) {
- allStrategies.add(superStrategies[i]);
- }
-
- return (IAutoEditStrategy[]) allStrategies.toArray(new IAutoEditStrategy[0]);
- }
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- if (fConfiguredContentTypes == null) {
- fConfiguredContentTypes = new String[]{ICSSPartitions.STYLE, IStructuredPartitions.DEFAULT_PARTITION, IStructuredPartitions.UNKNOWN_PARTITION};
- }
- return fConfiguredContentTypes;
- }
-
- protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType) {
- IContentAssistProcessor[] processors = null;
-
- if ((partitionType == ICSSPartitions.STYLE) || (partitionType == IStructuredPartitions.UNKNOWN_PARTITION)) {
- processors = new IContentAssistProcessor[]{new CSSContentAssistProcessor()};
- }
-
- return processors;
- }
-
- 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), ICSSPartitions.STYLE);
-
- ((MultiPassContentFormatter) formatter).setMasterStrategy(new StructuredFormattingStrategy(new FormatProcessorCSS()));
-
- return formatter;
- }
-
- public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) {
- Vector vector = new Vector();
-
- // prefix[0] is either '\t' or ' ' x tabWidth, depending on preference
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- int indentationWidth = preferences.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
- String indentCharPref = preferences.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
- boolean useSpaces = CSSCorePreferenceNames.SPACE.equals(indentCharPref);
-
- for (int i = 0; i <= indentationWidth; i++) {
- StringBuffer prefix = new StringBuffer();
- boolean appendTab = false;
-
- if (useSpaces) {
- for (int j = 0; j + i < indentationWidth; j++)
- prefix.append(' ');
-
- if (i != 0)
- appendTab = true;
- }
- else {
- for (int j = 0; j < i; j++)
- prefix.append(' ');
-
- if (i != indentationWidth)
- appendTab = true;
- }
-
- if (appendTab) {
- prefix.append('\t');
- vector.add(prefix.toString());
- // remove the tab so that indentation - tab is also an indent
- // prefix
- prefix.deleteCharAt(prefix.length() - 1);
- }
- vector.add(prefix.toString());
- }
-
- vector.add(""); //$NON-NLS-1$
-
- return (String[]) vector.toArray(new String[vector.size()]);
- }
-
- public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
- LineStyleProvider[] providers = null;
-
- if (partitionType == ICSSPartitions.STYLE) {
- providers = new LineStyleProvider[]{getLineStyleProviderForCSS()};
- }
-
- return providers;
- }
-
- private LineStyleProvider getLineStyleProviderForCSS() {
- if (fLineStyleProviderForCSS == null) {
- fLineStyleProviderForCSS = new LineStyleProviderForCSS();
- }
- return fLineStyleProviderForCSS;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/ActionContributorCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/ActionContributorCSS.java
deleted file mode 100644
index d7b45af582..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/ActionContributorCSS.java
+++ /dev/null
@@ -1,121 +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.wst.css.ui.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-import org.eclipse.ui.texteditor.RetargetTextEditorAction;
-import org.eclipse.wst.sse.ui.internal.actions.ActionContributor;
-import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
-import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
-
-/**
- * ActionContributorCSS
- *
- * 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 ActionContributorCSS extends ActionContributor {
- private static final String[] EDITOR_IDS = {"org.eclipse.wst.css.core.csssource.source", "org.eclipse.wst.sse.ui.StructuredTextEditor"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- protected RetargetTextEditorAction fContentAssist = null;
- protected RetargetTextEditorAction fCleanupDocument = null;
- protected RetargetTextEditorAction fFormatDocument = null;
- protected RetargetTextEditorAction fFormatActiveElements = null;
-
- public ActionContributorCSS() {
- super();
-
- ResourceBundle resourceBundle = CSSUIMessages.getResourceBundle();
-
- // edit commands
- fContentAssist = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
- fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
-
- // source commands
- fCleanupDocument = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
- fCleanupDocument.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
-
- fFormatDocument = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
- fFormatDocument.setActionDefinitionId(ActionDefinitionIds.FORMAT_DOCUMENT);
-
- fFormatActiveElements = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
- fFormatActiveElements.setActionDefinitionId(ActionDefinitionIds.FORMAT_ACTIVE_ELEMENTS);
- }
-
- protected String[] getExtensionIDs() {
- return EDITOR_IDS;
- }
-
- protected void addToMenu(IMenuManager menu) {
- // edit commands
- IMenuManager editMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
- if (editMenu != null) {
- editMenu.add(fCommandsSeparator);
- editMenu.add(fToggleInsertModeAction);
- editMenu.add(fCommandsSeparator);
- editMenu.add(fExpandSelectionToMenu);
- editMenu.add(fCommandsSeparator);
- editMenu.add(fContentAssist);
- editMenu.add(fMenuAdditionsGroupMarker);
- }
-
- // source commands
- String sourceMenuLabel = CSSUIMessages.SourceMenu_label;
- String sourceMenuId = "sourceMenuId"; //$NON-NLS-1$
- IMenuManager sourceMenu = new MenuManager(sourceMenuLabel, sourceMenuId);
- menu.insertAfter(IWorkbenchActionConstants.M_EDIT, sourceMenu);
- if (sourceMenu != null) {
- sourceMenu.add(fCommandsSeparator);
- sourceMenu.add(fShiftRight);
- sourceMenu.add(fShiftLeft);
- sourceMenu.add(fCleanupDocument);
- sourceMenu.add(fFormatDocument);
- sourceMenu.add(fFormatActiveElements);
- sourceMenu.add(fCommandsSeparator);
- }
- IMenuManager navigateMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE);
- if (navigateMenu != null) {
- IMenuManager gotoGroup = navigateMenu.findMenuUsingPath(IWorkbenchActionConstants.GO_TO);
- if (gotoGroup != null) {
- gotoGroup.add(fGotoMatchingBracketAction);
- }
- }
- }
-
- public void setActiveEditor(IEditorPart activeEditor) {
- super.setActiveEditor(activeEditor);
-
- ITextEditor textEditor = getTextEditor(activeEditor);
-
- fContentAssist.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS));
-
- fCleanupDocument.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT));
- fFormatDocument.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT));
- fFormatActiveElements.setAction(getAction(textEditor, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS));
- fCleanupDocument.setEnabled(textEditor != null && textEditor.isEditable());
- fFormatDocument.setEnabled(textEditor != null && textEditor.isEditable());
- fFormatActiveElements.setEnabled(textEditor != null && textEditor.isEditable());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIMessages.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIMessages.java
deleted file mode 100644
index fc57763d12..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIMessages.java
+++ /dev/null
@@ -1,126 +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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.osgi.util.NLS;
-
-public class CSSUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.wst.css.ui.internal.CSSUIPluginResources";//$NON-NLS-1$
- private static ResourceBundle fResourceBundle;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, CSSUIMessages.class);
- }
-
- public static ResourceBundle getResourceBundle() {
- try {
- if (fResourceBundle == null)
- fResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
- }
- catch (MissingResourceException x) {
- fResourceBundle = null;
- }
- return fResourceBundle;
- }
-
- public static String INFO_Not_Categorized_1;
- public static String PrefsLabel_WrappingWithoutAttr;
- public static String PrefsLabel_WrappingInsertLineBreak;
- public static String PrefsLabel_CaseGroup;
- public static String PrefsLabel_CaseIdent;
- public static String PrefsLabel_CasePropName;
- public static String PrefsLabel_CasePropValue;
- public static String PrefsLabel_CaseIdentUpper;
- public static String PrefsLabel_CaseIdentLower;
- public static String PrefsLabel_SelectorTagName;
- public static String PrefsLabel_CasePropNameUpper;
- public static String PrefsLabel_CasePropNameLower;
- public static String PrefsLabel_CasePropValueUpper;
- public static String PrefsLabel_CasePropValueLower;
- public static String PrefsLabel_SelectorTagNameUpper;
- public static String PrefsLabel_SelectorTagNameLower;
- public static String PrefsLabel_ColorSample;
- public static String PrefsLabel_ColorNormal;
- public static String PrefsLabel_ColorAtmarkRule;
- public static String PrefsLabel_ColorSelector;
- public static String PrefsLabel_ColorMedia;
- public static String PrefsLabel_ColorComment;
- public static String PrefsLabel_ColorPropertyName;
- public static String PrefsLabel_ColorPropertyValue;
- public static String PrefsLabel_ColorUri;
- public static String PrefsLabel_ColorString;
- public static String PrefsLabel_ColorColon;
- public static String PrefsLabel_ColorSemiColon;
- public static String PrefsLabel_ColorCurlyBrace;
- public static String PrefsLabel_ColorError;
- public static String SortAction_0;
- public static String _UI_WIZARD_NEW_TITLE;
- public static String _UI_WIZARD_NEW_HEADING;
- public static String _UI_WIZARD_NEW_DESCRIPTION;
- public static String _ERROR_FILENAME_MUST_END_CSS;
- public static String _WARNING_FOLDER_MUST_BE_INSIDE_WEB_CONTENT;
- public static String Title_InvalidValue;
- public static String Message_InvalidValue;
- public static String FormatMenu_label;
- public static String CleanupDocument_label; // resource bundle
- public static String CleanupDocument_tooltip; // resource bundle
- public static String CleanupDocument_description; // resource bundle
- public static String UI_none;
- public static String Cleanup_UI_;
- public static String CSS_Cleanup_UI_;
- public static String Identifier_case__UI_;
- public static String Property_name_case__UI_;
- public static String Property_value_case__UI_;
- public static String Selector_tag_name_case__UI_;
- public static String Quote_values_UI_;
- public static String Format_source_UI_;
- public static String As_is_UI_;
- public static String Lower_UI_;
- public static String Upper_UI_;
- public static String SourceMenu_label;
- public static String Formatting_UI_;
- public static String Line_width__UI_;
- public static String Indent_using_tabs_;
- public static String Indent_using_spaces;
- public static String Indentation_size;
- public static String Indentation_size_tip;
- public static String StructureSelectEnclosing_label;
- public static String StructureSelectEnclosing_tooltip;
- public static String StructureSelectEnclosing_description;
- public static String StructureSelectNext_label;
- public static String StructureSelectNext_tooltip;
- public static String StructureSelectNext_description;
- public static String StructureSelectPrevious_label;
- public static String StructureSelectPrevious_tooltip;
- public static String StructureSelectPrevious_description;
- public static String Creating_files_encoding;
- public static String ResourceGroup_nameExists;
- public static String NewCSSTemplatesWizardPage_0;
- public static String NewCSSTemplatesWizardPage_1;
- public static String NewCSSTemplatesWizardPage_2;
- public static String NewCSSTemplatesWizardPage_3;
- public static String NewCSSTemplatesWizardPage_4;
- public static String NewCSSTemplatesWizardPage_5;
- public static String NewCSSTemplatesWizardPage_6;
- public static String CSSContentSettingsPropertyPage_0;
- public static String CSSContentSettingsPropertyPage_1;
- 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;
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java
deleted file mode 100644
index 1fcef9170a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-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.css.ui.internal.preferences.CSSUIPreferenceNames;
-import org.eclipse.wst.css.ui.internal.templates.TemplateContextTypeIdsCSS;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class CSSUIPlugin extends AbstractUIPlugin {
- public final static String ID = "org.eclipse.wst.css.ui"; //$NON-NLS-1$
- //The shared instance.
- private static CSSUIPlugin plugin;
-
- /**
- * The template store for the css ui.
- */
- private TemplateStore fTemplateStore;
-
- /**
- * The template context type registry for css ui.
- */
- private ContextTypeRegistry fContextTypeRegistry;
-
- /**
- * The constructor.
- */
- public CSSUIPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static CSSUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Returns the template store for the css editor templates.
- *
- * @return the template store for the css editor templates
- */
- public TemplateStore getTemplateStore() {
- if (fTemplateStore == null) {
- fTemplateStore = new ContributionTemplateStore(getTemplateContextRegistry(), getPreferenceStore(), CSSUIPreferenceNames.TEMPLATES_KEY);
-
- try {
- fTemplateStore.load();
- } catch (IOException e) {
- Logger.logException(e);
- }
- }
- return fTemplateStore;
- }
-
- /**
- * Returns the template context type registry for the css plugin.
- *
- * @return the template context type registry for the css plugin
- */
- public ContextTypeRegistry getTemplateContextRegistry() {
- if (fContextTypeRegistry == null) {
- ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
- registry.addContextType(TemplateContextTypeIdsCSS.ALL);
- registry.addContextType(TemplateContextTypeIdsCSS.NEW);
-
- fContextTypeRegistry = registry;
- }
-
- return fContextTypeRegistry;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties
deleted file mode 100644
index 5c4bb7a610..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties
+++ /dev/null
@@ -1,115 +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
-###############################################################################
-
-INFO_Not_Categorized_1=Not Categorized
-
-## CSS Preferences -- source ##
-PrefsLabel_WrappingWithoutAttr=Disable wrapping in style &attribute of HTML
-PrefsLabel_WrappingInsertLineBreak=Insert &line break between properties
-
-PrefsLabel_CaseGroup=Capitalization style
-PrefsLabel_CaseIdent=Identifier:
-PrefsLabel_CasePropName=Property name:
-PrefsLabel_CasePropValue=Property value:
-PrefsLabel_SelectorTagName=Selector tag name:
-
-PrefsLabel_CaseIdentUpper=&Uppercase
-PrefsLabel_CaseIdentLower=L&owercase
-PrefsLabel_CasePropNameUpper=U&ppercase
-PrefsLabel_CasePropNameLower=Lo&wercase
-PrefsLabel_CasePropValueUpper=Upp&ercase
-PrefsLabel_CasePropValueLower=Lowe&rcase
-PrefsLabel_SelectorTagNameUpper=Upper&case
-PrefsLabel_SelectorTagNameLower=Lowerca&se
-
-## CSS Preferences -- color ##
-
-## The following line is a sample CSS document. Please translate only the following parts:
-## Sample Styles
-PrefsLabel_ColorSample=@import url("../sample2.css");\n\n/* Sample Styles */\n\nBODY {\n\tcolor : black;\n\tbackground-color : rgb(181, 253, 211);\n\ttext-align : center;\n\tfont-family : "Heisei Mincho W3", serif\n}\n\n@page :left { margin-left : 4cm }\n\n@media aural {\n\tP.heidi {\n\t\tazimuth : center-left;\n\t\televation : 12.3deg;\n\t\tpause : 30ms 1.6s\n\t}\n}\n
-
-PrefsLabel_ColorNormal=Default
-PrefsLabel_ColorAtmarkRule=At-Rule
-PrefsLabel_ColorSelector=Selector
-PrefsLabel_ColorMedia=Media Name
-PrefsLabel_ColorComment=Comment
-PrefsLabel_ColorPropertyName=Property Name
-PrefsLabel_ColorPropertyValue=Property Value
-PrefsLabel_ColorUri=URI
-PrefsLabel_ColorString=Quoted String
-PrefsLabel_ColorColon=Property Delimiter
-PrefsLabel_ColorSemiColon=SemiColon
-PrefsLabel_ColorCurlyBrace=Curly Brace
-PrefsLabel_ColorError=Error
-#
-SortAction_0=Sort
-#
-_UI_WIZARD_NEW_TITLE = New Cascading Style Sheet
-_UI_WIZARD_NEW_HEADING = Cascading Style Sheet
-_UI_WIZARD_NEW_DESCRIPTION = Create a new CSS file.
-_ERROR_FILENAME_MUST_END_CSS = The file name must end in one of the following extensions {0}.
-_WARNING_FOLDER_MUST_BE_INSIDE_WEB_CONTENT = Files created outside of the Web Content folder will not be included in your deployed Web application.
-#
-Title_InvalidValue=Invalid Value
-Message_InvalidValue=Invalid property value.
-# Copied from sse.ui
-FormatMenu_label=F&ormat
-CleanupDocument_label=C&leanup Document...
-CleanupDocument_tooltip=Cleanup Document
-CleanupDocument_description=Cleanup Document
-UI_none=none
-Cleanup_UI_=Cleanup
-CSS_Cleanup_UI_=CSS Cleanup
-Identifier_case__UI_=Identifier case:
-Property_name_case__UI_=Property name case:
-Property_value_case__UI_=Property value case:
-Selector_tag_name_case__UI_=Selector tag name case:
-Quote_values_UI_=Quote values
-Format_source_UI_=&Format source
-As_is_UI_=As-is
-Lower_UI_=Lower
-Upper_UI_=Upper
-SourceMenu_label=&Source
-Formatting_UI_=Formatting
-Line_width__UI_=Line &width:
-Indent_using_tabs_=&Indent using tabs
-Indent_using_spaces=I&ndent using spaces
-Indentation_size=In&dentation size:
-Indentation_size_tip=Indentation size
-StructureSelectEnclosing_label=&Enclosing Element
-StructureSelectEnclosing_tooltip=Expand selection to include enclosing element
-StructureSelectEnclosing_description=Expand selection to include enclosing element
-StructureSelectNext_label=&Next Element
-StructureSelectNext_tooltip=Expand selection to include next sibling
-StructureSelectNext_description=Expand selection to include next sibling
-StructureSelectPrevious_label=&Previous Element
-StructureSelectPrevious_tooltip=Expand selection to include previous sibling
-StructureSelectPrevious_description=Expand selection to include previous sibling
-##
-Creating_files_encoding=Creating files encoding preference
-ResourceGroup_nameExists = The same name already exists.
-NewCSSTemplatesWizardPage_0=Select CSS Template
-NewCSSTemplatesWizardPage_1=Select a template as initial content in the CSS page.
-NewCSSTemplatesWizardPage_2=Name
-NewCSSTemplatesWizardPage_3=Description
-NewCSSTemplatesWizardPage_4=Use CSS Template
-NewCSSTemplatesWizardPage_5=Preview:
-NewCSSTemplatesWizardPage_6=Templates are 'New CSS' templates found in the <a>CSS Templates</a> preference page.
-# CSS Content Settings
-CSSContentSettingsPropertyPage_0=The type of CSS to use. The project setting is used if you specify "none."
-CSSContentSettingsPropertyPage_1=CSS Profile:
-SyntaxColoringPage_0=Syntax Element:
-SyntaxColoringPage_2=Enable
-SyntaxColoringPage_3=&Bold
-SyntaxColoringPage_4=&Italic
-SyntaxColoringPage_5=&Strikethrough
-SyntaxColoringPage_6=&Underline
-_UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK=CSS editing preferences. Note that some preferences may be set on the <a>{0}</a> preference page.
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/Logger.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/Logger.java
deleted file mode 100644
index 73eba5e3f3..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/Logger.java
+++ /dev/null
@@ -1,156 +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.wst.css.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.wst.css.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.wst.css.ui/src/org/eclipse/wst/css/ui/internal/autoedit/StructuredAutoEditStrategyCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/autoedit/StructuredAutoEditStrategyCSS.java
deleted file mode 100644
index 531b0ca80e..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/autoedit/StructuredAutoEditStrategyCSS.java
+++ /dev/null
@@ -1,595 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.autoedit;
-
-import org.eclipse.core.runtime.Preferences;
-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.jface.text.IRegion;
-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.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-import org.eclipse.wst.css.ui.internal.Logger;
-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;
-
-public class StructuredAutoEditStrategyCSS implements IAutoEditStrategy {
- protected IStructuredDocument structuredDocument = null;
-
- class CompoundRegion {
-
- CompoundRegion(IStructuredDocumentRegion documentRegion, ITextRegion textRegion) {
- super();
- this.documentRegion = documentRegion;
- this.textRegion = textRegion;
- }
-
- IStructuredDocumentRegion getDocumentRegion() {
- return documentRegion;
- }
-
- ITextRegion getTextRegion() {
- return textRegion;
- }
-
- int getStart() {
- return textRegion.getStart();
- }
-
- int getEnd() {
- return textRegion.getEnd();
- }
-
- String getType() {
- return textRegion.getType();
- }
-
- String getText() {
- return documentRegion.getText(textRegion);
- }
-
- int getStartOffset() {
- return documentRegion.getStartOffset(textRegion);
- }
-
- int getEndOffset() {
- return documentRegion.getEndOffset(textRegion);
- }
-
- private IStructuredDocumentRegion documentRegion;
- private ITextRegion textRegion;
-
- }
-
- /**
- */
- protected void autoIndentAfterClose(DocumentCommand command, String regionType) {
- if (!setRangeForClose(command))
- return;
-
- int position = command.offset + command.length;
-
- if (position == -1 || structuredDocument.getLength() == 0) {
- return;
- }
-
- // get open brace region
- CompoundRegion region = prevCorrespondence(position, regionType);
-
- // get indentation
- String str = getIndentFor(region, false);
-
- // append to input
- if (str != null)
- command.text = str + command.text;
- }
-
- /**
- * Copies the indentation of the previous line.
- */
- protected void autoIndentAfterNewLine(DocumentCommand command) {
- // select nearest white spaces to replace with new-line
- setRangeForNewLine(command);
-
- // get position
- int position = command.offset;
-
- if (position == -1 || structuredDocument.getLength() == 0) {
- return;
- }
-
- // get current region
- CompoundRegion currentRegion = getRegion(command.offset + command.length);
-
- // get key region
- CompoundRegion keyRegion = getPrevKeyRegion(position, currentRegion);
-
- // get indent string
- String str = getIndentFor(keyRegion, true);
-
- // check another indentation
- int shift = needShift(keyRegion, command.offset + command.length);
-
- // create text to replace
- StringBuffer buf = new StringBuffer(command.text);
- if (str != null)
- buf.append(str);
- while (shift-- != 0)
- buf.append(getIndentString());
- command.text = buf.toString();
-
- }
-
- /**
- */
- public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
- Object textEditor = getActiveTextEditor();
- if (!(textEditor instanceof ITextEditorExtension3 && ((ITextEditorExtension3) textEditor).getInsertMode() == ITextEditorExtension3.SMART_INSERT))
- return;
-
- // return;
- // /*
- structuredDocument = (IStructuredDocument) document;
-
- if (command.length == 0 && command.text != null) {
- if (endsWith(document.getLegalLineDelimiters(), command.text) != -1) {
- autoIndentAfterNewLine(command);
- } else if (command.text.equals("}")) {//$NON-NLS-1$
- autoIndentAfterClose(command, CSSRegionContexts.CSS_RBRACE);
- } else if (command.text.equals("]")) {//$NON-NLS-1$
- autoIndentAfterClose(command, CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END);
- } else if (command.text.equals(")")) {//$NON-NLS-1$
- autoIndentAfterClose(command, CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE);
- }
- }
- // */
-
- // spaces for tab character
- if (command.text != null && command.text.length() > 0 && command.text.charAt(0) == '\t')
- smartInsertForTab(command, document);
- }
-
- /**
- */
- protected String getIndentFor(CompoundRegion region, boolean indentForNextRegion) {
- if (region == null)
- return null;
- IStructuredDocumentRegion flatNode = region.getDocumentRegion();
- if (flatNode == null)
- return null;
-
- try {
- if (region.getType() == CSSRegionContexts.CSS_LBRACE || region.getType() == CSSRegionContexts.CSS_DELIMITER || region.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- // get meanful flat node
- RegionIterator it = new RegionIterator(flatNode, region.getTextRegion());
- it.prev();
- while (it.hasPrev()) {
- ITextRegion r = it.prev();
- region = new CompoundRegion(it.getStructuredDocumentRegion(), r);
- if (region.getType() != CSSRegionContexts.CSS_S)
- break;
- }
- flatNode = region.getDocumentRegion();
- // get indent string
- int position = flatNode.getStart();
- int line = structuredDocument.getLineOfOffset(position);
- int start = structuredDocument.getLineOffset(line);
- int end = findEndOfWhiteSpace(structuredDocument, start, position);
- return structuredDocument.get(start, end - start);
- } else if (region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START ||
- // region.getType() == CSSRegionContexts.CSS_PARENTHESIS_OPEN ||
- region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION || region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- int position = flatNode.getStart() + region.getStart();
- int line = structuredDocument.getLineOfOffset(position);
- int start = structuredDocument.getLineOffset(line);
- int end = findEndOfWhiteSpace(structuredDocument, start, position);
- StringBuffer buf = new StringBuffer(structuredDocument.get(start, end - start));
- position += region.getText().length();
- if (indentForNextRegion) {
- int tokenStart = findEndOfWhiteSpace(structuredDocument, position, structuredDocument.getLineOffset(line) + structuredDocument.getLineLength(line) - 1);
- if (tokenStart < structuredDocument.getLineOffset(line) + structuredDocument.getLineLength(line) - 1) {
- position = tokenStart;
- }
- }
- while (position - end > 0) {
- buf.append(" ");//$NON-NLS-1$
- end++;
- }
- return buf.toString();
- } else
- return "";//$NON-NLS-1$
- } catch (BadLocationException excp) {
- Logger.logException(excp);
- }
- return null;
- }
-
- /**
- */
- protected CompoundRegion getPrevKeyRegion(int position, CompoundRegion currentRegion) {
- if (currentRegion == null) {
- if (structuredDocument.getLastStructuredDocumentRegion() == null)
- return null;
- }
-
- if (currentRegion != null && (currentRegion.getType() == CSSRegionContexts.CSS_RBRACE || currentRegion.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END || currentRegion.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)) {
- return prevCorrespondence(currentRegion);
- }
-
- RegionIterator it = new RegionIterator(structuredDocument, position - 1);
- while (it.hasPrev()) {
- ITextRegion r = it.prev();
- CompoundRegion region = new CompoundRegion(it.getStructuredDocumentRegion(), r);
- if (region.getType() == CSSRegionContexts.CSS_LBRACE ||
- // region.getType() == CSSRegionContexts.CSS_RBRACE ||
- region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START ||
- // region.getType() ==
- // CSSRegionContexts.CSS_BRACKET_CLOSE ||
- // // region.getType() ==
- // CSSRegionContexts.CSS_PARENTHESIS_OPEN ||
- // region.getType() ==
- // CSSRegionContexts.CSS_PARENTHESIS_CLOSE ||
- region.getType() == CSSRegionContexts.CSS_DELIMITER || region.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER ||
- // region.getType() == CSSRegionContexts.CSS_COLON ||
- // region.getType() == CSSRegionContexts.CSS_COMMENT
- // ||
- region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION) {
- return region;
- } else if (region.getType() == CSSRegionContexts.CSS_RBRACE || region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END || region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- // skip to LBRACE
- CompoundRegion pc = prevCorrespondence(region);
- // guard for NPE
- //https://bugs.eclipse.org/bugs/show_bug.cgi?id=111318
- if (pc == null) break;
- it.reset(pc.getDocumentRegion(), pc.getTextRegion());
- it.prev();
- } else if (region.getType() == CSSRegionContexts.CSS_STRING) {
- RegionIterator itTmp = new RegionIterator(structuredDocument, position);
- if (region == itTmp.prev())
- return region; // position is inside of string
- } else if (region.getType() == CSSRegionContexts.CSS_COMMENT) {
- RegionIterator itTmp = new RegionIterator(structuredDocument, position);
- if (region == itTmp.prev())
- return region; // position is inside of comment
- } else if (region.getType() == CSSRegionContexts.CSS_UNKNOWN) {
- String str = region.getText();
- if (str.charAt(str.length() - 1) == '\\')
- return region;
- } else if (region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- RegionIterator itPrev = new RegionIterator(region.getDocumentRegion(), region.getTextRegion());
- while (itPrev.hasPrev()) {
- ITextRegion regionPrev = itPrev.prev();
- if (regionPrev.getType() == CSSRegionContexts.CSS_RBRACE) {
- break;
- } else if (regionPrev.getType() == CSSRegionContexts.CSS_DELIMITER || regionPrev.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- return region;
- } else if (regionPrev.getType() == CSSRegionContexts.CSS_LBRACE) {
- while (itPrev.hasPrev()) {
- regionPrev = itPrev.prev();
- if (regionPrev.getType() == CSSRegionContexts.CSS_MEDIA)
- break;
- if (regionPrev.getType() == CSSRegionContexts.CSS_LBRACE || regionPrev.getType() == CSSRegionContexts.CSS_RBRACE || regionPrev.getType() == CSSRegionContexts.CSS_DELIMITER || regionPrev.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER)
- return region;
- }
- if (regionPrev.getType() == CSSRegionContexts.CSS_MEDIA)
- break;
- else
- return region;
- }
- }
- }
- }
- return null;
- }
-
- /**
- */
- protected CompoundRegion getRegion(int position) {
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(position);
- if (flatNode != null)
- return new CompoundRegion(flatNode, flatNode.getRegionAtCharacterOffset(position));
- return null;
- }
-
- /**
- */
- protected int needShift(CompoundRegion region, int position) {
- int shift = 0;
- if (region == null || region.getType() == CSSRegionContexts.CSS_DELIMITER || region.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER || region.getType() == CSSRegionContexts.CSS_LBRACE) {
- // get non space region
- CompoundRegion cr = getRegion(position - 1);
- RegionIterator it = new RegionIterator(cr.getDocumentRegion(), cr.getTextRegion());
- ITextRegion nearestRegion = null;
- while (it.hasPrev()) {
- nearestRegion = it.prev();
- if (nearestRegion.getType() != CSSRegionContexts.CSS_S && nearestRegion.getType() != CSSRegionContexts.CSS_COMMENT)
- break;
- }
- if (nearestRegion != null && (nearestRegion.getType() == CSSRegionContexts.CSS_LBRACE || nearestRegion.getType() == CSSRegionContexts.CSS_RBRACE || nearestRegion.getType() == CSSRegionContexts.CSS_DELIMITER || nearestRegion.getType() == CSSRegionContexts.CSS_DECLARATION_DELIMITER))
- shift--;
- else if (region == null)
- shift--;
- shift++;
- }
- if (region != null && region.getType() == CSSRegionContexts.CSS_LBRACE) {
- RegionIterator it = new RegionIterator(structuredDocument, position);
- if (!it.hasPrev() || it.prev().getType() != CSSRegionContexts.CSS_RBRACE)
- shift++;
- else
- shift = 0;
- }
- return shift;
- }
-
- /**
- */
- protected CompoundRegion prevCorrespondence(int position, String regionType) {
- RegionIterator it = new RegionIterator(structuredDocument, position - 1);
- ITextRegion region = null;
- int nest = 1;
- if (regionType == CSSRegionContexts.CSS_RBRACE) {
- // skip to LBRACE
- while (it.hasPrev()) {
- region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_LBRACE)
- nest--;
- else if (region.getType() == CSSRegionContexts.CSS_RBRACE)
- nest++;
- if (nest <= 0)
- break;
- }
- if (nest == 0)
- return new CompoundRegion(it.getStructuredDocumentRegion(), region);
- }
- if (regionType == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END) {
- // skip to BRACKET_OPEN
- while (it.hasPrev()) {
- region = it.prev();
- if (region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START)
- nest--;
- else if (region.getType() == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END)
- nest++;
- if (nest <= 0)
- break;
- }
- if (nest == 0)
- return new CompoundRegion(it.getStructuredDocumentRegion(), region);
- }
- if (regionType == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE) {
- // skip to PARENTHESIS_OPEN
- while (it.hasPrev()) {
- region = it.prev();
- if (// region.getType() ==
- // CSSRegionContexts.CSS_PARENTHESIS_OPEN ||
- region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION)
- nest--;
- else if (region.getType() == CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE)
- nest++;
- if (nest <= 0)
- break;
- }
- if (nest == 0)
- return new CompoundRegion(it.getStructuredDocumentRegion(), region);
- }
- return null;
- }
-
- /**
- */
- protected CompoundRegion prevCorrespondence(CompoundRegion region) {
- if (region == null)
- return null;
-
- IStructuredDocumentRegion flatNode = region.getDocumentRegion();
- int position = flatNode.getStart() + region.getStart();
- return prevCorrespondence(position, region.getType());
- }
-
- /**
- * Insert the method's description here.
- *
- * @return boolean
- * @param command
- * org.eclipse.jface.text.DocumentCommand
- */
- protected boolean setRangeForClose(DocumentCommand command) {
- int position = command.offset;
-
- if (position == -1 || structuredDocument.getLength() == 0) {
- return false;
- }
-
- try {
- // find start of line
- int p = (position == structuredDocument.getLength() ? position - 1 : position);
-
- int line = structuredDocument.getLineOfOffset(p);
- int start = structuredDocument.getLineOffset(line);
- RegionIterator it = new RegionIterator(structuredDocument, start);
- boolean allWhiteSpace = false;
- // check whether the text from lStart to position is white space
- // or not
- while (it.hasNext()) {
- ITextRegion region = it.next();
- if (region.getType() != CSSRegionContexts.CSS_S)
- break;
- if (it.getStructuredDocumentRegion().getEndOffset(region) > p) {
- allWhiteSpace = true;
- break;
- }
- }
- if (allWhiteSpace) {
- command.length = command.length - (start - command.offset);
- command.offset = start;
- return true;
- }
- } catch (BadLocationException excp) {
- Logger.logException(excp);
- }
- return false;
- }
-
- /**
- */
- protected void setRangeForNewLine(DocumentCommand command) {
- int position = command.offset;
-
- if (position == -1 || structuredDocument.getLength() == 0) {
- return;
- }
-
- try {
- // add pre-nearest white spaces to replace target
- if (position > 0) {
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(position - 1);
- if (flatNode != null) {
- ITextRegion region = flatNode.getRegionAtCharacterOffset(position - 1);
- if (region.getType() == CSSRegionContexts.CSS_S) {
- int end = command.offset + command.length;
- int nLine = structuredDocument.getLineOfOffset(position);
- int nStartPos = structuredDocument.getLineOffset(nLine);
- if (nStartPos < flatNode.getStartOffset(region))
- nStartPos = flatNode.getStartOffset(region);
- command.offset = nStartPos;
- command.length = end - command.offset;
- }
- }
- }
-
- // add post-nearest white spaces to replace target
- if (position < structuredDocument.getLength()) {
- IStructuredDocumentRegion flatNode = structuredDocument.getRegionAtCharacterOffset(position);
- if (flatNode != null) {
- ITextRegion region = flatNode.getRegionAtCharacterOffset(position);
- if (region.getType() == CSSRegionContexts.CSS_S) {
- int nLine = structuredDocument.getLineOfOffset(position);
- String currentLineDelim = structuredDocument.getLineDelimiter(nLine);
- int nEndPos = structuredDocument.getLineOffset(nLine) + structuredDocument.getLineLength(nLine) - ((currentLineDelim != null) ? currentLineDelim.length() : 0);
- if (nEndPos > flatNode.getEndOffset(region))
- nEndPos = flatNode.getEndOffset(region);
- command.length = nEndPos - command.offset;
- }
- }
- }
- } catch (BadLocationException e) {
- // do not customize command
- }
-
- }
-
- private static int endsWith(String[] searchStrings, String text) {
- for (int i = 0; i < searchStrings.length; i++) {
- if (text.endsWith(searchStrings[i]))
- return i;
- }
- return -1;
- }
-
- private static int findEndOfWhiteSpace(IDocument document, int offset, int end) throws BadLocationException {
- while (offset < end) {
- char c = document.getChar(offset);
- if (c != ' ' && c != '\t') {
- return offset;
- }
- offset++;
- }
- return end;
- }
-
-
- private String getIndentString() {
- StringBuffer indent = new StringBuffer();
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (preferences != null) {
- char indentChar = ' ';
- String indentCharPref = preferences.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
- if (CSSCorePreferenceNames.TAB.equals(indentCharPref)) {
- indentChar = '\t';
- }
- int indentationWidth = preferences.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
-
- for (int i = 0; i < indentationWidth; i++) {
- indent.append(indentChar);
- }
- }
- return indent.toString();
- }
-
- /**
- * 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;
- }
-
- /**
- * 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
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (CSSCorePreferenceNames.SPACE.equals(preferences.getString(CSSCorePreferenceNames.INDENTATION_CHAR))) {
- int indentationWidth = preferences.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
-
- StringBuffer indent = new StringBuffer();
- if (indentationWidth != 0) {
- int indentSize = indentationWidth;
- try {
- IRegion firstLine = document.getLineInformationOfOffset(command.offset);
- int offsetInLine = command.offset - firstLine.getOffset();
- int remainder = offsetInLine % indentationWidth;
-
- indentSize = indentationWidth - remainder;
- } catch (BadLocationException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
-
- for (int i = 0; i < indentSize; i++)
- indent.append(' ');
- }
-
- // replace \t characters with spaces
- command.text = indent.toString();
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSCACandidate.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSCACandidate.java
deleted file mode 100644
index 8b6f4e25c3..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSCACandidate.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentassist;
-
-
-
-import org.eclipse.wst.css.ui.internal.image.CSSImageType;
-
-class CSSCACandidate {
-
- private String fReplacementString = null;
- private int fCursorPosition = 0;
- private String fDisplayString = null;
- private CSSImageType fImageType = null;
-
- /**
- * CSSCACandidate constructor comment.
- */
- CSSCACandidate() {
- super();
- }
-
- /**
- *
- */
- int getCursorPosition() {
- return fCursorPosition;
- }
-
- /**
- *
- */
- String getDisplayString() {
- return fDisplayString;
- }
-
- /**
- *
- */
- CSSImageType getImageType() {
- return fImageType;
- }
-
- /**
- *
- */
- String getReplacementString() {
- return fReplacementString;
- }
-
- /**
- *
- */
- void setCursorPosition(int cursorPosition) {
- fCursorPosition = cursorPosition;
- }
-
- /**
- *
- */
- void setDisplayString(String displayString) {
- fDisplayString = displayString;
- }
-
- /**
- *
- */
- void setImageType(CSSImageType imageType) {
- fImageType = imageType;
- }
-
- /**
- *
- */
- void setReplacementString(String replacementString) {
- fReplacementString = replacementString;
- }
-
- /**
- * Returns a String that represents the value of this object.
- *
- * @return a string representation of the receiver
- */
- public String toString() {
- StringBuffer buf = new StringBuffer();
- buf.append(getReplacementString());
- buf.append("\"");//$NON-NLS-1$
- buf.append(getDisplayString());
- buf.append("\"");//$NON-NLS-1$
- buf.append("(");//$NON-NLS-1$
- buf.append(getCursorPosition());
- buf.append(")");//$NON-NLS-1$
-
- return buf.toString();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistContext.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistContext.java
deleted file mode 100644
index c810c4f5b5..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistContext.java
+++ /dev/null
@@ -1,404 +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.wst.css.ui.internal.contentassist;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelFinder;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-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;
-
-class CSSContentAssistContext {
-
- private int fReplaceBegin = -1;
- private String fTextToReplace = null;
- private String fTextToCompare = null;
- private int fTargetPos = -1;
- private ICSSNode fTargetNode = null;
- private int fCursorPos = -1;
- private IStructuredDocument fStructuredDocument = null;
- private int fDocumentOffset = 0;
- private char fQuote = 0;
- private ICSSModel fModel = null;
-
- /**
- *
- */
- private CSSContentAssistContext() {
- super();
- }
-
- /**
- *
- */
- CSSContentAssistContext(int documentPosition, ICSSNode node, int documentOffset, char quote) {
- this();
- fCursorPos = documentPosition;
- fDocumentOffset = documentOffset;
- fQuote = quote;
- initialize(node.getOwnerDocument());
- }
-
- /**
- * @return int
- */
- int getCursorPos() {
- return fCursorPos;
- }
-
- /**
- * @return int
- */
- int getDocumentOffset() {
- return fDocumentOffset;
- }
-
- IStructuredDocument getStructuredDocument() {
- return fStructuredDocument;
- }
-
- ICSSModel getModel() {
- return fModel;
- }
-
- private ICSSNode getNodeAt(int offset) {
- return (ICSSNode) ((fModel != null) ? fModel.getIndexedRegion(offset) : null);
- }
-
- /**
- *
- * @return char
- */
- char getQuoteOfStyleAttribute() {
- return fQuote;
- }
-
- ITextRegion getRegionByOffset(int offset) {
- ITextRegion region = null;
- if (fStructuredDocument != null) {
- IStructuredDocumentRegion flatNode = fStructuredDocument.getRegionAtCharacterOffset(offset);
- if (flatNode != null) {
- region = flatNode.getRegionAtCharacterOffset(offset);
- }
- }
- return region;
- }
-
- /**
- *
- */
- // String getRegionText() {
- // ITextRegion targetRegion = getTargetRegion();
- // if (targetRegion != null) {
- // return targetRegion.getText();
- // } else {
- // return ""; //$NON-NLS-1$
- // }
- // }
- /**
- *
- */
- int getReplaceBegin() {
- return fReplaceBegin;
- }
-
- ICSSNode getTargetNode() {
- return fTargetNode;
- }
-
- private int getTargetPos() {
- return fTargetPos;
- }
-
- ITextRegion getTargetRegion() {
- return getRegionByOffset(getTargetPos());
- }
-
- private IStructuredDocumentRegion getTargetDocumentRegion() {
- return getDocumentRegionByOffset(getTargetPos());
- }
-
- private IStructuredDocumentRegion getDocumentRegionByOffset(int offset) {
- return (fStructuredDocument != null) ? fStructuredDocument.getRegionAtCharacterOffset(offset) : null;
- }
-
- ITextRegion getTargetRegionPrevious() {
- ITextRegion previousRegion = null;
- ITextRegion targetRegion = getTargetRegion();
- RegionIterator iterator = null;
- if (targetRegion == null) {
- if (0 < fCursorPos) {
- iterator = new RegionIterator(fStructuredDocument, fCursorPos - 1);
- }
- } else {
- iterator = getRegionIterator();
- if (iterator.hasPrev()) {
- iterator.prev();
- } else {
- iterator = null;
- }
- }
- if (iterator != null) {
- while (iterator.hasPrev()) {
- ITextRegion region = iterator.prev();
- String type = region.getType();
- if (type != CSSRegionContexts.CSS_S && type != CSSRegionContexts.CSS_COMMENT && type != CSSRegionContexts.CSS_CDO && type != CSSRegionContexts.CSS_CDC) {
- previousRegion = region;
- break;
- }
- }
- }
-
- return previousRegion;
- }
-
- /**
- * @return java.lang.String
- */
- String getTextToCompare() {
- return fTextToCompare;
- }
-
- /**
- *
- */
- String getTextToReplace() {
- return fTextToReplace;
- }
-
- /**
- *
- */
- private void initialize(ICSSDocument doc) {
- if (doc == null) {
- return;
- }
- ICSSModel model = doc.getModel();
- fModel = model;
- fStructuredDocument = model.getStructuredDocument();
-
- initializeTargetPos();
- initializeTargetText();
- initializeTargetNode();
- }
-
- /**
- *
- */
- private void initializeTargetNode() {
- if (fCursorPos == 0) {
- fTargetNode = fModel.getDocument();
- return;
- }
-
- // find edge of tree node
- ICSSNode cursorNode = getNodeAt(fCursorPos);
- if (cursorNode == null) { // end of document
- cursorNode = fModel.getDocument();
- }
- ICSSNode node = null;
- IStructuredDocumentRegion flatNode = fStructuredDocument.getRegionAtCharacterOffset(fCursorPos - 1);
- while (flatNode != null && (node = getNodeAt(flatNode.getStartOffset())) == cursorNode && ((IndexedRegion) node).getStartOffset() != flatNode.getStartOffset()) {
- flatNode = flatNode.getPrevious();
- }
- if (flatNode == null) { // top of document
- fTargetNode = (node == null) ? fModel.getDocument() : node;
- return;
- }
- // v<--|
- // AAAAAA
- // BBBBBBBBBB cursorNode:A , node:B -> target is A
- if (cursorNode != null) {
- for (ICSSNode parent = cursorNode.getParentNode(); parent != null; parent = parent.getParentNode()) {
- if (parent == cursorNode) {
- fTargetNode = cursorNode;
- return;
- }
- }
- }
- // v<--|
- // AAA
- // BBBBBBBBBB cursorNode:B , node:A -> depend on A's node type
- short nodeType = node.getNodeType();
- if (nodeType == ICSSNode.STYLEDECLITEM_NODE || nodeType == ICSSNode.CHARSETRULE_NODE || nodeType == ICSSNode.IMPORTRULE_NODE) {
- String type = CSSUtil.getStructuredDocumentRegionType(flatNode);
- if (type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- fTargetNode = node.getParentNode();
- } else {
- fTargetNode = node;
- }
- // fTargetNode = (bOverSemiColon) ? node.getParentNode() : node;
- } else if (CSSUtil.getStructuredDocumentRegionType(flatNode) == CSSRegionContexts.CSS_RBRACE) {
- fTargetNode = node.getParentNode();
- } else {
- fTargetNode = node;
- }
-
- return;
- }
-
- /**
- *
- */
- private void initializeTargetPos() {
- if (fCursorPos == 0 || isSpecialDelimiterRegion(fCursorPos - 1)) {
- fTargetPos = fCursorPos;
- } else {
- fTargetPos = fCursorPos - 1;
- }
- }
-
- /**
- *
- */
- private void initializeTargetText() {
- ITextRegion targetRegion = getTargetRegion();
- IStructuredDocumentRegion documentRegion = getTargetDocumentRegion();
- if (targetRegion == null) {
- fReplaceBegin = fCursorPos;
- fTextToReplace = ""; //$NON-NLS-1$
- fTextToCompare = ""; //$NON-NLS-1$
- } else {
- String regionText = documentRegion.getText(targetRegion);
- int regionStart = documentRegion.getStartOffset(targetRegion);
- if (regionStart == fCursorPos || regionText.trim().length() == 0 || regionStart + regionText.length() - 1 < fTargetPos) {
- // to insertion
- fReplaceBegin = fCursorPos;
- fTextToReplace = ""; //$NON-NLS-1$
- fTextToCompare = ""; //$NON-NLS-1$
- } else {
- // to replace
- fReplaceBegin = regionStart;
- fTextToReplace = regionText;
- fTextToCompare = regionText.substring(0, fCursorPos - fReplaceBegin);
- }
- }
- }
-
- /**
- *
- */
- private boolean isSpecialDelimiterRegion(int pos) {
- ITextRegion region = getRegionByOffset(pos);
- String type = region.getType();
- return (type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_SEPARATOR || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER || type == CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR);
- }
-
- /**
- *
- */
- boolean isTargetPosAfterOf(String regionType) {
- int start = ((IndexedRegion) fTargetNode).getStartOffset();
- if (start < 0 || ((IndexedRegion) fTargetNode).getEndOffset() <= 0) {
- return false;
- }
-
- RegionIterator iRegion = new RegionIterator(fStructuredDocument, start);
- while (iRegion.hasNext()) {
- ITextRegion region = iRegion.next();
- if (fTargetPos < iRegion.getStructuredDocumentRegion().getTextEndOffset(region)) {
- break;
- }
- if (region.getType() == regionType) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- *
- */
- boolean isTargetPosBeforeOf(String regionType) {
- return !isTargetPosAfterOf(regionType);
- }
-
- /**
- * @return boolean
- * @param regionType
- * java.lang.String
- */
- boolean targetFollows(String regionType) {
- RegionIterator iRegion;
- ITextRegion region = null;
- if (fStructuredDocument.getLength() <= fTargetPos) {
- iRegion = new RegionIterator(fStructuredDocument, fStructuredDocument.getLength() - 1);
- } else {
- iRegion = new RegionIterator(fStructuredDocument, fTargetPos);
- try {
- if (!Character.isWhitespace(fStructuredDocument.getChar(fTargetPos)) && iRegion.hasPrev()) {
- region = iRegion.prev();
- }
- } catch (BadLocationException e) {
- iRegion = new RegionIterator(fStructuredDocument, fStructuredDocument.getLength() - 1);
- }
- }
- while (iRegion.hasPrev()) {
- region = iRegion.prev();
- String type = region.getType();
- if (type == CSSRegionContexts.CSS_S || type == CSSRegionContexts.CSS_COMMENT) {
- continue;
- } else {
- break;
- }
- }
- if (region != null && region.getType() == regionType) {
- return true;
- } else {
- return false;
- }
- }
-
- /**
- *
- */
- boolean targetHas(String regionType) {
- int start = ((IndexedRegion) fTargetNode).getStartOffset();
- int end = ((IndexedRegion) fTargetNode).getEndOffset();
- if (start < 0 || end <= 0) {
- return false;
- }
- RegionIterator iRegion = new RegionIterator(fStructuredDocument, start);
- while (iRegion.hasNext()) {
- ITextRegion region = iRegion.next();
- if (end <= iRegion.getStructuredDocumentRegion().getStartOffset(region)) {
- break;
- }
- if (region.getType() == regionType) {
- return true;
- }
- }
- return false;
- }
-
- RegionIterator getRegionIterator() {
- return new RegionIterator(getStructuredDocument(), getTargetPos());
- }
-
- /**
- *
- */
- CSSMetaModel getMetaModel() {
- CSSMetaModelFinder finder = CSSMetaModelFinder.getInstance();
- return finder.findMetaModelFor(getModel());
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistProcessor.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistProcessor.java
deleted file mode 100644
index 9530ceb960..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistProcessor.java
+++ /dev/null
@@ -1,331 +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.wst.css.ui.internal.contentassist;
-
-
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.wst.css.core.internal.provisional.adapters.ICSSModelAdapter;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.ui.internal.templates.TemplateContextTypeIdsCSS;
-import org.eclipse.wst.html.core.internal.htmlcss.StyleAdapterFactory;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentAssistUtilities;
-import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
-
-public class CSSContentAssistProcessor implements IContentAssistProcessor {
-
- private int fDocumentOffset = 0;
- private char fQuote = 0;
- private CSSTemplateCompletionProcessor fTemplateProcessor = null;
-
- /**
- * 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 indexedNode = ContentAssistUtils.getNodeAt(viewer, documentPosition + fDocumentOffset);
- IDOMNode xNode = null;
- IDOMNode parent = null;
- CSSProposalArranger arranger = null;
- boolean isEmptyDocument = false;
-
- // bail if we couldn't get an indexed node
- // if(indexedNode == null) return new ICompletionProposal[0];
- if (indexedNode instanceof IDOMNode) {
- xNode = (IDOMNode) indexedNode;
- parent = (IDOMNode) xNode.getParentNode();
- }
- // need to get in here if there in the no 0 region <style>|</style>
- // case
- if ((xNode != null) && xNode.getNodeName().equalsIgnoreCase(HTML40Namespace.ElementName.STYLE)) {
- // now we know the cursor is in a <style> tag w/out region
- IStructuredModel cssModel = getCSSModel(xNode);
- if (cssModel != null) {
- // adjust offsets for embedded style
- int offset = documentPosition;
- int pos = 0;
- IndexedRegion keyIndexedNode = cssModel.getIndexedRegion(pos);
- if (keyIndexedNode == null) {
- keyIndexedNode = (IndexedRegion) ((ICSSModel) cssModel).getDocument();
- }
- arranger = new CSSProposalArranger(pos, (ICSSNode) keyIndexedNode, offset, (char) 0);
- }
- } else if ((parent != null) && parent.getNodeName().equalsIgnoreCase(HTML40Namespace.ElementName.STYLE)) {
- // now we know the cursor is in a <style> tag with a region
- // use the parent because that will be the <style> tag
- IStructuredModel cssModel = getCSSModel(parent);
- if (cssModel != null) {
- // adjust offsets for embedded style
- int offset = indexedNode.getStartOffset();
- int pos = documentPosition - offset;
- IndexedRegion keyIndexedNode = cssModel.getIndexedRegion(pos);
- if (keyIndexedNode == null) {
- keyIndexedNode = (IndexedRegion) ((ICSSModel) cssModel).getDocument();
- }
- arranger = new CSSProposalArranger(pos, (ICSSNode) keyIndexedNode, offset, (char) 0);
- }
- } else if (indexedNode instanceof IDOMNode) {
- // get model for node w/ style attribute
- IStructuredModel cssModel = getCSSModel((IDOMNode) indexedNode);
- if (cssModel != null) {
- IndexedRegion keyIndexedNode = cssModel.getIndexedRegion(documentPosition - fDocumentOffset);
- if (keyIndexedNode == null) {
- keyIndexedNode = (IndexedRegion) ((ICSSModel) cssModel).getDocument();
- }
- if (keyIndexedNode instanceof ICSSNode) {
- // inline style for a tag, not embedded
- arranger = new CSSProposalArranger(documentPosition, (ICSSNode) keyIndexedNode, fDocumentOffset, fQuote);
- }
- }
- } else if (indexedNode instanceof ICSSNode) {
- // when editing external CSS using CSS Designer, ICSSNode is
- // passed.
- ICSSDocument cssdoc = ((ICSSNode) indexedNode).getOwnerDocument();
- if (cssdoc != null) {
- IStructuredModel cssModel = cssdoc.getModel();
- if (cssModel != null) {
- IndexedRegion keyIndexedNode = cssModel.getIndexedRegion(documentPosition - fDocumentOffset);
- if (keyIndexedNode == null) {
- keyIndexedNode = (IndexedRegion) ((ICSSModel) cssModel).getDocument();
- }
- if (keyIndexedNode instanceof ICSSNode) {
- // inline style for a tag, not embedded
- arranger = new CSSProposalArranger(documentPosition, (ICSSNode) keyIndexedNode, fDocumentOffset, fQuote);
- }
- }
- }
- } else if ((indexedNode == null) && isViewerEmpty(viewer)) {
- isEmptyDocument = true;
- // the top of empty CSS Document
- IStructuredModel cssModel = null;
- try {
- cssModel = StructuredModelManager.getModelManager().getExistingModelForRead(viewer.getDocument());
- if (cssModel instanceof ICSSModel) {
- IndexedRegion keyIndexedNode = cssModel.getIndexedRegion(documentPosition - fDocumentOffset);
- if (keyIndexedNode == null) {
- keyIndexedNode = (IndexedRegion) ((ICSSModel) cssModel).getDocument();
- }
- if (keyIndexedNode instanceof ICSSNode) {
- // inline style for a tag, not embedded
- arranger = new CSSProposalArranger(documentPosition, (ICSSNode) keyIndexedNode, fDocumentOffset, fQuote);
- }
- }
- } finally {
- if (cssModel != null)
- cssModel.releaseFromRead();
- }
- }
-
- ICompletionProposal[] proposals = new ICompletionProposal[0];
- if (arranger != null) {
- fDocumentOffset = 0;
- proposals = arranger.getProposals();
-
- ICompletionProposal[] newfileproposals = new ICompletionProposal[0];
- ICompletionProposal[] anyproposals = new ICompletionProposal[0];
- // add template proposals
- if (getTemplateCompletionProcessor() != null) {
- if (isEmptyDocument) {
- getTemplateCompletionProcessor().setContextType(TemplateContextTypeIdsCSS.NEW);
- newfileproposals = getTemplateCompletionProcessor().computeCompletionProposals(viewer, documentPosition);
- }
- getTemplateCompletionProcessor().setContextType(TemplateContextTypeIdsCSS.ALL);
- anyproposals = getTemplateCompletionProcessor().computeCompletionProposals(viewer, documentPosition);
- }
-
- // add end tag if parent is not closed
- ICompletionProposal endTag = XMLContentAssistUtilities.computeXMLEndTagProposal(viewer, documentPosition, indexedNode, HTML40Namespace.ElementName.STYLE, SharedXMLEditorPluginImageHelper.IMG_OBJ_TAG_GENERIC);
-
- // add the additional proposals
- int additionalLength = newfileproposals.length + anyproposals.length;
- additionalLength = (endTag != null) ? ++additionalLength : additionalLength;
- if (additionalLength > 0) {
- ICompletionProposal[] plusOnes = new ICompletionProposal[proposals.length + additionalLength];
- int appendPos = proposals.length;
- // add end tag proposal
- if (endTag != null) {
- System.arraycopy(proposals, 0, plusOnes, 1, proposals.length);
- plusOnes[0] = endTag;
- ++appendPos;
- } else {
- System.arraycopy(proposals, 0, plusOnes, 0, proposals.length);
- }
- // add items in newfileproposals
- for (int i = 0; i < newfileproposals.length; ++i) {
- plusOnes[appendPos + i] = newfileproposals[i];
- }
- // add items in anyproposals
- appendPos = appendPos + newfileproposals.length;
- for (int i = 0; i < anyproposals.length; ++i) {
- plusOnes[appendPos + i] = anyproposals[i];
- }
- proposals = plusOnes;
- }
- }
- return proposals;
- }
-
- /**
- * Returns true if there is no text or it's all white space, otherwise
- * returns false
- *
- * @param treeNode
- * @param textViewer
- * @return boolean
- */
- private boolean isViewerEmpty(ITextViewer textViewer) {
- boolean isEmpty = false;
- String text = textViewer.getTextWidget().getText();
- if ((text == null) || ((text != null) && text.trim().equals(""))) //$NON-NLS-1$
- isEmpty = true;
- return isEmpty;
- }
-
- /**
- * Get CSSModel for an indexed node
- *
- * @param indexedNode
- * @return IStructuredModel
- */
- // private IStructuredModel getCSSModel(IndexedRegion indexedNode) {
- // if (indexedNode == null) return null;
- // Node node = (Node)indexedNode;
- // INodeNotifier notifier = (INodeNotifier)node.getParentNode();
- // if (notifier == null) return null;
- // INodeAdapter adapter =
- // StyleAdapterFactory.getInstance().adapt(notifier);
- // if (adapter == null || !(adapter instanceof CSSModelAdapter)) return
- // null;
- // CSSModelAdapter modelAdapter = (CSSModelAdapter)adapter;
- // return modelAdapter.getModel();
- // }
- /**
- * Returns the CSSmodel for a given XML node.
- *
- * @param element
- * @return IStructuredModel
- */
- private IStructuredModel getCSSModel(IDOMNode element) {
- if (element == null)
- return null;
- INodeAdapter adapter = StyleAdapterFactory.getInstance().adapt(element);
- if ((adapter == null) || !(adapter instanceof ICSSModelAdapter))
- return null;
- ICSSModelAdapter modelAdapter = (ICSSModelAdapter) adapter;
- return modelAdapter.getModel();
- }
-
- /**
- * 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 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;
- }
-
- /**
- * 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 null;
- }
-
- /**
- * Insert the method's description here. Creation date: (2001/05/22
- * 10:37:05)
- *
- * @param offset
- * int
- */
- public void setDocumentOffset(int offset) {
- fDocumentOffset = offset;
- }
-
- /**
- *
- * @param quote
- * char
- */
- public void setQuoteCharOfStyleAttribute(char quote) {
- fQuote = quote;
- }
-
- private CSSTemplateCompletionProcessor getTemplateCompletionProcessor() {
- if (fTemplateProcessor == null) {
- fTemplateProcessor = new CSSTemplateCompletionProcessor();
- }
- return fTemplateProcessor;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalArranger.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalArranger.java
deleted file mode 100644
index e67f5cb751..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalArranger.java
+++ /dev/null
@@ -1,171 +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.wst.css.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPageRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-import org.w3c.dom.css.CSSFontFaceRule;
-
-class CSSProposalArranger {
-
- private List fProposals = new ArrayList();
- private CSSContentAssistContext fContext = null;
-
- /**
- * CSSProposalArranger constructor comment.
- */
- private CSSProposalArranger() {
- super();
- }
-
- /**
- * CSSProposalArranger constructor comment.
- */
- CSSProposalArranger(int documentPosition, ICSSNode node, int documentOffset, char quote) {
- this();
- fContext = new CSSContentAssistContext(documentPosition, node, documentOffset, quote);
- }
-
- /**
- *
- */
- void buildProposals() {
- fProposals.clear();
-
- /*
- * String text; ICompletionProposal item; text = "---- Test
- * Information ----"; item = new CompletionProposal("",
- * fContext.getReplaceBegin(), 0, 0, null, text, null, null);
- * fProposals.add(item);
- *
- * text = "Target: \"" + fContext.getRegionText() + "\"";
- *
- * item = new CompletionProposal("", fContext.getReplaceBegin(), 0, 0,
- * null, text, null, null); fProposals.add(item);
- *
- * text = fContext.getTargetNode().getClass().toString(); int
- * lastPeriodPos = text.lastIndexOf('.'); text = "Node: " +
- * text.substring(lastPeriodPos + 1); item = new
- * CompletionProposal("", fContext.getReplaceBegin(), 0, 0, null,
- * text, null, null); fProposals.add(item);
- */
-
- ICSSNode targetNode = fContext.getTargetNode();
- //int targetPos = fContext.getTargetPos();
- if (targetNode instanceof ICSSStyleSheet) {
- buildProposalsForAnyRule();
- } else if ((targetNode instanceof ICSSMediaRule && fContext.isTargetPosAfterOf(CSSRegionContexts.CSS_LBRACE)) || (targetNode instanceof ICSSStyleRule && fContext.isTargetPosBeforeOf(CSSRegionContexts.CSS_LBRACE))) {
- buildProposalsForAnyRule();
- // buildProposalsForStyleRule();
- } else if ((targetNode instanceof ICSSPageRule && fContext.isTargetPosBeforeOf(CSSRegionContexts.CSS_LBRACE))) {
- buildProposalsForPageRulePseudoClass();
- } else if ((targetNode instanceof ICSSStyleRule || targetNode instanceof CSSFontFaceRule || targetNode instanceof ICSSPageRule || targetNode instanceof ICSSStyleDeclaration) && (targetNode.getOwnerDocument() instanceof ICSSStyleDeclaration || fContext.targetFollows(CSSRegionContexts.CSS_DECLARATION_DELIMITER) || fContext.targetFollows(CSSRegionContexts.CSS_LBRACE))) {
- buildProposalsForDeclarationName();
- } else if (targetNode instanceof ICSSStyleDeclItem) {
- if (fContext.isTargetPosAfterOf(CSSRegionContexts.CSS_DECLARATION_SEPARATOR)) {
- buildProposalsForDeclarationValue();
- } else {
- buildProposalsForDeclarationName();
- }
- } else if (targetNode instanceof ICSSPrimitiveValue) {
- buildProposalsForDeclarationValue();
- }
- /*
- * else if (targetNode instanceof ICSSPrimitiveValue || ((targetNode
- * instanceof ICSSStyleRule || targetNode instanceof CSSFontFaceRule ||
- * targetNode instanceof ICSSStyleDeclaration || targetNode instanceof
- * ICSSStyleDeclItem) &&
- * fContext.isTargetPosAfterOf(CSSRegionContexts.COLON))) {
- * buildProposalsForDeclarationValue(); }
- */
-
- // for Test
- }
-
- /**
- *
- */
- void buildProposalsForAnyRule() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForAtmarkRule(fContext);
- fProposals.addAll(generator.getProposals());
- generator = new CSSProposalGeneratorForHTMLTag(fContext);
- fProposals.addAll(generator.getProposals());
- generator = new CSSProposalGeneratorForPseudoSelector(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- void buildProposalsForDeclarationName() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForDeclarationName(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- void buildProposalsForDeclarationValue() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForDeclarationValue(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- void buildProposalsForPageRulePseudoClass() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForPseudoSelector(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- void buildProposalsForStyleRule() {
- CSSProposalGenerator generator;
- generator = new CSSProposalGeneratorForHTMLTag(fContext);
- fProposals.addAll(generator.getProposals());
- generator = new CSSProposalGeneratorForPseudoSelector(fContext);
- fProposals.addAll(generator.getProposals());
- }
-
- /**
- *
- */
- ICompletionProposal[] getProposals() {
- buildProposals();
- ICompletionProposal[] proposalArray = new CompletionProposal[fProposals.size()];
- Iterator iItem = fProposals.iterator();
- for (int i = 0; iItem.hasNext(); i++) {
- proposalArray[i] = (ICompletionProposal) iItem.next();
- }
- return proposalArray;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGenerator.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGenerator.java
deleted file mode 100644
index cb393364a2..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGenerator.java
+++ /dev/null
@@ -1,234 +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.wst.css.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-import org.eclipse.wst.css.ui.internal.image.CSSImageHelper;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-abstract class CSSProposalGenerator {
-
-
- protected class StringAndOffset {
- StringAndOffset(String string, int offset) {
- this.fString = string;
- this.fOffset = offset;
- }
-
- String fString;
- int fOffset;
- }
-
- protected CSSContentAssistContext fContext = null;
-
- /**
- * CSSProposalGenerator constructor comment.
- */
- private CSSProposalGenerator() {
- super();
- }
-
- CSSProposalGenerator(CSSContentAssistContext context) {
- this();
- fContext = context;
- }
-
- /**
- *
- */
- protected boolean checkLeadingColon() {
- boolean hasLeadingColon = false;
- ITextRegion targetRegion = fContext.getTargetRegion();
- if (targetRegion == null && 0 < fContext.getCursorPos()) {
- targetRegion = fContext.getRegionByOffset(fContext.getCursorPos() - 1);
- if (targetRegion != null && targetRegion.getType() == CSSRegionContexts.CSS_SELECTOR_PSEUDO) {
- hasLeadingColon = true;
- }
- } else if (targetRegion != null) {
- RegionIterator iterator = fContext.getRegionIterator();
- if (iterator.hasPrev()) {
- iterator.prev();
- if (iterator.hasPrev() && iterator.prev().getType() == CSSRegionContexts.CSS_SELECTOR_PSEUDO) {
- hasLeadingColon = true;
- }
- }
- }
- return hasLeadingColon;
- }
-
- /**
- *
- */
- protected StringAndOffset generateBraces() {
- StringBuffer buf = new StringBuffer();
- String lineDelimiter = fContext.getStructuredDocument().getLineDelimiter();
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- String indentStr = getIndentString();
- if (preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_NEWLINE_ON_OPEN_BRACE)) {
- buf.append(lineDelimiter);
- }
- buf.append("{");//$NON-NLS-1$
- if (preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE)) {
- buf.append(lineDelimiter);
- buf.append(indentStr);
- } else {
- buf.append(" ");//$NON-NLS-1$
- }
- int offset = buf.length();
- if (preferences.getBoolean(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE)) {
- buf.append(lineDelimiter);
- } else {
- buf.append(" ");//$NON-NLS-1$
- }
- buf.append("}");//$NON-NLS-1$
- return new StringAndOffset(buf.toString(), offset);
- }
-
- /**
- *
- */
- protected StringAndOffset generateParenthesis() {
- StringBuffer buf = new StringBuffer();
- int offset;
- buf.append("(");//$NON-NLS-1$
- offset = 1;
- buf.append(")");//$NON-NLS-1$
- return new StringAndOffset(buf.toString(), offset);
- }
-
- /**
- *
- */
- protected StringAndOffset generateQuotes() {
- StringBuffer buf = new StringBuffer();
- char quoteChar = getQuoteChar();
- buf.append(quoteChar);
- buf.append(quoteChar);
- return new StringAndOffset(buf.toString(), 1);
- }
-
- /**
- *
- */
- protected StringAndOffset generateSemicolon() {
- StringBuffer buf = new StringBuffer();
- int offset;
- buf.append(";");//$NON-NLS-1$
- offset = 0;
- return new StringAndOffset(buf.toString(), offset);
- }
-
- /**
- *
- */
- protected StringAndOffset generateURI() {
- StringBuffer buf = new StringBuffer();
-
- boolean isQuoteInURI = CSSCorePlugin.getDefault().getPluginPreferences().getBoolean(CSSCorePreferenceNames.FORMAT_QUOTE_IN_URI);
- char quoteChar = getQuoteChar();
- buf.append("url(");//$NON-NLS-1$
- if (isQuoteInURI) {
- buf.append(quoteChar);
- }
- int offset = buf.length();
- if (isQuoteInURI) {
- buf.append(quoteChar);
- }
- buf.append(")");//$NON-NLS-1$
- return new StringAndOffset(buf.toString(), offset);
- }
-
- abstract protected Iterator getCandidates();
-
- List getProposals() {
- List proposals = new ArrayList();
-
- CSSImageHelper imageHelper = CSSImageHelper.getInstance();
- Iterator i = getCandidates();
- while (i.hasNext()) {
- CSSCACandidate candidate = (CSSCACandidate) i.next();
- Image image = imageHelper.getImage(candidate.getImageType());
- ICompletionProposal item = new CompletionProposal(candidate.getReplacementString(), fContext.getReplaceBegin() + fContext.getDocumentOffset(), fContext.getTextToReplace().length(), candidate.getCursorPosition(), image, candidate.getDisplayString(), null, null);
- proposals.add(item);
- }
-
- return proposals;
- }
-
- /**
- *
- * @return char
- */
- private char getQuoteChar() {
-
- String quoteStr = CSSCorePlugin.getDefault().getPluginPreferences().getString(CSSCorePreferenceNames.FORMAT_QUOTE);
- char quoteChar = (quoteStr != null && 0 < quoteStr.length()) ? quoteStr.charAt(0) : '"';
- char attrQuote = fContext.getQuoteOfStyleAttribute();
- if (attrQuote != 0) {
- if (attrQuote == '"' && quoteChar == '"') {
- quoteChar = '\'';
- } else if (attrQuote == '\'' && quoteChar == '\'') {
- quoteChar = '"';
- }
- }
- return quoteChar;
- }
-
- /**
- *
- */
- protected boolean isMatch(String text) {
- String textToCompare = fContext.getTextToCompare();
- if (textToCompare.length() == 0) {
- return true;
- } else {
- return (text.toUpperCase().indexOf(textToCompare.toUpperCase()) == 0);
- }
- /*
- * String textToReplace = fContext.getTextToReplace(); if
- * (textToReplace.length() == 0) { return true; } else { return
- * (text.toUpperCase().indexOf(textToReplace.toUpperCase()) == 0); }
- */
- }
-
-
- private String getIndentString() {
- StringBuffer indent = new StringBuffer();
-
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- if (preferences != null) {
- char indentChar = ' ';
- String indentCharPref = preferences.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
- if (CSSCorePreferenceNames.TAB.equals(indentCharPref)) {
- indentChar = '\t';
- }
- int indentationWidth = preferences.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
-
- for (int i = 0; i < indentationWidth; i++) {
- indent.append(indentChar);
- }
- }
- return indent.toString();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForAtmarkRule.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForAtmarkRule.java
deleted file mode 100644
index 87ba013219..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForAtmarkRule.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSCharsetRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.SelectionCollector;
-import org.eclipse.wst.css.ui.internal.image.CSSImageType;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-class CSSProposalGeneratorForAtmarkRule extends CSSProposalGenerator {
-
- private boolean fUseUpperCase = false;
- private static final String CHARSET = "@charset";//$NON-NLS-1$
- private static final String FONT_FACE = "@font-face";//$NON-NLS-1$
- private static final String IMPORT = "@import";//$NON-NLS-1$
- private static final String MEDIA = "@media";//$NON-NLS-1$
- private static final String PAGE = "@page";//$NON-NLS-1$
-
- /**
- * CSSAtmarkRuleProposalGenerator constructor comment.
- *
- */
- CSSProposalGeneratorForAtmarkRule(CSSContentAssistContext context) {
- super(context);
- fUseUpperCase = CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER;
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidateCharsetRule() {
- // check content model
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_CHARSET_RULE).hasNext()) {
- return null;
- }
-
- // check if embedded or not
- if (fContext.getModel().getStyleSheetType() == ICSSModel.EMBEDDED) {
- return null;
- }
-
- // check if caret precede all other rules.
- int offset = fContext.getCursorPos();
- if (0 < offset) {
- SelectionCollector trav = new SelectionCollector();
- trav.setRegion(0, offset - 1);
- trav.apply(fContext.getModel().getDocument());
- Iterator i = trav.getSelectedNodes().iterator();
- while (i.hasNext()) {
- Object obj = i.next();
- if (obj instanceof ICSSNode && !(obj instanceof ICSSDocument)) {
- return null;
- }
- }
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? CHARSET.toUpperCase() : CHARSET.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length();
- StringAndOffset sao;
- sao = generateQuotes();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- sao = generateSemicolon();
- buf.append(sao.fString);
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(text);
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_CHARSET);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidateFontFaceRule() {
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_FONT_FACE_RULE).hasNext()) {
- return null;
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? FONT_FACE.toUpperCase() : FONT_FACE.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length();
- StringAndOffset sao;
- sao = generateBraces();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_FONTFACE);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidateImportRule() {
- // check content model
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_IMPORT_RULE).hasNext()) {
- return null;
- }
-
- // charset and import can precede import rule.
- int offset = fContext.getCursorPos();
- if (0 < offset) {
- SelectionCollector trav = new SelectionCollector();
- trav.setRegion(0, offset - 1);
- trav.apply(fContext.getModel().getDocument());
- Iterator i = trav.getSelectedNodes().iterator();
- while (i.hasNext()) {
- Object obj = i.next();
- if (obj instanceof ICSSNode && !(obj instanceof ICSSDocument || obj instanceof ICSSCharsetRule || obj instanceof ICSSImportRule)) {
- return null;
- }
- }
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? IMPORT.toUpperCase() : IMPORT.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length();
- StringAndOffset sao;
- sao = generateURI();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- sao = generateSemicolon();
- buf.append(sao.fString);
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_IMPORT);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidateMediaRule() {
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_MEDIA_RULE).hasNext()) {
- return null;
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? MEDIA.toUpperCase() : MEDIA.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length() - 1;
- StringAndOffset sao;
- sao = generateBraces();
- buf.append(sao.fString);
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_MEDIA);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private CSSCACandidate getCandidatePageRule() {
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- if (!util.collectNodesByType(CSSMMNode.TYPE_PAGE_RULE).hasNext()) {
- return null;
- }
-
- int cursorPos = 0;
- String ident = (fUseUpperCase) ? PAGE.toUpperCase() : PAGE.toLowerCase();
- StringBuffer buf = new StringBuffer();
- buf.append(ident);
- buf.append(" ");//$NON-NLS-1$
- cursorPos = buf.length();
- StringAndOffset sao;
- sao = generateBraces();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
-
- String text = buf.toString();
-
- if (isMatch(text)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(ident);
- item.setImageType(CSSImageType.RULE_PAGE);
- return item;
- } else {
- return null;
- }
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- ITextRegion region = fContext.getTargetRegionPrevious();
- // ITextRegion region = fContext.getSignificantTargetRegion();
- if (region != null) {
- String type = region.getType();
- if (type != CSSRegionContexts.CSS_RBRACE && type != CSSRegionContexts.CSS_DELIMITER) {
- return candidates.iterator();
- }
- }
-
- CSSCACandidate item;
- if ((item = getCandidateImportRule()) != null) {
- candidates.add(item);
- }
- if ((item = getCandidateCharsetRule()) != null) {
- candidates.add(item);
- }
- if ((item = getCandidateMediaRule()) != null) {
- candidates.add(item);
- }
- if ((item = getCandidatePageRule()) != null) {
- candidates.add(item);
- }
- if ((item = getCandidateFontFaceRule()) != null) {
- candidates.add(item);
- }
- return candidates.iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationName.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationName.java
deleted file mode 100644
index 999d7288a0..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationName.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.ui.internal.image.CSSImageType;
-
-class CSSProposalGeneratorForDeclarationName extends CSSProposalGenerator {
-
- /**
- * CSSProposalGeneratorForDeclaration constructor comment.
- *
- */
- CSSProposalGeneratorForDeclarationName(CSSContentAssistContext context) {
- super(context);
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
- Preferences preferences = CSSCorePlugin.getDefault().getPluginPreferences();
- String preDelim = "";//$NON-NLS-1$
- for (int i = 0; i < preferences.getInt(CSSCorePreferenceNames.FORMAT_PROP_PRE_DELIM); i++) {
- preDelim += ' ';//$NON-NLS-1$
- }
- String postDelim = "";//$NON-NLS-1$
- for (int i = 0; i < preferences.getInt(CSSCorePreferenceNames.FORMAT_PROP_POST_DELIM); i++) {
- postDelim += ' ';//$NON-NLS-1$
- }
-
- ICSSNode targetNode = fContext.getTargetNode();
- boolean bFontRule = false;
- for (ICSSNode node = targetNode; node != null; node = node.getParentNode()) {
- if (node instanceof org.w3c.dom.css.CSSFontFaceRule) {
- bFontRule = true;
- break;
- }
- }
-
- List names = new ArrayList();
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- Iterator iNames = util.collectNodesByType((bFontRule) ? CSSMMNode.TYPE_DESCRIPTOR : CSSMMNode.TYPE_PROPERTY);
- while (iNames.hasNext()) {
- CSSMMNode node = (CSSMMNode) iNames.next();
- names.add(node);
- }
- sortNames(names);
- // Collections.sort(names);
-
- boolean bAddColon = true;
- if (targetNode instanceof ICSSStyleDeclItem && fContext.targetHas(CSSRegionContexts.CSS_DECLARATION_SEPARATOR)) {
- bAddColon = false;
- }
-
- Iterator i = names.iterator();
- while (i.hasNext()) {
- CSSMMNode node = (CSSMMNode) i.next();
- String text = node.getName();
- text = (preferences.getInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.UPPER) ? text.toUpperCase() : text.toLowerCase();
- if (!isMatch(text)) {
- continue;
- }
-
- int cursorPos = 0;
- StringBuffer buf = new StringBuffer();
- buf.append(text);
- buf.append(preDelim);
- cursorPos = buf.length();
- if (bAddColon) {
- buf.append(':');//$NON-NLS-1$
- buf.append(postDelim);
- cursorPos += 1 + postDelim.length();
- }
- // if (! (targetNode instanceof ICSSStyleDeclItem)) {
- // buf.append(';');//$NON-NLS-1$
- // }
-
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(text);
- item.setImageType(getCategoryImageType(node));
- candidates.add(item);
- }
-
- return candidates.iterator();
- }
-
- void sortNames(List names) {
- Collections.sort(names, new Comparator() {
- public int compare(Object o1, Object o2) {
- CSSMMNode node1 = (CSSMMNode) o1;
- CSSMMNode node2 = (CSSMMNode) o2;
- if (node1 == null) {
- return 1;
- } else if (node2 == null) {
- return -1;
- }
- int diff = 0;
- String category1 = node1.getAttribute("category"); //$NON-NLS-1$
- String category2 = node2.getAttribute("category"); //$NON-NLS-1$
- if (category1 == null) {
- if (category2 == null) {
- diff = 0;
- } else {
- return 1;
- }
- } else if (category2 == null) {
- return -1;
- } else {
- diff = category1.compareTo(category2);
- }
- if (diff == 0) {
- String name = node1.getName();
- if (name == null) {
- return 1;
- } else {
- return name.compareTo(node2.getName());
- }
- } else {
- return diff;
- }
- }
- });
- }
-
- /*
- * retrieve default category icon name TODO: if node has "icon"(?), use
- * it.
- */
- CSSImageType getCategoryImageType(CSSMMNode node) {
- CSSImageType imageType = null;
- if (node != null) {
- String category = node.getAttribute("category"); //$NON-NLS-1$
- if (category != null) {
- imageType = CSSImageType.getImageType(category);
- }
- }
- return (imageType == null) ? CSSImageType.CATEGORY_DEFAULT : imageType;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationValue.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationValue.java
deleted file mode 100644
index e9d993d5b1..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationValue.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMDescriptor;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMFunction;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNumber;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMProperty;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMUnit;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSFunctionID;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-import org.eclipse.wst.css.core.internal.util.RegionIterator;
-import org.eclipse.wst.css.ui.internal.image.CSSImageType;
-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.w3c.dom.css.CSSFontFaceRule;
-
-class CSSProposalGeneratorForDeclarationValue extends CSSProposalGenerator {
-
- private static final String IMPORTANT = "!important"; //$NON-NLS-1$
- private boolean fUseUpperCase;
- private boolean fAppendSemiColon;
-
- /**
- * CSSProposalGeneratorForDeclarationValue constructor comment.
- *
- */
- CSSProposalGeneratorForDeclarationValue(CSSContentAssistContext context) {
- super(context);
- fUseUpperCase = CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER;
- }
-
- /**
- *
- */
- private void addFunction(List candidates, CSSMMFunction prop) {
- String text = prop.toString();
- if (!isMatch(text)) {
- return;
- }
-
- int cursorPos = 0;
- StringBuffer buf = new StringBuffer();
- if (prop.getName().equals(CSSFunctionID.F_URI)) {
- StringAndOffset sao = generateURI();
- buf.append(sao.fString);
- cursorPos = sao.fOffset;
- } else {
- buf.append(prop.toString());
- cursorPos = buf.length();
- StringAndOffset sao = generateParenthesis();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- }
-
- text = buf.toString();
- text = (fUseUpperCase) ? text.toUpperCase() : text.toLowerCase();
-
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(text);
- item.setCursorPosition(cursorPos);
- item.setDisplayString(text);
- item.setImageType(CSSImageType.VALUE_FUNCTION);
- appendSemiColon(item);
- candidates.add(item);
- }
-
- /**
- *
- */
- private void addNumber(List candidates, CSSMMNumber prop) {
- String fullText = fContext.getTextToReplace();
- // skip number
- int unitIndex = -1;
- for (int i = 0; i < fullText.length(); i++) {
- if (Character.isDigit(fullText.charAt(i))) {
- unitIndex = i + 1;
- } else {
- break;
- }
- }
-
- String unitSubText = ""; //$NON-NLS-1$
- String numSubText = ""; //$NON-NLS-1$
- if (0 <= unitIndex) {
- numSubText = fullText.substring(0, unitIndex);
- if (unitIndex < fullText.length()) {
- unitSubText = fullText.substring(unitIndex);
- }
- } else {
- unitSubText = fullText;
- }
-
- Iterator i = prop.getDescendants();
- while (i.hasNext()) {
- CSSMMUnit unit = (CSSMMUnit) i.next();
- String unitString = unit.getUnitString();
- if ((0 < unitSubText.length() && unitString.indexOf(unitSubText) != 0) || (0 < numSubText.length() && unitString.equals("#"))) { //$NON-NLS-1$
- continue;
- }
-
- String text = numSubText + unitString;
- text = (fUseUpperCase) ? text.toUpperCase() : text.toLowerCase();
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(text);
- if (0 < numSubText.length() || text.equals("#")) { //$NON-NLS-1$
- item.setCursorPosition(text.length());
- } else {
- item.setCursorPosition(0);
- }
- item.setDisplayString(text);
- item.setImageType(CSSImageType.VALUE_NUMBER);
- appendSemiColon(item);
- candidates.add(item);
- }
- }
-
- /**
- *
- */
- private void checkSemiColon() {
- fAppendSemiColon = false;
-
- ITextRegion targetRegion = fContext.getTargetRegion();
- if (targetRegion != null && targetRegion.getType() != CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- // find trailing ":" or ";"
- // if ":" before ";" is found, add ";"
- RegionIterator iterator = fContext.getRegionIterator();
- IStructuredDocumentRegion container = iterator.getStructuredDocumentRegion();
- while (iterator.hasNext()) {
- ITextRegion region = iterator.next();
- if (iterator.getStructuredDocumentRegion() != container) {
- break;
- }
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- fAppendSemiColon = true;
- break;
- }
- }
- if (!fAppendSemiColon) {
- // second chance:
- // leading IStructuredDocumentRegion is not ";"
- IStructuredDocumentRegion nextStructuredDocumentRegion = CSSUtil.findNextSignificantNode(container);
- if (CSSUtil.getStructuredDocumentRegionType(nextStructuredDocumentRegion) != CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- fAppendSemiColon = true;
- }
- }
- }
- }
-
- /**
- *
- */
- private void appendSemiColon(CSSCACandidate item) {
- if (fAppendSemiColon) {
- String replacementString = item.getReplacementString();
- item.setReplacementString(replacementString + ";"); //$NON-NLS-1$
- int cursorPosition = item.getCursorPosition();
- if (replacementString.length() <= cursorPosition) {
- // cursorpos is tail of string
- cursorPosition++;
- item.setCursorPosition(cursorPosition);
- }
- }
- }
-
- /**
- *
- */
- private void addSemiColon(List candidates) {
- ICSSNode targetNode = fContext.getTargetNode();
- if (targetNode instanceof ICSSStyleDeclItem) {
- ICSSNode firstChild = targetNode.getFirstChild();
- if (firstChild == null) {
- return;
- }
- if (firstChild instanceof IndexedRegion) {
- int startOffset = ((IndexedRegion) firstChild).getStartOffset();
- if (fContext.getCursorPos() <= startOffset) {
- return;
- }
- }
- }
-
- boolean bAddCloser = false;
-
- ITextRegion targetRegion = fContext.getTargetRegion();
- if (targetRegion != null && targetRegion.getType() != CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- // find trailing ":" or ";"
- // if ":" before ";" is found, add ";"
- RegionIterator iterator = fContext.getRegionIterator();
- IStructuredDocumentRegion container = iterator.getStructuredDocumentRegion();
- while (iterator.hasNext()) {
- ITextRegion region = iterator.next();
- if (iterator.getStructuredDocumentRegion() != container) {
- break;
- }
- if (region.getType() == CSSRegionContexts.CSS_DECLARATION_SEPARATOR) {
- bAddCloser = true;
- break;
- }
- }
- if (!bAddCloser) {
- // second chance:
- // leading IStructuredDocumentRegion is not ";"
- IStructuredDocumentRegion nextStructuredDocumentRegion = CSSUtil.findNextSignificantNode(container);
- if (CSSUtil.getStructuredDocumentRegionType(nextStructuredDocumentRegion) != CSSRegionContexts.CSS_DECLARATION_DELIMITER) {
- bAddCloser = true;
- }
- }
- }
-
- if (bAddCloser) {
- CSSCACandidate item = new CSSCACandidate();
- String text = fContext.getTextToReplace() + ";";//$NON-NLS-1$
- item.setReplacementString(text);
- item.setCursorPosition(text.length());
- item.setDisplayString(";");//$NON-NLS-1$
- item.setImageType(null);
- candidates.add(item);
- }
- }
-
- /**
- *
- */
- private void addString(List candidates, String text) {
- if (!isMatch(text)) {
- return;
- }
-
- text = (fUseUpperCase) ? text.toUpperCase() : text.toLowerCase();
-
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(text);
- item.setCursorPosition(text.length());
- item.setDisplayString(text);
- item.setImageType(CSSImageType.VALUE_STRING);
- appendSemiColon(item);
- candidates.add(item);
- }
-
- private void addImportant(List candidates) {
- ICSSNode targetNode = fContext.getTargetNode();
- while (targetNode instanceof ICSSPrimitiveValue) {
- targetNode = targetNode.getParentNode();
- }
- if (!(targetNode instanceof ICSSStyleDeclItem)) {
- return;
- }
- // 1. has no priority region
- // 2. cursor position is after of last child
- // 3. normal isMatch method
- String priority = ((ICSSStyleDeclItem) targetNode).getPriority();
- if (priority == null || priority.length() == 0) {
- ICSSNode lastChild = targetNode.getLastChild();
- if (lastChild instanceof IndexedRegion) {
- int startOffset = ((IndexedRegion) lastChild).getStartOffset();
- // int endOffset = ((IndexedRegion)lastChild).getEndOffset();
- if (startOffset < fContext.getCursorPos() && isMatch(IMPORTANT)) {
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(IMPORTANT);
- item.setCursorPosition(IMPORTANT.length());
- item.setDisplayString(IMPORTANT);
- item.setImageType(CSSImageType.VALUE_STRING);
- appendSemiColon(item);
- candidates.add(item);
- }
- }
- }
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- checkSemiColon(); // check should add semi-colon or not
-
- String name = getPropertyName();
- if (name != null) {
- CSSMetaModelUtil util = new CSSMetaModelUtil(fContext.getMetaModel());
- Iterator i = Collections.EMPTY_LIST.iterator();
- if (isFontFaceRule()) {
- CSSMMDescriptor desc = util.getDescriptor(name);
- if (desc != null) {
- i = desc.getValues();
- }
- } else {
- CSSMMProperty prop = util.getProperty(name);
- if (prop != null) {
- i = prop.getValues();
- }
- }
- while (i.hasNext()) {
- CSSMMNode val = (CSSMMNode) i.next();
- String valueType = val.getType();
- if (valueType == CSSMMNode.TYPE_KEYWORD) {
- addString(candidates, val.toString());
- } else if (valueType == CSSMMNode.TYPE_NUMBER) {
- addNumber(candidates, (CSSMMNumber) val);
- } else if (valueType == CSSMMNode.TYPE_FUNCTION) {
- addFunction(candidates, (CSSMMFunction) val);
- }
- }
- }
-
- addImportant(candidates);
- addSemiColon(candidates);
-
- return candidates.iterator();
- }
-
- /**
- * @return java.lang.String
- */
- private String getPropertyName() {
- ICSSNode targetNode = fContext.getTargetNode();
- while (targetNode instanceof ICSSPrimitiveValue) {
- targetNode = targetNode.getParentNode();
- }
- if (targetNode instanceof ICSSStyleDeclItem) {
- return ((ICSSStyleDeclItem) targetNode).getPropertyName();
- } else {
- return null;
- }
- }
-
- /**
- *
- */
- private boolean isFontFaceRule() {
- ICSSNode targetNode = fContext.getTargetNode();
- while (targetNode instanceof ICSSPrimitiveValue) {
- targetNode = targetNode.getParentNode();
- }
- if (targetNode instanceof ICSSStyleDeclItem) {
- targetNode = targetNode.getParentNode(); // get Declaration
- if (targetNode != null) {
- // inline style has no rule node
- targetNode = targetNode.getParentNode(); // get rule
- }
- }
- return (targetNode instanceof CSSFontFaceRule);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForHTMLTag.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForHTMLTag.java
deleted file mode 100644
index 6f28c14b5f..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForHTMLTag.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.ui.internal.image.CSSImageType;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
-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.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-class CSSProposalGeneratorForHTMLTag extends CSSProposalGenerator {
-
- /**
- * CSSStyleRuleProposalGenerator constructor comment.
- *
- */
- CSSProposalGeneratorForHTMLTag(CSSContentAssistContext context) {
- super(context);
-
- if (fHTMLTags == null) {
- fHTMLTags = setupHTMLTags();
- }
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- if (checkLeadingColon()) {
- return candidates.iterator();
- }
-
- // XHTML requires lower case
- boolean bLowerCase = false;
- if (fContext.getModel().getStyleSheetType() == ICSSModel.EMBEDDED) {
- Node domNode = fContext.getModel().getOwnerDOMNode();
- if (domNode != null && !(domNode instanceof Document)) {
- domNode = domNode.getOwnerDocument();
- if (domNode instanceof IDOMDocument) {
- DocumentTypeAdapter adapter = (DocumentTypeAdapter) ((IDOMDocument) domNode).getAdapterFor(DocumentTypeAdapter.class);
- if (adapter != null)
- bLowerCase = (adapter.getTagNameCase() == DocumentTypeAdapter.LOWER_CASE);
- }
- }
- }
-
-
- int length = fHTMLTags.length;
- for (int i = 0; i < length; i++) {
- String tagText = fHTMLTags[i];
- if (bLowerCase) {
- tagText = tagText.toLowerCase();
- }
- if (!isMatch(tagText)) {
- continue;
- }
-
- int cursorPos = 0;
- StringBuffer buf = new StringBuffer();
- buf.append(tagText);
- cursorPos += tagText.length();
- boolean inRule = (fContext.getTargetNode() instanceof ICSSStyleRule);
- if (!inRule || fContext.getTextToReplace().length() == 0) {
- buf.append(" ");//$NON-NLS-1$
- cursorPos += 1;
- }
- if (!inRule) {
- StringAndOffset sao = generateBraces();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- }
-
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(tagText);
- item.setImageType(CSSImageType.SELECTOR_TAG);
- candidates.add(item);
- }
-
- return candidates.iterator();
- }
-
- /**
- *
- */
- private static String[] setupHTMLTags() {
- CMDocument cmdoc = HTMLCMDocumentFactory.getCMDocument(CMDocType.HTML_DOC_TYPE);
- CMNamedNodeMap elements = cmdoc.getElements();
- Vector names = new Vector();
- int nElements = elements.getLength();
- for (int i = 0; i < nElements; i++) {
- CMElementDeclaration edec = (CMElementDeclaration) elements.item(i);
- if (isAttrDefined(edec, HTML40Namespace.ATTR_NAME_STYLE)) {
- names.add(edec.getElementName());
- }
- }
- Collections.sort(names);
- String[] tags = new String[names.size()];
- Iterator iNames = names.iterator();
- for (int i = 0; iNames.hasNext(); i++) {
- tags[i] = (String) iNames.next();
- }
- return tags;
- }
-
- /**
- *
- */
- private static boolean isAttrDefined(CMElementDeclaration edec, String attrName) {
- if (edec == null) {
- return false;
- }
- CMNamedNodeMap attrs = edec.getAttributes();
- if (attrs == null) {
- return false;
- }
- for (int i = 0; i < attrs.getLength(); i++) {
- CMAttributeDeclaration attr = (CMAttributeDeclaration) attrs.item(i);
- if (attr == null) {
- continue;
- }
- if (attr.getAttrName().equalsIgnoreCase(attrName)) {
- return true;
- }
- }
- return false;
- }
-
- private static String[] fHTMLTags = null;
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForPseudoSelector.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForPseudoSelector.java
deleted file mode 100644
index 27df837c06..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForPseudoSelector.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMSelector;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMMTypeCollector;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPageRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.ui.internal.image.CSSImageType;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-/**
- *
- */
-class CSSProposalGeneratorForPseudoSelector extends CSSProposalGenerator {
-
- /**
- * CSSProposalGeneratorForPseudoSelector constructor comment.
- *
- */
- CSSProposalGeneratorForPseudoSelector(CSSContentAssistContext context) {
- super(context);
- }
-
- /**
- * getCandidates method comment.
- */
- protected Iterator getCandidates() {
- List candidates = new ArrayList();
-
- boolean hasLeadingColon = checkLeadingColon();
- String textToReplace = fContext.getTextToReplace();
- if (!hasLeadingColon && 0 < textToReplace.length() && !textToReplace.equals(fContext.getTextToCompare())) {
- // cursor placed midpoint of the region
- return candidates.iterator();
- }
- ITextRegion region = fContext.getTargetRegion();
- if (region != null) {
- String type = region.getType();
- if (type != CSSRegionContexts.CSS_S && !CSSRegionUtil.isSelectorBegginingType(type)) {
- return candidates.iterator();
- }
- }
-
- boolean useUpperCase = CSSCorePlugin.getDefault().getPluginPreferences().getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER;
-
- List tags = getSelectorTags();
- Collections.sort(tags);
- Iterator i = tags.iterator();
- while (i.hasNext()) {
- String text = (String) i.next();
- if (hasLeadingColon && !isMatch(text)) {
- continue;
- }
- text = (useUpperCase) ? text.toUpperCase() : text.toLowerCase();
-
- int cursorPos = 0;
- StringBuffer buf = new StringBuffer();
- if (hasLeadingColon) {
- buf.append(text.substring(1));
- } else {
- buf.append(textToReplace);
- buf.append(text);
- }
- cursorPos += buf.length();
-
- if (0 < buf.length()) {
- boolean inRule = (fContext.getTargetNode() instanceof ICSSStyleRule || fContext.getTargetNode() instanceof ICSSPageRule);
- if (!inRule || (textToReplace.length() == 0 && !hasLeadingColon)) {
- buf.append(" ");//$NON-NLS-1$
- cursorPos += 1;
- }
- if (!inRule) {
- StringAndOffset sao = generateBraces();
- buf.append(sao.fString);
- cursorPos += sao.fOffset;
- }
- CSSCACandidate item = new CSSCACandidate();
- item.setReplacementString(buf.toString());
- item.setCursorPosition(cursorPos);
- item.setDisplayString(text);
- item.setImageType(CSSImageType.SELECTOR_PSEUDO);
- candidates.add(item);
- }
- }
-
- return candidates.iterator();
- }
-
- /**
- *
- */
- List getSelectorTags() {
- List tagList = new ArrayList();
- ICSSNode targetNode = fContext.getTargetNode();
- String rootType = (targetNode instanceof ICSSPageRule) ? CSSMMNode.TYPE_PAGE_RULE : CSSMMNode.TYPE_STYLE_RULE;
-
- CSSMMTypeCollector collector = new CSSMMTypeCollector();
- collector.collectNestedType(false);
- collector.apply(fContext.getMetaModel(), rootType);
- Iterator i;
- i = collector.getNodes();
- if (!i.hasNext()) {
- return tagList;
- }
- CSSMMNode node = (CSSMMNode) i.next();
- i = node.getChildNodes();
- while (i.hasNext()) {
- CSSMMNode child = (CSSMMNode) i.next();
- if (child.getType() == CSSMMNode.TYPE_SELECTOR) {
- String selType = ((CSSMMSelector) child).getSelectorType();
- if (selType == CSSMMSelector.TYPE_PSEUDO_CLASS || selType == CSSMMSelector.TYPE_PSEUDO_ELEMENT) {
- tagList.add(((CSSMMSelector) child).getSelectorString());
- }
- }
- }
- return tagList;
- }
-
- /**
- *
- */
- protected boolean isMatch(String text) {
- if (!super.isMatch(text)) {
- ITextRegion region = fContext.getTargetRegion();
- if (region != null && region.getType() == CSSRegionContexts.CSS_SELECTOR_PSEUDO) {
- return true;
- } else {
- return false;
- }
- } else {
- return true;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSTemplateCompletionProcessor.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSTemplateCompletionProcessor.java
deleted file mode 100644
index 6605bdbb09..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSTemplateCompletionProcessor.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentassist;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-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.TemplateContextType;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.CSSEditorPluginImages;
-import org.eclipse.wst.css.ui.internal.image.CSSImageHelper;
-
-
-/**
- * Completion processor for CSS Templates. Most of the work is already done
- * by the CSS Content Assist processor, so by the time the
- * CSSTemplateCompletionProcessor is asked for content assist proposals, the
- * CSS content assist processor has already set the context type for
- * templates.
- */
-class CSSTemplateCompletionProcessor extends TemplateCompletionProcessor {
- private String fContextTypeId = null;
-
- 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) {
- // just return the same image for now
- return CSSImageHelper.getInstance().getImage(CSSEditorPluginImages.IMG_OBJ_TEMPLATE);
- }
-
- private ContextTypeRegistry getTemplateContextRegistry() {
- return CSSUIPlugin.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 CSSUIPlugin.getDefault().getTemplateStore();
- }
-
- void setContextType(String contextTypeId) {
- fContextTypeId = contextTypeId;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/HTML40Namespace.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/HTML40Namespace.java
deleted file mode 100644
index c8c0e30948..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/HTML40Namespace.java
+++ /dev/null
@@ -1,890 +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.wst.css.ui.internal.contentassist;
-
-
-
-/**
- * Provide all names defined in the HTML 4.0? specification.
- */
-public interface HTML40Namespace {
-
- // Element names
- public static interface ElementName {
- public static final String A = "A"; //$NON-NLS-1$
- public static final String ABBR = "ABBR"; //$NON-NLS-1$
- public static final String ACRONYM = "ACRONYM"; //$NON-NLS-1$
- public static final String ADDRESS = "ADDRESS"; //$NON-NLS-1$
- public static final String APPLET = "APPLET"; //$NON-NLS-1$
- public static final String AREA = "AREA"; //$NON-NLS-1$
- public static final String B = "B"; //$NON-NLS-1$
- public static final String BASE = "BASE"; //$NON-NLS-1$
- public static final String BASEFONT = "BASEFONT"; //$NON-NLS-1$
- public static final String BDO = "BDO"; //$NON-NLS-1$
- public static final String BGSOUND = "BGSOUND"; // D205513
- // //$NON-NLS-1$
- public static final String BIG = "BIG"; //$NON-NLS-1$
- public static final String BLINK = "BLINK"; //$NON-NLS-1$
- public static final String BLOCKQUOTE = "BLOCKQUOTE"; //$NON-NLS-1$
- public static final String BODY = "BODY"; //$NON-NLS-1$
- public static final String BR = "BR"; //$NON-NLS-1$
- public static final String BUTTON = "BUTTON"; //$NON-NLS-1$
- public static final String CAPTION = "CAPTION"; //$NON-NLS-1$
- public static final String CENTER = "CENTER"; //$NON-NLS-1$
- public static final String CITE = "CITE"; //$NON-NLS-1$
- public static final String CODE = "CODE"; //$NON-NLS-1$
- public static final String COL = "COL"; //$NON-NLS-1$
- public static final String COLGROUP = "COLGROUP"; //$NON-NLS-1$
- public static final String DD = "DD"; //$NON-NLS-1$
- public static final String DEL = "DEL"; //$NON-NLS-1$
- public static final String DFN = "DFN"; //$NON-NLS-1$
- public static final String DIR = "DIR"; //$NON-NLS-1$
- public static final String DIV = "DIV"; //$NON-NLS-1$
- public static final String DL = "DL"; //$NON-NLS-1$
- public static final String DT = "DT"; //$NON-NLS-1$
- public static final String EM = "EM"; //$NON-NLS-1$
- public static final String EMBED = "EMBED"; //$NON-NLS-1$
- public static final String FIELDSET = "FIELDSET"; //$NON-NLS-1$
- public static final String FONT = "FONT"; //$NON-NLS-1$
- public static final String FORM = "FORM"; //$NON-NLS-1$
- public static final String FRAME = "FRAME"; //$NON-NLS-1$
- public static final String FRAMESET = "FRAMESET"; //$NON-NLS-1$
- public static final String H1 = "H1"; //$NON-NLS-1$
- public static final String H2 = "H2"; //$NON-NLS-1$
- public static final String H3 = "H3"; //$NON-NLS-1$
- public static final String H4 = "H4"; //$NON-NLS-1$
- public static final String H5 = "H5"; //$NON-NLS-1$
- public static final String H6 = "H6"; //$NON-NLS-1$
- public static final String HEAD = "HEAD"; //$NON-NLS-1$
- public static final String HR = "HR"; //$NON-NLS-1$
- public static final String HTML = "HTML"; //$NON-NLS-1$
- public static final String I = "I"; //$NON-NLS-1$
- public static final String IFRAME = "IFRAME"; //$NON-NLS-1$
- public static final String IMG = "IMG"; //$NON-NLS-1$
- public static final String INPUT = "INPUT"; //$NON-NLS-1$
- public static final String INS = "INS"; //$NON-NLS-1$
- public static final String ISINDEX = "ISINDEX"; //$NON-NLS-1$
- public static final String KBD = "KBD"; //$NON-NLS-1$
- public static final String LABEL = "LABEL"; //$NON-NLS-1$
- public static final String LEGEND = "LEGEND"; //$NON-NLS-1$
- public static final String LI = "LI"; //$NON-NLS-1$
- public static final String LINK = "LINK"; //$NON-NLS-1$
- public static final String MAP = "MAP"; //$NON-NLS-1$
- public static final String MENU = "MENU"; //$NON-NLS-1$
- public static final String META = "META"; //$NON-NLS-1$
- public static final String NOBR = "NOBR"; // D205513 //$NON-NLS-1$
- public static final String NOEMBED = "NOEMBED"; //$NON-NLS-1$
- public static final String NOFRAMES = "NOFRAMES"; //$NON-NLS-1$
- public static final String NOSCRIPT = "NOSCRIPT"; //$NON-NLS-1$
- public static final String OBJECT = "OBJECT"; //$NON-NLS-1$
- public static final String OL = "OL"; //$NON-NLS-1$
- public static final String OPTGROUP = "OPTGROUP"; //$NON-NLS-1$
- public static final String OPTION = "OPTION"; //$NON-NLS-1$
- public static final String P = "P"; //$NON-NLS-1$
- public static final String PARAM = "PARAM"; //$NON-NLS-1$
- public static final String PRE = "PRE"; //$NON-NLS-1$
- public static final String Q = "Q"; //$NON-NLS-1$
- public static final String S = "S"; //$NON-NLS-1$
- public static final String SAMP = "SAMP"; //$NON-NLS-1$
- public static final String SCRIPT = "SCRIPT"; //$NON-NLS-1$
- public static final String SELECT = "SELECT"; //$NON-NLS-1$
- public static final String SMALL = "SMALL"; //$NON-NLS-1$
- public static final String SPAN = "SPAN"; //$NON-NLS-1$
- public static final String STRIKE = "STRIKE"; //$NON-NLS-1$
- public static final String STRONG = "STRONG"; //$NON-NLS-1$
- public static final String STYLE = "STYLE"; //$NON-NLS-1$
- public static final String SUB = "SUB"; //$NON-NLS-1$
- public static final String SUP = "SUP"; //$NON-NLS-1$
- public static final String TABLE = "TABLE"; //$NON-NLS-1$
- public static final String TBODY = "TBODY"; //$NON-NLS-1$
- public static final String TD = "TD"; //$NON-NLS-1$
- public static final String TEXTAREA = "TEXTAREA"; //$NON-NLS-1$
- public static final String TFOOT = "TFOOT"; //$NON-NLS-1$
- public static final String TH = "TH"; //$NON-NLS-1$
- public static final String THEAD = "THEAD"; //$NON-NLS-1$
- public static final String TITLE = "TITLE"; //$NON-NLS-1$
- public static final String TR = "TR"; //$NON-NLS-1$
- public static final String TT = "TT"; //$NON-NLS-1$
- public static final String U = "U"; //$NON-NLS-1$
- public static final String UL = "UL"; //$NON-NLS-1$
- public static final String VAR = "VAR"; //$NON-NLS-1$
- public static final String WBR = "WBR"; // D205513 //$NON-NLS-1$
- public static final String MARQUEE = "MARQUEE"; //$NON-NLS-1$
- public static final String SSI_CONFIG = "SSI:CONFIG"; // D210393
- // //$NON-NLS-1$
- public static final String SSI_ECHO = "SSI:ECHO"; //$NON-NLS-1$
- public static final String SSI_EXEC = "SSI:EXEC"; //$NON-NLS-1$
- public static final String SSI_FSIZE = "SSI:FSIZE"; //$NON-NLS-1$
- public static final String SSI_FLASTMOD = "SSI:FLASTMOD"; //$NON-NLS-1$
- public static final String SSI_INCLUDE = "SSI:INCLUDE"; //$NON-NLS-1$
- public static final String SSI_PRINTENV = "SSI:PRINTENV"; //$NON-NLS-1$
- public static final String SSI_SET = "SSI:SET"; //$NON-NLS-1$
- public static final String WML_WML = "wml"; //$NON-NLS-1$
- public static final String WML_CARD = "card"; //$NON-NLS-1$
- public static final String WML_TEMPLATE = "template"; //$NON-NLS-1$
- public static final String WML_ACCESS = "access"; //$NON-NLS-1$
- public static final String WML_DO = "do"; //$NON-NLS-1$
- public static final String WML_ONEVENT = "onevent"; //$NON-NLS-1$
- public static final String WML_TIMER = "timer"; //$NON-NLS-1$
- public static final String WML_ANCHOR = "anchor"; //$NON-NLS-1$
- public static final String WML_PREV = "prev"; //$NON-NLS-1$
- public static final String WML_REFRESH = "refresh"; //$NON-NLS-1$
- public static final String WML_GO = "go"; //$NON-NLS-1$
- public static final String WML_NOOP = "noop"; //$NON-NLS-1$
- public static final String WML_SETVAR = "setvar"; //$NON-NLS-1$
- public static final String WML_POSTFIELD = "postfield"; //$NON-NLS-1$
- }
-
- // Character Entities
- public static interface EntityName {
- public static final String AACUTE_U = "Aacute"; //$NON-NLS-1$
- public static final String AACUTE_L = "aacute"; //$NON-NLS-1$
- public static final String ACIRC_U = "Acirc"; //$NON-NLS-1$
- public static final String ACIRC_L = "acirc"; //$NON-NLS-1$
- public static final String ACUTE = "acute"; //$NON-NLS-1$
- public static final String AELIG_U = "AElig"; //$NON-NLS-1$
- public static final String AELIG_L = "aelig"; //$NON-NLS-1$
- public static final String AGRAVE_U = "Agrave"; //$NON-NLS-1$
- public static final String AGRAVE_L = "agrave"; //$NON-NLS-1$
- public static final String ALEFSYM = "alefsym"; //$NON-NLS-1$
- public static final String ALPHA_U = "Alpha"; //$NON-NLS-1$
- public static final String ALPHA_L = "alpha"; //$NON-NLS-1$
- public static final String AMP = "amp"; //$NON-NLS-1$
- public static final String AND = "and"; //$NON-NLS-1$
- public static final String ANG = "ang"; //$NON-NLS-1$
- public static final String ARING_U = "Aring"; //$NON-NLS-1$
- public static final String ARING_L = "aring"; //$NON-NLS-1$
- public static final String ASYMP = "asymp"; //$NON-NLS-1$
- public static final String ATILDE_U = "Atilde"; //$NON-NLS-1$
- public static final String ATILDE_L = "atilde"; //$NON-NLS-1$
- public static final String AUML_U = "Auml"; //$NON-NLS-1$
- public static final String AUML_L = "auml"; //$NON-NLS-1$
- public static final String BDQUO = "bdquo"; //$NON-NLS-1$
- public static final String BETA_U = "Beta"; //$NON-NLS-1$
- public static final String BETA_L = "beta"; //$NON-NLS-1$
- public static final String BRVBAR = "brvbar"; //$NON-NLS-1$
- public static final String BULL = "bull"; //$NON-NLS-1$
- public static final String CAP = "cap"; //$NON-NLS-1$
- public static final String CCEDIL_U = "Ccedil"; //$NON-NLS-1$
- public static final String CCEDIL_L = "ccedil"; //$NON-NLS-1$
- public static final String CEDIL = "cedil"; //$NON-NLS-1$
- public static final String CENT = "cent"; //$NON-NLS-1$
- public static final String CHI_U = "Chi"; //$NON-NLS-1$
- public static final String CHI_L = "chi"; //$NON-NLS-1$
- public static final String CIRC = "circ"; //$NON-NLS-1$
- public static final String CLUBS = "clubs"; //$NON-NLS-1$
- public static final String CONG = "cong"; //$NON-NLS-1$
- public static final String COPY = "copy"; //$NON-NLS-1$
- public static final String CRARR = "crarr"; //$NON-NLS-1$
- public static final String CUP = "cup"; //$NON-NLS-1$
- public static final String CURREN = "curren"; //$NON-NLS-1$
- public static final String DAGGER_U = "Dagger"; //$NON-NLS-1$
- public static final String DAGGER_L = "dagger"; //$NON-NLS-1$
- public static final String DARR_U = "dArr"; //$NON-NLS-1$
- public static final String DARR_L = "darr"; //$NON-NLS-1$
- public static final String DEG = "deg"; //$NON-NLS-1$
- public static final String DELTA_U = "Delta"; //$NON-NLS-1$
- public static final String DELTA_L = "delta"; //$NON-NLS-1$
- public static final String DIAMS = "diams"; //$NON-NLS-1$
- public static final String DIVIDE = "divide"; //$NON-NLS-1$
- public static final String EACUTE_U = "Eacute"; //$NON-NLS-1$
- public static final String EACUTE_L = "eacute"; //$NON-NLS-1$
- public static final String ECIRC_U = "Ecirc"; //$NON-NLS-1$
- public static final String ECIRC_L = "ecirc"; //$NON-NLS-1$
- public static final String EGRAVE_U = "Egrave"; //$NON-NLS-1$
- public static final String EGRAVE_L = "egrave"; //$NON-NLS-1$
- public static final String EMPTY = "empty"; //$NON-NLS-1$
- public static final String EMSP = "emsp"; //$NON-NLS-1$
- public static final String ENSP = "ensp"; //$NON-NLS-1$
- public static final String EPSILON_U = "Epsilon"; //$NON-NLS-1$
- public static final String EPSILON_L = "epsilon"; //$NON-NLS-1$
- public static final String EQUIV = "equiv"; //$NON-NLS-1$
- public static final String ETA_U = "Eta"; //$NON-NLS-1$
- public static final String ETA_L = "eta"; //$NON-NLS-1$
- public static final String ETH_U = "ETH"; //$NON-NLS-1$
- public static final String ETH_L = "eth"; //$NON-NLS-1$
- public static final String EUML_U = "Euml"; //$NON-NLS-1$
- public static final String EUML_L = "euml"; //$NON-NLS-1$
- public static final String EURO = "euro"; //$NON-NLS-1$
- public static final String EXIST = "exist"; //$NON-NLS-1$
- public static final String FNOF = "fnof"; //$NON-NLS-1$
- public static final String FORALL = "forall"; //$NON-NLS-1$
- public static final String FRAC12 = "frac12"; //$NON-NLS-1$
- public static final String FRAC14 = "frac14"; //$NON-NLS-1$
- public static final String FRAC34 = "frac34"; //$NON-NLS-1$
- public static final String FRASL = "frasl"; //$NON-NLS-1$
- public static final String GAMMA_U = "Gamma"; //$NON-NLS-1$
- public static final String GAMMA_L = "gamma"; //$NON-NLS-1$
- public static final String GE = "ge"; //$NON-NLS-1$
- public static final String GT = "gt"; //$NON-NLS-1$
- public static final String HARR_U = "hArr"; //$NON-NLS-1$
- public static final String HARR_L = "harr"; //$NON-NLS-1$
- public static final String HEARTS = "hearts"; //$NON-NLS-1$
- public static final String HELLIP = "hellip"; //$NON-NLS-1$
- public static final String IACUTE_U = "Iacute"; //$NON-NLS-1$
- public static final String IACUTE_L = "iacute"; //$NON-NLS-1$
- public static final String ICIRC_U = "Icirc"; //$NON-NLS-1$
- public static final String ICIRC_L = "icirc"; //$NON-NLS-1$
- public static final String IEXCL = "iexcl"; //$NON-NLS-1$
- public static final String IGRAVE_U = "Igrave"; //$NON-NLS-1$
- public static final String IGRAVE_L = "igrave"; //$NON-NLS-1$
- public static final String IMAGE = "image"; //$NON-NLS-1$
- public static final String INFIN = "infin"; //$NON-NLS-1$
- public static final String INT = "int"; //$NON-NLS-1$
- public static final String IOTA_U = "Iota"; //$NON-NLS-1$
- public static final String IOTA_L = "iota"; //$NON-NLS-1$
- public static final String IQUEST = "iquest"; //$NON-NLS-1$
- public static final String ISIN = "isin"; //$NON-NLS-1$
- public static final String IUML_U = "Iuml"; //$NON-NLS-1$
- public static final String IUML_L = "iuml"; //$NON-NLS-1$
- public static final String KAPPA_U = "Kappa"; //$NON-NLS-1$
- public static final String KAPPA_L = "kappa"; //$NON-NLS-1$
- public static final String LAMBDA_U = "Lambda"; //$NON-NLS-1$
- public static final String LAMBDA_L = "lambda"; //$NON-NLS-1$
- public static final String LANG = "lang"; //$NON-NLS-1$
- public static final String LAQUO = "laquo"; //$NON-NLS-1$
- public static final String LARR_U = "lArr"; //$NON-NLS-1$
- public static final String LARR_L = "larr"; //$NON-NLS-1$
- public static final String LCEIL = "lceil"; //$NON-NLS-1$
- public static final String LDQUO = "ldquo"; //$NON-NLS-1$
- public static final String LE = "le"; //$NON-NLS-1$
- public static final String LFLOOR = "lfloor"; //$NON-NLS-1$
- public static final String LOWAST = "lowast"; //$NON-NLS-1$
- public static final String LOZ = "loz"; //$NON-NLS-1$
- public static final String LRM = "lrm"; //$NON-NLS-1$
- public static final String LSAQUO = "lsaquo"; //$NON-NLS-1$
- public static final String LSQUO = "lsquo"; //$NON-NLS-1$
- public static final String LT = "lt"; //$NON-NLS-1$
- public static final String MACR = "macr"; //$NON-NLS-1$
- public static final String MDASH = "mdash"; //$NON-NLS-1$
- public static final String MICRO = "micro"; //$NON-NLS-1$
- public static final String MIDDOT = "middot"; //$NON-NLS-1$
- public static final String MINUS = "minus"; //$NON-NLS-1$
- public static final String MU_U = "Mu"; //$NON-NLS-1$
- public static final String MU_L = "mu"; //$NON-NLS-1$
- public static final String NABLA = "nabla"; //$NON-NLS-1$
- public static final String NBSP = "nbsp"; //$NON-NLS-1$
- public static final String NDASH = "ndash"; //$NON-NLS-1$
- public static final String NE = "ne"; //$NON-NLS-1$
- public static final String NI = "ni"; //$NON-NLS-1$
- public static final String NOT = "not"; //$NON-NLS-1$
- public static final String NOTIN = "notin"; //$NON-NLS-1$
- public static final String NSUB = "nsub"; //$NON-NLS-1$
- public static final String NTILDE_U = "Ntilde"; //$NON-NLS-1$
- public static final String NTILDE_L = "ntilde"; //$NON-NLS-1$
- public static final String NU_U = "Nu"; //$NON-NLS-1$
- public static final String NU_L = "nu"; //$NON-NLS-1$
- public static final String OACUTE_U = "Oacute"; //$NON-NLS-1$
- public static final String OACUTE_L = "oacute"; //$NON-NLS-1$
- public static final String OCIRC_U = "Ocirc"; //$NON-NLS-1$
- public static final String OCIRC_L = "ocirc"; //$NON-NLS-1$
- public static final String OELIG_U = "OElig"; //$NON-NLS-1$
- public static final String OELIG_L = "oelig"; //$NON-NLS-1$
- public static final String OGRAVE_U = "Ograve"; //$NON-NLS-1$
- public static final String OGRAVE_L = "ograve"; //$NON-NLS-1$
- public static final String OLINE = "oline"; //$NON-NLS-1$
- public static final String OMEGA_U = "Omega"; //$NON-NLS-1$
- public static final String OMEGA_L = "omega"; //$NON-NLS-1$
- public static final String OMICRON_U = "Omicron"; //$NON-NLS-1$
- public static final String OMICRON_L = "omicron"; //$NON-NLS-1$
- public static final String OPLUS = "oplus"; //$NON-NLS-1$
- public static final String OR = "or"; //$NON-NLS-1$
- public static final String ORDF = "ordf"; //$NON-NLS-1$
- public static final String ORDM = "ordm"; //$NON-NLS-1$
- public static final String OSLASH_U = "Oslash"; //$NON-NLS-1$
- public static final String OSLASH_L = "oslash"; //$NON-NLS-1$
- public static final String OTILDE_U = "Otilde"; //$NON-NLS-1$
- public static final String OTILDE_L = "otilde"; //$NON-NLS-1$
- public static final String OTIMES = "otimes"; //$NON-NLS-1$
- public static final String OUML_U = "Ouml"; //$NON-NLS-1$
- public static final String OUML_L = "ouml"; //$NON-NLS-1$
- public static final String PARA = "para"; //$NON-NLS-1$
- public static final String PART = "part"; //$NON-NLS-1$
- public static final String PERMIL = "permil"; //$NON-NLS-1$
- public static final String PERP = "perp"; //$NON-NLS-1$
- public static final String PHI_U = "Phi"; //$NON-NLS-1$
- public static final String PHI_L = "phi"; //$NON-NLS-1$
- public static final String PI_U = "Pi"; //$NON-NLS-1$
- public static final String PI_L = "pi"; //$NON-NLS-1$
- public static final String PIV = "piv"; //$NON-NLS-1$
- public static final String PLUSMN = "plusmn"; //$NON-NLS-1$
- public static final String POUND = "pound"; //$NON-NLS-1$
- public static final String PRIME_U = "Prime"; //$NON-NLS-1$
- public static final String PRIME_L = "prime"; //$NON-NLS-1$
- public static final String PROD = "prod"; //$NON-NLS-1$
- public static final String PROP = "prop"; //$NON-NLS-1$
- public static final String PSI_U = "Psi"; //$NON-NLS-1$
- public static final String PSI_L = "psi"; //$NON-NLS-1$
- public static final String QUOT = "quot"; //$NON-NLS-1$
- public static final String RADIC = "radic"; //$NON-NLS-1$
- public static final String RANG = "rang"; //$NON-NLS-1$
- public static final String RAQUO = "raquo"; //$NON-NLS-1$
- public static final String RARR_U = "rArr"; //$NON-NLS-1$
- public static final String RARR_L = "rarr"; //$NON-NLS-1$
- public static final String RCEIL = "rceil"; //$NON-NLS-1$
- public static final String RDQUO = "rdquo"; //$NON-NLS-1$
- public static final String REAL = "real"; //$NON-NLS-1$
- public static final String REG = "reg"; //$NON-NLS-1$
- public static final String RFLOOR = "rfloor"; //$NON-NLS-1$
- public static final String RHO_U = "Rho"; //$NON-NLS-1$
- public static final String RHO_L = "rho"; //$NON-NLS-1$
- public static final String RLM = "rlm"; //$NON-NLS-1$
- public static final String RSAQUO = "rsaquo"; //$NON-NLS-1$
- public static final String RSQUO = "rsquo"; //$NON-NLS-1$
- public static final String SBQUO = "sbquo"; //$NON-NLS-1$
- public static final String SCARON_U = "Scaron"; //$NON-NLS-1$
- public static final String SCARON_L = "scaron"; //$NON-NLS-1$
- public static final String SDOT = "sdot"; //$NON-NLS-1$
- public static final String SECT = "sect"; //$NON-NLS-1$
- public static final String SHY = "shy"; //$NON-NLS-1$
- public static final String SIGMA_U = "Sigma"; //$NON-NLS-1$
- public static final String SIGMA_L = "sigma"; //$NON-NLS-1$
- public static final String SIGMAF = "sigmaf"; //$NON-NLS-1$
- public static final String SIM = "sim"; //$NON-NLS-1$
- public static final String SPADES = "spades"; //$NON-NLS-1$
- public static final String SUB = "sub"; //$NON-NLS-1$
- public static final String SUBE = "sube"; //$NON-NLS-1$
- public static final String SUM = "sum"; //$NON-NLS-1$
- public static final String SUP = "sup"; //$NON-NLS-1$
- public static final String SUP1 = "sup1"; //$NON-NLS-1$
- public static final String SUP2 = "sup2"; //$NON-NLS-1$
- public static final String SUP3 = "sup3"; //$NON-NLS-1$
- public static final String SUPE = "supe"; //$NON-NLS-1$
- public static final String SZLIG = "szlig"; //$NON-NLS-1$
- public static final String TAU_U = "Tau"; //$NON-NLS-1$
- public static final String TAU_L = "tau"; //$NON-NLS-1$
- public static final String THERE4 = "there4"; //$NON-NLS-1$
- public static final String THETA_U = "Theta"; //$NON-NLS-1$
- public static final String THETA_L = "theta"; //$NON-NLS-1$
- public static final String THETASYM = "thetasym"; //$NON-NLS-1$
- public static final String THINSP = "thinsp"; //$NON-NLS-1$
- public static final String THORN_U = "THORN"; //$NON-NLS-1$
- public static final String THORN_L = "thorn"; //$NON-NLS-1$
- public static final String TILDE = "tilde"; //$NON-NLS-1$
- public static final String TIMES = "times"; //$NON-NLS-1$
- public static final String TRADE = "trade"; //$NON-NLS-1$
- public static final String UACUTE_U = "Uacute"; //$NON-NLS-1$
- public static final String UACUTE_L = "uacute"; //$NON-NLS-1$
- public static final String UARR_U = "uArr"; //$NON-NLS-1$
- public static final String UARR_L = "uarr"; //$NON-NLS-1$
- public static final String UCIRC_U = "Ucirc"; //$NON-NLS-1$
- public static final String UCIRC_L = "ucirc"; //$NON-NLS-1$
- public static final String UGRAVE_U = "Ugrave"; //$NON-NLS-1$
- public static final String UGRAVE_L = "ugrave"; //$NON-NLS-1$
- public static final String UML = "uml"; //$NON-NLS-1$
- public static final String UPSIH = "upsih"; //$NON-NLS-1$
- public static final String UPSILON_U = "Upsilon"; //$NON-NLS-1$
- public static final String UPSILON_L = "upsilon"; //$NON-NLS-1$
- public static final String UUML_U = "Uuml"; //$NON-NLS-1$
- public static final String UUML_L = "uuml"; //$NON-NLS-1$
- public static final String WEIERP = "weierp"; //$NON-NLS-1$
- public static final String XI_U = "Xi"; //$NON-NLS-1$
- public static final String XI_L = "xi"; //$NON-NLS-1$
- public static final String YACUTE_U = "Yacute"; //$NON-NLS-1$
- public static final String YACUTE_L = "yacute"; //$NON-NLS-1$
- public static final String YEN = "yen"; //$NON-NLS-1$
- public static final String YUML_U = "Yuml"; //$NON-NLS-1$
- public static final String YUML_L = "yuml"; //$NON-NLS-1$
- public static final String ZETA_U = "Zeta"; //$NON-NLS-1$
- public static final String ZETA_L = "zeta"; //$NON-NLS-1$
- public static final String ZWJ = "zwj"; //$NON-NLS-1$
- public static final String ZWNJ = "zwnj"; //$NON-NLS-1$
- }
-
- public static final String HTML40_URI = "http://www.w3.org/TR/REC-html40/frameset.dtd"; //$NON-NLS-1$
- public static final String HTML40_TAG_PREFIX = ""; //$NON-NLS-1$
- // global attribute names
- public static final String ATTR_NAME_ID = "id"; // %coreattrs;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CLASS = "class"; // %coreattrs;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_STYLE = "style"; // %coreattrs;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TITLE = "title"; // %coreattrs;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LANG = "lang"; // %i18n;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DIR = "dir"; // %i18n; //$NON-NLS-1$
- public static final String ATTR_NAME_ONCLICK = "onclick"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONDBLCLICK = "ondblclick"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEDOWN = "onmousedown"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEUP = "onmouseup"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEOVER = "onmouseover"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEMOVE = "onmousemove"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONMOUSEOUT = "onmouseout"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYPRESS = "onkeypress"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYDOWN = "onkeydown"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONKEYUP = "onkeyup"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONHELP = "onhelp"; // %events;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BGCOLOR = "bgcolor"; // %bodycolor;,
- // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TEXT = "text"; // %bodycolor;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LINK = "link"; // %bodycolor;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VLINK = "vlink"; // %bodycolor;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ALINK = "alink"; // %bodycolor;
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VERSION = "version"; // HTML
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PROFILE = "profile"; // HEAD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONLOAD = "onload"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONUNLOAD = "onunload"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BACKGROUND = "background"; // BODY,
- // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SRC = "src"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_ALT = "alt"; // IMG,AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LONGDESC = "longdesc"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NAME = "name"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_HEIGHT = "height"; // IMG, TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_WIDTH = "width"; // IMG, TABLE,HR
- // //$NON-NLS-1$
- public static final String ATTR_NAME_USEMAP = "usemap"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ISMAP = "ismap"; // IMG //$NON-NLS-1$
- public static final String ATTR_NAME_ALIGN = "align"; // IMG, TABLE,HR
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BORDER = "border"; // IMG, TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_HSPACE = "hspace"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VSPACE = "vspace"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MAPFILE = "mapfile"; // IMG
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SUMMARY = "summary"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_FRAME = "frame"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_RULES = "rules"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CELLSPACING = "cellspacing"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CELLPADDING = "cellpadding"; // TABLE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DATAPAGESIZE = "datapagesize"; // TABLE,HR
- // //$NON-NLS-1$
- public static final String ATTR_NAME_COLOR = "color"; // BASEFONT,FONT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_FACE = "face"; // BASEFONT,FONT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SIZE = "size"; // BASEFONT,FONT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CLEAR = "clear"; // BR //$NON-NLS-1$
- public static final String ATTR_NAME_SHAPE = "shape"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_COORDS = "coords"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_HREF = "href"; // AREA //$NON-NLS-1$
- public static final String ATTR_NAME_TARGET = "target"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NOHREF = "nohref"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TABINDEX = "tabindex"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ACCESSKEY = "accesskey"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONFOCUS = "onfocus"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONBLUR = "onblur"; // AREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CHARSET = "charset"; // LINK
- // //$NON-NLS-1$
- public static final String ATTR_NAME_HREFLANG = "hreflang"; // LINK
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TYPE = "type"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_REL = "rel"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_REV = "rev"; // LINK //$NON-NLS-1$
- public static final String ATTR_NAME_MEDIA = "media"; // LINK
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VALUE = "value"; // PARAM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VALUETYPE = "valuetype"; // PARAM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NOSHADE = "noshade"; // HR
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CHECKED = "checked"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DISABLED = "disabled"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_READONLY = "readonly"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MAXLENGTH = "maxlength"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONSELECT = "onselect"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONCHANGE = "onchange"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ACCEPT = "accept"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ISTYLE = "istyle"; // INPUT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CHAR = "char"; // COL //$NON-NLS-1$
- public static final String ATTR_NAME_CHAROFF = "charoff"; // COL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VALIGN = "valign"; // COL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SPAN = "span"; // COL //$NON-NLS-1$
- public static final String ATTR_NAME_FRAMEBORDER = "frameborder"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MARGINWIDTH = "marginwidth"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MARGINHEIGHT = "marginheight"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NORESIZE = "noresize"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLING = "scrolling"; // FRAME
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PROMPT = "prompt"; // ISINDEX
- // //$NON-NLS-1$
- public static final String ATTR_NAME_HTTP_EQUIV = "http-equiv"; // META
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CONTENT = "content"; // META
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCHEME = "scheme"; // META
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ERRMSG = "errmsg"; // ssi:config
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SIZEFMT = "sizefmt"; // ssi:config
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TIMEFMT = "timefmt"; // ssi:config
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VAR = "var"; // ssi:echo
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CGI = "cgi"; // ssi:exec
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CMD = "cmd"; // ssi:exec
- // //$NON-NLS-1$
- public static final String ATTR_NAME_FILE = "file"; // ssi:fsize
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VIRTUAL = "virtual"; // ssi:fsize
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SELECTED = "selected"; // OPTION
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LABEL = "label"; // OPTION
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ROWS = "rows"; // TEXTAREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_COLS = "cols"; // TEXTAREA
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LANGUAGE = "language"; // SCRIPT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DEFER = "defer"; // SCRIPT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_EVENT = "event"; // SCRIPT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_FOR = "for"; // SCRIPT //$NON-NLS-1$
- public static final String ATTR_NAME_COMPACT = "compact"; // OL/UL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_START = "start"; // OL/UL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DIRECTKEY = "directkey"; // A
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CODEBASE = "codebase"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ARCHIVE = "archive"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CODE = "code"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_OBJECT = "object"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MAYSCRIPT = "mayscript"; // APPLET
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CITE = "cite"; // BLOCKQUOTE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MACRO = "macro"; // D2W //$NON-NLS-1$
- public static final String ATTR_NAME_DATETIME = "datetime"; // INS/DEL
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LOOP = "loop"; // EMBED //$NON-NLS-1$
- public static final String ATTR_NAME_HIDDEN = "hidden"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_VOLUME = "volume"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOSTART = "autostart"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOPLAY = "autoplay"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOSIZE = "autosize"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CONTROLLER = "controller";// EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCALE = "scale"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SHOWCONTROLS = "showcontrols";// EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PLAYCOUNT = "playcount"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_REPEAT = "repeat"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PANEL = "panel"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_PALETTE = "palette"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TEXTFOCUS = "textfocus"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ACTION = "action"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_METHOD = "method"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ENCTYPE = "enctype"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONSUBMIT = "onsubmit"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ONRESET = "onreset"; // FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ACCEPT_CHARSET = "accept-charset";// FORM
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BEHAVIOR = "behavior"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DIRECTION = "direction"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLAMOUNT = "scrollamount";// MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCROLLDELAY = "scrolldelay";// MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_TRUESPEED = "truespeed"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DECLARE = "declare"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CLASSID = "classid"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_DATA = "data"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_CODETYPE = "codetype"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_STANDBY = "standby"; // OBJECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_MULTIPLE = "multiple"; // SELECT
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ABBR = "abbr"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_AXIS = "axis"; // TH/TD //$NON-NLS-1$
- public static final String ATTR_NAME_HEADERS = "headers"; // TH/TD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_SCOPE = "scope"; // TH/TD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_ROWSPAN = "rowspan"; // TH/TD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_COLSPAN = "colspan"; // TH/TD
- // //$NON-NLS-1$
- public static final String ATTR_NAME_NOWRAP = "nowrap"; // TH/TD
- // //$NON-NLS-1$
- // <<D205514
- public static final String ATTR_NAME_TOPMARGIN = "topmargin"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BOTTOMMARGIN = "bottommargin"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_LEFTMARGIN = "leftmargin"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_RIGHTMARGIN = "rightmargin"; // BODY
- // //$NON-NLS-1$
- public static final String ATTR_NAME_BORDERCOLOR = "bordercolor"; // TABLE/TR/TH/TD/FRAMESET/FRAME
- // //$NON-NLS-1$
- // for WML
- public static final String WML_ATTR_NAME_TITLE = "title"; // card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_DOMAIN = "domain"; // access
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_PATH = "path"; // access
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONENTERFORWARD = "onenterforward"; // template,card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONENTERBACKWARD = "onenterbackward"; // template,card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONPICK = "onpick"; // option
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ONTIMER = "ontimer"; // template,card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_NEWCONTEXT = "newcontext"; // card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ORDERED = "ordered"; // card
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_OPTIONAL = "optional"; // do
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_CACHE_CONTROL = "cache-control"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_SENDREFERER = "sendreferer"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_METHOD = "method"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ENCTYPE = "enctype"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_ACCEPT_CHARSET = "accept-charset"; // go
- // //$NON-NLS-1$
- public static final String WML_ATTR_NAME_COLUMNS = "columns"; // table
- // //$NON-NLS-1$
- // D205514
- //<<D215684
- public static final String ATTR_NAME_FRAMESPACING = "framespacing"; // FRAMESET
- // //$NON-NLS-1$
- //D215684
- // global attribute values; mainly used in enumeration.
- public static final String ATTR_VALUE_VERSION_TRANSITIONAL = "-//W3C//DTD HTML 4.01 Transitional//EN"; //$NON-NLS-1$
- public static final String ATTR_VALUE_VERSION_FRAMESET = "-//W3C//DTD HTML 4.01 Frameset//EN"; //$NON-NLS-1$
- public static final String ATTR_VALUE_LTR = "ltr"; // dir //$NON-NLS-1$
- public static final String ATTR_VALUE_RTL = "rtl"; // dir //$NON-NLS-1$
- // for align (top|middle|bottom|left|right)
- public static final String ATTR_VALUE_TOP = "top"; // align //$NON-NLS-1$
- public static final String ATTR_VALUE_MIDDLE = "middle"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BOTTOM = "bottom"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_LEFT = "left"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_CENTER = "center"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_RIGHT = "right"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_JUSTIFY = "justify"; // align
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_CHAR = "char"; // align
- // //$NON-NLS-1$
- // for valign (baseline)
- public static final String ATTR_VALUE_BASELINE = "baseline"; // valign
- // //$NON-NLS-1$
- // for clear (left|all|right|none): left and right are already defined
- // above.
- public static final String ATTR_VALUE_ALL = "all"; // clear //$NON-NLS-1$
- public static final String ATTR_VALUE_NONE = "none"; // clear
- // //$NON-NLS-1$
- // for shape (rect|circle|poly|default)
- public static final String ATTR_VALUE_RECT = "rect"; // shape
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_CIRCLE = "circle"; // shape
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_POLY = "poly"; // shape
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_DEFAULT = "default"; // shape
- // //$NON-NLS-1$
- // for valuetype (data|ref|object)
- public static final String ATTR_VALUE_DATA = "data"; // valuetype
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_REF = "ref"; // valuetype
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_OBJECT = "object"; // valuetype
- // //$NON-NLS-1$
- // for type of INPUT
- // (text | password | checkbox | radio | submit | reset |
- // file | hidden | image | button)
- public static final String ATTR_VALUE_TEXT = "text"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_PASSWORD = "password"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_CHECKBOX = "checkbox"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_RADIO = "radio"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_SUBMIT = "submit"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_RESET = "reset"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_FILE = "file"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_HIDDEN = "hidden"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_IMAGE = "image"; // INPUT:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BUTTON = "button"; // INPUT:type
- // //$NON-NLS-1$
- // for span, colspan, rowspan
- public static final String ATTR_VALUE_1 = "1"; // span //$NON-NLS-1$
- // for frameborder
- public static final String ATTR_VALUE_0 = "0"; // FRAME //$NON-NLS-1$
- // for scrolling
- public static final String ATTR_VALUE_YES = "yes"; // FRAME //$NON-NLS-1$
- public static final String ATTR_VALUE_NO = "no"; // FRAME //$NON-NLS-1$
- public static final String ATTR_VALUE_AUTO = "auto"; // FRAME
- // //$NON-NLS-1$
- // for UL
- public static final String ATTR_VALUE_DISC = "disc"; // UL:type
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_SQUARE = "square"; // UL:type
- // //$NON-NLS-1$
- // for frame of TABLE
- public static final String ATTR_VALUE_VOID = "void"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_ABOVE = "above"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BELOW = "below"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_HSIDES = "hsides"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_LHS = "lhs"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_RHS = "rhs"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_VSIDES = "vsides"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BOX = "box"; // TABLE:frame
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_BORDER = "border"; // TABLE:frame
- // //$NON-NLS-1$
- // for rules of TABLE
- public static final String ATTR_VALUE_GROUPS = "groups"; // TABLE:rules
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_ROWS = "rows"; // TEXTAREA
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_COLS = "cols"; // TEXTAREA
- // //$NON-NLS-1$
- // for method of FORM
- public static final String ATTR_VALUE_GET = "get"; // FORM //$NON-NLS-1$
- public static final String ATTR_VALUE_POST = "post"; // FORM //$NON-NLS-1$
- public static final String ATTR_VALUE_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"; //$NON-NLS-1$
- // for scope of (TH | TD)
- public static final String ATTR_VALUE_ROW = "row"; // (TH|TD):scope
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_COL = "col"; // (TH|TD):scope
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_ROWGROUP = "rowgroup";// (TH|TD):scope
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_COLGROUP = "colgroup";// (TH|TD):scope
- // //$NON-NLS-1$
- // for auto?? of EMBED
- public static final String ATTR_VALUE_TRUE = "true"; // EMBED
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_FALSE = "false"; // EMBED
- // //$NON-NLS-1$
- // for behaviro of MARQUEE
- public static final String ATTR_VALUE_SCROLL = "scroll"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_SLIDE = "slide"; // MARQUEE
- // //$NON-NLS-1$
- public static final String ATTR_VALUE_ALTERNATE = "alternate"; // MARQUEE
- // //$NON-NLS-1$
- // for direction of MARQUEE
- public static final String ATTR_VALUE_UP = "up"; // MARQUEE //$NON-NLS-1$
- public static final String ATTR_VALUE_DOWN = "down"; // MARQUEE
- // //$NON-NLS-1$
- // for type of LI (D19924)
- public static final String ATTR_VALUE_NUMBER = "1"; // LI //$NON-NLS-1$
- public static final String ATTR_VALUE_LOWER_ALPHA = "a"; // LI
- // //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/CSSNodeAdapter.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/CSSNodeAdapter.java
deleted file mode 100644
index 1e449057a4..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/CSSNodeAdapter.java
+++ /dev/null
@@ -1,593 +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.wst.css.ui.internal.contentoutline;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSMediaRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
-import org.eclipse.wst.css.ui.internal.image.CSSImageHelper;
-import org.eclipse.wst.css.ui.internal.image.CSSImageType;
-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.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapterFactory;
-import org.w3c.dom.css.CSSImportRule;
-import org.w3c.dom.css.CSSRule;
-import org.w3c.dom.stylesheets.MediaList;
-
-/**
- * Adapts the CSS DOM node to a JFace viewer.
- */
-class CSSNodeAdapter implements IJFaceNodeAdapter, INodeAdapter, Runnable {
- class NotifyContext {
- NotifyContext(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- this.notifier = notifier;
- this.eventType = eventType;
- this.changedFeature = changedFeature;
- this.oldValue = oldValue;
- this.newValue = newValue;
- this.pos = pos;
- }
-
- void fire() {
- internalNotifyChanged(notifier, eventType, changedFeature, oldValue, newValue, pos);
- }
-
- INodeNotifier notifier;
- int eventType;
- Object changedFeature;
- Object oldValue;
- Object newValue;
- int pos;
- }
-
- class StyleViewUpdater implements Runnable {
- public void run() {
- if (lastUpdater == this) {
- internalActionPerformed();
- lastUpdater = null;
- }
- }
- }
-
- protected INodeAdapterFactory adapterFactory;
- private Vector notifyQueue;
- StyleViewUpdater lastUpdater;
- protected int delayMSecs = 500;
- final static Class ADAPTER_KEY = IJFaceNodeAdapter.class;
-
- public CSSNodeAdapter(INodeAdapterFactory adapterFactory) {
- super();
- this.adapterFactory = adapterFactory;
- }
-
- /**
- * Insert the method's description here.
- */
- protected void internalActionPerformed() {
- if (notifyQueue == null) {
- return;
- }
- boolean refresh_all = false;
- boolean refresh_rule = false;
- int pos_all = 0;
- List targets = new ArrayList();
- for (int i = 0; i < notifyQueue.size(); i++) {
- NotifyContext context = (NotifyContext) notifyQueue.get(i);
- if (context.notifier instanceof ICSSStyleSheet) {
- refresh_all = true;
- pos_all = i;
- }
- if (context.notifier instanceof ICSSStyleDeclaration) {
- refresh_rule = true;
- targets.add(context);
- // pos_rule = i;
- }
- // ((NotifyContext) notifyQueue.get(i)).fire();
- }
- if (refresh_all) {
- ((NotifyContext) notifyQueue.get(pos_all)).fire();
- }
- else if (refresh_rule) {
- Iterator i = targets.iterator();
- while (i.hasNext()) {
- ((NotifyContext) i.next()).fire();
- }
- // else if (refresh_rule) internalRefreshAll();
- }
- else {
- for (int i = 0; i < notifyQueue.size(); i++) {
- ((NotifyContext) notifyQueue.get(i)).fire();
- }
- }
- notifyQueue.clear();
- }
-
- /**
- * Called by the object being adapter (the notifier) when something has
- * changed.
- */
- public void internalNotifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- Iterator iterator = ((IJFaceNodeAdapterFactory) adapterFactory).getListeners().iterator();
- while (iterator.hasNext()) {
- Object listener = iterator.next();
- if (listener instanceof StructuredViewer) {
- notifyChangedForStructuredViewer((StructuredViewer) listener, notifier, eventType, changedFeature, oldValue, newValue, pos);
- }
- else if (listener instanceof PropertySheetPage) {
- notifyChangedForPropertySheetPage((PropertySheetPage) listener, notifier, eventType, changedFeature, oldValue, newValue, pos);
- }
- }
- }
-
- private void notifyChangedForPropertySheetPage(PropertySheetPage page, INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (page.getControl() == null || page.getControl().isDisposed()) {
- return;
- }
- if (eventType == INodeNotifier.CHANGE || eventType == INodeNotifier.ADD || eventType == INodeNotifier.REMOVE) {
- page.refresh();
- }
- }
-
- private void notifyChangedForStructuredViewer(StructuredViewer viewer, INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (viewer.getControl() == null || viewer.getControl().isDisposed()) {
- return;
- }
- if (eventType == INodeNotifier.CHANGE) {
- if (notifier instanceof ICSSStyleSheet) {
- ICSSNode temp = (changedFeature != null) ? (ICSSNode) changedFeature : (ICSSNode) newValue;
- if (temp instanceof ICSSStyleRule) {
- viewer.refresh();
- }
- else {
- for (;;) {
- if (temp instanceof ICSSStyleRule) {
- break;
- }
- temp = temp.getParentNode();
- if (temp == null) {
- break;
- }
- }
- if (temp == null || temp instanceof ICSSStyleSheet) {
- viewer.refresh();
- }
- else {
- viewer.refresh(temp);
- }
- }
- }
- else {
- ICSSNode temp = (ICSSNode) notifier;
- if (temp != null) {
- temp = temp.getParentNode();
- }
- if (temp == null || temp instanceof ICSSStyleSheet) {
- viewer.refresh();
- }
- else {
- viewer.refresh(temp);
- }
- }
- }
- if (eventType == INodeNotifier.ADD) {
- if (notifier instanceof ICSSStyleSheet) {
- ICSSNode temp = (changedFeature != null) ? (ICSSNode) changedFeature : (ICSSNode) newValue;
- if (temp instanceof ICSSStyleRule) {
- viewer.refresh();
- }
- else {
- for (;;) {
- if (temp instanceof ICSSStyleRule) {
- break;
- }
- temp = temp.getParentNode();
- if (temp == null) {
- break;
- }
- }
- }
- if (temp == null || (temp instanceof ICSSStyleSheet)) {
- viewer.refresh();
- }
- else {
- viewer.refresh(temp);
- }
- }
- else {
- if (newValue != null && (newValue instanceof ICSSStyleDeclItem)) {
- viewer.refresh(((ICSSNode) newValue).getParentNode());
- }
- else {
- ICSSNode temp = (ICSSNode) notifier;
- if (temp != null) {
- temp = temp.getParentNode();
- }
- if (temp == null || (temp instanceof ICSSStyleSheet)) {
- viewer.refresh();
- }
- else {
- viewer.refresh(temp);
- }
- }
- }
- }
- else if (eventType == INodeNotifier.REMOVE) {
- if (notifier instanceof ICSSStyleSheet) {
- ICSSNode temp = (changedFeature != null) ? (ICSSNode) changedFeature : (ICSSNode) newValue;
- if (temp instanceof ICSSStyleRule) {
- viewer.refresh();
- }
- else {
- for (;;) {
- if (temp instanceof ICSSStyleRule) {
- break;
- }
- temp = temp.getParentNode();
- if (temp == null) {
- break;
- }
- }
- if (temp == null || (temp instanceof ICSSStyleSheet)) {
- viewer.refresh();
- }
- else {
- viewer.refresh(temp);
- }
- }
- }
- else {
- // viewer.refresh(notifier);
- ICSSNode temp = (ICSSNode) notifier;
- if (temp != null) {
- temp = temp.getParentNode();
- }
- if (temp == null || (temp instanceof ICSSStyleSheet)) {
- viewer.refresh();
- }
- else {
- viewer.refresh(temp);
- }
- }
- }
- // }
- }
-
- /**
- *
- */
- public void internalRefreshAll() {
- Collection listeners = ((JFaceNodeAdapterFactoryCSS) adapterFactory).getListeners();
- Iterator iterator = listeners.iterator();
- while (iterator.hasNext()) {
- Object listener = iterator.next();
- if (listener instanceof StructuredViewer) {
- StructuredViewer viewer = (StructuredViewer) listener;
- if (viewer.getControl() != null && !viewer.getControl().isDisposed()) {
- viewer.refresh();
- }
- }
- else if (listener instanceof PropertySheetPage) {
- PropertySheetPage page = (PropertySheetPage) listener;
- if (page.getControl() != null && !page.getControl().isDisposed()) {
- page.refresh();
- }
- }
- }
- }
-
- /**
- * Allowing the INodeAdapter to compare itself against the type allows it
- * to return true in more than one case.
- */
- public boolean isAdapterForType(Object type) {
- return type.equals(ADAPTER_KEY);
- }
-
- /**
- * Called by the object being adapter (the notifier) when something has
- * changed.
- */
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (notifyQueue == null)
- notifyQueue = new Vector();
- notifyQueue.add(new NotifyContext(notifier, eventType, changedFeature, oldValue, newValue, pos));
- // TODO-future: there's probably a better way than relying on async
- // exec
- if (Thread.currentThread() == getDisplay().getThread())
- getDisplay().timerExec(delayMSecs, this);
- else
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (getDisplay() != null) {
- getDisplay().timerExec(delayMSecs, this);
- }
- }
- });
- }
-
- Display getDisplay() {
- return PlatformUI.getWorkbench().getDisplay();
- }
-
- /**
- * this method is intended only for timerExec()
- */
- public void run() {
- lastUpdater = new StyleViewUpdater();
- getDisplay().asyncExec(lastUpdater);
- }
-
- /**
- * Returns an enumeration containing all child nodes of the given element,
- * which represents a node in a tree. The difference to
- * <code>IStructuredContentProvider.getElements(Object)</code> is as
- * follows: <code>getElements</code> is called to obtain the tree
- * viewer's root elements. Method <code>getChildren</code> is used to
- * obtain the children of a given node in the tree, which can can be a
- * root node, too.
- */
- public Object[] getChildren(Object object) {
- if (object instanceof ICSSNode) {
- ICSSNode node = (ICSSNode) object;
-
- short nodeType = node.getNodeType();
- if (nodeType == ICSSNode.STYLERULE_NODE || nodeType == ICSSNode.PAGERULE_NODE || nodeType == ICSSNode.FONTFACERULE_NODE) {
- for (node = node.getFirstChild(); node != null && !(node instanceof ICSSStyleDeclaration); node.getNextSibling()) {
- // nop
- }
- }
- List children = new ArrayList();
- ICSSNode child = (node != null) ? node.getFirstChild() : null;
- while (child != null) {
- if (!(child instanceof ICSSPrimitiveValue) && !(child instanceof MediaList)) {
- children.add(child);
- }
- /*
- * Required to correctly connect the refreshing behavior to
- * the tree
- */
- if (child instanceof INodeNotifier) {
- ((INodeNotifier) child).getAdapterFor(IJFaceNodeAdapter.class);
- }
- child = child.getNextSibling();
- }
- return children.toArray();
- }
- return new Object[0];
- }
-
- /**
- * Returns an enumeration with the elements belonging to the passed
- * element. These elements can be presented as rows in a table, items in a
- * list etc.
- */
- public Object[] getElements(Object object) {
- // The root is usually an instance of an XMLStructuredModel in
- // which case we want to extract the document.
-
- if (object instanceof ICSSModel) {
- ArrayList v = new ArrayList();
- // internalGetElements(object, v);
- addElements(object, v);
- Object[] elements = v.toArray();
-
- for (int i = 0; i < elements.length; i++) {
- /*
- * Required to correctly connect the refreshing behavior to
- * the tree
- */
- if (elements[i] instanceof INodeNotifier) {
- ((INodeNotifier) elements[i]).getAdapterFor(IJFaceNodeAdapter.class);
- }
- }
-
- return elements;
- }
- return new Object[0];
-
- }
-
- /**
- * Returns the image for the label of the given element, for use in the
- * given viewer.
- *
- * @param viewer
- * The viewer that displays the element.
- * @param element
- * The element for which to provide the label image. Element
- * can be <code>null</code> indicating no input object is set
- * to the viewer.
- */
- public Image getLabelImage(Object element) {
- if (element instanceof ICSSNode) {
- CSSImageHelper helper = CSSImageHelper.getInstance();
- return helper.getImage(CSSImageType.getImageType((ICSSNode) element));
- // Image image = getCSSNodeImage(element);
- // return image;
- // return getAdapter(element).getLabelImage((ICSSNode) element);
- }
- return null;
- }
-
- /**
- * Returns the text for the label of the given element, for use in the
- * given viewer.
- *
- * @param viewer
- * The viewer that displays the element.
- * @param element
- * The element for which to provide the label text. Element can
- * be <code>null</code> indicating no input object is set to
- * the viewer.
- */
- public String getLabelText(Object element) {
- // This was returning null, on occasion ... probably should not be,
- // but
- // took the quick and easy way out for now. (dmw 3/8/01)
-
- String result = "";//$NON-NLS-1$
- String mediaText;
- if (element instanceof ICSSNode) {
- switch (((ICSSNode) element).getNodeType()) {
- case ICSSNode.STYLERULE_NODE :
- result = ((ICSSStyleRule) element).getSelectors().getString();
- break;
- case ICSSNode.FONTFACERULE_NODE :
- result = "@font-face";//$NON-NLS-1$
- break;
- case ICSSNode.IMPORTRULE_NODE :
- result = ((CSSImportRule) element).getHref();
- mediaText = getMediaText((CSSImportRule) element);
- if (mediaText != null && 0 < mediaText.length()) {
- result += " (" + mediaText + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- break;
- case ICSSNode.PAGERULE_NODE :
- result = "@page";//$NON-NLS-1$
- break;
- case ICSSNode.STYLEDECLARATION_NODE :
- result = "properties";//$NON-NLS-1$
- break;
- case ICSSNode.STYLEDECLITEM_NODE :
- result = ((ICSSStyleDeclItem) element).getPropertyName();
- break;
- case ICSSNode.PRIMITIVEVALUE_NODE :
- result = ((ICSSPrimitiveValue) element).getStringValue();
- break;
- case ICSSNode.MEDIARULE_NODE :
- result = "@media";//$NON-NLS-1$
- mediaText = getMediaText((ICSSMediaRule) element);
- if (mediaText != null && 0 < mediaText.length()) {
- result += " (" + mediaText + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- break;
- case ICSSNode.CHARSETRULE_NODE :
- result = "@charset";//$NON-NLS-1$
- break;
- case ICSSNode.MEDIALIST_NODE :
- result = ((MediaList) element).getMediaText();
- break;
- default :
- break;
- }
- }
-
- // if (element instanceof ICSSNode) {
- // ICSSNode node = ((ICSSNode)element);
- // result = getAdapter(element).getLabelText((ICSSNode) element);
- // }
- return result;
- }
-
- /**
- * Returns the parent for the given element. This method can return
- * <code>null</code> indicating that the parent can't be computed. In
- * this case the tree viewer can't expand a given node correctly if
- * requested.
- */
- public Object getParent(Object object) {
- if (object instanceof ICSSNode) {
- ICSSNode node = ((ICSSNode) object).getParentNode();
- if (node != null && node.getNodeType() == ICSSNode.STYLEDECLARATION_NODE) {
- /*
- * Required to also correctly connect style declaration to the
- * refreshing behavior in the tree
- */
- if (node instanceof INodeNotifier) {
- ((INodeNotifier) node).getAdapterFor(IJFaceNodeAdapter.class);
- }
- node = node.getParentNode();
- }
- return node;
- }
- return null;
- }
-
- /**
- * Returns <code>true</code> if the given element has children.
- * Otherwise <code>false</code> is returned.
- */
- public boolean hasChildren(Object object) {
- // return getAdapter(object).hasChildren((ICSSNode) object);
- if (object instanceof ICSSNode) {
- /*
- * Required to correctly connect the refreshing behavior to the
- * tree
- */
- if (object instanceof INodeNotifier) {
- ((INodeNotifier) object).getAdapterFor(IJFaceNodeAdapter.class);
- }
-
- if (object instanceof ICSSStyleDeclItem)
- return false;
- else
- return ((ICSSNode) object).hasChildNodes();
- }
- return false;
- }
-
- private void addElements(Object element, ArrayList v) {
-
- ICSSNode node;
-
- if (element instanceof ICSSModel) {
- ICSSModel model = (ICSSModel) element;
- ICSSDocument doc = model.getDocument();
- node = doc.getFirstChild();
- }
- else if (element instanceof ICSSNode) {
- node = ((ICSSNode) element).getFirstChild();
- }
- else
- return;
-
- while (node != null) {
- if (node instanceof CSSRule) {
- v.add(node);
- }
-
- node = node.getNextSibling();
- }
-
- }
-
- private String getMediaText(CSSRule rule) {
- String result = ""; //$NON-NLS-1$
- ICSSNode child = (rule != null) ? ((ICSSNode) rule).getFirstChild() : null;
- while (child != null) {
- if (child.getNodeType() == ICSSNode.MEDIALIST_NODE) {
- result = ((MediaList) child).getMediaText();
- break;
- }
- child = child.getNextSibling();
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/JFaceNodeAdapterFactoryCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/JFaceNodeAdapterFactoryCSS.java
deleted file mode 100644
index d87e8ee4ea..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/JFaceNodeAdapterFactoryCSS.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.wst.css.ui.internal.contentoutline;
-
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeAdapterFactory;
-
-public class JFaceNodeAdapterFactoryCSS extends JFaceNodeAdapterFactory {
- public JFaceNodeAdapterFactoryCSS() {
- this(IJFaceNodeAdapter.class, true);
- }
-
- public JFaceNodeAdapterFactoryCSS(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
-
- protected INodeAdapter createAdapter(INodeNotifier node) {
- if (singletonAdapter == null) {
- // create the JFaceNodeAdapter
- singletonAdapter = new CSSNodeAdapter(this);
- }
- return singletonAdapter;
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ContentSettingsRegistry.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ContentSettingsRegistry.java
deleted file mode 100644
index 87155f00aa..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ContentSettingsRegistry.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
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentproperties;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfile;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfileRegistry;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.sse.ui.internal.contentproperties.ui.ComboList;
-
-/**
- * @deprecated This class only contains helper methods that you should
- * actually implement yourself.
- */
-public final class ContentSettingsRegistry {
- private static final String NONE = CSSUIMessages.UI_none;
-
- public static void setCSSMetaModelRegistryInto(ComboList combo) {
- combo.add(NONE, ""); //$NON-NLS-1$
- CSSProfileRegistry reg = CSSProfileRegistry.getInstance();
- Iterator i = reg.getProfiles();
- while (i.hasNext()) {
- CSSProfile profile = (CSSProfile) i.next();
- String id = profile.getProfileID();
- String name = profile.getProfileName();
- combo.add(name, id);
- }
- combo.sortByKey(1);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ui/CSSContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ui/CSSContentSettingsPropertyPage.java
deleted file mode 100644
index 47f0f07cb5..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ui/CSSContentSettingsPropertyPage.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.wst.css.ui.internal.contentproperties.ui;
-
-
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.css.ui.internal.Logger;
-import org.eclipse.wst.css.ui.internal.contentproperties.ContentSettingsRegistry;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.internal.contentproperties.IContentSettings;
-import org.eclipse.wst.sse.ui.internal.contentproperties.ui.ComboListOnPropertyPage;
-import org.eclipse.wst.sse.ui.internal.contentproperties.ui.ContentSettingsPropertyPage;
-
-/**
- * @deprecated Use CSSWebContentSettingsPropertyPage instead
- */
-public final class CSSContentSettingsPropertyPage extends ContentSettingsPropertyPage {
-
- private final int N_CSS_PROFILE = 0;
-
-
-
- public CSSContentSettingsPropertyPage() {
- super();
- numberOfCombo = 1;
- numCols = 2;
- numRows = 1;
- combo = new ComboListOnPropertyPage[super.numberOfCombo];
-
- }
-
- protected void createCSSComboBox() {
- super.combo[N_CSS_PROFILE] = super.createComboBoxOf(CSS_LABEL);
- ContentSettingsRegistry.setCSSMetaModelRegistryInto(combo[N_CSS_PROFILE]);
- if (combo[N_CSS_PROFILE].getItemCount() <= 0)
- return;
- String initValue = contentSettings.getProperty((IResource) super.getElement(), IContentSettings.CSS_PROFILE);
- // when either .contentsettings or element doesn't exist
- // when attribute doesn't exists,getProperty returns empty string.
- if (initValue == null)
- initValue = ""; //$NON-NLS-1$
- // set init selectionItem in Combo
- super.setSelectionItem(combo[N_CSS_PROFILE], initValue);
- }
-
-
-
- protected void createSettingsPageGUI() {
-
- int type = ((IResource) getElement()).getType();
- switch (type) {
- case IResource.FILE :
- //composite = createComposite(propertyPage,numCols,numRows);
- createCSSComboBox();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(propertyPage, IHelpContextIds.CSS_CONTENT_SETTINGS_HELPID);
- break;
-
- default :
- Logger.log(Logger.WARNING, "CSSContentSettingsPropertyPage is instantiated by resource except FILE");//$NON-NLS-1$
- break;
- }
-
- }
-
-
- protected void putSelectedPropertyInto(Map properties, String valueInCombo, int index) {
-
- switch (index) {
- case N_CSS_PROFILE :
- // css
- properties.put(IContentSettings.CSS_PROFILE, valueInCombo);
- break;
- default :
- Logger.log(Logger.ERROR, "Index is out of range in putSelectedPropertyInto() in class CSSContentSettingsPropertyPage");//$NON-NLS-1$
- break;
- }
-
- }
-
- protected void deleteNoneProperty(int index) {
- switch (index) {
- case N_CSS_PROFILE :
- // css
- contentSettings.deleteProperty((IResource) super.getElement(), IContentSettings.CSS_PROFILE);
- break;
-
- default :
- Logger.log(Logger.ERROR, "Index is out of range in deleteNoneProperty() in class CSSContentSettingsPropertyPage");//$NON-NLS-1$
- break;
- }
- }
-
-}
-
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ui/CSSWebContentSettingsPropertyPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ui/CSSWebContentSettingsPropertyPage.java
deleted file mode 100644
index 7e1dff427e..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ui/CSSWebContentSettingsPropertyPage.java
+++ /dev/null
@@ -1,156 +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
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- ****************************************************************************/
-package org.eclipse.wst.css.ui.internal.contentproperties.ui;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.Dialog;
-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;
-import org.eclipse.wst.css.core.internal.contentproperties.CSSContentProperties;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfile;
-import org.eclipse.wst.css.core.internal.metamodel.CSSProfileRegistry;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.css.ui.internal.Logger;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-
-public final class CSSWebContentSettingsPropertyPage extends PropertyPage {
- private static final String SELECT_NONE = CSSUIMessages.UI_none;
-
- private Combo fProfileCombo;
- private List fProfileIds;
-
- public CSSWebContentSettingsPropertyPage() {
- super();
- setDescription(CSSUIMessages.CSSContentSettingsPropertyPage_0);
- }
-
- 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);
-
- // CSS Profile control
- Text languageLabel = new Text(propertyPage, SWT.READ_ONLY);
- languageLabel.setText(CSSUIMessages.CSSContentSettingsPropertyPage_1);
- fProfileCombo = new Combo(propertyPage, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL, GridData.FILL, true, false);
- data.horizontalIndent = 0;
- fProfileCombo.setLayoutData(data);
-
- populateValues();
- initializeValues();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(propertyPage, IHelpContextIds.CSS_CONTENT_SETTINGS_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;
- if (getElement() instanceof IResource) {
- resource = (IResource) getElement();
- }
- return resource;
- }
-
- private void initializeValues() {
- int index = 0;
- String profile = CSSContentProperties.getProperty(CSSContentProperties.CSS_PROFILE, getResource(), false);
- if (profile != null && profile.length() > 0) {
- /*
- * If item is already part of combo, select it. Otherwise, select
- * none.
- */
- index = fProfileIds.indexOf(profile);
- }
- index = index >= 0 ? index : 0;
- fProfileCombo.select(index);
- }
-
- private void populateValues() {
- fProfileIds = new ArrayList();
- // add none first
- fProfileCombo.add(SELECT_NONE);
- fProfileIds.add(null);
-
- CSSProfileRegistry reg = CSSProfileRegistry.getInstance();
- Iterator i = reg.getProfiles();
- while (i.hasNext()) {
- CSSProfile profile = (CSSProfile) i.next();
- String id = profile.getProfileID();
- String name = profile.getProfileName();
- fProfileCombo.add(name);
- fProfileIds.add(id);
- }
- }
-
- protected void performDefaults() {
- int index = fProfileCombo.indexOf(SELECT_NONE);
- if (index > -1)
- fProfileCombo.select(index);
-
- super.performDefaults();
- }
-
- public boolean performOk() {
- int index = fProfileCombo.getSelectionIndex();
- if (index > -1) {
- String id = (String) fProfileIds.get(index);
- if (id == null || id.length() == 0 || id.equalsIgnoreCase(SELECT_NONE)) {
- // if none, use null
- id = null;
- }
- try {
- CSSContentProperties.setProperty(CSSContentProperties.CSS_PROFILE, getResource(), id);
- }
- 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.wst.css.ui/src/org/eclipse/wst/css/ui/internal/edit/ui/CleanupActionCSSDelegate.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/edit/ui/CleanupActionCSSDelegate.java
deleted file mode 100644
index 1f2d6d07da..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/edit/ui/CleanupActionCSSDelegate.java
+++ /dev/null
@@ -1,134 +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.wst.css.ui.internal.edit.ui;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.custom.BusyIndicator;
-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.texteditor.ITextEditor;
-import org.eclipse.wst.css.core.internal.cleanup.CleanupProcessorCSS;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupProcessor;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
-
-/**
- * Cleanup action delegate for CSS editor
- */
-public class CleanupActionCSSDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate {
- private IEditorPart fEditor;
- private IStructuredCleanupProcessor fCleanupProcessor;
-
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- fEditor = targetEditor;
- }
-
- public void dispose() {
- // nulling out just in case
- fEditor = null;
- fCleanupProcessor = null;
- }
-
- public void init(IAction action) {
- if (action != null) {
- action.setText(CSSUIMessages.CleanupDocument_label);
- action.setToolTipText(CSSUIMessages.CleanupDocument_tooltip);
- action.setDescription(CSSUIMessages.CleanupDocument_description);
- }
- }
-
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- public void init(IViewPart view) {
- // do nothing
- }
-
- public void run(IAction action) {
- if (fEditor instanceof ITextEditor) {
- final ITextEditor editor = (ITextEditor) fEditor;
- Dialog cleanupDialog = new CleanupDialogCSS(editor.getSite().getShell());
- if (cleanupDialog.open() == Window.OK) {
- // setup runnable
- Runnable runnable = new Runnable() {
- public void run() {
- IStructuredCleanupProcessor cleanupProcessor = getCleanupProcessor();
- if (cleanupProcessor != null) {
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForEdit(editor.getDocumentProvider().getDocument(editor.getEditorInput()));
- if (model != null)
- cleanupProcessor.cleanupModel(model);
- }
- finally {
- if (model != null)
- model.releaseFromEdit();
- }
- }
- }
- };
-
- // TODO: make independent of 'model'.
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForEdit(editor.getDocumentProvider().getDocument(editor.getEditorInput()));
- if (model != null) {
- // begin recording
- ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
- model.beginRecording(this, SSEUIMessages.Cleanup_Document_UI_, SSEUIMessages.Cleanup_Document_UI_, selection.getOffset(), selection.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
-
- // tell the model that we are about to make a big
- // model change
- model.aboutToChangeModel();
-
- // run
- BusyIndicator.showWhile(fEditor.getEditorSite().getWorkbenchWindow().getShell().getDisplay(), runnable);
- }
- }
- finally {
- if (model != null) {
- // tell the model that we are done with the big
- // model
- // change
- model.changedModel();
-
- // end recording
- ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
- model.endRecording(this, selection.getOffset(), selection.getLength());
- model.releaseFromEdit();
- }
- }
- }
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // do nothing
- }
-
- IStructuredCleanupProcessor getCleanupProcessor() {
- if (fCleanupProcessor == null)
- fCleanupProcessor = new CleanupProcessorCSS();
-
- return fCleanupProcessor;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/edit/ui/CleanupDialogCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/edit/ui/CleanupDialogCSS.java
deleted file mode 100644
index d3007a0421..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/edit/ui/CleanupDialogCSS.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.edit.ui;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-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.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy;
-import org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategyImpl;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-
-public class CleanupDialogCSS extends Dialog {
-
- private boolean embeddedCSS;
- protected Button fRadioButtonIdentCaseAsis;
- protected Button fRadioButtonIdentCaseLower;
- protected Button fRadioButtonIdentCaseUpper;
- protected Button fRadioButtonPropNameCaseAsis;
- protected Button fRadioButtonPropNameCaseLower;
- protected Button fRadioButtonPropNameCaseUpper;
- protected Button fRadioButtonPropValueCaseAsis;
- protected Button fRadioButtonPropValueCaseLower;
- protected Button fRadioButtonPropValueCaseUpper;
- protected Button fRadioButtonSelectorTagCaseAsis;
- protected Button fRadioButtonSelectorTagCaseLower;
- protected Button fRadioButtonSelectorTagCaseUpper;
- protected Button fCheckBoxQuoteValues;
- protected Button fCheckBoxFormatSource;
-
- /**
- * CSSCleanupDialog constructor comment.
- *
- * @param parentShell
- * org.eclipse.swt.widgets.Shell
- */
- public CleanupDialogCSS(Shell parentShell) {
- super(parentShell);
- }
-
- /**
- *
- * @return org.eclipse.swt.widgets.Control
- * @param parent
- * org.eclipse.swt.widgets.Composite
- */
- public Control createDialogArea(Composite parent) {
- if (isEmbeddedCSS())
- getShell().setText(CSSUIMessages.CSS_Cleanup_UI_);
- else
- getShell().setText(CSSUIMessages.Cleanup_UI_);
-
- Composite panel = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.makeColumnsEqualWidth = true;
- panel.setLayout(layout);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(panel, IHelpContextIds.CSS_CLEANUP_HELPID);
-
- // Convert ident case
- // ACC: Group radio buttons together so associated label is read
- // Label identCaseLabel = new Label(panel, SWT.NULL);
- // identCaseLabel.setText(ResourceHandler.getString("Identifier_case__UI_"));
- // //$NON-NLS-1$ = "Identifier case:"
- // Canvas identCase = new Canvas(panel, SWT.NULL);
- Group identCase = new Group(panel, SWT.NULL);
- identCase.setText(CSSUIMessages.Identifier_case__UI_);
- GridLayout hLayout = new GridLayout();
- hLayout.numColumns = 3;
- identCase.setLayout(hLayout);
- fRadioButtonIdentCaseAsis = new Button(identCase, SWT.RADIO);
- fRadioButtonIdentCaseAsis.setText(CSSUIMessages.As_is_UI_);
- fRadioButtonIdentCaseLower = new Button(identCase, SWT.RADIO);
- fRadioButtonIdentCaseLower.setText(CSSUIMessages.Lower_UI_);
- fRadioButtonIdentCaseUpper = new Button(identCase, SWT.RADIO);
- fRadioButtonIdentCaseUpper.setText(CSSUIMessages.Upper_UI_);
-
- // Convert property name case
- // ACC: Group radio buttons together so associated label is read
- // Label propNameCaseLabel = new Label(panel, SWT.NULL);
- // propNameCaseLabel.setText(ResourceHandler.getString("Property_name_case__UI_"));
- // //$NON-NLS-1$ = "Property name case:"
- // Canvas propNameCase = new Canvas(panel, SWT.NULL);
- Group propNameCase = new Group(panel, SWT.NULL);
- propNameCase.setText(CSSUIMessages.Property_name_case__UI_);
- hLayout = new GridLayout();
- hLayout.numColumns = 3;
- propNameCase.setLayout(hLayout);
- fRadioButtonPropNameCaseAsis = new Button(propNameCase, SWT.RADIO);
- fRadioButtonPropNameCaseAsis.setText(CSSUIMessages.As_is_UI_);
- fRadioButtonPropNameCaseLower = new Button(propNameCase, SWT.RADIO);
- fRadioButtonPropNameCaseLower.setText(CSSUIMessages.Lower_UI_);
- fRadioButtonPropNameCaseUpper = new Button(propNameCase, SWT.RADIO);
- fRadioButtonPropNameCaseUpper.setText(CSSUIMessages.Upper_UI_);
-
- // Convert property Value case
- // ACC: Group radio buttons together so associated label is read
- // Label propValueCaseLabel = new Label(panel, SWT.NULL);
- // propValueCaseLabel.setText(ResourceHandler.getString("Property_value_case__UI_"));
- // //$NON-NLS-1$ = "Property value case:"
- // Canvas propValueCase = new Canvas(panel, SWT.NULL);
- Group propValueCase = new Group(panel, SWT.NULL);
- propValueCase.setText(CSSUIMessages.Property_value_case__UI_);
- hLayout = new GridLayout();
- hLayout.numColumns = 3;
- propValueCase.setLayout(hLayout);
- fRadioButtonPropValueCaseAsis = new Button(propValueCase, SWT.RADIO);
- fRadioButtonPropValueCaseAsis.setText(CSSUIMessages.As_is_UI_);
- fRadioButtonPropValueCaseLower = new Button(propValueCase, SWT.RADIO);
- fRadioButtonPropValueCaseLower.setText(CSSUIMessages.Lower_UI_);
- fRadioButtonPropValueCaseUpper = new Button(propValueCase, SWT.RADIO);
- fRadioButtonPropValueCaseUpper.setText(CSSUIMessages.Upper_UI_);
-
- if (!isEmbeddedCSS()) {
- // Convert selector tag case
- // ACC: Group radio buttons together so associated label is read
- // Label selectorTagCaseLabel = new Label(panel, SWT.NULL);
- // selectorTagCaseLabel.setText(ResourceHandler.getString("Selector_tag_name_case__UI_"));
- // //$NON-NLS-1$ = "Selector tag name case:"
- // Canvas selectorTagCase = new Canvas(panel, SWT.NULL);
- Group selectorTagCase = new Group(panel, SWT.NULL);
- selectorTagCase.setText(CSSUIMessages.Selector_tag_name_case__UI_);
- hLayout = new GridLayout();
- hLayout.numColumns = 3;
- selectorTagCase.setLayout(hLayout);
- fRadioButtonSelectorTagCaseAsis = new Button(selectorTagCase, SWT.RADIO);
- fRadioButtonSelectorTagCaseAsis.setText(CSSUIMessages.As_is_UI_);
- fRadioButtonSelectorTagCaseLower = new Button(selectorTagCase, SWT.RADIO);
- fRadioButtonSelectorTagCaseLower.setText(CSSUIMessages.Lower_UI_);
- fRadioButtonSelectorTagCaseUpper = new Button(selectorTagCase, SWT.RADIO);
- fRadioButtonSelectorTagCaseUpper.setText(CSSUIMessages.Upper_UI_);
- }
-
- // Quote attribute values
- fCheckBoxQuoteValues = new Button(panel, SWT.CHECK);
- fCheckBoxQuoteValues.setText(CSSUIMessages.Quote_values_UI_);
-
- if (!isEmbeddedCSS()) {
- // Format source
- fCheckBoxFormatSource = new Button(panel, SWT.CHECK);
- fCheckBoxFormatSource.setText(CSSUIMessages.Format_source_UI_);
- }
-
- setCleanupOptions();
-
- return panel;
- }
-
- /**
- * Insert the method's description here.
- *
- * @return boolean
- */
- public boolean isEmbeddedCSS() {
- return embeddedCSS;
- }
-
- /**
- *
- */
- protected void okPressed() {
- updateCleanupOptions();
- super.okPressed();
- }
-
- /**
- *
- */
- protected void setCleanupOptions() {
- CSSCleanupStrategy stgy = CSSCleanupStrategyImpl.getInstance();
-
- if (fRadioButtonIdentCaseAsis != null) {
- if (stgy.getIdentCase() == CSSCleanupStrategy.UPPER)
- fRadioButtonIdentCaseUpper.setSelection(true);
- else if (stgy.getIdentCase() == CSSCleanupStrategy.LOWER)
- fRadioButtonIdentCaseLower.setSelection(true);
- else
- fRadioButtonIdentCaseAsis.setSelection(true);
- }
-
- if (fRadioButtonPropNameCaseAsis != null) {
- if (stgy.getPropNameCase() == CSSCleanupStrategy.UPPER)
- fRadioButtonPropNameCaseUpper.setSelection(true);
- else if (stgy.getPropNameCase() == CSSCleanupStrategy.LOWER)
- fRadioButtonPropNameCaseLower.setSelection(true);
- else
- fRadioButtonPropNameCaseAsis.setSelection(true);
- }
-
- if (fRadioButtonPropValueCaseAsis != null) {
- if (stgy.getPropValueCase() == CSSCleanupStrategy.UPPER)
- fRadioButtonPropValueCaseUpper.setSelection(true);
- else if (stgy.getPropValueCase() == CSSCleanupStrategy.LOWER)
- fRadioButtonPropValueCaseLower.setSelection(true);
- else
- fRadioButtonPropValueCaseAsis.setSelection(true);
- }
-
- if (fRadioButtonSelectorTagCaseAsis != null) {
- if (stgy.getSelectorTagCase() == CSSCleanupStrategy.UPPER)
- fRadioButtonSelectorTagCaseUpper.setSelection(true);
- else if (stgy.getSelectorTagCase() == CSSCleanupStrategy.LOWER)
- fRadioButtonSelectorTagCaseLower.setSelection(true);
- else
- fRadioButtonSelectorTagCaseAsis.setSelection(true);
- }
-
- if (fCheckBoxQuoteValues != null)
- fCheckBoxQuoteValues.setSelection(stgy.isQuoteValues());
-
- if (fCheckBoxFormatSource != null)
- fCheckBoxFormatSource.setSelection(stgy.isFormatSource());
-
- }
-
- /**
- * Insert the method's description here.
- *
- * @param newEmbeddedCSS
- * boolean
- */
- public void setEmbeddedCSS(boolean newEmbeddedCSS) {
- embeddedCSS = newEmbeddedCSS;
- }
-
- /**
- *
- */
- protected void updateCleanupOptions() {
- CSSCleanupStrategy stgy = CSSCleanupStrategyImpl.getInstance();
-
- if (fRadioButtonIdentCaseAsis != null) {
- if (fRadioButtonIdentCaseUpper.getSelection())
- stgy.setIdentCase(CSSCleanupStrategy.UPPER);
- else if (fRadioButtonIdentCaseLower.getSelection())
- stgy.setIdentCase(CSSCleanupStrategy.LOWER);
- else
- stgy.setIdentCase(CSSCleanupStrategy.ASIS);
- }
-
- if (fRadioButtonPropNameCaseAsis != null) {
- if (fRadioButtonPropNameCaseUpper.getSelection())
- stgy.setPropNameCase(CSSCleanupStrategy.UPPER);
- else if (fRadioButtonPropNameCaseLower.getSelection())
- stgy.setPropNameCase(CSSCleanupStrategy.LOWER);
- else
- stgy.setPropNameCase(CSSCleanupStrategy.ASIS);
- }
-
- if (fRadioButtonPropValueCaseAsis != null) {
- if (fRadioButtonPropValueCaseUpper.getSelection())
- stgy.setPropValueCase(CSSCleanupStrategy.UPPER);
- else if (fRadioButtonPropValueCaseLower.getSelection())
- stgy.setPropValueCase(CSSCleanupStrategy.LOWER);
- else
- stgy.setPropValueCase(CSSCleanupStrategy.ASIS);
- }
-
- if (fRadioButtonSelectorTagCaseAsis != null) {
- if (fRadioButtonSelectorTagCaseUpper.getSelection())
- stgy.setSelectorTagCase(CSSCleanupStrategy.UPPER);
- else if (fRadioButtonSelectorTagCaseLower.getSelection())
- stgy.setSelectorTagCase(CSSCleanupStrategy.LOWER);
- else
- stgy.setSelectorTagCase(CSSCleanupStrategy.ASIS);
- }
-
- if (fCheckBoxQuoteValues != null)
- stgy.setQuoteValues(fCheckBoxQuoteValues.getSelection());
-
- if (fCheckBoxFormatSource != null)
- stgy.setFormatSource(fCheckBoxFormatSource.getSelection());
-
- // save these values to preferences
- ((CSSCleanupStrategyImpl) stgy).saveOptions();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSEditorPluginImages.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSEditorPluginImages.java
deleted file mode 100644
index 7559e982b8..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSEditorPluginImages.java
+++ /dev/null
@@ -1,54 +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.wst.css.ui.internal.editor;
-
-
-/**
- * Bundle of most images used by the CSS Source Editor plug-in.
- */
-public class CSSEditorPluginImages {
- public static final String IMG_OBJ_SORT = "icons/full/obj16/sort.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_STYLESHEET = "icons/full/obj16/stylesheet.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_CHARSET = "icons/full/obj16/charset_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_FONTFACE = "icons/full/obj16/fontface_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_IMPORT = "icons/full/obj16/link_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_MEDIA = "icons/full/obj16/media_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_PAGE = "icons/full/obj16/page_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_STYLE = "icons/full/obj16/style_rule.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_RULE_UNKNOWN = "icons/full/obj16/unknown_rule.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_SELECTOR_CLASS = "icons/full/obj16/class_selector.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_ID = "icons/full/obj16/id_selector.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_PSEUDO = "icons/full/obj16/pseudo.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_TAG = "icons/full/obj16/tag_selector.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_LINK = "icons/full/obj16/link_selector.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SELECTOR_DEFAULT = "icons/full/obj16/tag_selector.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_VALUE_FUNCTION = "icons/full/obj16/css_propertyvalue_function.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_VALUE_NUMBER = "icons/full/obj16/css_propertyvalue_unit.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_VALUE_STRING = "icons/full/obj16/css_propertyvalue_identifier.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_CATEGORY_AURAL = "icons/full/obj16/aural_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_BOX = "icons/full/obj16/boxmodel_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_COLORANDBACKGROUND = "icons/full/obj16/colback_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_CONTENT = "icons/full/obj16/content_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_FONT = "icons/full/obj16/font_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_PAGE = "icons/full/obj16/pagedmedia_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_TABLES = "icons/full/obj16/table_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_TEXT = "icons/full/obj16/text_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_UI = "icons/full/obj16/ui_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_VISUAL = "icons/full/obj16/visual_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_CATEGORY_DEFAULT = "icons/full/obj16/other_props.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TEMPLATE = "icons/full/obj16/tag-template.gif"; //$NON-NLS-1$
-
- public static final String IMG_WIZBAN_NEWCSSFILE = "icons/full/wizban/newcssfile_wiz.png"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/IHelpContextIds.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/IHelpContextIds.java
deleted file mode 100644
index ddc622b3b2..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/IHelpContextIds.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
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.editor;
-
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-
-/**
- * Help context ids for the CSS Source Editor.
- * <p>
- * This interface contains constants only; it is not intended to be
- * implemented.
- * </p>
- *
- */
-public interface IHelpContextIds {
- // org.eclipse.wst.css.ui.
- public static final String PREFIX = CSSUIPlugin.ID + "."; //$NON-NLS-1$
-
- // // figured out on the fly
- // // CSS Source page editor
- // public static final String CSS_SOURCEVIEW_HELPID =
- // ContentTypeIdForCSS.ContentTypeID_CSS +"_source_HelpId"; //$NON-NLS-1$
-
- // CSS Files Preference page
- public static final String CSS_PREFWEBX_FILES_HELPID = PREFIX + "webx0010"; //$NON-NLS-1$
- // CSS Source Preference page
- public static final String CSS_PREFWEBX_SOURCE_HELPID = PREFIX + "webx0011"; //$NON-NLS-1$
- // CSS Styles Preference page
- public static final String CSS_PREFWEBX_STYLES_HELPID = PREFIX + "webx0012"; //$NON-NLS-1$
- // CSS Template Preference page
- public static final String CSS_PREFWEBX_TEMPLATES_HELPID = PREFIX + "webx0013"; //$NON-NLS-1$
-
- // CSS Cleanup dialog
- public static final String CSS_CLEANUP_HELPID = PREFIX + "xmlm1300"; //$NON-NLS-1$
-
- // CSS Content Settings
- public static final String CSS_CONTENT_SETTINGS_HELPID = PREFIX + "misc0180"; //$NON-NLS-1$
-
- // CSS New File Wizard - Template Page
- public static final String CSS_NEWWIZARD_TEMPLATE_HELPID = PREFIX + "cssw0010"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/CleanupDocumentHandler.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/CleanupDocumentHandler.java
deleted file mode 100644
index a623b3ee18..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/CleanupDocumentHandler.java
+++ /dev/null
@@ -1,120 +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.wst.css.ui.internal.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.css.core.internal.cleanup.CleanupProcessorCSS;
-import org.eclipse.wst.css.ui.internal.edit.ui.CleanupDialogCSS;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupProcessor;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
-
-public class CleanupDocumentHandler extends AbstractHandler implements IHandler {
- private IStructuredCleanupProcessor fCleanupProcessor;
-
- public void dispose() {
- // nulling out just in case
- fCleanupProcessor = null;
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
- ITextEditor textEditor = null;
- if (editorPart instanceof ITextEditor)
- textEditor = (ITextEditor) editorPart;
- else {
- Object o = editorPart.getAdapter(ITextEditor.class);
- if (o != null)
- textEditor = (ITextEditor) o;
- }
-
- if (textEditor != null) {
- final ITextEditor editor = textEditor;
- Dialog cleanupDialog = new CleanupDialogCSS(editor.getSite().getShell());
- if (cleanupDialog.open() == Window.OK) {
- // setup runnable
- Runnable runnable = new Runnable() {
- public void run() {
- IStructuredCleanupProcessor cleanupProcessor = getCleanupProcessor();
- if (cleanupProcessor != null) {
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForEdit(editor.getDocumentProvider().getDocument(editor.getEditorInput()));
- if (model != null)
- cleanupProcessor.cleanupModel(model);
- }
- finally {
- if (model != null)
- model.releaseFromEdit();
- }
- }
- }
- };
-
- // TODO: make independent of 'model'.
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForEdit(editor.getDocumentProvider().getDocument(editor.getEditorInput()));
- if (model != null) {
- // begin recording
- ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
- model.beginRecording(this, SSEUIMessages.Cleanup_Document_UI_, SSEUIMessages.Cleanup_Document_UI_, selection.getOffset(), selection.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
-
- // tell the model that we are about to make a big
- // model change
- model.aboutToChangeModel();
-
- // run
- BusyIndicator.showWhile(editor.getEditorSite().getWorkbenchWindow().getShell().getDisplay(), runnable);
- }
- }
- finally {
- if (model != null) {
- // tell the model that we are done with the big
- // model
- // change
- model.changedModel();
-
- // end recording
- ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
- model.endRecording(this, selection.getOffset(), selection.getLength());
- model.releaseFromEdit();
- }
- }
- }
- }
- return null;
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // do nothing
- }
-
- IStructuredCleanupProcessor getCleanupProcessor() {
- if (fCleanupProcessor == null)
- fCleanupProcessor = new CleanupProcessorCSS();
-
- return fCleanupProcessor;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectEnclosingHandler.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectEnclosingHandler.java
deleted file mode 100644
index ac19982754..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectEnclosingHandler.java
+++ /dev/null
@@ -1,50 +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.wst.css.ui.internal.handlers;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.handlers.AbstractStructuredSelectHandler;
-
-public class StructuredSelectEnclosingHandler extends AbstractStructuredSelectHandler {
-
- protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
- IndexedRegion indexedRegion = null;
-
- indexedRegion = getIndexedRegion(document, textSelection.getOffset());
-
- return indexedRegion;
- }
-
- protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
- Region newRegion = null;
- if (indexedRegion instanceof ICSSNode) {
- ICSSNode cursorNode = (ICSSNode) indexedRegion;
- Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
- int currentOffset = textSelection.getOffset();
- int currentEndOffset = currentOffset + textSelection.getLength();
- if (cursorNodeRegion.getOffset() >= currentOffset && cursorNodeRegion.getOffset() <= currentEndOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentEndOffset) {
- ICSSNode newNode = cursorNode.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
- }
- else
- newRegion = cursorNodeRegion;
- }
- return newRegion;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectNextHandler.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectNextHandler.java
deleted file mode 100644
index bfccb26a81..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectNextHandler.java
+++ /dev/null
@@ -1,65 +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.wst.css.ui.internal.handlers;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.handlers.AbstractStructuredSelectHandler;
-
-public class StructuredSelectNextHandler extends AbstractStructuredSelectHandler {
-
- protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
- int offset = textSelection.getOffset() + textSelection.getLength() - 1;
- if (offset < 0)
- offset = 0;
-
- IndexedRegion indexedRegion = null;
-
- indexedRegion = getIndexedRegion(document, offset);
-
- return indexedRegion;
- }
-
- protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
- Region newRegion = null;
-
- if (indexedRegion instanceof ICSSNode) {
- ICSSNode cursorNode = (ICSSNode) indexedRegion;
-
- Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
- int currentOffset = textSelection.getOffset();
- int currentEndOffset = currentOffset + textSelection.getLength();
- if (cursorNodeRegion.getOffset() >= currentOffset && cursorNodeRegion.getOffset() <= currentEndOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentEndOffset) {
- ICSSNode newNode = cursorNode.getNextSibling();
- if (newNode == null) {
- newNode = cursorNode.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
- }
- else {
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(currentOffset, newIndexedRegion.getEndOffset() - currentOffset);
- }
- }
- }
- else
- newRegion = cursorNodeRegion;
- }
- return newRegion;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectPreviousHandler.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectPreviousHandler.java
deleted file mode 100644
index 5827a4f664..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectPreviousHandler.java
+++ /dev/null
@@ -1,60 +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.wst.css.ui.internal.handlers;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.handlers.AbstractStructuredSelectHandler;
-
-public class StructuredSelectPreviousHandler extends AbstractStructuredSelectHandler {
-
- protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
- IndexedRegion indexedRegion = null;
-
- indexedRegion = getIndexedRegion(document, textSelection.getOffset());
-
- return indexedRegion;
- }
-
- protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
- Region newRegion = null;
- if (indexedRegion instanceof ICSSNode) {
- ICSSNode cursorNode = (ICSSNode) indexedRegion;
-
- Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
- int currentOffset = textSelection.getOffset();
- int currentEndOffset = currentOffset + textSelection.getLength();
- if (cursorNodeRegion.getOffset() >= currentOffset && cursorNodeRegion.getOffset() <= currentEndOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentEndOffset) {
- ICSSNode newNode = cursorNode.getPreviousSibling();
- if (newNode == null) {
- newNode = cursorNode.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
- }
- else {
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), currentEndOffset - newIndexedRegion.getStartOffset());
- }
- }
- }
- else
- newRegion = cursorNodeRegion;
- }
- return newRegion;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/image/CSSImageHelper.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/image/CSSImageHelper.java
deleted file mode 100644
index 702be85760..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/image/CSSImageHelper.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.image;
-
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.CSSEditorPluginImages;
-
-
-public class CSSImageHelper {
- private static CSSImageHelper fInstance = null;
-
- /**
- * singleton
- */
- public synchronized static CSSImageHelper getInstance() {
- if (fInstance == null) {
- fInstance = new CSSImageHelper();
- }
- return fInstance;
- }
-
- private HashMap fImageDescRegistry = null; // save a descriptor for each image
- private Map fTypeMap = null;
-
- /**
- *
- */
- private CSSImageHelper() {
- super();
- }
-
- /**
- *
- */
- private Image createImage(String resource) {
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(CSSUIPlugin.ID, resource);
- Image image = null;
-
- if (desc == null) {
- desc = ImageDescriptor.getMissingImageDescriptor();
- image = desc.createImage();
- } else {
- image = desc.createImage();
- 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(CSSUIPlugin.ID, imageFilePath);
- if (imageDescriptor != null) {
- getImageDescriptorRegistry().put(imageFilePath, imageDescriptor);
- } else {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
-
- return imageDescriptor;
- }
-
- /**
- * by type
- */
- public Image getImage(CSSImageType type) {
- if (fTypeMap == null) {
- fTypeMap = new HashMap();
- fTypeMap.put(CSSImageType.STYLESHEET, CSSEditorPluginImages.IMG_OBJ_STYLESHEET);
-
- fTypeMap.put(CSSImageType.RULE_CHARSET, CSSEditorPluginImages.IMG_OBJ_RULE_CHARSET);
- fTypeMap.put(CSSImageType.RULE_FONTFACE, CSSEditorPluginImages.IMG_OBJ_RULE_FONTFACE);
- fTypeMap.put(CSSImageType.RULE_IMPORT, CSSEditorPluginImages.IMG_OBJ_RULE_IMPORT);
- fTypeMap.put(CSSImageType.RULE_MEDIA, CSSEditorPluginImages.IMG_OBJ_RULE_MEDIA);
- fTypeMap.put(CSSImageType.RULE_PAGE, CSSEditorPluginImages.IMG_OBJ_RULE_PAGE);
- fTypeMap.put(CSSImageType.RULE_STYLE, CSSEditorPluginImages.IMG_OBJ_RULE_STYLE);
- fTypeMap.put(CSSImageType.RULE_UNKNOWN, CSSEditorPluginImages.IMG_OBJ_RULE_UNKNOWN);
-
- fTypeMap.put(CSSImageType.SELECTOR_CLASS, CSSEditorPluginImages.IMG_OBJ_SELECTOR_CLASS);
- fTypeMap.put(CSSImageType.SELECTOR_ID, CSSEditorPluginImages.IMG_OBJ_SELECTOR_ID);
- fTypeMap.put(CSSImageType.SELECTOR_PSEUDO, CSSEditorPluginImages.IMG_OBJ_SELECTOR_PSEUDO);
- fTypeMap.put(CSSImageType.SELECTOR_TAG, CSSEditorPluginImages.IMG_OBJ_SELECTOR_TAG);
- fTypeMap.put(CSSImageType.SELECTOR_LINK, CSSEditorPluginImages.IMG_OBJ_SELECTOR_LINK);
- fTypeMap.put(CSSImageType.SELECTOR_DEFAULT, CSSEditorPluginImages.IMG_OBJ_SELECTOR_DEFAULT);
-
- fTypeMap.put(CSSImageType.VALUE_FUNCTION, CSSEditorPluginImages.IMG_OBJ_VALUE_FUNCTION);
- fTypeMap.put(CSSImageType.VALUE_NUMBER, CSSEditorPluginImages.IMG_OBJ_VALUE_NUMBER);
- fTypeMap.put(CSSImageType.VALUE_STRING, CSSEditorPluginImages.IMG_OBJ_VALUE_STRING);
-
- fTypeMap.put(CSSImageType.CATEGORY_AURAL, CSSEditorPluginImages.IMG_OBJ_CATEGORY_AURAL);
- fTypeMap.put(CSSImageType.CATEGORY_BOX, CSSEditorPluginImages.IMG_OBJ_CATEGORY_BOX);
- fTypeMap.put(CSSImageType.CATEGORY_COLORANDBACKGROUND, CSSEditorPluginImages.IMG_OBJ_CATEGORY_COLORANDBACKGROUND);
- fTypeMap.put(CSSImageType.CATEGORY_CONTENT, CSSEditorPluginImages.IMG_OBJ_CATEGORY_CONTENT);
- fTypeMap.put(CSSImageType.CATEGORY_FONT, CSSEditorPluginImages.IMG_OBJ_CATEGORY_FONT);
- fTypeMap.put(CSSImageType.CATEGORY_PAGE, CSSEditorPluginImages.IMG_OBJ_CATEGORY_PAGE);
- fTypeMap.put(CSSImageType.CATEGORY_TABLES, CSSEditorPluginImages.IMG_OBJ_CATEGORY_TABLES);
- fTypeMap.put(CSSImageType.CATEGORY_TEXT, CSSEditorPluginImages.IMG_OBJ_CATEGORY_TEXT);
- fTypeMap.put(CSSImageType.CATEGORY_UI, CSSEditorPluginImages.IMG_OBJ_CATEGORY_UI);
- fTypeMap.put(CSSImageType.CATEGORY_VISUAL, CSSEditorPluginImages.IMG_OBJ_CATEGORY_VISUAL);
- fTypeMap.put(CSSImageType.CATEGORY_DEFAULT, CSSEditorPluginImages.IMG_OBJ_CATEGORY_DEFAULT);
- }
- return getImage((String) fTypeMap.get(type));
- }
-
- /**
- * by relative path(from here)
- */
- public Image getImage(String resource) {
- if (resource == null) {
- return null;
- }
- Image image = getImageRegistry().get(resource);
- if (image == null) {
- image = createImage(resource);
- }
- return image;
- }
-
- /**
- * 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;
- }
-
- private ImageRegistry getImageRegistry() {
- return JFaceResources.getImageRegistry();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/image/CSSImageType.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/image/CSSImageType.java
deleted file mode 100644
index 6f2bf91fac..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/image/CSSImageType.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.image;
-
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMProperty;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelFinder;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorList;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSSimpleSelector;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
-import org.w3c.dom.css.CSSCharsetRule;
-import org.w3c.dom.css.CSSFontFaceRule;
-import org.w3c.dom.css.CSSImportRule;
-import org.w3c.dom.css.CSSMediaRule;
-import org.w3c.dom.css.CSSPageRule;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.CSSStyleDeclaration;
-import org.w3c.dom.css.CSSStyleRule;
-import org.w3c.dom.css.CSSValue;
-
-/**
- */
-public class CSSImageType {
-
- private final String fName;
-
- private CSSImageType(String name) {
- this.fName = name;
- }
-
- public String toString() {
- return fName;
- }
-
- public static final CSSImageType STYLESHEET = new CSSImageType("STYLESHEET"); //$NON-NLS-1$
-
- public static final CSSImageType RULE_CHARSET = new CSSImageType("RULE_CHARSET"); //$NON-NLS-1$
- public static final CSSImageType RULE_FONTFACE = new CSSImageType("RULE_FONTFACE"); //$NON-NLS-1$
- public static final CSSImageType RULE_IMPORT = new CSSImageType("RULE_IMPORT"); //$NON-NLS-1$
- public static final CSSImageType RULE_MEDIA = new CSSImageType("RULE_MEDIA"); //$NON-NLS-1$
- public static final CSSImageType RULE_PAGE = new CSSImageType("RULE_PAGE"); //$NON-NLS-1$
- public static final CSSImageType RULE_STYLE = new CSSImageType("RULE_STYLE"); //$NON-NLS-1$
- public static final CSSImageType RULE_UNKNOWN = new CSSImageType("RULE_UNKNOWN"); //$NON-NLS-1$
-
- public static final CSSImageType SELECTOR_CLASS = new CSSImageType("SELECTOR_CLASS"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_ID = new CSSImageType("SELECTOR_ID"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_DEFAULT = new CSSImageType("SELECTOR_DEFAULT"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_PSEUDO = new CSSImageType("SELECTOR_PSEUDO"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_TAG = new CSSImageType("SELECTOR_TAG"); //$NON-NLS-1$
- public static final CSSImageType SELECTOR_LINK = new CSSImageType("SELECTOR_LINK"); //$NON-NLS-1$
-
- public static final CSSImageType VALUE_FUNCTION = new CSSImageType("VALUE_FUNCTION"); //$NON-NLS-1$
- public static final CSSImageType VALUE_NUMBER = new CSSImageType("VALUE_NUMBER"); //$NON-NLS-1$
- public static final CSSImageType VALUE_STRING = new CSSImageType("VALUE_STRING"); //$NON-NLS-1$
-
- public static final CSSImageType CATEGORY_AURAL = new CSSImageType("CATEGORY_AURAL"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_BOX = new CSSImageType("CATEGORY_BOX"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_COLORANDBACKGROUND = new CSSImageType("CATEGORY_COLORANDBACKGROUND"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_CONTENT = new CSSImageType("CATEGORY_CONTENT"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_FONT = new CSSImageType("CATEGORY_FONT"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_PAGE = new CSSImageType("CATEGORY_PAGE"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_TABLES = new CSSImageType("CATEGORY_TABLES"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_TEXT = new CSSImageType("CATEGORY_TEXT"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_UI = new CSSImageType("CATEGORY_UI"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_VISUAL = new CSSImageType("CATEGORY_VISUAL"); //$NON-NLS-1$
- public static final CSSImageType CATEGORY_DEFAULT = new CSSImageType("CATEGORY_DEFAULT"); //$NON-NLS-1$
-
- /**
- * by node
- */
- public static CSSImageType getImageType(ICSSNode node) {
- CSSImageType imageType = null;
- if (node instanceof CSSCharsetRule) {
- imageType = RULE_CHARSET;
- } else if (node instanceof CSSFontFaceRule) {
- imageType = RULE_FONTFACE;
- } else if (node instanceof CSSImportRule) {
- imageType = RULE_IMPORT;
- } else if (node instanceof CSSMediaRule) {
- imageType = RULE_MEDIA;
- } else if (node instanceof CSSPageRule) {
- imageType = RULE_PAGE;
- } else if (node instanceof CSSStyleRule) {
- imageType = getImageType(((ICSSStyleRule) node).getSelectors());
- } else if (node instanceof CSSStyleDeclaration) {
- ICSSNode parent = node.getParentNode();
- if (parent != null) {
- return getImageType(parent);
- }
- } else if (node instanceof ICSSStyleDeclItem) {
- String name = ((ICSSStyleDeclItem) node).getPropertyName();
- ICSSDocument doc = node.getOwnerDocument();
- ICSSModel model = (doc != null) ? doc.getModel() : null;
- CSSMetaModelFinder finder = CSSMetaModelFinder.getInstance();
- CSSMetaModel metaModel = finder.findMetaModelFor(model);
- // is font-face rule ?
- ICSSNode parent = node.getParentNode();
- if (parent != null) {
- parent = parent.getParentNode();
- if (parent instanceof CSSFontFaceRule) {
- imageType = CSSImageType.CATEGORY_FONT;
- }
- }
- if (imageType == null) {
- CSSMMProperty prop = new CSSMetaModelUtil(metaModel).getProperty(name);
- if (prop != null) {
- String category = prop.getAttribute("category"); //$NON-NLS-1$
- imageType = getImageType(category);
- }
- if (imageType == null) {
- imageType = CSSImageType.CATEGORY_DEFAULT;
- }
- }
- } else if (node instanceof CSSValue) {
- switch (((CSSValue) node).getCssValueType()) {
- case CSSPrimitiveValue.CSS_NUMBER :
- case CSSPrimitiveValue.CSS_PERCENTAGE :
- case CSSPrimitiveValue.CSS_EMS :
- case CSSPrimitiveValue.CSS_EXS :
- case CSSPrimitiveValue.CSS_PX :
- case CSSPrimitiveValue.CSS_CM :
- case CSSPrimitiveValue.CSS_MM :
- case CSSPrimitiveValue.CSS_IN :
- case CSSPrimitiveValue.CSS_PT :
- case CSSPrimitiveValue.CSS_PC :
- case CSSPrimitiveValue.CSS_DEG :
- case CSSPrimitiveValue.CSS_RAD :
- case CSSPrimitiveValue.CSS_GRAD :
- case CSSPrimitiveValue.CSS_MS :
- case CSSPrimitiveValue.CSS_S :
- case CSSPrimitiveValue.CSS_HZ :
- case CSSPrimitiveValue.CSS_KHZ :
- case CSSPrimitiveValue.CSS_DIMENSION :
- case ICSSPrimitiveValue.CSS_INTEGER :
- case ICSSPrimitiveValue.CSS_HASH :
- imageType = VALUE_NUMBER;
- break;
- case CSSPrimitiveValue.CSS_ATTR :
- case CSSPrimitiveValue.CSS_COUNTER :
- case CSSPrimitiveValue.CSS_RECT :
- case CSSPrimitiveValue.CSS_RGBCOLOR :
- case CSSPrimitiveValue.CSS_URI :
- case ICSSPrimitiveValue.CSS_FORMAT :
- case ICSSPrimitiveValue.CSS_LOCAL :
- imageType = VALUE_FUNCTION;
- break;
- default :
- imageType = VALUE_STRING;
- break;
- }
- }
- return imageType;
- }
-
- public static CSSImageType getImageType(ICSSSelectorList selectorList) {
- if (selectorList == null || selectorList.getLength() == 0) {
- return SELECTOR_DEFAULT;
- }
- CSSImageType imageType = null;
- int nSelectors = selectorList.getLength();
- for (int i = 0; i < nSelectors; i++) {
- CSSImageType candidate = getImageType(selectorList.getSelector(i));
- if (imageType == null) {
- imageType = candidate;
- } else if (imageType != candidate) {
- imageType = null;
- break;
- }
- }
-
- return (imageType == null) ? SELECTOR_DEFAULT : imageType;
- }
-
- public static CSSImageType getImageType(ICSSSelector selector) {
- CSSImageType imageType = SELECTOR_DEFAULT;
- if (selector == null || selector.getLength() == 0) {
- return imageType;
- }
- ICSSSelectorItem item = selector.getItem(selector.getLength() - 1);
- if (item.getItemType() == ICSSSelectorItem.SIMPLE) {
- ICSSSimpleSelector ss = (ICSSSimpleSelector) item;
- if (0 < ss.getNumOfIDs()) {
- imageType = SELECTOR_ID;
- } else if (0 < ss.getNumOfClasses()) {
- imageType = SELECTOR_CLASS;
- } else if (0 < ss.getNumOfPseudoNames()) {
- imageType = SELECTOR_PSEUDO;
- } else {
- imageType = SELECTOR_TAG;
- }
- }
- return imageType;
- }
-
- public static CSSImageType getImageType(String category) {
- if (fCategoryMap == null) {
- fCategoryMap = new HashMap();
- fCategoryMap.put("aural", CATEGORY_AURAL); //$NON-NLS-1$
- fCategoryMap.put("box", CATEGORY_BOX); //$NON-NLS-1$
- fCategoryMap.put("colorandbackground", CATEGORY_COLORANDBACKGROUND); //$NON-NLS-1$
- fCategoryMap.put("content", CATEGORY_CONTENT); //$NON-NLS-1$
- fCategoryMap.put("font", CATEGORY_FONT); //$NON-NLS-1$
- fCategoryMap.put("page", CATEGORY_PAGE); //$NON-NLS-1$
- fCategoryMap.put("tables", CATEGORY_TABLES); //$NON-NLS-1$
- fCategoryMap.put("text", CATEGORY_TEXT); //$NON-NLS-1$
- fCategoryMap.put("ui", CATEGORY_UI); //$NON-NLS-1$
- fCategoryMap.put("visual", CATEGORY_VISUAL); //$NON-NLS-1$
- }
- CSSImageType imageType = (CSSImageType) fCategoryMap.get(category);
- return (imageType == null) ? CATEGORY_DEFAULT : imageType;
- }
-
- private static Map fCategoryMap = null;
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceInitializer.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceInitializer.java
deleted file mode 100644
index c4714f0496..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceInitializer.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.wst.css.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.jface.text.templates.Template;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.style.IStyleConstantsCSS;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
-
-/**
- * Sets default values for CSS UI preferences
- */
-public class CSSUIPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = CSSUIPlugin.getDefault().getPreferenceStore();
- ColorRegistry registry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
-
- // CSS Style Preferences
- String NOBACKGROUNDBOLD = " | null | false"; //$NON-NLS-1$
- String JUSTITALIC = " | null | false | true"; //$NON-NLS-1$
- String styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
- store.setDefault(IStyleConstantsCSS.NORMAL, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.ATMARK_RULE, 63, 127, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsCSS.ATMARK_RULE, styleValue);
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.SELECTOR, 63, 127, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsCSS.SELECTOR, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.MEDIA, 42, 0, 225) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsCSS.MEDIA, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.COMMENT, 63, 95, 191) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsCSS.COMMENT, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.PROPERTY_NAME, 127, 0, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsCSS.PROPERTY_NAME, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.PROPERTY_VALUE, 42, 0, 225) + JUSTITALIC;
- store.setDefault(IStyleConstantsCSS.PROPERTY_VALUE, styleValue);
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.URI, 42, 0, 225) + JUSTITALIC;
- store.setDefault(IStyleConstantsCSS.URI, styleValue);
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.STRING, 42, 0, 225) + JUSTITALIC;
- store.setDefault(IStyleConstantsCSS.STRING, styleValue);
-
- styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
- store.setDefault(IStyleConstantsCSS.COLON, styleValue);
- store.setDefault(IStyleConstantsCSS.SEMI_COLON, styleValue);
- store.setDefault(IStyleConstantsCSS.CURLY_BRACE, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsCSS.ERROR, 191, 63, 63) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsCSS.ERROR, styleValue);
-
- // set default new css file template to use in new file wizard
- /*
- * Need to find template name that goes with default template id (name
- * may change for differnt language)
- */
- String templateName = ""; //$NON-NLS-1$
- Template template = CSSUIPlugin.getDefault().getTemplateStore().findTemplateById("org.eclipse.wst.css.ui.internal.templates.newcss"); //$NON-NLS-1$
- if (template != null)
- templateName = template.getName();
- store.setDefault(CSSUIPreferenceNames.NEW_FILE_TEMPLATE_NAME, templateName);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceNames.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceNames.java
deleted file mode 100644
index 48ab781d29..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceNames.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.wst.css.ui.internal.preferences;
-
-/**
- * Preference keys for CSS UI
- */
-public class CSSUIPreferenceNames {
- private CSSUIPreferenceNames() {
- // cannot create instance
- }
- /**
- * The key to store customized templates.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String TEMPLATES_KEY = "org.eclipse.wst.sse.ui.custom_templates"; //$NON-NLS-1$
-
- /**
- * The key to store the last template name used in new CSS 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$
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSColorPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSColorPage.java
deleted file mode 100644
index ab63bf1ab3..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSColorPage.java
+++ /dev/null
@@ -1,221 +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.wst.css.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.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.css.ui.internal.style.IStyleConstantsCSS;
-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.AbstractColorPage;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.StyledTextColorPicker;
-
-/**
- * @deprecated
- */
-public class CSSColorPage extends AbstractColorPage {
-
- /**
- * 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;
- }
-
- protected Control createContents(Composite parent) {
- Composite pageComponent = createComposite(parent, 1);
- ((GridData) pageComponent.getLayoutData()).horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
-
- super.createContents(pageComponent);
-
- // assigning one help for whole group
- PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.CSS_PREFWEBX_STYLES_HELPID);
-
- return pageComponent;
- }
-
- protected Composite createColoringComposite(Composite parent) {
- Composite coloringComposite = super.createColoringComposite(parent);
-
- // assigning one help for whole group
- return coloringComposite;
- }
-
- /**
- * getSampleText method comment.
- */
- public String getSampleText() {
- return CSSUIMessages.PrefsLabel_ColorSample; //$NON-NLS-1$
- }
-
- /**
- *
- * @param contextStyleMap
- * java.util.Dictionary
- */
- protected void initContextStyleMap(Dictionary contextStyleMap) {
- contextStyleMap.put(CSSRegionContexts.CSS_COMMENT, IStyleConstantsCSS.COMMENT);
- contextStyleMap.put(CSSRegionContexts.CSS_CDO, IStyleConstantsCSS.COMMENT);
- contextStyleMap.put(CSSRegionContexts.CSS_CDC, IStyleConstantsCSS.COMMENT);
- contextStyleMap.put(CSSRegionContexts.CSS_S, IStyleConstantsCSS.NORMAL);
-
- contextStyleMap.put(CSSRegionContexts.CSS_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
- contextStyleMap.put(CSSRegionContexts.CSS_LBRACE, IStyleConstantsCSS.CURLY_BRACE);
- contextStyleMap.put(CSSRegionContexts.CSS_RBRACE, IStyleConstantsCSS.CURLY_BRACE);
-
- contextStyleMap.put(CSSRegionContexts.CSS_IMPORT, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_PAGE, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_MEDIA, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_FONT_FACE, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_CHARSET, IStyleConstantsCSS.ATMARK_RULE);
- contextStyleMap.put(CSSRegionContexts.CSS_ATKEYWORD, IStyleConstantsCSS.ATMARK_RULE);
-
- contextStyleMap.put(CSSRegionContexts.CSS_STRING, IStyleConstantsCSS.STRING);
- contextStyleMap.put(CSSRegionContexts.CSS_URI, IStyleConstantsCSS.URI);
- contextStyleMap.put(CSSRegionContexts.CSS_MEDIUM, IStyleConstantsCSS.MEDIA);
- contextStyleMap.put(CSSRegionContexts.CSS_MEDIA_SEPARATOR, IStyleConstantsCSS.MEDIA);
-
- contextStyleMap.put(CSSRegionContexts.CSS_CHARSET_NAME, IStyleConstantsCSS.STRING);
-
- contextStyleMap.put(CSSRegionContexts.CSS_PAGE_SELECTOR, IStyleConstantsCSS.MEDIA);
-
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_UNIVERSAL, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_PSEUDO, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_CLASS, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ID, IStyleConstantsCSS.SELECTOR);
-
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_COMBINATOR, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_SEPARATOR, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE, IStyleConstantsCSS.SELECTOR);
- contextStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR, IStyleConstantsCSS.SELECTOR);
-
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_PROPERTY, IStyleConstantsCSS.PROPERTY_NAME);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_STRING, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_URI, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_HASH, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_S, IStyleConstantsCSS.PROPERTY_VALUE);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_SEPARATOR, IStyleConstantsCSS.COLON);
- contextStyleMap.put(CSSRegionContexts.CSS_DECLARATION_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
-
- contextStyleMap.put(CSSRegionContexts.CSS_UNKNOWN, IStyleConstantsCSS.ERROR);
- }
-
- /**
- *
- * @param descriptions
- * java.util.Dictionary
- */
- protected void initDescriptions(Dictionary descriptions) {
- // create descriptions for hilighting types
- descriptions.put(IStyleConstantsCSS.NORMAL, CSSUIMessages.PrefsLabel_ColorNormal);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.ATMARK_RULE, CSSUIMessages.PrefsLabel_ColorAtmarkRule);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.SELECTOR, CSSUIMessages.PrefsLabel_ColorSelector);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.MEDIA, CSSUIMessages.PrefsLabel_ColorMedia);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.COMMENT, CSSUIMessages.PrefsLabel_ColorComment);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.PROPERTY_NAME, CSSUIMessages.PrefsLabel_ColorPropertyName);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.PROPERTY_VALUE, CSSUIMessages.PrefsLabel_ColorPropertyValue);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.URI, CSSUIMessages.PrefsLabel_ColorUri);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.STRING, CSSUIMessages.PrefsLabel_ColorString);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.COLON, CSSUIMessages.PrefsLabel_ColorColon);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.SEMI_COLON, CSSUIMessages.PrefsLabel_ColorSemiColon);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.CURLY_BRACE, CSSUIMessages.PrefsLabel_ColorCurlyBrace);//$NON-NLS-1$
- descriptions.put(IStyleConstantsCSS.ERROR, CSSUIMessages.PrefsLabel_ColorError);//$NON-NLS-1$
- }
-
- /**
- *
- * @param list
- * java.util.ArrayList
- */
- protected void initStyleList(ArrayList list) {
- list.add(IStyleConstantsCSS.NORMAL);
- list.add(IStyleConstantsCSS.ATMARK_RULE);
- list.add(IStyleConstantsCSS.SELECTOR);
- list.add(IStyleConstantsCSS.MEDIA);
- list.add(IStyleConstantsCSS.COMMENT);
- list.add(IStyleConstantsCSS.PROPERTY_NAME);
- list.add(IStyleConstantsCSS.PROPERTY_VALUE);
- list.add(IStyleConstantsCSS.URI);
- list.add(IStyleConstantsCSS.STRING);
- list.add(IStyleConstantsCSS.COLON);
- list.add(IStyleConstantsCSS.SEMI_COLON);
- list.add(IStyleConstantsCSS.CURLY_BRACE);
- list.add(IStyleConstantsCSS.ERROR);
- }
-
- /**
- * setupPicker method comment.
- */
- protected void setupPicker(StyledTextColorPicker picker) {
- IModelManager mmanager = StructuredModelManager.getModelManager();
- picker.setParser(mmanager.createStructuredDocumentFor(ContentTypeIdForCSS.ContentTypeID_CSS).getParser());
-
- Dictionary descriptions = new Hashtable();
- initDescriptions(descriptions);
-
- Dictionary contextStyleMap = new Hashtable();
- initContextStyleMap(contextStyleMap);
-
- ArrayList styleList = new ArrayList();
- initStyleList(styleList);
-
- picker.setContextStyleMap(contextStyleMap);
- picker.setDescriptions(descriptions);
- picker.setStyleList(styleList);
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return CSSUIPlugin.getDefault().getPreferenceStore();
- }
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.ui.preferences.ui.AbstractColorPage#savePreferences()
- */
- protected void savePreferences() {
- CSSUIPlugin.getDefault().savePluginPreferences();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSFilesPreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSFilesPreferencePage.java
deleted file mode 100644
index 77cbe7f532..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSFilesPreferencePage.java
+++ /dev/null
@@ -1,67 +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.wst.css.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.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage;
-
-public class CSSFilesPreferencePage extends XMLFilesPreferencePage {
- protected IPreferenceStore doGetPreferenceStore() {
- return CSSUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected void doSavePreferenceStore() {
- CSSCorePlugin.getDefault().savePluginPreferences(); // model
- }
-
- protected Preferences getModelPreferences() {
- return CSSCorePlugin.getDefault().getPluginPreferences();
- }
-
- protected Control createContents(Composite parent) {
- Composite scrolledComposite = createScrolledComposite(parent);
- createContentsForCreatingGroup(scrolledComposite);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(scrolledComposite, IHelpContextIds.CSS_PREFWEBX_FILES_HELPID);
-
- setSize(scrolledComposite);
- loadPreferences();
- return scrolledComposite;
- }
-
- protected IContentType getContentType() {
- return Platform.getContentTypeManager().getContentType(ContentTypeIdForCSS.ContentTypeID_CSS);
- }
-
- protected void initializeValues() {
- initializeValuesForCreatingGroup();
- }
-
- protected void performDefaults() {
- performDefaultsForCreatingGroup();
-
- updateApplyButton();
- }
-
- protected void storeValues() {
- storeValuesForCreatingGroup();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java
deleted file mode 100644
index 235373cf55..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java
+++ /dev/null
@@ -1,273 +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.wst.css.ui.internal.preferences.ui;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.SWT;
-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.swt.widgets.Label;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferenceLinkArea;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
-
-/**
- */
-public class CSSSourcePreferencePage extends AbstractPreferencePage {
- // Content Assist
- protected Button fAutoPropose;
- protected Label fAutoProposeLabel;
-
- protected Text fAutoProposeText;
- protected Button fClearAllBlankLines;
- protected Button fIdentLower;
- // case of output character
- // case of identifier
- protected Button fIdentUpper;
- private Spinner fIndentationSize;
- private Button fIndentUsingSpaces;
-
- private Button fIndentUsingTabs;
- // Formatting
- protected Label fLineWidthLabel;
-
- protected Text fLineWidthText;
- // prohibit wrapping if style attribute
- protected Button fNowrapAttr;
- // one property per one line
- protected Button fPropertyPerLine;
- protected Button fPropNameLower;
-
- // case of property name
- protected Button fPropNameUpper;
- protected Button fPropValueLower;
- // case of property value
- protected Button fPropValueUpper;
- protected Button fSplitMultiAttrs;
- private final int MAX_INDENTATION_SIZE = 16;
- private final int MIN_INDENTATION_SIZE = 0;
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- final Composite composite = super.createComposite(parent, 1);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.CSS_PREFWEBX_SOURCE_HELPID);
-
- new PreferenceLinkArea(composite, SWT.WRAP | SWT.MULTI, "org.eclipse.wst.sse.ui.preferences.editor", CSSUIMessages._UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK,//$NON-NLS-1$
- (IWorkbenchPreferenceContainer) getContainer(), null).getControl().setLayoutData(GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).create());
- new Label(composite, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().create());
-
- createContentsForFormattingGroup(composite);
- createContentsForContentAssistGroup(composite);
- setSize(composite);
- loadPreferences();
-
- return composite;
- }
-
- private void createContentsForContentAssistGroup(Composite parent) {
- // not content assist, but preferred case
- Group caseGroup = createGroup(parent, 3);
- caseGroup.setText(CSSUIMessages.PrefsLabel_CaseGroup);
-
- // use group for radio buttons so that associated label is read
- Group identGroup = createGroup(caseGroup, 1);
- identGroup.setText(CSSUIMessages.PrefsLabel_CaseIdent);
- fIdentUpper = createRadioButton(identGroup, CSSUIMessages.PrefsLabel_CaseIdentUpper);
- fIdentLower = createRadioButton(identGroup, CSSUIMessages.PrefsLabel_CaseIdentLower);
-
- // use group for radio buttons so that associated label is read
- Group propNameGroup = createGroup(caseGroup, 1);
- propNameGroup.setText(CSSUIMessages.PrefsLabel_CasePropName);
- fPropNameUpper = createRadioButton(propNameGroup, CSSUIMessages.PrefsLabel_CasePropNameUpper);
- fPropNameLower = createRadioButton(propNameGroup, CSSUIMessages.PrefsLabel_CasePropNameLower);
-
- // use group for radio buttons so that associated label is read
- Group propValueGroup = createGroup(caseGroup, 1);
- propValueGroup.setText(CSSUIMessages.PrefsLabel_CasePropValue);
- fPropValueUpper = createRadioButton(propValueGroup, CSSUIMessages.PrefsLabel_CasePropValueUpper);
- fPropValueLower = createRadioButton(propValueGroup, CSSUIMessages.PrefsLabel_CasePropValueLower);
- }
-
- private void createContentsForFormattingGroup(Composite parent) {
- Group formattingGroup = createGroup(parent, 2);
- formattingGroup.setText(CSSUIMessages.Formatting_UI_);
-
- fLineWidthLabel = createLabel(formattingGroup, CSSUIMessages.Line_width__UI_);
- fLineWidthText = new Text(formattingGroup, SWT.SINGLE | SWT.BORDER);
- GridData gData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.BEGINNING);
- gData.widthHint = 25;
- fLineWidthText.setLayoutData(gData);
- fLineWidthText.addModifyListener(this);
-
- fPropertyPerLine = createCheckBox(formattingGroup, CSSUIMessages.PrefsLabel_WrappingInsertLineBreak);
- ((GridData) fPropertyPerLine.getLayoutData()).horizontalSpan = 2;
-
- fNowrapAttr = createCheckBox(formattingGroup, CSSUIMessages.PrefsLabel_WrappingWithoutAttr);
- ((GridData) fNowrapAttr.getLayoutData()).horizontalSpan = 2;
-
- fIndentUsingTabs = createRadioButton(formattingGroup, CSSUIMessages.Indent_using_tabs_);
- ((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 2;
- fIndentUsingSpaces = createRadioButton(formattingGroup, CSSUIMessages.Indent_using_spaces);
- ((GridData) fIndentUsingSpaces.getLayoutData()).horizontalSpan = 2;
-
- createLabel(formattingGroup, CSSUIMessages.Indentation_size);
- fIndentationSize = new Spinner(formattingGroup, SWT.READ_ONLY | SWT.BORDER);
- GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- fIndentationSize.setLayoutData(gd);
- fIndentationSize.setToolTipText(CSSUIMessages.Indentation_size_tip);
- fIndentationSize.setMinimum(MIN_INDENTATION_SIZE);
- fIndentationSize.setMaximum(MAX_INDENTATION_SIZE);
- fIndentationSize.setIncrement(1);
- fIndentationSize.setPageIncrement(4);
- fIndentationSize.addModifyListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return CSSUIPlugin.getDefault().getPreferenceStore();
- }
-
- private void doSavePreferenceStore() {
- CSSUIPlugin.getDefault().savePluginPreferences();
- CSSCorePlugin.getDefault().savePluginPreferences(); // model
- }
-
- protected Preferences getModelPreferences() {
- return CSSCorePlugin.getDefault().getPluginPreferences();
- }
-
- protected void initializeValues() {
- initializeValuesForFormattingGroup();
- initializeValuesForContentAssistGroup();
- }
-
- private void initializeValuesForContentAssistGroup() {
- // not content assist, but preferred case
- Preferences prefs = getModelPreferences();
- fIdentUpper.setSelection(prefs.getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER);
- fIdentLower.setSelection(prefs.getInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.LOWER);
- fPropNameUpper.setSelection(prefs.getInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.UPPER);
- fPropNameLower.setSelection(prefs.getInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.LOWER);
- fPropValueUpper.setSelection(prefs.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER);
- fPropValueLower.setSelection(prefs.getInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.LOWER);
- }
-
- private void initializeValuesForFormattingGroup() {
- // Formatting
- Preferences prefs = getModelPreferences();
- fLineWidthText.setText(prefs.getString(CSSCorePreferenceNames.LINE_WIDTH));
- fPropertyPerLine.setSelection(prefs.getBoolean(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE));
- fNowrapAttr.setSelection(prefs.getBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR));
-
- if (CSSCorePreferenceNames.TAB.equals(getModelPreferences().getString(CSSCorePreferenceNames.INDENTATION_CHAR))) {
- fIndentUsingTabs.setSelection(true);
- fIndentUsingSpaces.setSelection(false);
- } else {
- fIndentUsingSpaces.setSelection(true);
- fIndentUsingTabs.setSelection(false);
- }
-
- fIndentationSize.setSelection(getModelPreferences().getInt(CSSCorePreferenceNames.INDENTATION_SIZE));
- }
-
- protected void performDefaults() {
- performDefaultsForFormattingGroup();
- performDefaultsForContentAssistGroup();
-
- validateValues();
- enableValues();
-
- super.performDefaults();
- }
-
- private void performDefaultsForContentAssistGroup() {
- // not content assist, but preferred case
- Preferences prefs = getModelPreferences();
- fIdentUpper.setSelection(prefs.getDefaultInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.UPPER);
- fIdentLower.setSelection(prefs.getDefaultInt(CSSCorePreferenceNames.CASE_IDENTIFIER) == CSSCorePreferenceNames.LOWER);
- fPropNameUpper.setSelection(prefs.getDefaultInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.UPPER);
- fPropNameLower.setSelection(prefs.getDefaultInt(CSSCorePreferenceNames.CASE_PROPERTY_NAME) == CSSCorePreferenceNames.LOWER);
- fPropValueUpper.setSelection(prefs.getDefaultInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.UPPER);
- fPropValueLower.setSelection(prefs.getDefaultInt(CSSCorePreferenceNames.CASE_PROPERTY_VALUE) == CSSCorePreferenceNames.LOWER);
- }
-
- private void performDefaultsForFormattingGroup() {
- // Formatting
- Preferences prefs = getModelPreferences();
- fLineWidthText.setText(prefs.getDefaultString(CSSCorePreferenceNames.LINE_WIDTH));
- fPropertyPerLine.setSelection(prefs.getDefaultBoolean(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE));
- fNowrapAttr.setSelection(prefs.getDefaultBoolean(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR));
-
- if (CSSCorePreferenceNames.TAB.equals(getModelPreferences().getDefaultString(CSSCorePreferenceNames.INDENTATION_CHAR))) {
- fIndentUsingTabs.setSelection(true);
- fIndentUsingSpaces.setSelection(false);
- } else {
- fIndentUsingSpaces.setSelection(true);
- fIndentUsingTabs.setSelection(false);
- }
- fIndentationSize.setSelection(getModelPreferences().getDefaultInt(CSSCorePreferenceNames.INDENTATION_SIZE));
- }
-
- public boolean performOk() {
- boolean result = super.performOk();
-
- doSavePreferenceStore();
-
- return result;
- }
-
- protected void storeValues() {
- storeValuesForFormattingGroup();
- storeValuesForContentAssistGroup();
- }
-
- private void storeValuesForContentAssistGroup() {
- // not content assist, but preferred case
- Preferences prefs = getModelPreferences();
- prefs.setValue(CSSCorePreferenceNames.CASE_IDENTIFIER, (fIdentUpper.getSelection()) ? CSSCorePreferenceNames.UPPER : CSSCorePreferenceNames.LOWER);
- prefs.setValue(CSSCorePreferenceNames.CASE_PROPERTY_NAME, (fPropNameUpper.getSelection()) ? CSSCorePreferenceNames.UPPER : CSSCorePreferenceNames.LOWER);
- prefs.setValue(CSSCorePreferenceNames.CASE_PROPERTY_VALUE, (fPropValueUpper.getSelection()) ? CSSCorePreferenceNames.UPPER : CSSCorePreferenceNames.LOWER);
- }
- private void storeValuesForFormattingGroup() {
- // Formatting
- Preferences prefs = getModelPreferences();
- prefs.setValue(CSSCorePreferenceNames.LINE_WIDTH, fLineWidthText.getText());
- prefs.setValue(CSSCorePreferenceNames.WRAPPING_ONE_PER_LINE, fPropertyPerLine.getSelection());
- prefs.setValue(CSSCorePreferenceNames.WRAPPING_PROHIBIT_WRAP_ON_ATTR, fNowrapAttr.getSelection());
-
- if (fIndentUsingTabs.getSelection()) {
- getModelPreferences().setValue(CSSCorePreferenceNames.INDENTATION_CHAR, CSSCorePreferenceNames.TAB);
- } else {
- getModelPreferences().setValue(CSSCorePreferenceNames.INDENTATION_CHAR, CSSCorePreferenceNames.SPACE);
- }
- getModelPreferences().setValue(CSSCorePreferenceNames.INDENTATION_SIZE, fIndentationSize.getSelection());
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSyntaxColoringPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSyntaxColoringPage.java
deleted file mode 100644
index afd4014091..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSyntaxColoringPage.java
+++ /dev/null
@@ -1,881 +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.wst.css.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.preference.PreferencePage;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.TextAttribute;
-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.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.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.css.ui.internal.style.IStyleConstantsCSS;
-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.ColorHelper;
-import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
-
-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 CSSSyntaxColoringPage extends PreferencePage 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;
-
- // 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);
- fBold.setEnabled(true);
- fItalic.setEnabled(true);
- fStrike.setEnabled(true);
- fUnderline.setEnabled(true);
- fForegroundLabel.setEnabled(true);
- fBackgroundLabel.setEnabled(true);
- fForegroundColorEditor.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.CSS_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, CSSUIMessages.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, "");
- Button enabler = createCheckbox(editingComposite, CSSUIMessages.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);
-
- 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);
-
- fBold = createCheckbox(editControls, CSSUIMessages.SyntaxColoringPage_3);
- fBold.setEnabled(false);
- ((GridData) fBold.getLayoutData()).horizontalSpan = 2;
- fItalic = createCheckbox(editControls, CSSUIMessages.SyntaxColoringPage_4);
- fItalic.setEnabled(false);
- ((GridData) fItalic.getLayoutData()).horizontalSpan = 2;
- fStrike = createCheckbox(editControls, CSSUIMessages.SyntaxColoringPage_5);
- fStrike.setEnabled(false);
- ((GridData) fStrike.getLayoutData()).horizontalSpan = 2;
- fUnderline = createCheckbox(editControls, CSSUIMessages.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:"
- SourceViewer viewer = new SourceViewer(sampleArea, null, SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY);
- fText = viewer.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"));
- fText.addKeyListener(getTextKeyListener());
- fText.addSelectionListener(getTextSelectionListener());
- fText.addMouseListener(getTextMouseListener());
- fText.addTraverseListener(getTraverseListener());
- setAccessible(fText, SSEUIMessages.Sample_text__UI_);
- fDocument = StructuredModelManager.getModelManager().createStructuredDocumentFor(ContentTypeIdForCSS.ContentTypeID_CSS);
- fDocument.set(getExampleText());
- viewer.setDocument(fDocument);
-
- top.setWeights(new int[]{1, 1});
- editor.setWeights(new int[]{1, 1});
- PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.CSS_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;
- }
-
- 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 CSSUIPlugin.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 CSSUIMessages.PrefsLabel_ColorSample;
- }
-
- 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(IStyleConstantsCSS.NORMAL);
- styles.add(IStyleConstantsCSS.ATMARK_RULE);
- styles.add(IStyleConstantsCSS.SELECTOR);
- styles.add(IStyleConstantsCSS.MEDIA);
- styles.add(IStyleConstantsCSS.COMMENT);
- styles.add(IStyleConstantsCSS.PROPERTY_NAME);
- styles.add(IStyleConstantsCSS.PROPERTY_VALUE);
- styles.add(IStyleConstantsCSS.URI);
- styles.add(IStyleConstantsCSS.STRING);
- styles.add(IStyleConstantsCSS.COLON);
- styles.add(IStyleConstantsCSS.SEMI_COLON);
- styles.add(IStyleConstantsCSS.CURLY_BRACE);
- styles.add(IStyleConstantsCSS.ERROR);
- 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(CSSRegionContexts.CSS_COMMENT, IStyleConstantsCSS.COMMENT);
- fContextToStyleMap.put(CSSRegionContexts.CSS_CDO, IStyleConstantsCSS.COMMENT);
- fContextToStyleMap.put(CSSRegionContexts.CSS_CDC, IStyleConstantsCSS.COMMENT);
- fContextToStyleMap.put(CSSRegionContexts.CSS_S, IStyleConstantsCSS.NORMAL);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
- fContextToStyleMap.put(CSSRegionContexts.CSS_LBRACE, IStyleConstantsCSS.CURLY_BRACE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_RBRACE, IStyleConstantsCSS.CURLY_BRACE);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_IMPORT, IStyleConstantsCSS.ATMARK_RULE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_PAGE, IStyleConstantsCSS.ATMARK_RULE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_MEDIA, IStyleConstantsCSS.ATMARK_RULE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_FONT_FACE, IStyleConstantsCSS.ATMARK_RULE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_CHARSET, IStyleConstantsCSS.ATMARK_RULE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_ATKEYWORD, IStyleConstantsCSS.ATMARK_RULE);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_STRING, IStyleConstantsCSS.STRING);
- fContextToStyleMap.put(CSSRegionContexts.CSS_URI, IStyleConstantsCSS.URI);
- fContextToStyleMap.put(CSSRegionContexts.CSS_MEDIUM, IStyleConstantsCSS.MEDIA);
- fContextToStyleMap.put(CSSRegionContexts.CSS_MEDIA_SEPARATOR, IStyleConstantsCSS.MEDIA);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_CHARSET_NAME, IStyleConstantsCSS.STRING);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_PAGE_SELECTOR, IStyleConstantsCSS.MEDIA);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_UNIVERSAL, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_PSEUDO, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_CLASS, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ID, IStyleConstantsCSS.SELECTOR);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_COMBINATOR, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_SEPARATOR, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE, IStyleConstantsCSS.SELECTOR);
- fContextToStyleMap.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR, IStyleConstantsCSS.SELECTOR);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_PROPERTY, IStyleConstantsCSS.PROPERTY_NAME);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_STRING, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_URI, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_HASH, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_VALUE_S, IStyleConstantsCSS.PROPERTY_VALUE);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_SEPARATOR, IStyleConstantsCSS.COLON);
- fContextToStyleMap.put(CSSRegionContexts.CSS_DECLARATION_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
-
- fContextToStyleMap.put(CSSRegionContexts.CSS_UNKNOWN, IStyleConstantsCSS.ERROR);
- }
-
- private void initStyleToDescriptionMap() {
- fStyleToDescriptionMap.put(IStyleConstantsCSS.NORMAL, CSSUIMessages.PrefsLabel_ColorNormal);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.ATMARK_RULE, CSSUIMessages.PrefsLabel_ColorAtmarkRule);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.SELECTOR, CSSUIMessages.PrefsLabel_ColorSelector);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.MEDIA, CSSUIMessages.PrefsLabel_ColorMedia);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.COMMENT, CSSUIMessages.PrefsLabel_ColorComment);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.PROPERTY_NAME, CSSUIMessages.PrefsLabel_ColorPropertyName);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.PROPERTY_VALUE, CSSUIMessages.PrefsLabel_ColorPropertyValue);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.URI, CSSUIMessages.PrefsLabel_ColorUri);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.STRING, CSSUIMessages.PrefsLabel_ColorString);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.COLON, CSSUIMessages.PrefsLabel_ColorColon);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.SEMI_COLON, CSSUIMessages.PrefsLabel_ColorSemiColon);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.CURLY_BRACE, CSSUIMessages.PrefsLabel_ColorCurlyBrace);//$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsCSS.ERROR, CSSUIMessages.PrefsLabel_ColorError);//$NON-NLS-1$
- }
-
- protected void performDefaults() {
- super.performDefaults();
- getOverlayStore().loadDefaults();
- applyStyles();
- fStylesViewer.setSelection(StructuredSelection.EMPTY);
- activate(null);
- fText.redraw();
- }
-
- public boolean performOk() {
- getOverlayStore().propagate();
-
- CSSUIPlugin.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.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSTemplatePreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSTemplatePreferencePage.java
deleted file mode 100644
index 419351ed29..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSTemplatePreferencePage.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.wst.css.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.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.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
-import org.eclipse.wst.css.ui.StructuredTextViewerConfigurationCSS;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-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 CSS templates
- */
-public class CSSTemplatePreferencePage extends TemplatePreferencePage {
-
- class CSSEditTemplateDialog extends EditTemplateDialog {
- public CSSEditTemplateDialog(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 StructuredTextViewerConfigurationCSS();
-
- 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 CSSTemplatePreferencePage() {
- CSSUIPlugin cssUIPlugin = CSSUIPlugin.getDefault();
-
- setPreferenceStore(cssUIPlugin.getPreferenceStore());
- setTemplateStore(cssUIPlugin.getTemplateStore());
- setContextTypeRegistry(cssUIPlugin.getTemplateContextRegistry());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- boolean ok = super.performOk();
- CSSUIPlugin.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.CSS_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 StructuredTextViewerConfigurationCSS();
-
- 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 = ContentTypeIdForCSS.ContentTypeID_CSS;
- viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- ((StructuredTextViewer) 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 CSSEditTemplateDialog(getShell(), template, edit, isNameModifiable, getContextTypeRegistry());
- if (dialog.open() == Window.OK) {
- return dialog.getTemplate();
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionAnnotationModelChanges.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionAnnotationModelChanges.java
deleted file mode 100644
index 1c5108bd3d..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionAnnotationModelChanges.java
+++ /dev/null
@@ -1,55 +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.wst.css.ui.internal.projection;
-
-import java.util.Map;
-
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-/**
- * Contains a set of projection model additions/deletions/modifications
- */
-class ProjectionAnnotationModelChanges {
- // copies of this class located in:
- // org.eclipse.wst.xml.ui.internal.projection
- // org.eclipse.wst.css.ui.internal.projection
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
- // change Node to ICSSNode
- private ICSSNode fNode;
- private Annotation[] fDeletions;
- private Map fAdditions;
- private Annotation[] fModifications;
-
- public ProjectionAnnotationModelChanges(ICSSNode node, Annotation[] deletions, Map additions, Annotation[] modifications) {
- fNode = node;
- fDeletions = deletions;
- fAdditions = additions;
- fModifications = modifications;
- }
-
- public Map getAdditions() {
- return fAdditions;
- }
-
- public Annotation[] getDeletions() {
- return fDeletions;
- }
-
- public Annotation[] getModifications() {
- return fModifications;
- }
-
- public ICSSNode getNode() {
- return fNode;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionModelNodeAdapterCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionModelNodeAdapterCSS.java
deleted file mode 100644
index af6e56e9de..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionModelNodeAdapterCSS.java
+++ /dev/null
@@ -1,303 +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.wst.css.ui.internal.projection;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-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.core.internal.provisional.IndexedRegion;
-
-/**
- * Updates projection annotation model with projection annotations for this
- * adapter node's children
- */
-public class ProjectionModelNodeAdapterCSS implements INodeAdapter {
- private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.css.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$\
-
- private class TagProjectionAnnotation extends ProjectionAnnotation {
- private boolean fIsVisible = false; /* workaround for BUG85874 */
- private ICSSNode fNode;
-
- public TagProjectionAnnotation(ICSSNode node, boolean isCollapsed) {
- super(isCollapsed);
- fNode = node;
- }
-
- public ICSSNode getNode() {
- return fNode;
- }
-
- public void setNode(ICSSNode node) {
- fNode = node;
- }
-
- /**
- * Does not paint hidden annotations. Annotations are hidden when they
- * only span one line.
- *
- * @see ProjectionAnnotation#paint(org.eclipse.swt.graphics.GC,
- * org.eclipse.swt.widgets.Canvas,
- * org.eclipse.swt.graphics.Rectangle)
- */
- public void paint(GC gc, Canvas canvas, Rectangle rectangle) {
- /* workaround for BUG85874 */
- /*
- * only need to check annotations that are expanded because hidden
- * annotations should never have been given the chance to
- * collapse.
- */
- if (!isCollapsed()) {
- // working with rectangle, so line height
- FontMetrics metrics = gc.getFontMetrics();
- if (metrics != null) {
- // do not draw annotations that only span one line and
- // mark them as not visible
- if ((rectangle.height / metrics.getHeight()) <= 1) {
- fIsVisible = false;
- return;
- }
- }
- }
- fIsVisible = true;
- super.paint(gc, canvas, rectangle);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.projection.ProjectionAnnotation#markCollapsed()
- */
- public void markCollapsed() {
- /* workaround for BUG85874 */
- // do not mark collapsed if annotation is not visible
- if (fIsVisible)
- super.markCollapsed();
- }
- }
-
- ProjectionModelNodeAdapterFactoryCSS fAdapterFactory;
- private Map fTagAnnotations = new HashMap();
-
- public ProjectionModelNodeAdapterCSS(ProjectionModelNodeAdapterFactoryCSS factory) {
- fAdapterFactory = factory;
- }
-
- /**
- * Create a projection position from the given node. Able to get
- * projection position if node isNodeProjectable.
- *
- * @param node
- * @return null if no projection position possible, a Position otherwise
- */
- private Position createProjectionPosition(ICSSNode node) {
- Position pos = null;
- if (isNodeProjectable(node) && node instanceof IndexedRegion) {
- // IDocument document =
- // fAdapterFactory.getProjectionViewer().getDocument();
- // if (document != null) {
- IndexedRegion inode = (IndexedRegion) node;
- int start = inode.getStartOffset();
- int end = inode.getEndOffset();
- if (start >= 0 && start < end) {
- // region-based
- // extra line when collapsed, but no region increase when
- // add newline
- pos = new Position(start, end - start);
- // try {
- // // line-based
- // // extra line when collapsed, but no region
- // // increase when add newline
- // IRegion startLineRegion =
- // document.getLineInformationOfOffset(start);
- // IRegion endLineRegion =
- // document.getLineInformationOfOffset(end);
- // int startOffset = startLineRegion.getOffset();
- // int endOffset = endLineRegion.getOffset() +
- // endLineRegion.getLength();
- // if (endOffset > startOffset) {
- // pos = new Position(startOffset, endOffset -
- // startOffset);
- // }
- //
- // // line-based
- // // no extra line when collapsed, but region increase
- // // when add newline
- // int startLine = document.getLineOfOffset(start);
- // int endLine = document.getLineOfOffset(end);
- // if (endLine + 1 < document.getNumberOfLines()) {
- // int offset = document.getLineOffset(startLine);
- // int endOffset = document.getLineOffset(endLine + 1);
- // pos = new Position(offset, endOffset - offset);
- // }
- // }
- // catch (BadLocationException x) {
- // Logger.log(Logger.WARNING_DEBUG, null, x);
- // }
- }
- // }
- }
- return pos;
- }
-
- /**
- * Find TagProjectionAnnotation for node in the current list of projection
- * annotations for this adapter
- *
- * @param node
- * @return TagProjectionAnnotation
- */
- private TagProjectionAnnotation getExistingAnnotation(ICSSNode node) {
- TagProjectionAnnotation anno = null;
-
- if ((node != null) && (!fTagAnnotations.isEmpty())) {
- Iterator it = fTagAnnotations.keySet().iterator();
- while (it.hasNext() && anno == null) {
- TagProjectionAnnotation a = (TagProjectionAnnotation) it.next();
- ICSSNode n = a.getNode();
- if (node.equals(n)) {
- anno = a;
- }
- }
- }
- return anno;
- }
-
- public boolean isAdapterForType(Object type) {
- return type == ProjectionModelNodeAdapterCSS.class;
- }
-
- /**
- * Returns true if node is a node type able to fold
- *
- * @param node
- * @return boolean true if node is projectable, false otherwise
- */
- private boolean isNodeProjectable(ICSSNode node) {
- if (node != null) {
- short type = node.getNodeType();
- if (type == ICSSNode.STYLERULE_NODE || type == ICSSNode.PAGERULE_NODE || type == ICSSNode.MEDIARULE_NODE || type == ICSSNode.IMPORTRULE_NODE || type == ICSSNode.FONTFACERULE_NODE || type == ICSSNode.CHARSETRULE_NODE)
- return true;
- }
- return false;
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- // check if folding is even enabled, if not, just ignore notifyChanged
- // events
- if (!fAdapterFactory.isActive()) {
- return;
- }
-
- // workaround for Bug85342 - STRUCTRE_CHANGED is never fired so need
- // to listen for every ADD, REMOVE
- // if ((eventType == INodeNotifier.STRUCTURE_CHANGED) && (notifier
- // instanceof ICSSNode)) {
- if ((eventType == INodeNotifier.ADD || eventType == INodeNotifier.REMOVE) && (notifier instanceof ICSSNode)) {
- updateAdapter((ICSSNode) notifier);
- }
- }
-
- /**
- * Update the projection annotation of all the nodes that are children of
- * node
- *
- * @param node
- */
- void updateAdapter(ICSSNode node) {
- updateAdapter(node, null);
- }
-
- /**
- * Update the projection annotation of all the nodes that are children of
- * node and adds all projection annotations to viewer (for newly added
- * viewers)
- *
- * @param node
- * @param viewer
- */
- void updateAdapter(ICSSNode node, ProjectionViewer viewer) {
- long start = System.currentTimeMillis();
-
- Map additions = new HashMap();
- Map projectionAnnotations = new HashMap();
-
- // go through immediate child nodes and figure out projection
- // model annotations
- if (node != null) {
- ICSSNode childNode = node.getFirstChild();
- while (childNode != null) {
- Position newPos = createProjectionPosition(childNode);
- if (newPos != null) {
- TagProjectionAnnotation newAnnotation = new TagProjectionAnnotation(childNode, false);
- TagProjectionAnnotation existing = getExistingAnnotation(childNode);
- if (existing == null) {
- // add to map containing all annotations for this
- // adapter
- projectionAnnotations.put(newAnnotation, newPos);
- // add to map containing annotations to add
- additions.put(newAnnotation, newPos);
- }
- else {
- // add to map containing all annotations for this
- // adapter
- projectionAnnotations.put(existing, newPos);
- // remove from map containing annotations to delete
- fTagAnnotations.remove(existing);
- }
- }
- childNode = childNode.getNextSibling();
- }
-
- // in the end, want to delete anything leftover in old list, add
- // everything in additions, and update everything in
- // projectionAnnotations
- ProjectionAnnotation[] oldList = null;
- if (!fTagAnnotations.isEmpty()) {
- oldList = (ProjectionAnnotation[]) fTagAnnotations.keySet().toArray(new ProjectionAnnotation[0]);
- }
- ProjectionAnnotation[] modifyList = null;
- if (!projectionAnnotations.isEmpty()) {
- modifyList = (ProjectionAnnotation[]) projectionAnnotations.keySet().toArray(new ProjectionAnnotation[0]);
- }
-
- // specifically add all annotations to viewer
- if (viewer != null && !projectionAnnotations.isEmpty()) {
- fAdapterFactory.queueAnnotationModelChanges(node, null, projectionAnnotations, null, viewer);
- }
-
- // only update when there is something to update
- if ((oldList != null && oldList.length > 0) || (!additions.isEmpty()) || (modifyList != null && modifyList.length > 0))
- fAdapterFactory.queueAnnotationModelChanges(node, oldList, additions, modifyList);
- }
-
- // save new list of annotations
- fTagAnnotations = projectionAnnotations;
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- String nodeName = node != null ? node.toString() : "null"; //$NON-NLS-1$
- System.out.println("ProjectionModelNodeAdapterCSS.updateAdapter (" + nodeName + "):" + (end - start)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionModelNodeAdapterFactoryCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionModelNodeAdapterFactoryCSS.java
deleted file mode 100644
index 10d7239e4b..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionModelNodeAdapterFactoryCSS.java
+++ /dev/null
@@ -1,169 +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.wst.css.ui.internal.projection;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-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;
-
-public class ProjectionModelNodeAdapterFactoryCSS extends AbstractAdapterFactory {
- /**
- * List of projection viewers currently associated with this projection
- * model node adapter factory.
- */
- private HashMap fProjectionViewers;
-
- public ProjectionModelNodeAdapterFactoryCSS() {
- this(ProjectionModelNodeAdapterCSS.class);
- }
-
- public ProjectionModelNodeAdapterFactoryCSS(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
- public ProjectionModelNodeAdapterFactoryCSS(Object adapterKey) {
- super(adapterKey);
- }
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- ProjectionModelNodeAdapterCSS adapter = null;
-
- if ((isActive()) && (target instanceof ICSSNode)) {
- ICSSNode node = (ICSSNode) target;
- short type = node.getNodeType();
- // only add for top stylesheet node
- if (type == ICSSNode.STYLESHEET_NODE) {
- adapter = new ProjectionModelNodeAdapterCSS(this);
- adapter.updateAdapter(node);
- }
- }
-
- return adapter;
- }
-
- /**
- * Return true if this factory is currently actively managing projection
- *
- * @return
- */
- boolean isActive() {
- return (fProjectionViewers != null && !fProjectionViewers.isEmpty());
- }
-
- /**
- * Updates projection annotation model if document is not in flux.
- * Otherwise, queues up the changes to be applied when document is ready.
- *
- * @param node
- * @param deletions
- * @param additions
- * @param modifications
- */
- void queueAnnotationModelChanges(ICSSNode node, Annotation[] deletions, Map additions, Annotation[] modifications) {
- queueAnnotationModelChanges(node, deletions, additions, modifications, null);
- }
-
- /**
- * Updates projection annotation model for a specific projection viewer if
- * document is not in flux. Otherwise, queues up the changes to be applied
- * when document is ready.
- *
- * @param node
- * @param deletions
- * @param additions
- * @param modifications
- * @param viewer
- */
- void queueAnnotationModelChanges(ICSSNode node, Annotation[] deletions, Map additions, Annotation[] modifications, ProjectionViewer viewer) {
- // create a change object for latest change and add to queue
- ProjectionAnnotationModelChanges newChange = new ProjectionAnnotationModelChanges(node, deletions, additions, modifications);
- if (fProjectionViewers != null) {
- if (viewer != null) {
- ProjectionViewerInformation info = (ProjectionViewerInformation) fProjectionViewers.get(viewer);
- if (info != null) {
- info.queueAnnotationModelChanges(newChange);
- }
- }
- else {
- Iterator infos = fProjectionViewers.values().iterator();
- while (infos.hasNext()) {
- ProjectionViewerInformation info = (ProjectionViewerInformation) infos.next();
- info.queueAnnotationModelChanges(newChange);
- }
- }
- }
- }
-
- public void release() {
- // go through every projectionviewer and call
- // removeProjectionViewer(viewer);
- if (fProjectionViewers != null) {
- Iterator infos = fProjectionViewers.values().iterator();
- while (infos.hasNext()) {
- ProjectionViewerInformation info = (ProjectionViewerInformation) infos.next();
- info.dispose();
- infos.remove();
- }
- fProjectionViewers = null;
- }
- super.release();
- }
-
- /**
- * Adds viewer to list of projection viewers this factory is associated
- * with
- *
- * @param viewer -
- * assumes viewer's document and projection annotation model
- * are not null
- */
- void addProjectionViewer(ProjectionViewer viewer) {
- // remove old entry if it exists
- removeProjectionViewer(viewer);
-
- if (fProjectionViewers == null) {
- fProjectionViewers = new HashMap();
- }
-
- // create new object containing projection viewer and its info
- ProjectionViewerInformation info = new ProjectionViewerInformation(viewer);
- fProjectionViewers.put(viewer, info);
- info.initialize();
- }
-
- /**
- * Removes the given viewer from the list of projection viewers this
- * factor is associated with
- *
- * @param viewer
- */
- void removeProjectionViewer(ProjectionViewer viewer) {
- if (fProjectionViewers != null) {
- // remove entry from list of viewers
- ProjectionViewerInformation info = (ProjectionViewerInformation) fProjectionViewers.remove(viewer);
- if (info != null) {
- info.dispose();
- }
- // if removing last projection viewer, clear out everything
- if (fProjectionViewers.isEmpty()) {
- fProjectionViewers = null;
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionViewerInformation.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionViewerInformation.java
deleted file mode 100644
index a058fd1f9a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/ProjectionViewerInformation.java
+++ /dev/null
@@ -1,196 +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.wst.css.ui.internal.projection;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentExtension;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.css.ui.internal.Logger;
-
-/**
- * Contains information about a projection viewer and also manages updating
- * the viewer's projection annotation model
- */
-class ProjectionViewerInformation {
- // copies of this class located in:
- // org.eclipse.wst.xml.ui.internal.projection
- // org.eclipse.wst.css.ui.internal.projection
- // org.eclipse.wst.html.ui.internal.projection
- // org.eclipse.jst.jsp.ui.internal.projection
-
- /**
- * Listens to document to be aware of when to update the projection
- * annotation model.
- */
- private class DocumentListener implements IDocumentListener {
- private ProjectionViewerInformation fInfo;
-
- public DocumentListener(ProjectionViewerInformation info) {
- fInfo = info;
- }
-
- public void documentAboutToBeChanged(DocumentEvent event) {
- IDocument document = event.getDocument();
- if (fInfo.getDocument() == document) {
- fInfo.setIsDocumentChanging(true);
- }
- }
-
- public void documentChanged(DocumentEvent event) {
- // register a post notification replace so that projection
- // annotation model will be updated after all documentChanged
- // listeners have been notified
- IDocument document = event.getDocument();
- if (document instanceof IDocumentExtension && fInfo.getDocument() == document) {
- if (fInfo.hasChangesQueued())
- ((IDocumentExtension) document).registerPostNotificationReplace(this, new PostDocumentChangedListener(fInfo));
- }
- }
- }
-
- /**
- * Essentially a post document changed listener because it is called after
- * documentchanged has been fired.
- */
- private class PostDocumentChangedListener implements IDocumentExtension.IReplace {
- private ProjectionViewerInformation fInfo;
-
- public PostDocumentChangedListener(ProjectionViewerInformation info) {
- fInfo = info;
- }
-
- public void perform(IDocument document, IDocumentListener owner) {
- fInfo.applyAnnotationModelChanges();
- fInfo.setIsDocumentChanging(false);
- }
- }
-
- /**
- * Projection annotation model current associated with this projection
- * viewer
- */
- private ProjectionAnnotationModel fProjectionAnnotationModel;
- /**
- * Document currently associated with this projection viewer
- */
- private IDocument fDocument;
- /**
- * Listener to fProjectionViewer's document
- */
- private IDocumentListener fDocumentListener;
- /**
- * Indicates whether or not document is in the middle of changing
- */
- private boolean fIsDocumentChanging = false;
- /**
- * List of projection annotation model changes that need to be applied
- */
- private List fQueuedAnnotationChanges;
-
- public ProjectionViewerInformation(ProjectionViewer viewer) {
- fDocument = viewer.getDocument();
- fProjectionAnnotationModel = viewer.getProjectionAnnotationModel();
- }
-
- IDocument getDocument() {
- return fDocument;
- }
-
- private List getQueuedAnnotationChanges() {
- if (fQueuedAnnotationChanges == null) {
- fQueuedAnnotationChanges = new ArrayList();
- }
- return fQueuedAnnotationChanges;
- }
-
- void setIsDocumentChanging(boolean changing) {
- fIsDocumentChanging = changing;
- }
-
- private boolean isDocumentChanging() {
- return fIsDocumentChanging;
- }
-
- /**
- * Applies the pending projection annotation model changes to the
- * projection annotation model.
- */
- void applyAnnotationModelChanges() {
- List queuedChanges = getQueuedAnnotationChanges();
- // go through all the pending annotation changes and apply
- // them to
- // the projection annotation model
- while (!queuedChanges.isEmpty()) {
- ProjectionAnnotationModelChanges changes = (ProjectionAnnotationModelChanges) queuedChanges.remove(0);
- try {
- fProjectionAnnotationModel.modifyAnnotations(changes.getDeletions(), changes.getAdditions(), changes.getModifications());
- }
- catch (Exception e) {
- // if anything goes wrong, log it be continue
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
-
- /**
- * Returns true if there are annotation changes queued up, false otherwise
- *
- * @return boolean
- */
- boolean hasChangesQueued() {
- return !getQueuedAnnotationChanges().isEmpty();
- }
-
- /**
- * Updates projection annotation model if document is not in flux.
- * Otherwise, queues up the changes to be applied when document is ready.
- */
- public void queueAnnotationModelChanges(ProjectionAnnotationModelChanges newChange) {
- /*
- * future_TODO: maybe improve by checking if annotation projection
- * model change already exists for node. if so, throw out old change.
- */
- getQueuedAnnotationChanges().add(newChange);
-
- // if document isn't changing, go ahead and apply it
- if (!isDocumentChanging()) {
- applyAnnotationModelChanges();
- }
- }
-
- public void initialize() {
- // add document listener
- if (fDocumentListener == null) {
- fDocumentListener = new DocumentListener(this);
- }
- getDocument().addDocumentListener(fDocumentListener);
- }
-
- public void dispose() {
- // remove document listener
- if (fDocumentListener != null) {
- getDocument().removeDocumentListener(fDocumentListener);
- }
-
- // clear out list of queued changes since it may no longer
- // be accurate
- if (fQueuedAnnotationChanges != null) {
- fQueuedAnnotationChanges.clear();
- fQueuedAnnotationChanges = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/StructuredTextFoldingProviderCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/StructuredTextFoldingProviderCSS.java
deleted file mode 100644
index 1d06224aea..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/StructuredTextFoldingProviderCSS.java
+++ /dev/null
@@ -1,260 +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.wst.css.ui.internal.projection;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextInputListener;
-import org.eclipse.jface.text.source.projection.IProjectionListener;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.projection.IStructuredTextFoldingProvider;
-
-/**
- * Updates the projection model of a structured model for CSS.
- */
-public class StructuredTextFoldingProviderCSS implements IStructuredTextFoldingProvider, IProjectionListener, ITextInputListener {
- private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.css.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$\
-
- private IDocument fDocument;
- private ProjectionViewer fViewer;
- private boolean fProjectionNeedsToBeEnabled = false;
-
- /**
- * Just add adapter to top stylesheet node. This adapter will track
- * children addition/deletion.
- */
- private void addAllAdapters() {
- long start = System.currentTimeMillis();
-
- if (fDocument != null) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (sModel instanceof ICSSModel) {
- ICSSModel cssModel = (ICSSModel) sModel;
- ICSSDocument cssDoc = cssModel.getDocument();
- if (cssDoc instanceof INodeNotifier) {
- INodeNotifier notifier = (INodeNotifier) cssDoc;
- ProjectionModelNodeAdapterCSS adapter = (ProjectionModelNodeAdapterCSS) notifier.getExistingAdapter(ProjectionModelNodeAdapterCSS.class);
- if (adapter != null) {
- adapter.updateAdapter(cssDoc, fViewer);
- }
- else {
- // just call getadapter so the adapter is created
- // and
- // automatically initialized
- notifier.getAdapterFor(ProjectionModelNodeAdapterCSS.class);
- }
- }
- }
- }
- finally {
- if (sModel != null) {
- sModel.releaseFromRead();
- }
- }
- }
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderCSS.addAllAdapters: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- /**
- * Get the ProjectionModelNodeAdapterFactoryCSS to use with this provider.
- *
- * @return ProjectionModelNodeAdapterFactoryCSS
- */
- private ProjectionModelNodeAdapterFactoryCSS getAdapterFactory(boolean createIfNeeded) {
- ProjectionModelNodeAdapterFactoryCSS factory = null;
- if (fDocument != null) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (sModel != null) {
- FactoryRegistry factoryRegistry = sModel.getFactoryRegistry();
-
- // getting the projectionmodelnodeadapter for the first
- // time
- // so do some initializing
- if (!factoryRegistry.contains(ProjectionModelNodeAdapterCSS.class) && createIfNeeded) {
- ProjectionModelNodeAdapterFactoryCSS newFactory = new ProjectionModelNodeAdapterFactoryCSS();
-
- // add factory to factory registry
- factoryRegistry.addFactory(newFactory);
- }
-
- // try and get the factory
- factory = (ProjectionModelNodeAdapterFactoryCSS) factoryRegistry.getFactoryFor(ProjectionModelNodeAdapterCSS.class);
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
- return factory;
- }
-
- /**
- * Initialize this provider with the correct document. Assumes projection
- * is enabled. (otherwise, only install would have been called)
- */
- public void initialize() {
- if (!isInstalled())
- return;
-
- long start = System.currentTimeMillis();
- // clear out old info
- projectionDisabled();
-
- fDocument = fViewer.getDocument();
-
- // set projection viewer on new document's adapter factory
- if (fViewer.getProjectionAnnotationModel() != null) {
- ProjectionModelNodeAdapterFactoryCSS factory = getAdapterFactory(true);
- if (factory != null) {
- factory.addProjectionViewer(fViewer);
- }
-
- try {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=198304
- // disable redraw while adding all adapters
- fViewer.setRedraw(false);
- addAllAdapters();
- }
- finally {
- fViewer.setRedraw(true);
- }
- }
- fProjectionNeedsToBeEnabled = false;
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderCSS.initialize: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- /**
- * Associate a ProjectionViewer with this IStructuredTextFoldingProvider
- *
- * @param viewer -
- * assumes not null
- */
- public void install(ProjectionViewer viewer) {
- // uninstall before trying to install new viewer
- if (isInstalled()) {
- uninstall();
- }
- fViewer = viewer;
- fViewer.addProjectionListener(this);
- fViewer.addTextInputListener(this);
- }
-
- private boolean isInstalled() {
- return fViewer != null;
- }
-
- public void projectionDisabled() {
- ProjectionModelNodeAdapterFactoryCSS factory = getAdapterFactory(false);
- if (factory != null) {
- factory.removeProjectionViewer(fViewer);
- }
-
- // clear out all annotations
- if (fViewer.getProjectionAnnotationModel() != null)
- fViewer.getProjectionAnnotationModel().removeAllAnnotations();
-
- removeAllAdapters();
-
- fDocument = null;
- fProjectionNeedsToBeEnabled = false;
- }
-
- public void projectionEnabled() {
- initialize();
- }
-
- /**
- * Removes adapter from top stylesheet node
- */
- private void removeAllAdapters() {
- long start = System.currentTimeMillis();
-
- if (fDocument != null) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (sModel instanceof ICSSModel) {
- ICSSModel cssModel = (ICSSModel) sModel;
- ICSSDocument cssDoc = cssModel.getDocument();
- if (cssDoc instanceof INodeNotifier) {
- INodeNotifier notifier = (INodeNotifier) cssDoc;
- INodeAdapter adapter = notifier.getExistingAdapter(ProjectionModelNodeAdapterCSS.class);
- if (adapter != null) {
- notifier.removeAdapter(adapter);
- }
- }
- }
- }
- finally {
- if (sModel != null) {
- sModel.releaseFromRead();
- }
- }
- }
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderCSS.addAllAdapters: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
- // if folding is enabled and new document is going to be a totally
- // different document, disable projection
- if (fDocument != null && fDocument != newInput) {
- // disable projection and disconnect everything
- projectionDisabled();
- fProjectionNeedsToBeEnabled = true;
- }
- }
-
- public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
- // if projection was previously enabled before input document changed
- // and new document is different than old document
- if (fProjectionNeedsToBeEnabled && fDocument == null && newInput != null) {
- projectionEnabled();
- fProjectionNeedsToBeEnabled = false;
- }
- }
-
- /**
- * Disconnect this IStructuredTextFoldingProvider from projection viewer
- */
- public void uninstall() {
- if (isInstalled()) {
- projectionDisabled();
-
- fViewer.removeProjectionListener(this);
- fViewer.removeTextInputListener(this);
- fViewer = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java
deleted file mode 100644
index 5060e8bd41..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java
+++ /dev/null
@@ -1,355 +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.wst.css.ui.internal.properties;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMCategory;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMMNode;
-import org.eclipse.wst.css.core.internal.metamodel.CSSMetaModel;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelFinder;
-import org.eclipse.wst.css.core.internal.metamodel.util.CSSMetaModelUtil;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNodeList;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.sse.ui.views.properties.IPropertySourceExtension;
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-/**
- * A IPropertySource implementation for a JFace viewer used to display
- * properties of CSS nodes.
- */
-public class CSSPropertySource implements IPropertySource, IPropertySourceExtension {
- protected ICSSNode fNode = null;
- // for performance...
- final static Class ADAPTER_KEY = IPropertySource.class;
- final boolean PERF_GETDESCRIPTORS = false;
- private long time0;
-
- public CSSPropertySource(ICSSNode target) {
- super();
- fNode = target;
- }
-
- protected IPropertyDescriptor createDefaultPropertyDescriptor(String attributeName) {
- // the displayName MUST be set
- IPropertyDescriptor descriptor = new CSSTextPropertyDescriptor(attributeName, attributeName, fNode);
- // IPropertyDescriptor descriptor = new
- // TextPropertyDescriptor(attributeName, attributeName);
- return descriptor;
- }
-
- protected IPropertyDescriptor createPropertyDescriptor(CSSMMNode node, String category) {
- return createPropertyDescriptor(node.getName(), category);
- }
-
- protected IPropertyDescriptor createPropertyDescriptor(String name, String category) {
- IPropertyDescriptor descriptor = null;
- if (name != null && 0 < name.length()) {
- name = name.toLowerCase();
- if (category == null) {
- category = CSSUIMessages.INFO_Not_Categorized_1; //$NON-NLS-1$
- }
- descriptor = new CSSTextPropertyDescriptor(name, name, fNode, category);
- // if (category == null) {
- // descriptor = new CSSTextPropertyDescriptor(name, name, fNode);
- // } else {
- // descriptor = new CSSTextPropertyDescriptor(name, name, fNode,
- // category);
- // }
- }
- return descriptor;
- }
-
- /**
- * Returns a value for this object that can be editted in a property
- * sheet.
- *
- * @return a value that can be editted
- */
- public Object getEditableValue() {
- return null;
- }
-
- /**
- * Returns the current collection of property descriptors.
- *
- * @return a vector containing all descriptors.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- time0 = System.currentTimeMillis();
-
- CSSMetaModel metamodel = CSSMetaModelFinder.getInstance().findMetaModelFor(fNode);
- Iterator iProperties = Collections.EMPTY_LIST.iterator();
- switch (fNode.getNodeType()) {
- case ICSSNode.STYLERULE_NODE :
- case ICSSNode.FONTFACERULE_NODE :
- case ICSSNode.PAGERULE_NODE :
- case ICSSNode.STYLEDECLARATION_NODE :
- CSSMMNode mmParent = new CSSMetaModelUtil(metamodel).getMetaModelNodeFor(fNode);
- if (mmParent != null) {
- iProperties = mmParent.getChildNodes();
- }
- break;
- case ICSSNode.STYLEDECLITEM_NODE :
- CSSMMNode mmNode = new CSSMetaModelUtil(metamodel).getMetaModelNodeFor(fNode);
- if (mmNode != null) {
- iProperties = Collections.singletonList(mmNode).iterator();
- }
- break;
- default :
- break;
- }
-
- // setup categories
- Map categories = new HashMap();
- Iterator iCategories = metamodel.getCategories();
- while (iCategories.hasNext()) {
- CSSMMCategory category = (CSSMMCategory) iCategories.next();
- categories.put(category.getName(), category.getCaption());
- }
-
- // collect property names
- Set declaredProperties = new HashSet();
- if (iProperties.hasNext()) {
- CSSStyleDeclaration declaration = getDeclarationNode();
- if (declaration != null) {
- ICSSNodeList nodeList = ((ICSSNode) declaration).getChildNodes();
- int nProps = (nodeList != null) ? nodeList.getLength() : 0;
- for (int i = 0; i < nProps; i++) {
- ICSSNode node = nodeList.item(i);
- if (node instanceof ICSSStyleDeclItem) {
- String name = ((ICSSStyleDeclItem) node).getPropertyName();
- if (name != null && 0 < name.length()) {
- declaredProperties.add(name.toLowerCase());
- }
- }
- }
- }
- }
-
- List descriptors = new ArrayList();
-
- // first: properties from content model
- while (iProperties.hasNext()) {
- CSSMMNode node = (CSSMMNode) iProperties.next();
- if (node.getType() == CSSMMNode.TYPE_PROPERTY || node.getType() == CSSMMNode.TYPE_DESCRIPTOR) {
- String category = (String) categories.get(node.getAttribute("category")); //$NON-NLS-1$
- String name = node.getName().toLowerCase();
- if (declaredProperties.contains(name)) {
- declaredProperties.remove(name);
- }
- IPropertyDescriptor descriptor = createPropertyDescriptor(name, category);
- if (descriptor != null) {
- descriptors.add(descriptor);
- }
- }
- }
-
- // second: existing properties but not in content model
- Iterator iRemains = declaredProperties.iterator();
- while (iRemains.hasNext()) {
- IPropertyDescriptor descriptor = createPropertyDescriptor((String) iRemains.next(), null);
- if (descriptor != null) {
- descriptors.add(descriptor);
- }
- }
-
- IPropertyDescriptor[] resultArray = new IPropertyDescriptor[descriptors.size()];
- if (PERF_GETDESCRIPTORS) {
- System.out.println(getClass().getName() + ".getPropertyDescriptors: " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return (IPropertyDescriptor[]) descriptors.toArray(resultArray);
- }
-
- /**
- * Returns the current value for the named property.
- *
- * @param name
- * the name of the property as named by its property descriptor
- * @return the current value of the property
- */
- public Object getPropertyValue(Object name) {
- if (name == null) {
- return ""; //$NON-NLS-1$
- }
-
- String valueString = null;
- String nameString = name.toString();
-
- CSSStyleDeclaration declaration = null;
-
- switch (fNode.getNodeType()) {
- case ICSSNode.STYLEDECLITEM_NODE :
- valueString = ((ICSSStyleDeclItem) fNode).getCSSValueText();
- break;
- case ICSSNode.STYLERULE_NODE :
- case ICSSNode.FONTFACERULE_NODE :
- case ICSSNode.PAGERULE_NODE :
- declaration = (CSSStyleDeclaration) fNode.getFirstChild();
- if (declaration != null) {
- valueString = declaration.getPropertyValue(nameString);
- }
- break;
- case ICSSNode.STYLEDECLARATION_NODE :
- valueString = ((CSSStyleDeclaration) fNode).getPropertyValue(nameString);
- break;
- case ICSSNode.PRIMITIVEVALUE_NODE :
- ICSSNode parent = fNode;
- while (parent != null && !(parent instanceof ICSSStyleDeclItem)) {
- parent = parent.getParentNode();
- }
- if (parent != null) {
- valueString = ((ICSSStyleDeclItem) parent).getCSSValueText();
- }
- break;
- default :
- break;
- }
-
- if (valueString == null) {
- valueString = ""; //$NON-NLS-1$
- }
-
- return valueString;
- }
-
- /**
- * Returns whether the property value has changed from the default.
- *
- * @return <code>true</code> if the value of the specified property has
- * changed from its original default value; <code>false</code>
- * otherwise.
- */
- public boolean isPropertySet(Object property) {
- if (property == null) {
- return false;
- }
- CSSStyleDeclaration declaration = getDeclarationNode();
- if (declaration != null) {
- String value = declaration.getPropertyValue(property.toString());
- if (value != null && 0 < value.length()) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Resets the specified property's value to its default value.
- *
- * @param property
- * the property to reset
- */
- public void resetPropertyValue(Object str) {
- if (str == null) {
- return;
- }
- CSSStyleDeclaration declaration = getDeclarationNode();
- if (declaration != null) {
- declaration.removeProperty(str.toString());
- }
- }
-
- /**
- * Sets the named property to the given value.
- *
- * @param name
- * the name of the property being set
- * @param value
- * the new value for the property
- */
- public void setPropertyValue(Object name, Object value) {
- if (name == null) {
- return;
- }
- String valueString = (value != null) ? value.toString() : null;
- String nameString = name.toString();
- CSSStyleDeclaration declaration = getDeclarationNode();
- if (declaration != null) {
- try {
- if (valueString == null || valueString.length() <= 0) {
- declaration.removeProperty(nameString);
- }
- else {
- declaration.setProperty(nameString, valueString, ""); //$NON-NLS-1$
- }
- }
- catch (Exception e) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- String title = CSSUIMessages.Title_InvalidValue; //$NON-NLS-1$
- String message = CSSUIMessages.Message_InvalidValue; //$NON-NLS-1$
- MessageDialog.openWarning(window.getShell(), title, message);
- }
- }
- }
-
- private CSSStyleDeclaration getDeclarationNode() {
- CSSStyleDeclaration declaration = null;
-
- switch (fNode.getNodeType()) {
- case ICSSNode.STYLEDECLITEM_NODE :
- declaration = (CSSStyleDeclaration) fNode.getParentNode();
- break;
- case ICSSNode.STYLERULE_NODE :
- case ICSSNode.FONTFACERULE_NODE :
- case ICSSNode.PAGERULE_NODE :
- declaration = (CSSStyleDeclaration) fNode.getFirstChild();
- break;
- case ICSSNode.STYLEDECLARATION_NODE :
- declaration = (CSSStyleDeclaration) fNode;
- break;
- case ICSSNode.PRIMITIVEVALUE_NODE :
- ICSSNode parent = fNode;
- while (parent != null && !(parent instanceof CSSStyleDeclaration)) {
- parent = parent.getParentNode();
- }
- if (parent != null) {
- declaration = (CSSStyleDeclaration) parent;
- }
- break;
- default :
- break;
- }
-
- return declaration;
- }
-
- // Bug 130039 - Implement IPropertySourceExtension
-
- public boolean isPropertyRemovable(Object name) {
- return true;
- }
-
- public void removeProperty(Object name) {
- if(name == null)
- return;
-
- CSSStyleDeclaration declaration = getDeclarationNode();
-
- if(declaration != null)
- declaration.removeProperty(name.toString());
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java
deleted file mode 100644
index 77c27a98f8..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java
+++ /dev/null
@@ -1,112 +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.wst.css.ui.internal.properties;
-
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.CSSPathService;
-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.IDOMNode;
-
-/**
- */
-public class CSSTextPropertyDescriptor extends TextPropertyDescriptor {
- private final ICSSNode fNode;
-
- /**
- * CSSTextPropertyDescriptor constructor comment.
- *
- * @param id
- * java.lang.String
- * @param displayName
- * java.lang.String
- */
- public CSSTextPropertyDescriptor(String id, String displayName, ICSSNode node) {
- super(id, displayName);
- this.fNode = node;
- }
-
- public CSSTextPropertyDescriptor(String id, String displayName, ICSSNode node, String category) {
- super(id, displayName);
- this.fNode = node;
- setCategory(category);
- }
-
- /**
- * @return org.eclipse.jface.viewers.CellEditor
- * @param parent
- * org.eclipse.swt.widgets.Composite
- */
- public CellEditor createPropertyEditor(Composite parent) {
- ICSSModel model = fNode.getOwnerDocument().getModel();
- if (model == null)
- return null;
- if (model.getStyleSheetType() == ICSSModel.EXTERNAL && findEditor(model) == null)
- return null;
- // check whether IFile is readonly to prohibit editing before
- // validateEdit()
- IStructuredModel structuredModel = model;
- if (model.getStyleSheetType() != ICSSModel.EXTERNAL) {
- structuredModel = ((IDOMNode) model.getOwnerDOMNode()).getModel();
- if (structuredModel == null)
- return null;
- }
- IFile file = CSSPathService.location2File(structuredModel.getBaseLocation());
- if (file == null || file.isReadOnly())
- return null;
-
- return super.createPropertyEditor(parent);
- }
-
- private static IEditorPart findEditor(ICSSModel model) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
- for (int i = 0; i < windows.length; i++) {
- IWorkbenchPage[] pages = windows[i].getPages();
- for (int j = 0; j < pages.length; j++) {
- IEditorReference[] editors = pages[j].getEditorReferences();
- for (int k = 0; k < editors.length; k++) {
- IEditorPart editPart = editors[k].getEditor(false);
- if (editPart != null) {
- IEditorInput editorInput = editPart.getEditorInput();
- if (editorInput instanceof IFileEditorInput) {
- IFile file = ((IFileEditorInput) editorInput).getFile();
- if (file != null) {
- //TODO Urgent needs to be fixed
- // I think we need 'equals' (or 'equivalent'
- // on model) for cases like this
- if (StructuredModelManager.getModelManager().calculateId(file).equals(model.getId())) {
- return editPart;
- }
- }
- }
- }
- }
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/registry/AdapterFactoryProviderCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/registry/AdapterFactoryProviderCSS.java
deleted file mode 100644
index 717dcb529a..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/registry/AdapterFactoryProviderCSS.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
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.registry;
-
-import org.eclipse.wst.css.core.internal.modelhandler.ModelHandlerForCSS;
-import org.eclipse.wst.css.ui.internal.contentoutline.JFaceNodeAdapterFactoryCSS;
-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;
-
-public class AdapterFactoryProviderCSS implements AdapterFactoryProvider {
- public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
- return (contentTypeDescription instanceof ModelHandlerForCSS);
- }
-
- public void addAdapterFactories(IStructuredModel structuredModel) {
- // add the normal content based factories to model's registry
- addContentBasedFactories(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 JFaceNodeAdapterFactoryCSS(IJFaceNodeAdapter.class, true);
- factoryRegistry.addFactory(factory);
- }
- }
-
- public void reinitializeFactories(IStructuredModel structuredModel) {
-
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectEnclosingCSSActionDelegate.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectEnclosingCSSActionDelegate.java
deleted file mode 100644
index fa1a72016d..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectEnclosingCSSActionDelegate.java
+++ /dev/null
@@ -1,64 +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.wst.css.ui.internal.selection;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.selection.StructuredSelectActionDelegate;
-
-/**
- * Selects enclosing CSS element
- */
-public class StructuredSelectEnclosingCSSActionDelegate extends StructuredSelectActionDelegate {
- public void init(IAction action) {
- if (action != null) {
- action.setText(CSSUIMessages.StructureSelectEnclosing_label);
- action.setToolTipText(CSSUIMessages.StructureSelectEnclosing_tooltip);
- action.setDescription(CSSUIMessages.StructureSelectEnclosing_description);
- }
- }
-
- protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
- IndexedRegion indexedRegion = null;
-
- indexedRegion = getIndexedRegion(document, textSelection.getOffset());
-
- return indexedRegion;
- }
-
- protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
- Region newRegion = null;
- if (indexedRegion instanceof ICSSNode) {
- ICSSNode cursorNode = (ICSSNode) indexedRegion;
- Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
- int currentOffset = textSelection.getOffset();
- int currentEndOffset = currentOffset + textSelection.getLength();
- if (cursorNodeRegion.getOffset() >= currentOffset && cursorNodeRegion.getOffset() <= currentEndOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentEndOffset) {
- ICSSNode newNode = cursorNode.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
- }
- else
- newRegion = cursorNodeRegion;
- }
- return newRegion;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectNextCSSActionDelegate.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectNextCSSActionDelegate.java
deleted file mode 100644
index de122ab198..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectNextCSSActionDelegate.java
+++ /dev/null
@@ -1,81 +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.wst.css.ui.internal.selection;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.selection.StructuredSelectActionDelegate;
-
-/**
- * Selects next CSS element
- */
-public class StructuredSelectNextCSSActionDelegate extends StructuredSelectActionDelegate {
-
- protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
- int offset = textSelection.getOffset() + textSelection.getLength() - 1;
- if (offset < 0)
- offset = 0;
-
- IndexedRegion indexedRegion = null;
-
- indexedRegion = getIndexedRegion(document, offset);
-
- return indexedRegion;
- }
-
- protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
- Region newRegion = null;
-
- if (indexedRegion instanceof ICSSNode) {
- ICSSNode cursorNode = (ICSSNode) indexedRegion;
-
- Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
- int currentOffset = textSelection.getOffset();
- int currentEndOffset = currentOffset + textSelection.getLength();
- if (cursorNodeRegion.getOffset() >= currentOffset && cursorNodeRegion.getOffset() <= currentEndOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentEndOffset) {
- ICSSNode newNode = cursorNode.getNextSibling();
- if (newNode == null) {
- newNode = cursorNode.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
- }
- else {
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(currentOffset, newIndexedRegion.getEndOffset() - currentOffset);
- }
- }
- }
- else
- newRegion = cursorNodeRegion;
- }
- return newRegion;
- }
-
- public void init(IAction action) {
- if (action != null) {
- action.setText(CSSUIMessages.StructureSelectNext_label);
- action.setToolTipText(CSSUIMessages.StructureSelectNext_tooltip);
- action.setDescription(CSSUIMessages.StructureSelectNext_description);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectPreviousCSSActionDelegate.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectPreviousCSSActionDelegate.java
deleted file mode 100644
index 78289a25f7..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectPreviousCSSActionDelegate.java
+++ /dev/null
@@ -1,76 +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.wst.css.ui.internal.selection;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.ui.internal.selection.StructuredSelectActionDelegate;
-
-/**
- * Selects previous CSS element
- */
-public class StructuredSelectPreviousCSSActionDelegate extends StructuredSelectActionDelegate {
-
- protected IndexedRegion getCursorIndexedRegion(IDocument document, ITextSelection textSelection) {
- IndexedRegion indexedRegion = null;
-
- indexedRegion = getIndexedRegion(document, textSelection.getOffset());
-
- return indexedRegion;
- }
-
- protected Region getNewSelectionRegion(IndexedRegion indexedRegion, ITextSelection textSelection) {
- Region newRegion = null;
- if (indexedRegion instanceof ICSSNode) {
- ICSSNode cursorNode = (ICSSNode) indexedRegion;
-
- Region cursorNodeRegion = new Region(indexedRegion.getStartOffset(), indexedRegion.getEndOffset() - indexedRegion.getStartOffset());
- int currentOffset = textSelection.getOffset();
- int currentEndOffset = currentOffset + textSelection.getLength();
- if (cursorNodeRegion.getOffset() >= currentOffset && cursorNodeRegion.getOffset() <= currentEndOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() >= currentOffset && cursorNodeRegion.getOffset() + cursorNodeRegion.getLength() <= currentEndOffset) {
- ICSSNode newNode = cursorNode.getPreviousSibling();
- if (newNode == null) {
- newNode = cursorNode.getParentNode();
-
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), newIndexedRegion.getEndOffset() - newIndexedRegion.getStartOffset());
- }
- }
- else {
- if (newNode instanceof IndexedRegion) {
- IndexedRegion newIndexedRegion = (IndexedRegion) newNode;
- newRegion = new Region(newIndexedRegion.getStartOffset(), currentEndOffset - newIndexedRegion.getStartOffset());
- }
- }
- }
- else
- newRegion = cursorNodeRegion;
- }
- return newRegion;
- }
-
- public void init(IAction action) {
- if (action != null) {
- action.setText(CSSUIMessages.StructureSelectPrevious_label);
- action.setToolTipText(CSSUIMessages.StructureSelectPrevious_tooltip);
- action.setDescription(CSSUIMessages.StructureSelectPrevious_description);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/IStyleConstantsCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/IStyleConstantsCSS.java
deleted file mode 100644
index a9b53305ca..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/IStyleConstantsCSS.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.style;
-
-/**
- * Contains the symbolic name of styles used by LineStyleProvider,
- * ColorManager, and any others who may be interested
- */
-public interface IStyleConstantsCSS {
- public static final String NORMAL = "NORMAL"; //$NON-NLS-1$
- public static final String ATMARK_RULE = "ATMARK_RULE"; //$NON-NLS-1$
- public static final String SELECTOR = "SELECTOR"; //$NON-NLS-1$
- public static final String MEDIA = "MEDIA"; //$NON-NLS-1$
- public static final String COMMENT = "COMMENT"; //$NON-NLS-1$
- public static final String PROPERTY_NAME = "PROPERTY_NAME"; //$NON-NLS-1$
- public static final String PROPERTY_VALUE = "PROPERTY_VALUE"; //$NON-NLS-1$
- public static final String URI = "URI"; //$NON-NLS-1$
- public static final String STRING = "STRING"; //$NON-NLS-1$
- public static final String COLON = "COLON"; //$NON-NLS-1$
- public static final String SEMI_COLON = "SEMI_COLON"; //$NON-NLS-1$
- public static final String CURLY_BRACE = "CURLY_BRACE"; //$NON-NLS-1$
- public static final String ERROR = "ERROR"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForCSS.java
deleted file mode 100644
index cb05027b60..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForCSS.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.css.ui.internal.style;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-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;
-
-/**
- */
-public class LineStyleProviderForCSS extends AbstractLineStyleProvider implements LineStyleProvider {
- /** Contains region to style mapping */
- private Map fColorTypes;
-
- /**
- * LineStyleProviderForEmbeddedCSS constructor comment.
- */
- public LineStyleProviderForCSS() {
- super();
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- if (region != null) {
- String type = region.getType();
- if (type != null) {
- return getAttributeFor(type);
- }
- }
- return (TextAttribute) getTextAttributes().get(IStyleConstantsCSS.NORMAL);
- }
-
- /**
- * Look up the TextAttribute for the given region context. Might return
- * null for unusual text.
- *
- * @param type
- * @return
- */
- protected TextAttribute getAttributeFor(String type) {
- return (TextAttribute) getTextAttributes().get(fColorTypes.get(type));
- }
-
- private void initAttributes() {
- if (fColorTypes == null) {
- fColorTypes = new HashMap();
- }
- fColorTypes.put(CSSRegionContexts.CSS_COMMENT, IStyleConstantsCSS.COMMENT);
- fColorTypes.put(CSSRegionContexts.CSS_CDO, IStyleConstantsCSS.COMMENT);
- fColorTypes.put(CSSRegionContexts.CSS_CDC, IStyleConstantsCSS.COMMENT);
- fColorTypes.put(CSSRegionContexts.CSS_S, IStyleConstantsCSS.NORMAL);
-
- fColorTypes.put(CSSRegionContexts.CSS_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
- fColorTypes.put(CSSRegionContexts.CSS_LBRACE, IStyleConstantsCSS.CURLY_BRACE);
- fColorTypes.put(CSSRegionContexts.CSS_RBRACE, IStyleConstantsCSS.CURLY_BRACE);
-
- fColorTypes.put(CSSRegionContexts.CSS_IMPORT, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_PAGE, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_MEDIA, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_FONT_FACE, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_CHARSET, IStyleConstantsCSS.ATMARK_RULE);
- fColorTypes.put(CSSRegionContexts.CSS_ATKEYWORD, IStyleConstantsCSS.ATMARK_RULE);
-
- fColorTypes.put(CSSRegionContexts.CSS_STRING, IStyleConstantsCSS.STRING);
- fColorTypes.put(CSSRegionContexts.CSS_URI, IStyleConstantsCSS.URI);
- fColorTypes.put(CSSRegionContexts.CSS_MEDIUM, IStyleConstantsCSS.MEDIA);
- fColorTypes.put(CSSRegionContexts.CSS_MEDIA_SEPARATOR, IStyleConstantsCSS.MEDIA);
-
- fColorTypes.put(CSSRegionContexts.CSS_CHARSET_NAME, IStyleConstantsCSS.STRING);
-
- fColorTypes.put(CSSRegionContexts.CSS_PAGE_SELECTOR, IStyleConstantsCSS.MEDIA);
-
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_UNIVERSAL, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_PSEUDO, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_CLASS, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ID, IStyleConstantsCSS.SELECTOR);
-
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_COMBINATOR, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_SEPARATOR, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_END, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_NAME, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_VALUE, IStyleConstantsCSS.SELECTOR);
- fColorTypes.put(CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_OPERATOR, IStyleConstantsCSS.SELECTOR);
-
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_PROPERTY, IStyleConstantsCSS.PROPERTY_NAME);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IDENT, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_DIMENSION, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PERCENTAGE, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_NUMBER, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_FUNCTION, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_STRING, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_URI, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_HASH, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_UNICODE_RANGE, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_IMPORTANT, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_OPERATOR, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_VALUE_S, IStyleConstantsCSS.PROPERTY_VALUE);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_SEPARATOR, IStyleConstantsCSS.COLON);
- fColorTypes.put(CSSRegionContexts.CSS_DECLARATION_DELIMITER, IStyleConstantsCSS.SEMI_COLON);
-
- fColorTypes.put(CSSRegionContexts.CSS_UNKNOWN, IStyleConstantsCSS.NORMAL);
- }
-
- protected void handlePropertyChange(PropertyChangeEvent event) {
- String styleKey = null;
-
- if (event != null) {
- String prefKey = event.getProperty();
- // check if preference changed is a style preference
- if (IStyleConstantsCSS.ATMARK_RULE.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.ATMARK_RULE;
- } else if (IStyleConstantsCSS.COLON.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.COLON;
- } else if (IStyleConstantsCSS.COMMENT.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.COMMENT;
- } else if (IStyleConstantsCSS.CURLY_BRACE.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.CURLY_BRACE;
- } else if (IStyleConstantsCSS.ERROR.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.ERROR;
- } else if (IStyleConstantsCSS.MEDIA.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.MEDIA;
- } else if (IStyleConstantsCSS.NORMAL.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.NORMAL;
- } else if (IStyleConstantsCSS.PROPERTY_NAME.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.PROPERTY_NAME;
- } else if (IStyleConstantsCSS.PROPERTY_VALUE.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.PROPERTY_VALUE;
- } else if (IStyleConstantsCSS.SELECTOR.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.SELECTOR;
- } else if (IStyleConstantsCSS.SEMI_COLON.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.SEMI_COLON;
- } else if (IStyleConstantsCSS.STRING.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.STRING;
- } else if (IStyleConstantsCSS.URI.equals(prefKey)) {
- styleKey = IStyleConstantsCSS.URI;
- }
- } else {
- // this is around for old deprecated preferencesChanged() method
- // TODO remove when preferencesChanged() is removed
- loadColors();
- super.handlePropertyChange(event);
- }
-
- if (styleKey != null) {
- // overwrite style preference with new value
- addTextAttribute(styleKey);
- super.handlePropertyChange(event);
- }
- }
-
- public void release() {
- if (fColorTypes != null) {
- fColorTypes.clear();
- fColorTypes = null;
- }
- super.release();
- }
-
- public void loadColors() {
- initAttributes();
-
- addTextAttribute(IStyleConstantsCSS.ATMARK_RULE);
- addTextAttribute(IStyleConstantsCSS.COLON);
- addTextAttribute(IStyleConstantsCSS.COMMENT);
- addTextAttribute(IStyleConstantsCSS.CURLY_BRACE);
- addTextAttribute(IStyleConstantsCSS.ERROR);
- addTextAttribute(IStyleConstantsCSS.MEDIA);
- addTextAttribute(IStyleConstantsCSS.NORMAL);
- addTextAttribute(IStyleConstantsCSS.PROPERTY_NAME);
- addTextAttribute(IStyleConstantsCSS.PROPERTY_VALUE);
- addTextAttribute(IStyleConstantsCSS.SELECTOR);
- addTextAttribute(IStyleConstantsCSS.SEMI_COLON);
- addTextAttribute(IStyleConstantsCSS.STRING);
- addTextAttribute(IStyleConstantsCSS.URI);
- }
-
- protected IPreferenceStore getColorPreferences() {
- return CSSUIPlugin.getDefault().getPreferenceStore();
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForEmbeddedCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForEmbeddedCSS.java
deleted file mode 100644
index ccdc88a116..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForEmbeddedCSS.java
+++ /dev/null
@@ -1,111 +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.wst.css.ui.internal.style;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextParser;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-public class LineStyleProviderForEmbeddedCSS extends LineStyleProviderForCSS {
-
- public boolean prepareRegions(ITypedRegion typedRegion, int lineRequestStart, int lineRequestLength, Collection holdResults) {
- int regionStart = typedRegion.getOffset();
- int regionEnd = regionStart + typedRegion.getLength();
- IStructuredDocumentRegion wholeRegion = getDocument().getRegionAtCharacterOffset(regionStart);
-
- List tokens;
- int offset;
-
- ParserCache cache = getCachedParsingResult(wholeRegion);
- if (cache == null) {
- offset = wholeRegion.getStartOffset();
- String content;
- content = wholeRegion.getText();
-
- CSSTextParser parser = new CSSTextParser(CSSTextParser.MODE_STYLESHEET, content);
- tokens = parser.getTokenList();
- cacheParsingResult(wholeRegion, new ParserCache(offset, tokens));
- } else {
- tokens = cache.tokens;
- offset = cache.offset;
- }
-
- boolean result = false;
-
- if (0 < tokens.size()) {
- int start = offset;
- Iterator i = tokens.iterator();
- while (i.hasNext()) {
- CSSTextToken token = (CSSTextToken) i.next();
- if (regionStart <= start && start < regionEnd) {
- TextAttribute attribute = getAttributeFor(token.kind);
- if (attribute != null) {
- holdResults.add(new StyleRange(start, token.length, attribute.getForeground(), attribute.getBackground(), attribute.getStyle()));
- }
- else {
- holdResults.add(new StyleRange(start, token.length, null, null));
- }
- }
- start += token.length;
- }
- result = true;
- }
-
- return result;
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- return null;
- }
-
- private void cleanupCache() {
- fCacheKey = -1;
- fCacheResult = null;
- }
-
- private ParserCache getCachedParsingResult(IStructuredDocumentRegion region) {
- if (fCacheKey == region.getText().hashCode()) {
- return fCacheResult;
- }
- return null;
- }
-
- private void cacheParsingResult(IStructuredDocumentRegion region, ParserCache result) {
- fCacheKey = region.getText().hashCode();
- fCacheResult = result;
- }
-
- public void release() {
- super.release();
- cleanupCache();
- }
-
- private class ParserCache {
- ParserCache(int newOffset, List newTokens) {
- offset = newOffset;
- tokens = newTokens;
- }
-
- int offset;
- List tokens;
- }
-
- int fCacheKey = -1;
- ParserCache fCacheResult = null;
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/EncodingTemplateVariableResolverCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/EncodingTemplateVariableResolverCSS.java
deleted file mode 100644
index 757da6ca70..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/EncodingTemplateVariableResolverCSS.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.wst.css.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.SimpleTemplateVariableResolver;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-
-
-public class EncodingTemplateVariableResolverCSS extends SimpleTemplateVariableResolver {
- private static final String ENCODING_TYPE = getEncodingType();
-
- private static String getEncodingType() {
- return "encoding"; //$NON-NLS-1$
- }
-
- /**
- * Creates a new encoding variable
- */
- public EncodingTemplateVariableResolverCSS() {
- super(ENCODING_TYPE, CSSUIMessages.Creating_files_encoding);
- }
-
- protected String resolve(TemplateContext context) {
- return CSSCorePlugin.getDefault().getPluginPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/TemplateContextTypeCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/TemplateContextTypeCSS.java
deleted file mode 100644
index 7e981c86ea..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/TemplateContextTypeCSS.java
+++ /dev/null
@@ -1,34 +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.wst.css.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-
-/**
- * Base class for CSS template context types. Templates of this context type
- * apply to any place within CSS content type.
- */
-public class TemplateContextTypeCSS extends TemplateContextType {
-
- public TemplateContextTypeCSS() {
- 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 EncodingTemplateVariableResolverCSS());
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/TemplateContextTypeIdsCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/TemplateContextTypeIdsCSS.java
deleted file mode 100644
index d0a134f1d2..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/TemplateContextTypeIdsCSS.java
+++ /dev/null
@@ -1,20 +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.wst.css.ui.internal.templates;
-
-
-public class TemplateContextTypeIdsCSS {
-
- public static final String ALL = "css_all"; //$NON-NLS-1$
-
- public static final String NEW = "css_new"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/text/CSSDocumentRegionEdgeMatcher.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/text/CSSDocumentRegionEdgeMatcher.java
deleted file mode 100644
index 702dbc679f..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/text/CSSDocumentRegionEdgeMatcher.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.wst.css.ui.internal.text;
-
-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;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-public class CSSDocumentRegionEdgeMatcher implements ICharacterPairMatcher {
-
- private int fAnchor = ICharacterPairMatcher.LEFT;
-
- /**
- * @param validContexts
- * @param nextMatcher
- */
- public CSSDocumentRegionEdgeMatcher() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#clear()
- */
- public void clear() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#dispose()
- */
- public void dispose() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#getAnchor()
- */
- public int getAnchor() {
- return fAnchor;
- }
-
- public IRegion match(IDocument document, int offset) {
- if (document instanceof IStructuredDocument) {
- IStructuredDocumentRegion r = ((IStructuredDocument) document).getRegionAtCharacterOffset(offset);
- if (r != null) {
- if (r.getPrevious() != null && r.getStartOffset() == offset && r.getPrevious().getType().equals(CSSRegionContexts.CSS_RBRACE)) {
- r = r.getPrevious();
- }
- if (r.getType().equals(CSSRegionContexts.CSS_RBRACE)) {
- while (r != null && !r.getType().equals(CSSRegionContexts.CSS_LBRACE)) {
- r = r.getPrevious();
- }
- if (r != null) {
- return new Region(r.getStartOffset(), 1);
- }
- } else if (r.getType().equals(CSSRegionContexts.CSS_LBRACE)) {
- while (r != null && !r.getType().equals(CSSRegionContexts.CSS_RBRACE)) {
- r = r.getNext();
- }
- if (r != null) {
- return new Region(r.getEndOffset() - 1, 1);
- }
- }
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/FacetModuleCoreSupport.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/FacetModuleCoreSupport.java
deleted file mode 100644
index 636c6931aa..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/FacetModuleCoreSupport.java
+++ /dev/null
@@ -1,67 +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.wst.css.ui.internal.wizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * 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.
- */
-final class FacetModuleCoreSupport {
- static final boolean _dump_NCDFE = false;
-
- /**
- * @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
- * @throws org.eclipse.core.runtime.CoreException
- */
- public static boolean isWebProject(IProject project) {
- if (project == null)
- return false;
-
- try {
- return FacetModuleCoreSupportDelegate.isWebProject(project);
- }
- catch (NoClassDefFoundError e) {
- if (_dump_NCDFE)
- e.printStackTrace();
- }
- return true;
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/FacetModuleCoreSupportDelegate.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/FacetModuleCoreSupportDelegate.java
deleted file mode 100644
index 1af190f6a6..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/FacetModuleCoreSupportDelegate.java
+++ /dev/null
@@ -1,84 +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 License v1.0
- * which accompanies 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.css.ui.internal.wizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-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.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.css.ui.internal.Logger;
-
-/**
- * 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 {
- /**
- * 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$
-
- private final static String WST_WEB_MODULE = "wst.web"; //$NON-NLS-1$
-
- /**
- * @param project
- * @return the IPath to the "root" of the web contents
- */
- static IPath getWebContentRootPath(IProject project) {
- if (!ModuleCoreNature.isFlexibleProject(project))
- return project.getFullPath();
-
- IPath path = null;
- IVirtualComponent component = ComponentCore.createComponent(project);
- if (component != null && component.exists()) {
- path = component.getRootFolder().getWorkspaceRelativePath();
- }
- else {
- path = project.getFullPath();
- }
- return path;
- }
-
- /**
- * @param project
- * @return
- * @throws CoreException
- */
- static boolean isWebProject(IProject project) {
- boolean is = false;
- try {
- IFacetedProject faceted = ProjectFacetsManager.create(project);
- if (ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) {
- IProjectFacet facet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE);
- is = is || (faceted != null && faceted.hasProjectFacet(facet));
- }
- if (ProjectFacetsManager.isProjectFacetDefined(WST_WEB_MODULE)) {
- IProjectFacet facet = ProjectFacetsManager.getProjectFacet(WST_WEB_MODULE);
- is = is || (faceted != null && faceted.hasProjectFacet(facet));
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- return is;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSFileWizardPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSFileWizardPage.java
deleted file mode 100644
index 4cc64240bd..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSFileWizardPage.java
+++ /dev/null
@@ -1,225 +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.wst.css.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.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.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-import org.eclipse.wst.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.core.internal.preferences.CSSCorePreferenceNames;
-import org.eclipse.wst.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-
-class NewCSSFileWizardPage extends WizardNewFileCreationPage {
-
- private IContentType fContentType;
- private List fValidExtensions = null;
-
- public NewCSSFileWizardPage(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
- * css 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(CSSUIMessages._ERROR_FILENAME_MUST_END_CSS, 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(CSSUIMessages.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 && isWebProject(project)) {
- // check that the path is inside the webContent folder
- IPath webContentPath = getWebContentPath(project);
- if (!webContentPath.isPrefixOf(fullPath)) {
- setMessage(CSSUIMessages._WARNING_FOLDER_MUST_BE_INSIDE_WEB_CONTENT, WARNING);
- }
- }
- }
-
- return true;
- }
-
- /**
- * Get content type associated with this new file wizard
- *
- * @return IContentType
- */
- private IContentType getContentType() {
- if (fContentType == null)
- fContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForCSS.ContentTypeID_CSS);
- return fContentType;
- }
-
- /**
- * Get list of valid extensions for CSS 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;
- }
-
- /**
- * Adds default extension to the filename
- *
- * @param filename
- * @return
- */
- String addDefaultExtension(String filename) {
- StringBuffer newFileName = new StringBuffer(filename);
-
- Preferences preference = CSSCorePlugin.getDefault().getPluginPreferences();
- String ext = preference.getString(CSSCorePreferenceNames.DEFAULT_EXTENSION);
-
- newFileName.append("."); //$NON-NLS-1$
- newFileName.append(ext);
-
- return newFileName.toString();
- }
-
- /**
- * 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 isWebProject(IProject project) {
- return FacetModuleCoreSupport.isWebProject(project);
- }
-
- /**
- * 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) {
- return FacetModuleCoreSupport.getWebContentRootPath(project);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSTemplatesWizardPage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSTemplatesWizardPage.java
deleted file mode 100644
index 1100391452..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSTemplatesWizardPage.java
+++ /dev/null
@@ -1,505 +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.wst.css.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.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.css.core.internal.provisional.contenttype.ContentTypeIdForCSS;
-import org.eclipse.wst.css.ui.StructuredTextViewerConfigurationCSS;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.Logger;
-import org.eclipse.wst.css.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.css.ui.internal.preferences.CSSUIPreferenceNames;
-import org.eclipse.wst.css.ui.internal.templates.TemplateContextTypeIdsCSS;
-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 NewCSSTemplatesWizardPage 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(TemplateContextTypeIdsCSS.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 NewCSSTemplatesWizardPage() {
- super("NewCSSTemplatesWizardPage", CSSUIMessages.NewCSSTemplatesWizardPage_0, null); //$NON-NLS-1$
- setDescription(CSSUIMessages.NewCSSTemplatesWizardPage_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 CSS Template
- fUseTemplateButton = new Button(parent, SWT.CHECK);
- fUseTemplateButton.setText(CSSUIMessages.NewCSSTemplatesWizardPage_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);
-
- // Create linked text to just to templates preference page
- Link link = new Link(innerParent, SWT.NONE);
- link.setText(CSSUIMessages.NewCSSTemplatesWizardPage_6);
- data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
- link.setLayoutData(data);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- linkClicked();
- }
- });
-
- // 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(CSSUIMessages.NewCSSTemplatesWizardPage_2);
-
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- column2.setText(CSSUIMessages.NewCSSTemplatesWizardPage_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 = CSSUIPlugin.getDefault().getTemplateStore();
- fTableViewer.setInput(fTemplateStore);
-
- configureTableResizing(innerParent, table, column1, column2);
- loadLastSavedPreferences();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.CSS_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 StructuredTextViewerConfigurationCSS();
-
- 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);
- ((StructuredTextViewer) viewer).getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
- IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(ContentTypeIdForCSS.ContentTypeID_CSS);
- 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(CSSUIMessages.NewCSSTemplatesWizardPage_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);
- 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.css.ui.preferences.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 = CSSUIPlugin.getDefault().getTemplateContextRegistry().getContextType(TemplateContextTypeIdsCSS.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 css", 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 CSS File wizard.
- */
- private void loadLastSavedPreferences() {
- String templateName = CSSUIPlugin.getDefault().getPreferenceStore().getString(CSSUIPreferenceNames.NEW_FILE_TEMPLATE_NAME);
- if (templateName == null || templateName.length() == 0) {
- fLastSelectedTemplateName = ""; //$NON-NLS-1$
- fUseTemplateButton.setSelection(false);
- }
- else {
- fLastSelectedTemplateName = templateName;
- fUseTemplateButton.setSelection(true);
- }
- enableTemplates();
- }
-
- /**
- * Save template name used for next call to New CSS File wizard.
- */
- void saveLastSavedPreferences() {
- String templateName = ""; //$NON-NLS-1$
-
- Template template = getSelectedTemplate();
- if (template != null) {
- templateName = template.getName();
- }
-
- CSSUIPlugin.getDefault().getPreferenceStore().setValue(CSSUIPreferenceNames.NEW_FILE_TEMPLATE_NAME, templateName);
- CSSUIPlugin.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, TemplateContextTypeIdsCSS.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.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSWizard.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSWizard.java
deleted file mode 100644
index 62b456d0c2..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSWizard.java
+++ /dev/null
@@ -1,145 +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.wst.css.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.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.css.core.internal.CSSCorePlugin;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.css.ui.internal.Logger;
-import org.eclipse.wst.css.ui.internal.editor.CSSEditorPluginImages;
-import org.eclipse.wst.css.ui.internal.image.CSSImageHelper;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-public class NewCSSWizard extends Wizard implements INewWizard {
- private NewCSSFileWizardPage fNewFilePage;
- private NewCSSTemplatesWizardPage fNewFileTemplatesPage;
- private IStructuredSelection fSelection;
-
- public void addPages() {
- fNewFilePage = new NewCSSFileWizardPage("CSSWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))); //$NON-NLS-1$
- fNewFilePage.setTitle(CSSUIMessages._UI_WIZARD_NEW_HEADING); //$NON-NLS-1$
- fNewFilePage.setDescription(CSSUIMessages._UI_WIZARD_NEW_DESCRIPTION); //$NON-NLS-1$
- addPage(fNewFilePage);
-
- fNewFileTemplatesPage = new NewCSSTemplatesWizardPage();
- 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(CSSUIMessages._UI_WIZARD_NEW_TITLE); //$NON-NLS-1$
- ImageDescriptor descriptor = CSSImageHelper.getInstance().getImageDescriptor(CSSEditorPluginImages.IMG_WIZBAN_NEWCSSFILE);
- 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 = CSSCorePlugin.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 CSS 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.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentOutlineConfiguration.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentOutlineConfiguration.java
deleted file mode 100644
index fbc9d85e43..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentOutlineConfiguration.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and
- * is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ****************************************************************************/
-package org.eclipse.wst.css.ui.views.contentoutline;
-
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSValue;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateActionContributionItem;
-import org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration;
-
-/**
- * Configuration for outline view page which shows CSS content.
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration
- * @since 1.0
- */
-public class CSSContentOutlineConfiguration extends ContentOutlineConfiguration {
- private IContentProvider fContentProvider = null;
- private ILabelProvider fLabelProvider = null;
- private final String OUTLINE_SORT_PREF = "outline-sort"; //$NON-NLS-1$
-
- /**
- * Create new instance of CSSContentOutlineConfiguration
- */
- public CSSContentOutlineConfiguration() {
- // Must have empty constructor to createExecutableExtension
- super();
- }
-
- public IContributionItem[] createToolbarContributions(TreeViewer viewer) {
- IContributionItem[] items = super.createToolbarContributions(viewer);
-
- SortAction sortAction = new SortAction(viewer, CSSUIPlugin.getDefault().getPreferenceStore(), OUTLINE_SORT_PREF);
- IContributionItem sortItem = new PropertyChangeUpdateActionContributionItem(sortAction);
-
- if (items == null) {
- items = new IContributionItem[1];
- items[0] = sortItem;
- }
- else {
- IContributionItem[] combinedItems = new IContributionItem[items.length + 1];
- combinedItems[0] = sortItem;
- System.arraycopy(items, 0, combinedItems, 1, items.length);
- items = combinedItems;
- }
- return items;
- }
-
- public IContentProvider getContentProvider(TreeViewer viewer) {
- if (fContentProvider == null)
- fContentProvider = new JFaceNodeContentProviderCSS();
- return fContentProvider;
- }
-
- private Object getFilteredNode(Object o) {
- ICSSNode node = null;
- if (o instanceof ICSSNode) {
- node = (ICSSNode) o;
- short nodeType = node.getNodeType();
- if (node instanceof ICSSValue) {
- while (node != null && !(node instanceof ICSSStyleDeclItem)) {
- node = node.getParentNode();
- }
- }
- else if (nodeType == ICSSNode.STYLEDECLARATION_NODE) {
- node = node.getParentNode();
- }
- else if (nodeType == ICSSNode.MEDIALIST_NODE) {
- node = node.getParentNode();
- }
- }
- return node;
- }
-
- private Object[] getFilteredNodes(Object[] objects) {
- Object[] filtered = new Object[objects.length];
- for (int i = 0; i < filtered.length; i++) {
- filtered[i] = getFilteredNode(objects[i]);
- }
- return filtered;
- }
-
- public ILabelProvider getLabelProvider(TreeViewer viewer) {
- if (fLabelProvider == null)
- fLabelProvider = new JFaceNodeLabelProviderCSS();
- return fLabelProvider;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.StructuredContentOutlineConfiguration#getPreferenceStore()
- */
- protected IPreferenceStore getPreferenceStore() {
- return CSSUIPlugin.getDefault().getPreferenceStore();
- }
-
- public ISelection getSelection(TreeViewer viewer, ISelection selection) {
- ISelection filteredSelection = selection;
- if (selection instanceof IStructuredSelection) {
- Object[] filteredNodes = getFilteredNodes(((IStructuredSelection) selection).toArray());
- filteredSelection = new StructuredSelection(filteredNodes);
- }
- return filteredSelection;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeContentProviderCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeContentProviderCSS.java
deleted file mode 100644
index fdf353a891..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeContentProviderCSS.java
+++ /dev/null
@@ -1,176 +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.wst.css.ui.views.contentoutline;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-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.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapterFactory;
-import org.w3c.dom.css.CSSRule;
-
-/**
- * A Content provider for a JFace viewer used to display CSS nodes. This
- * content provider does not use adapters.
- */
-class JFaceNodeContentProviderCSS implements ITreeContentProvider {
-
- public JFaceNodeContentProviderCSS() {
- super();
- }
-
- /**
- * @deprecated
- */
- protected void addElements(Object element, ArrayList v) {
-
- ICSSNode node;
-
- if (element instanceof ICSSModel) {
- ICSSModel model = (ICSSModel) element;
- ICSSDocument doc = model.getDocument();
- node = doc.getFirstChild();
- }
- else if (element instanceof ICSSNode) {
- node = ((ICSSNode) element).getFirstChild();
- }
- else
- return;
-
- while (node != null) {
- if (node instanceof CSSRule) {
- v.add(node);
- }
-
- node = node.getNextSibling();
- }
-
- }
-
- /**
- * The visual part that is using this content provider is about to be
- * disposed. Deallocate all allocated SWT resources.
- */
- public void dispose() {
- }
-
- /**
- * Returns an enumeration containing all child nodes of the given element,
- * which represents a node in a tree. The difference to
- * <code>IStructuredContentProvider.getElements(Object)</code> is as
- * follows: <code>getElements</code> is called to obtain the tree
- * viewer's root elements. Method <code>getChildren</code> is used to
- * obtain the children of a given node in the tree, which can can be a
- * root node, too.
- */
- public Object[] getChildren(Object object) {
- IJFaceNodeAdapter adapter = getAdapter(object);
- if (adapter != null)
- return adapter.getChildren(object);
-
- return new Object[0];
- }
-
- /**
- * Returns an enumeration with the elements belonging to the passed
- * element. These elements can be presented as rows in a table, items in a
- * list etc.
- */
- public Object[] getElements(Object object) {
- IJFaceNodeAdapter adapter = getAdapter(object);
- if (adapter != null)
- return adapter.getElements(object);
-
- return new Object[0];
- }
-
- /**
- * Returns the parent for the given element. This method can return
- * <code>null</code> indicating that the parent can't be computed. In
- * this case the tree viewer can't expand a given node correctly if
- * requested.
- */
- public Object getParent(Object object) {
- IJFaceNodeAdapter adapter = getAdapter(object);
- if (adapter != null)
- return adapter.getParent(object);
-
- return null;
- }
-
- /**
- * Returns <code>true</code> if the given element has children.
- * Otherwise <code>false</code> is returned.
- */
- public boolean hasChildren(Object object) {
- IJFaceNodeAdapter adapter = getAdapter(object);
- if (adapter != null)
- return adapter.hasChildren(object);
-
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (oldInput != null && oldInput instanceof IStructuredModel) {
- IJFaceNodeAdapterFactory factory = (IJFaceNodeAdapterFactory) ((IStructuredModel) oldInput).getFactoryRegistry().getFactoryFor(IJFaceNodeAdapter.class);
- if (factory != null) {
- factory.removeListener(viewer);
- }
- }
- if (newInput != null && newInput instanceof IStructuredModel) {
- IJFaceNodeAdapterFactory factory = (IJFaceNodeAdapterFactory) ((IStructuredModel) newInput).getFactoryRegistry().getFactoryFor(IJFaceNodeAdapter.class);
- if (factory != null) {
- factory.addListener(viewer);
- }
- }
- }
-
- /**
- * Checks whether the given element is deleted or not.
- *
- * @deprecated
- */
- public boolean isDeleted(Object element) {
- return false;
- }
-
- /**
- * Returns the JFace adapter for the specified object.
- *
- * @param adaptable
- * java.lang.Object The object to get the adapter for
- */
- private IJFaceNodeAdapter getAdapter(Object adaptable) {
- IJFaceNodeAdapter adapter = null;
- if (adaptable instanceof ICSSModel) {
- adaptable = ((ICSSModel) adaptable).getDocument();
- }
- if (adaptable instanceof ICSSNode && adaptable instanceof INodeNotifier) {
- INodeAdapter nodeAdapter = ((INodeNotifier) adaptable).getAdapterFor(IJFaceNodeAdapter.class);
- if (nodeAdapter instanceof IJFaceNodeAdapter)
- adapter = (IJFaceNodeAdapter) nodeAdapter;
- }
- return adapter;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeLabelProviderCSS.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeLabelProviderCSS.java
deleted file mode 100644
index 964de2fabf..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeLabelProviderCSS.java
+++ /dev/null
@@ -1,115 +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.wst.css.ui.views.contentoutline;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-
-class JFaceNodeLabelProviderCSS extends LabelProvider {
-
- /**
- * JFaceNodeLabelProvider constructor comment.
- */
- public JFaceNodeLabelProviderCSS() {
- super();
- }
-
- /**
- * Returns the JFace adapter for the specified object.
- *
- * @param adaptable
- * java.lang.Object The object to get the adapter for
- */
- private IJFaceNodeAdapter getAdapter(Object adaptable) {
- IJFaceNodeAdapter adapter = null;
- if (adaptable instanceof ICSSModel) {
- adaptable = ((ICSSModel) adaptable).getDocument();
- }
- if (adaptable instanceof INodeNotifier) {
- INodeAdapter nodeAdapter = ((INodeNotifier) adaptable).getAdapterFor(IJFaceNodeAdapter.class);
- if (nodeAdapter instanceof IJFaceNodeAdapter)
- adapter = (IJFaceNodeAdapter) nodeAdapter;
- }
- return adapter;
- }
-
- /**
- * Returns the image for the label of the given element, for use in the
- * given viewer.
- *
- * @param viewer
- * The viewer that displays the element.
- * @param element
- * The element for which to provide the label image. Element
- * can be <code>null</code> indicating no input object is set
- * to the viewer.
- */
- public Image getImage(Object element) {
- Image image = null;
- IJFaceNodeAdapter adapter = getAdapter(element);
- if (adapter != null)
- image = adapter.getLabelImage(element);
- return image;
- }
-
- /**
- * Returns the text for the label of the given element, for use in the
- * given viewer.
- *
- * @param viewer
- * The viewer that displays the element.
- * @param element
- * The element for which to provide the label text. Element can
- * be <code>null</code> indicating no input object is set to
- * the viewer.
- */
- public String getText(Object element) {
- String text = null;
- IJFaceNodeAdapter adapter = getAdapter(element);
- if (adapter != null) {
- text = adapter.getLabelText(element);
- }
- return text;
- }
-
- /**
- * Checks whether this label provider is affected by the given domain
- * event.
- *
- * @deprecated
- */
- public boolean isAffected(Object dummy) {// DomainEvent event) {
- // return event.isModifier(DomainEvent.NON_STRUCTURE_CHANGE);
- return true;
-
- }
-
- /**
- * Returns whether the label would be affected by a change to the given
- * property of the given element. This can be used to optimize a
- * non-structural viewer update. If the property mentioned in the update
- * does not affect the label, then the viewer need not update the label.
- *
- * @param element
- * the element
- * @param property
- * the property
- * @return <code>true</code> if the label would be affected, and
- * <code>false</code> if it would be unaffected
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java
deleted file mode 100644
index 370dbff1da..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java
+++ /dev/null
@@ -1,55 +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.wst.css.ui.views.contentoutline;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.css.ui.internal.CSSUIMessages;
-import org.eclipse.wst.css.ui.internal.CSSUIPlugin;
-import org.eclipse.wst.css.ui.internal.editor.CSSEditorPluginImages;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateAction;
-
-/*
- * Based on DTDContentOutlinePage#SortAction
- */
-class SortAction extends PropertyChangeUpdateAction {
- private TreeViewer treeViewer;
-
- public SortAction(TreeViewer viewer, IPreferenceStore store, String preferenceKey) {
- super(CSSUIMessages.SortAction_0, store, preferenceKey, false); //$NON-NLS-1$
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(CSSUIPlugin.ID, CSSEditorPluginImages.IMG_OBJ_SORT);
- setImageDescriptor(desc);
- setToolTipText(getText());
- treeViewer = viewer;
- if (isChecked()) {
- treeViewer.setComparator(new ViewerComparator());
- }
- }
-
- public void update() {
- super.update();
- treeViewer.getControl().setRedraw(false);
- Object[] expandedElements = treeViewer.getExpandedElements();
- if (isChecked()) {
- treeViewer.setComparator(new ViewerComparator());
- }
- else {
- treeViewer.setComparator(null);
- }
- treeViewer.setInput(treeViewer.getInput());
- treeViewer.setExpandedElements(expandedElements);
- treeViewer.getControl().setRedraw(true);
- }
-}
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySheetConfiguration.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySheetConfiguration.java
deleted file mode 100644
index b8c1fa4c05..0000000000
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySheetConfiguration.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and
- * is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ****************************************************************************/
-
-package org.eclipse.wst.css.ui.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.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.css.ui.internal.properties.CSSPropertySource;
-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;
-
-/**
- * Configuration for property sheet page which shows CSS content.
- *
- * @see org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration
- * @since 1.0
- */
-public class CSSPropertySheetConfiguration 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 CSSPropertySource(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 CSSPropertySheetConfiguration() {
- // 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;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.css.ui/templates/cssdefault-templates.properties b/bundles/org.eclipse.wst.css.ui/templates/cssdefault-templates.properties
deleted file mode 100644
index bf282ec7ab..0000000000
--- a/bundles/org.eclipse.wst.css.ui/templates/cssdefault-templates.properties
+++ /dev/null
@@ -1,12 +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
-###############################################################################
-Templates.newcss.name=New CSS File
-Templates.newcss.desc=new css file
diff --git a/bundles/org.eclipse.wst.css.ui/templates/cssdefault-templates.xml b/bundles/org.eclipse.wst.css.ui/templates/cssdefault-templates.xml
deleted file mode 100644
index e6e0f0dd80..0000000000
--- a/bundles/org.eclipse.wst.css.ui/templates/cssdefault-templates.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*******************************************************************************
- * 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
- *******************************************************************************/
- -->
-<templates>
-<template name="%Templates.newcss.name" description="%Templates.newcss.desc" id="org.eclipse.wst.css.ui.internal.templates.newcss" context="css_new" enabled="true">@CHARSET "${encoding}";</template>
-</templates>
diff --git a/bundles/org.eclipse.wst.dtd.core/.classpath b/bundles/org.eclipse.wst.dtd.core/.classpath
deleted file mode 100644
index 9355ebac3a..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="contentmodel/"/>
- <classpathentry kind="src" path="emfmodel/"/>
- <classpathentry kind="src" path="saxparser/"/>
- <classpathentry kind="src" path="src-validation"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.dtd.core/.cvsignore b/bundles/org.eclipse.wst.dtd.core/.cvsignore
deleted file mode 100644
index 06a13979a3..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-bin
-runtime
-dtdcore.jar
-*.zip
-build.xml
-temp.folder
-@dot
-javaCompiler...args
diff --git a/bundles/org.eclipse.wst.dtd.core/.project b/bundles/org.eclipse.wst.dtd.core/.project
deleted file mode 100644
index 76249e5f71..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.project
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.dtd.core</name>
- <comment></comment>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index afa5c91352..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.core/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 7ec5750225..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 7bf9b39137..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,79 +0,0 @@
-#Sat Mar 24 02:16:32 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=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 6c80926d79..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Nov 15 02:08:45 EST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates/>
diff --git a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index c59368c5e1..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.core/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 26198819ab..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,16 +0,0 @@
-#Wed Nov 15 02:08:45 EST 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=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
deleted file mode 100644
index a01867aef8..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.dtd.core; singleton:=true
-Bundle-Version: 1.1.200.qualifier
-Bundle-Activator: org.eclipse.wst.dtd.core.internal.DTDCorePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.dtd.core.internal;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.content;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.contentmodel;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.document;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.emf;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.emf.impl;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.emf.util;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.encoding;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.event;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.modelhandler;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.parser;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.preferences;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.provisional.contenttype;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.provisional.document;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.provisional.text;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.saxparser;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.tasks;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.text;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.tokenizer;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.util;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.validation;x-friends:="org.eclipse.wst.dtd.core,org.eclipse.wst.dtd.ui,org.eclipse.wst.xml.core,org.eclipse.wst.xml.ui,org.eclipse.wst.xsd.core,org.eclipse.wst.xsd.ui",
- org.eclipse.wst.dtd.core.internal.validation.eclipse;x-internal:=true,
- org.eclipse.wst.dtd.core.text,
- rose
-Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
- com.ibm.icu;bundle-version="[3.8.1,4.0.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.0,1.3.0)"
-Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.wst.dtd.core.internal.content"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.wst.dtd.core/about.html b/bundles/org.eclipse.wst.dtd.core/about.html
deleted file mode 100644
index 2199df3f05..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.core/build.properties b/bundles/org.eclipse.wst.dtd.core/build.properties
deleted file mode 100644
index af332a6105..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/build.properties
+++ /dev/null
@@ -1,27 +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
-#
-###############################################################################
-bin.includes = plugin.xml,\
- plugin.properties,\
- icons/,\
- META-INF/,\
- .,\
- about.html
-bin.excludes = bin/**,\
- @dot/**,\
- temp.folder/**
-src.includes = component.xml
-source.. = src/,\
- contentmodel/,\
- emfmodel/,\
- saxparser/,\
- src-validation/
diff --git a/bundles/org.eclipse.wst.dtd.core/component.xml b/bundles/org.eclipse.wst.dtd.core/component.xml
deleted file mode 100644
index e4dc12c306..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/component.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.wst.dtd">
- <component-depends unrestricted="true" />
- <plugin id="org.eclipse.wst.dtdeditor.doc.user" fragment="false" />
- <plugin id="org.eclipse.wst.dtd.core" fragment="false" />
- <plugin id="org.eclipse.wst.dtd.ui" fragment="false" />
- <description url="http://eclipse.org/webtools/wst/components/dtd/overview.html" />
- <package name="org.eclipse.wst.dtd.ui" api="false">
- <type name="StructuredTextViewerConfigurationDTD" subclass="true" instantiate="true" />
- </package>
- <package name="org.eclipse.wst.dtd.ui.views.contentoutline" api="false">
- <type name="DTDContentOutlineConfiguration" subclass="true" instantiate="true" />
- </package>
- <plugin id="org.eclipse.wst.dtd.ui.infopop" fragment="false" />
-</component>
diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java
deleted file mode 100644
index bfe64b3b10..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.contentmodel;
-
-import org.eclipse.wst.dtd.core.internal.Logger;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.factory.CMDocumentFactory;
-
-/**
- * This builder handles building .dtd grammar files
- */
-public class CMDocumentFactoryDTD implements CMDocumentFactory {
- public CMDocumentFactoryDTD() {
- }
-
-
- public CMDocument createCMDocument(String uri) {
- // work around a bug in our parsers
- // todo... revisit this
- //
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=100481
-// String fileProtocol = "file:"; //$NON-NLS-1$
-// if (uri.startsWith(fileProtocol)) {
-// uri = uri.substring(fileProtocol.length());
-// }
-
- CMDocument result = null;
- try {
- result = DTDImpl.buildCMDocument(uri);
- }
- catch (Exception e) {
- Logger.logException("could not create content model for URI: " + uri, e); //$NON-NLS-1$
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java
deleted file mode 100644
index 1be7c53e9a..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java
+++ /dev/null
@@ -1,36 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.contentmodel;
-
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public abstract class CMNodeImpl extends AdapterImpl implements CMNode {
- protected static final String PROPERTY_DOCUMENTATION = "documentation"; //$NON-NLS-1$
- protected static final String PROPERTY_DOCUMENTATION_SOURCE = "documentationSource"; //$NON-NLS-1$
- protected static final String PROPERTY_DOCUMENTATION_LANGUAGE = "documentationLanguage"; //$NON-NLS-1$
- protected static final String PROPERTY_MOF_NOTIFIER = "key"; //$NON-NLS-1$
- protected static final String PROPERTY_DEFINITION_INFO = "http://org.eclipse.wst/cm/properties/definitionInfo"; //$NON-NLS-1$
- protected static final String PROPERTY_DEFINITION = "http://org.eclipse.wst/cm/properties/definition"; //$NON-NLS-1$
-
- public abstract Object getKey();
-
- public boolean supports(String propertyName) {
- return propertyName.equals(PROPERTY_MOF_NOTIFIER);
- }
-
- public Object getProperty(String propertyName) {
- return null;
- }
-
- public void setProperty(String propertyName, Object object) {
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java b/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java
deleted file mode 100644
index 17180ca7bf..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java
+++ /dev/null
@@ -1,775 +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.wst.dtd.core.internal.contentmodel;
-
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import com.ibm.icu.util.StringTokenizer;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDType;
-import org.eclipse.wst.dtd.core.internal.emf.impl.DTDBasicTypeImpl;
-import org.eclipse.wst.dtd.core.internal.emf.impl.DTDPackageImpl;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDMetrics;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDUtil;
-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.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocumentation;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMEntityDeclaration;
-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.CMNamespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
-import org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMDataTypeImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMEntityDeclarationImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNodeListImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDescriptionBuilder;
-
-
-public class DTDImpl {
- static {
- // Call init on the DTD package to avoid strange initialization bugs
- //
- DTDPackageImpl.init();
- }
-
- protected static DTDAdapterFactoryImpl dtdAdapterFactoryImpl = new DTDAdapterFactoryImpl();
- protected static CMDataTypeInfoTable cmDataTypeInfoTable = new CMDataTypeInfoTable();
-
- public static CMDocument buildCMDocument(String uri) {
- DTDFile dtdFile = buildDTDModel(uri);
- CMDocument cmDocument = (CMDocument) getAdapter(dtdFile);
-
- return cmDocument;
- }
-
- public static DTDFile buildDTDModel(String uri) {
- DTDUtil dtdUtil = new DTDUtil();
- dtdUtil.setexpandEntityReferences(true);
- dtdUtil.parse(new ResourceSetImpl(), uri);
- return dtdUtil.getDTDFile();
- }
-
- public static CMDocument buildCMDocument(DTDFile dtdFile) {
- return (CMDocument) getAdapter(dtdFile);
- }
-
- public static CMNode getAdapter(Notifier o) {
- return (CMNode) dtdAdapterFactoryImpl.adapt(o);
- }
-
- public static int getMinOccurHelper(DTDRepeatableContent content) {
- int occurence = content.getOccurrence().getValue();
- boolean isOptional = (occurence == DTDOccurrenceType.OPTIONAL || occurence == DTDOccurrenceType.ZERO_OR_MORE);
- return isOptional ? 0 : 1;
- }
-
- public static int getMaxOccurHelper(DTDRepeatableContent content) {
- int occurence = content.getOccurrence().getValue();
- boolean isMulti = (occurence == DTDOccurrenceType.ONE_OR_MORE || occurence == DTDOccurrenceType.ZERO_OR_MORE);
- return isMulti ? -1 : 1;
- }
-
- public static class DTDAdapterFactoryImpl extends AdapterFactoryImpl {
- public Adapter createAdapter(Notifier target) {
- Adapter result = null;
- if (target != null) {
- if (target instanceof DTDAttribute) {
- result = new DTDAttributeAdapter((DTDAttribute) target);
- }
- else if (target instanceof DTDElement) {
- result = new DTDElementAdapter((DTDElement) target);
- }
- else if (target instanceof DTDElementReferenceContent) {
- result = new DTDElementReferenceContentAdapter((DTDElementReferenceContent) target);
- }
- else if (target instanceof DTDFile) {
- result = new DTDFileAdapter((DTDFile) target);
- }
- else if (target instanceof DTDGroupContent) {
- result = new DTDGroupContentAdapter((DTDGroupContent) target);
- }
- else if (target instanceof DTDEntity) {
- result = new DTDEntityAdapter((DTDEntity) target);
- }
- }
- return result;
- }
-
- public Adapter adapt(Notifier target) {
- return adapt(target, this);
- }
- }
-
- /**
- * DTDBaseAdapter
- */
- public static abstract class DTDBaseAdapter extends CMNodeImpl {
- public String getNodeName() {
- return ""; //$NON-NLS-1$
- }
-
- public boolean isAdapterForType(Object type) {
- return type == dtdAdapterFactoryImpl;
- }
-
- public Object getProperty(String propertyName) {
- Object result = null;
- if (propertyName.equals("CMDocument")) { //$NON-NLS-1$
- result = getCMDocument();
- }
- else if (propertyName.equals(PROPERTY_DOCUMENTATION)) {
- result = getDocumentation();
- }
- else if (propertyName.equals(PROPERTY_DEFINITION_INFO)) {
- result = getDefinitionInfo();
- }
- else if (propertyName.equals(PROPERTY_DEFINITION)) {
- result = getDefinition();
- }
- else if (propertyName.equals(PROPERTY_MOF_NOTIFIER)) {
- result = getKey();
- }
- else if (propertyName.equals("spec")) { //$NON-NLS-1$
- result = getSpec();
- }
- else {
- result = super.getProperty(propertyName);
- if (result == null) {
- CMDocument cmDocument = getCMDocument();
- if (cmDocument instanceof DTDFileAdapter) {
- AnnotationMap map = ((DTDFileAdapter) cmDocument).annotationMap;
- if (map != null) {
- String spec = getSpec();
- if (spec != null) {
- result = map.getProperty(getSpec(), propertyName);
- }
- }
- if (result == null) {
- Map globalPropertyMap = ((DTDFileAdapter) cmDocument).globalPropertyMap;
- result = globalPropertyMap.get(propertyName);
- }
- }
- }
- }
- return result;
- }
-
- public CMDocument getCMDocument() {
- return null;
- }
-
- protected CMNodeList getDocumentation() {
- return new CMNodeListImpl();
- }
-
- public String getDefinitionInfo() {
- return null;
- }
-
- public CMNode getDefinition() {
- return null;
- }
-
- public String getSpec() {
- return getNodeName();
- }
- }
-
- /**
- * DTDAttributeAdapter
- */
- public static class DTDAttributeAdapter extends DTDBaseAdapter implements CMAttributeDeclaration {
- protected DTDAttribute attribute;
- protected CMDataType dataType;
-
- public DTDAttributeAdapter(DTDAttribute attribute) {
- this.attribute = attribute;
- dataType = new DataTypeImpl();
- }
-
- public Object getKey() {
- return attribute;
- }
-
- public String getSpec() {
- return attribute.getDTDElement().getName() + "/@" + attribute.getName(); //$NON-NLS-1$
- }
-
- public int getNodeType() {
- return ATTRIBUTE_DECLARATION;
- }
-
- public String getNodeName() {
- return attribute.getName();
- }
-
- public String getAttrName() {
- return attribute.getName();
- }
-
- public CMDataType getAttrType() {
- return dataType;
- }
-
- public String getDefaultValue() {
- return attribute.getDefaultValueString();
- }
-
- public Enumeration getEnumAttr() {
- return Collections.enumeration(attribute.getEnumeratedValues());
- }
-
- public int getUsage() {
- int usage = OPTIONAL;
- switch (attribute.getDefaultKind().getValue()) {
- case DTDDefaultKind.REQUIRED : {
- usage = REQUIRED;
- break;
- }
- case DTDDefaultKind.FIXED : {
- usage = FIXED;
- break;
- }
- }
- return usage;
- }
-
- public CMDocument getCMDocument() {
- DTDFile dtdFile = attribute.getDTDElement().getDTDFile();
- return dtdFile != null ? (CMDocument) getAdapter(dtdFile) : null;
- }
-
- public class DataTypeImpl implements CMDataType {
- public int getNodeType() {
- return CMNode.DATA_TYPE;
- }
-
- public String getNodeName() {
- return getDataTypeName();
- }
-
- public boolean supports(String propertyName) {
- return false;
- }
-
- public Object getProperty(String propertyName) {
- Object result = null;
- if (propertyName.equals("isValidEmptyValue")) { //$NON-NLS-1$
- String dataTypeName = getDataTypeName();
- result = (dataTypeName == null || dataTypeName.equals(CMDataType.CDATA)) ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- return result;
- }
-
- public String getDataTypeName() {
- return cmDataTypeInfoTable.getDataTypeName(attribute.getDTDType());
- }
-
- public String generateInstanceValue() {
- return cmDataTypeInfoTable.getInstanceValue(attribute.getDTDType());
- }
-
- public int getImpliedValueKind() {
- int result = IMPLIED_VALUE_NONE;
- int defaultValueKind = attribute.getDefaultKind().getValue();
- if (defaultValueKind == DTDDefaultKind.NOFIXED) {
- result = IMPLIED_VALUE_DEFAULT;
- }
- else if (defaultValueKind == DTDDefaultKind.FIXED) {
- result = IMPLIED_VALUE_FIXED;
- }
- return result;
- }
-
- public String getImpliedValue() {
- return attribute.getDefaultValueString();
- }
-
- public String[] getEnumeratedValues() {
- Object[] objectList = attribute.getEnumeratedValues().toArray();
- String[] result = new String[objectList.length];
- for (int i = 0; i < objectList.length; i++) {
- result[i] = objectList[i].toString();
- }
- return result;
- }
- }
- }
-
-
- /**
- * DTDElementBaseAdapter
- */
- public static abstract class DTDElementBaseAdapter extends DTDBaseAdapter implements CMElementDeclaration {
- protected CMDataType dataType;
-
- protected abstract DTDElement getDTDElement();
-
- protected CMDocumentation documentation = null;
-
- public int getNodeType() {
- return ELEMENT_DECLARATION;
- }
-
- public String getNodeName() {
- return getDTDElement().getName();
- }
-
- public CMNamedNodeMap getAttributes() {
- CMNamedNodeMapImpl result = new CMNamedNodeMapImpl();
- List attributeList = getDTDElement().getDTDAttribute();
- for (Iterator i = attributeList.iterator(); i.hasNext();) {
- DTDAttribute attribute = (DTDAttribute) i.next();
- result.getHashtable().put(attribute.getName(), getAdapter(attribute));
- }
- return result;
- }
-
- public CMContent getContent() {
- return (CMContent) getAdapter(getDTDElement().getContent());
- }
-
- public int getContentType() {
- // todo
- int result = ELEMENT;
- DTDElementContent dtdElementContent = getDTDElement().getContent();
- if (dtdElementContent instanceof DTDPCDataContent) {
- result = PCDATA;
- }
- else if (dtdElementContent instanceof DTDGroupContent) {
- DTDGroupContent groupContent = (DTDGroupContent) dtdElementContent;
- int groupKind = groupContent.getGroupKind().getValue();
- if (groupKind == DTDGroupKind.CHOICE) {
- List list = groupContent.getContent();
- if (list.size() > 0 && list.get(0) instanceof DTDPCDataContent) {
- result = MIXED;
- }
- }
- }
- else if (dtdElementContent instanceof DTDAnyContent) {
- result = ANY;
- }
- else if (dtdElementContent instanceof DTDEmptyContent) {
- result = EMPTY;
- }
-
- return result;
- }
-
- public String getElementName() {
- return getDTDElement().getName();
- }
-
- public CMDataType getDataType() {
- int contentType = getContentType();
- boolean hasDataType = contentType == PCDATA || contentType == MIXED;
- return hasDataType ? dataType : null;
- }
-
- public CMNamedNodeMap getLocalElements() {
- return CMNamedNodeMapImpl.EMPTY_NAMED_NODE_MAP;
- }
-
- public CMDocument getCMDocument() {
- DTDFile dtdFile = getDTDElement().getDTDFile();
- return dtdFile != null ? (CMDocument) getAdapter(dtdFile) : null;
- }
-
- protected CMNodeList getDocumentation() {
- CMNodeListImpl nodeList = new CMNodeListImpl();
- if (documentation == null) {
- String comment = getDTDElement().getComment();
- if (comment != null) {
- String value = ""; //$NON-NLS-1$
- StringTokenizer st = new StringTokenizer(comment, "\n"); //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- value += st.nextToken().trim() + "\n"; //$NON-NLS-1$
- }
- documentation = new CMDocumentationImpl(value);
- }
- }
- if (documentation != null) {
- nodeList.getList().add(documentation);
- }
- return nodeList;
- }
- }
-
-
- public static class CMDocumentationImpl implements CMDocumentation {
- protected String value;
-
- public CMDocumentationImpl(String value) {
- this.value = value;
- }
-
- public String getNodeName() {
- return ""; //$NON-NLS-1$
- }
-
- public int getNodeType() {
- return DOCUMENTATION;
- }
-
- public boolean supports(String propertyName) {
- return false;
- }
-
- public Object getProperty(String propertyName) {
- return null;
- }
-
- public String getValue() {
- return value;
- }
-
- public String getLanguage() {
- return null;
- }
-
- public String getSource() {
- return null;
- }
- }
-
-
- /**
- * DTDElementAdapter
- */
- public static class DTDElementAdapter extends DTDElementBaseAdapter {
- protected DTDElement element;
-
- public DTDElementAdapter(DTDElement element) {
- this.element = element;
- dataType = new CMDataTypeImpl("#PCDATA", getDTDElement().getName()); //$NON-NLS-1$
- }
-
- public Object getKey() {
- return element;
- }
-
- protected DTDElement getDTDElement() {
- return element;
- }
-
- public int getMinOccur() {
- return 1;
- }
-
- public int getMaxOccur() {
- return 1;
- }
-
- public String getDefinitionInfo() {
- return "global"; //$NON-NLS-1$
- }
-
- public CMNode getDefinition() {
- return this;
- }
- }
-
-
- /**
- * DTDElementReferenceContentAdapter
- */
- public static class DTDElementReferenceContentAdapter extends DTDElementBaseAdapter {
- protected DTDElementReferenceContent content;
-
- public DTDElementReferenceContentAdapter(DTDElementReferenceContent content) {
- this.content = content;
- dataType = new CMDataTypeImpl("#PCDATA", getDTDElement().getName()); //$NON-NLS-1$
- }
-
- public Object getKey() {
- return content;
- }
-
- protected DTDElement getDTDElement() {
- return content.getReferencedElement();
- }
-
- public int getMinOccur() {
- return getMinOccurHelper(content);
- }
-
- public int getMaxOccur() {
- return getMaxOccurHelper(content);
- }
-
-
- public CMNode getDefinition() {
- return getAdapter(getDTDElement());
- }
- }
-
-
- /**
- * DTDEntityAdapter
- */
- public static class DTDEntityAdapter extends DTDBaseAdapter implements CMEntityDeclaration {
- protected DTDEntity dtdEntity;
-
- public DTDEntityAdapter(DTDEntity dtdEntity) {
- this.dtdEntity = dtdEntity;
- }
-
- public int getNodeType() {
- return ENTITY_DECLARATION;
- }
-
- public Object getKey() {
- return dtdEntity;
- }
-
- public String getName() {
- return dtdEntity.getName();
- }
-
- public String getValue() {
- String value = ""; //$NON-NLS-1$
- if (dtdEntity.getContent() instanceof DTDInternalEntity) {
- DTDInternalEntity content = (DTDInternalEntity) dtdEntity.getContent();
- value = content.getValue();
- }
- return value;
- }
- }
-
-
- /**
- * DTDGroupContentAdapter
- */
- public static class DTDGroupContentAdapter extends DTDBaseAdapter implements CMGroup {
- protected DTDGroupContent content;
-
- public DTDGroupContentAdapter(DTDGroupContent content) {
- this.content = content;
- }
-
- public Object getKey() {
- return content;
- }
-
- public int getNodeType() {
- return GROUP;
- }
-
- public String getNodeName() {
- CMDescriptionBuilder descriptionBuilder = new CMDescriptionBuilder();
- return descriptionBuilder.buildDescription(this);
- }
-
- public CMNodeList getChildNodes() {
- List list = content.getContent();
- CMNodeListImpl result = new CMNodeListImpl();
- for (Iterator i = list.iterator(); i.hasNext();) {
- CMNode node = getAdapter((Notifier) i.next());
- if (node != null) {
- result.getList().add(node);
- }
- }
- return result;
- }
-
-
- public int getMaxOccur() {
- return getMaxOccurHelper(content);
- }
-
- public int getMinOccur() {
- return getMinOccurHelper(content);
- }
-
- public int getOperator() {
- // todo... handle ALONE case by checkig if child count == 1
- int groupKind = content.getGroupKind().getValue();
- return (groupKind == DTDGroupKind.CHOICE) ? CHOICE : SEQUENCE;
- }
- }
-
- /**
- * DTDFileAdapter
- */
- public static class DTDFileAdapter extends DTDBaseAdapter implements CMDocument {
- protected final String DEFAULT_ROOT_NAME = "http://org.eclipse.wst/cm/properties/defaultRootName"; //$NON-NLS-1$
-
- protected DTDFile dtdFile;
- protected CMNamedNodeMapImpl namedNodeMap;
- protected CMNamedNodeMapImpl entityNodeMap;
-
- protected AnnotationMap annotationMap = new AnnotationMap();
- protected Map globalPropertyMap = new HashMap();
-
- public DTDFileAdapter(DTDFile dtdFile) {
- this.dtdFile = dtdFile;
- }
-
- public Object getKey() {
- return dtdFile;
- }
-
- public AnnotationMap getAnnotationMap() {
- return annotationMap;
- }
-
- public CMNamedNodeMap getElements() {
- if (namedNodeMap == null) {
- namedNodeMap = new CMNamedNodeMapImpl();
- for (Iterator iterator = dtdFile.listDTDElement().iterator(); iterator.hasNext();) {
- DTDElement dtdElement = (DTDElement) iterator.next();
- namedNodeMap.getHashtable().put(dtdElement.getName(), getAdapter(dtdElement));
- }
- }
- return namedNodeMap;
- }
-
- public CMNamedNodeMap getEntities() {
- if (entityNodeMap == null) {
- entityNodeMap = new CMNamedNodeMapImpl();
-
- // add the built in entity declarations
- //
- entityNodeMap.getHashtable().put("amp", new CMEntityDeclarationImpl("amp", "&")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- entityNodeMap.getHashtable().put("lt", new CMEntityDeclarationImpl("lt", "<")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- entityNodeMap.getHashtable().put("gt", new CMEntityDeclarationImpl("gt", ">")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- entityNodeMap.getHashtable().put("quot", new CMEntityDeclarationImpl("quot", "\"")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- entityNodeMap.getHashtable().put("apos", new CMEntityDeclarationImpl("apos", "'")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- for (Iterator i = dtdFile.listDTDEntity().iterator(); i.hasNext();) {
- DTDEntity dtdEntity = (DTDEntity) i.next();
- if (!dtdEntity.isParameterEntity() && dtdEntity.getName() != null) {
- // for now... just handle DTDInternalEntity
- //
- if (dtdEntity.getContent() instanceof DTDInternalEntity) {
- entityNodeMap.getHashtable().put(dtdEntity.getName(), getAdapter(dtdEntity));
- }
- }
- }
- }
- return entityNodeMap;
- }
-
- public CMNamespace getNamespace() {
- return null;
- }
-
- public int getNodeType() {
- return DOCUMENT;
- }
-
- public String getNodeName() {
- return dtdFile.getName() + ".dtd"; //$NON-NLS-1$
- }
-
- public Object getProperty(String propertyName) {
- Object result = null;
- if (propertyName.equals(DEFAULT_ROOT_NAME)) {
- DTDMetrics metrics = new DTDMetrics(dtdFile);
- DTDElement dtdElement = metrics.getLeastReferencedElement();
- if (dtdElement != null) {
- result = dtdElement.getName();
- }
- }
- else if (propertyName.equals("annotationMap")) { //$NON-NLS-1$
- result = annotationMap;
- }
- else if (propertyName.equals("globalPropertyMap")) { //$NON-NLS-1$
- result = globalPropertyMap;
- }
- else {
- result = super.getProperty(propertyName);
- }
- return result;
- }
- }
-
-
- public static class CMDataTypeInfoTable {
- protected String[] instanceValueTable;
- protected String[] dataTypeNameTable;
-
- public CMDataTypeInfoTable() {
- // hashtable.put(DTDType.CDATA, null));
- instanceValueTable = new String[DTDBasicTypeImpl.basicTypeKinds.length];
- instanceValueTable[DTDBasicTypeKind.ENTITY] = "entity"; //$NON-NLS-1$
- instanceValueTable[DTDBasicTypeKind.ENTITIES] = "entities"; //$NON-NLS-1$
- instanceValueTable[DTDBasicTypeKind.NMTOKEN] = "nmtoken"; //$NON-NLS-1$
- instanceValueTable[DTDBasicTypeKind.NMTOKENS] = "nmtokens"; //$NON-NLS-1$
-
- dataTypeNameTable = new String[DTDBasicTypeImpl.basicTypeKinds.length];
- dataTypeNameTable[DTDBasicTypeKind.CDATA] = CMDataType.CDATA;
- dataTypeNameTable[DTDBasicTypeKind.ID] = CMDataType.ID;
- dataTypeNameTable[DTDBasicTypeKind.IDREF] = CMDataType.IDREF;
- dataTypeNameTable[DTDBasicTypeKind.ENTITY] = CMDataType.ENTITY;
- dataTypeNameTable[DTDBasicTypeKind.ENTITIES] = CMDataType.ENTITIES;
- dataTypeNameTable[DTDBasicTypeKind.NMTOKEN] = CMDataType.NMTOKEN;
- dataTypeNameTable[DTDBasicTypeKind.NMTOKENS] = CMDataType.NMTOKENS;
- }
-
- public String getInstanceValue(DTDType dtdType) {
- String result = null;
- if (dtdType instanceof DTDBasicType) {
- int kind = ((DTDBasicType) dtdType).getKind().getValue();
- if (kind >= 0 && kind < DTDBasicTypeImpl.basicTypeDescriptions.length) {
- result = instanceValueTable[kind];
- }
- }
- return result;
- }
-
- public String getDataTypeName(DTDType dtdType) {
- String result = null;
- if (dtdType instanceof DTDBasicType) {
- int kind = ((DTDBasicType) dtdType).getKind().getValue();
- if (kind >= 0 && kind < DTDBasicTypeImpl.basicTypeDescriptions.length) {
- result = dataTypeNameTable[kind];
- }
- }
- else if (dtdType instanceof DTDEnumerationType) {
- result = CMDataType.ENUM;
- }
- return result;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAnyContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAnyContent.java
deleted file mode 100644
index 5e13bf8ca9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAnyContent.java
+++ /dev/null
@@ -1,26 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Any Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAnyContent()
- * @model
- * @generated
- */
-public interface DTDAnyContent extends DTDElementContent {
-} // DTDAnyContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAttribute.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAttribute.java
deleted file mode 100644
index ba9841f51b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAttribute.java
+++ /dev/null
@@ -1,240 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EAttribute;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Attribute</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultKind <em>Default Kind</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultValueString <em>Default Value String</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement <em>DTD Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute()
- * @model
- * @generated
- */
-public interface DTDAttribute extends EAttribute, DTDObject, DTDSourceOffset {
- // NON-GEN interfaces DTDObject, DTDSourceOffset
-
- public DTDType getDTDType();
-
- public void setDTDType(DTDType type);
-
- public void setDTDBasicType(int value);
-
- public DTDEnumerationType createDTDEnumeration(String[] enumValues, int enumKind);
-
- public Collection getEnumeratedValues();
-
- public String unparse();
-
- /**
- * Returns the value of the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Comment</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Comment</em>' attribute.
- * @see #setComment(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_Comment()
- * @model
- * @generated
- */
- String getComment();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getComment <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Comment</em>' attribute.
- * @see #getComment()
- * @generated
- */
- void setComment(String value);
-
- /**
- * Returns the value of the '<em><b>Default Kind</b></em>' attribute.
- * The literals are from the enumeration
- * {@link org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind}. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Kind</em>' attribute isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Default Kind</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind
- * @see #setDefaultKind(DTDDefaultKind)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_DefaultKind()
- * @model
- * @generated
- */
- DTDDefaultKind getDefaultKind();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultKind <em>Default Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Default Kind</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind
- * @see #getDefaultKind()
- * @generated
- */
- void setDefaultKind(DTDDefaultKind value);
-
- /**
- * Returns the value of the '<em><b>Default Value String</b></em>'
- * attribute. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Value String</em>' attribute
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Default Value String</em>' attribute.
- * @see #setDefaultValueString(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_DefaultValueString()
- * @model
- * @generated
- */
- String getDefaultValueString();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultValueString <em>Default Value String</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Default Value String</em>'
- * attribute.
- * @see #getDefaultValueString()
- * @generated
- */
- void setDefaultValueString(String value);
-
- /**
- * Returns the value of the '<em><b>Attribute Name Referenced Entity</b></em>'
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference <em>Attribute Name Reference</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute Name Referenced Entity</em>'
- * reference isn't clear, there really should be more of a description
- * here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Attribute Name Referenced Entity</em>'
- * reference.
- * @see #setAttributeNameReferencedEntity(DTDEntity)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_AttributeNameReferencedEntity()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference
- * @model opposite="attributeNameReference"
- * @generated
- */
- DTDEntity getAttributeNameReferencedEntity();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Attribute Name Referenced Entity</em>'
- * reference.
- * @see #getAttributeNameReferencedEntity()
- * @generated
- */
- void setAttributeNameReferencedEntity(DTDEntity value);
-
- /**
- * Returns the value of the '<em><b>Attribute Type Referenced Entity</b></em>'
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference <em>Attribute Type Reference</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute Type Referenced Entity</em>'
- * reference isn't clear, there really should be more of a description
- * here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Attribute Type Referenced Entity</em>'
- * reference.
- * @see #setAttributeTypeReferencedEntity(DTDEntity)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_AttributeTypeReferencedEntity()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference
- * @model opposite="attributeTypeReference"
- * @generated
- */
- DTDEntity getAttributeTypeReferencedEntity();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Attribute Type Referenced Entity</em>'
- * reference.
- * @see #getAttributeTypeReferencedEntity()
- * @generated
- */
- void setAttributeTypeReferencedEntity(DTDEntity value);
-
- /**
- * Returns the value of the '<em><b>DTD Element</b></em>' container
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute <em>DTD Attribute</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>DTD Element</em>' container reference
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>DTD Element</em>' container
- * reference.
- * @see #setDTDElement(DTDElement)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDAttribute_DTDElement()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute
- * @model opposite="DTDAttribute"
- * @generated
- */
- DTDElement getDTDElement();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement <em>DTD Element</em>}'
- * container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>DTD Element</em>' container
- * reference.
- * @see #getDTDElement()
- * @generated
- */
- void setDTDElement(DTDElement value);
-
-} // DTDAttribute
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicType.java
deleted file mode 100644
index e0032804a0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicType.java
+++ /dev/null
@@ -1,66 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Basic Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicType#getKind <em>Kind</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDBasicType()
- * @model
- * @generated
- */
-public interface DTDBasicType extends EClass, DTDType {
- // NON-GEN interfaces DTDType
-
- public String getTypeDescription();
-
- /**
- * Returns the value of the '<em><b>Kind</b></em>' attribute. The
- * literals are from the enumeration
- * {@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind}. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Kind</em>' attribute isn't clear, there
- * really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Kind</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind
- * @see #setKind(DTDBasicTypeKind)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDBasicType_Kind()
- * @model
- * @generated
- */
- DTDBasicTypeKind getKind();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicType#getKind <em>Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Kind</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind
- * @see #getKind()
- * @generated
- */
- void setKind(DTDBasicTypeKind value);
-} // DTDBasicType
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicTypeKind.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicTypeKind.java
deleted file mode 100644
index c8fe9cd769..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicTypeKind.java
+++ /dev/null
@@ -1,332 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.AbstractEnumerator;
-
-/**
- * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Basic Type Kind</b></em>',
- * and utility methods for working with them. <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDBasicTypeKind()
- * @model
- * @generated
- */
-public final class DTDBasicTypeKind extends AbstractEnumerator {
- /**
- * The '<em><b>NONE</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #NONE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int NONE = 0;
-
- /**
- * The '<em><b>CDATA</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #CDATA_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int CDATA = 1;
-
- /**
- * The '<em><b>ID</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #ID_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int ID = 2;
-
- /**
- * The '<em><b>IDREF</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #IDREF_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int IDREF = 3;
-
- /**
- * The '<em><b>IDREFS</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #IDREFS_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int IDREFS = 4;
-
- /**
- * The '<em><b>ENTITY</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #ENTITY_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int ENTITY = 5;
-
- /**
- * The '<em><b>ENTITIES</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #ENTITIES_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int ENTITIES = 6;
-
- /**
- * The '<em><b>NMTOKEN</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #NMTOKEN_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int NMTOKEN = 7;
-
- /**
- * The '<em><b>NMTOKENS</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #NMTOKENS_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int NMTOKENS = 8;
-
- /**
- * The '<em><b>NONE</b></em>' literal object. <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>NONE</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #NONE
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind NONE_LITERAL = new DTDBasicTypeKind(NONE, "NONE"); //$NON-NLS-1$
-
- /**
- * The '<em><b>CDATA</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>CDATA</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #CDATA
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind CDATA_LITERAL = new DTDBasicTypeKind(CDATA, "CDATA"); //$NON-NLS-1$
-
- /**
- * The '<em><b>ID</b></em>' literal object. <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>ID</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #ID
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind ID_LITERAL = new DTDBasicTypeKind(ID, "ID"); //$NON-NLS-1$
-
- /**
- * The '<em><b>IDREF</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>IDREF</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #IDREF
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind IDREF_LITERAL = new DTDBasicTypeKind(IDREF, "IDREF"); //$NON-NLS-1$
-
- /**
- * The '<em><b>IDREFS</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>IDREFS</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #IDREFS
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind IDREFS_LITERAL = new DTDBasicTypeKind(IDREFS, "IDREFS"); //$NON-NLS-1$
-
- /**
- * The '<em><b>ENTITY</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>ENTITY</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #ENTITY
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind ENTITY_LITERAL = new DTDBasicTypeKind(ENTITY, "ENTITY"); //$NON-NLS-1$
-
- /**
- * The '<em><b>ENTITIES</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>ENTITIES</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #ENTITIES
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind ENTITIES_LITERAL = new DTDBasicTypeKind(ENTITIES, "ENTITIES"); //$NON-NLS-1$
-
- /**
- * The '<em><b>NMTOKEN</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>NMTOKEN</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #NMTOKEN
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind NMTOKEN_LITERAL = new DTDBasicTypeKind(NMTOKEN, "NMTOKEN"); //$NON-NLS-1$
-
- /**
- * The '<em><b>NMTOKENS</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>NMTOKENS</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #NMTOKENS
- * @generated
- * @ordered
- */
- public static final DTDBasicTypeKind NMTOKENS_LITERAL = new DTDBasicTypeKind(NMTOKENS, "NMTOKENS"); //$NON-NLS-1$
-
- /**
- * An array of all the '<em><b>Basic Type Kind</b></em>' enumerators.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private static final DTDBasicTypeKind[] VALUES_ARRAY = new DTDBasicTypeKind[]{NONE_LITERAL, CDATA_LITERAL, ID_LITERAL, IDREF_LITERAL, IDREFS_LITERAL, ENTITY_LITERAL, ENTITIES_LITERAL, NMTOKEN_LITERAL, NMTOKENS_LITERAL,};
-
- /**
- * A public read-only list of all the '<em><b>Basic Type Kind</b></em>'
- * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Basic Type Kind</b></em>' literal with the
- * specified name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDBasicTypeKind get(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- DTDBasicTypeKind result = VALUES_ARRAY[i];
- if (result.toString().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Basic Type Kind</b></em>' literal with the
- * specified value. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDBasicTypeKind get(int value) {
- switch (value) {
- case NONE :
- return NONE_LITERAL;
- case CDATA :
- return CDATA_LITERAL;
- case ID :
- return ID_LITERAL;
- case IDREF :
- return IDREF_LITERAL;
- case IDREFS :
- return IDREFS_LITERAL;
- case ENTITY :
- return ENTITY_LITERAL;
- case ENTITIES :
- return ENTITIES_LITERAL;
- case NMTOKEN :
- return NMTOKEN_LITERAL;
- case NMTOKENS :
- return NMTOKENS_LITERAL;
- }
- return null;
- }
-
- /**
- * Only this class can construct instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- private DTDBasicTypeKind(int value, String name) {
- super(value, name);
- }
-
-} // DTDBasicTypeKind
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDConstants.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDConstants.java
deleted file mode 100644
index ef3fb79e3d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDConstants.java
+++ /dev/null
@@ -1,21 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-public class DTDConstants {
- public static String DTD_ERROR_LINE_PREFIX = "<!--ERROR "; //$NON-NLS-1$
- public static String DTD_ERROR_LINE_SUFFIX = " -->"; //$NON-NLS-1$
- public static final String DTD_EXTENSION = "dtd"; //$NON-NLS-1$
- public static final String XML_EXTENSION = "xml"; //$NON-NLS-1$
- public static final String XMI_EXTENSION = "xmi"; //$NON-NLS-1$
- public static final String DTD_XMI_EXTENSION = "dtd.xmi"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDContent.java
deleted file mode 100644
index f0667581ed..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDContent.java
+++ /dev/null
@@ -1,63 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile <em>DTD File</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDContent()
- * @model abstract="true"
- * @generated
- */
-public interface DTDContent extends EObject {
- /**
- * Returns the value of the '<em><b>DTD File</b></em>' container
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent <em>DTD Content</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>DTD File</em>' container reference isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>DTD File</em>' container reference.
- * @see #setDTDFile(DTDFile)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDContent_DTDFile()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent
- * @model opposite="DTDContent"
- * @generated
- */
- DTDFile getDTDFile();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile <em>DTD File</em>}'
- * container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>DTD File</em>' container
- * reference.
- * @see #getDTDFile()
- * @generated
- */
- void setDTDFile(DTDFile value);
-
-} // DTDContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDDefaultKind.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDDefaultKind.java
deleted file mode 100644
index 9e57c5a37f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDDefaultKind.java
+++ /dev/null
@@ -1,194 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.AbstractEnumerator;
-
-/**
- * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Default Kind</b></em>',
- * and utility methods for working with them. <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDDefaultKind()
- * @model
- * @generated
- */
-public final class DTDDefaultKind extends AbstractEnumerator {
- /**
- * The '<em><b>IMPLIED</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #IMPLIED_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int IMPLIED = 1;
-
- /**
- * The '<em><b>REQUIRED</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #REQUIRED_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int REQUIRED = 2;
-
- /**
- * The '<em><b>FIXED</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #FIXED_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int FIXED = 3;
-
- /**
- * The '<em><b>NOFIXED</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #NOFIXED_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int NOFIXED = 4;
-
- /**
- * The '<em><b>IMPLIED</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>IMPLIED</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #IMPLIED
- * @generated
- * @ordered
- */
- public static final DTDDefaultKind IMPLIED_LITERAL = new DTDDefaultKind(IMPLIED, "IMPLIED"); //$NON-NLS-1$
-
- /**
- * The '<em><b>REQUIRED</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>REQUIRED</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #REQUIRED
- * @generated
- * @ordered
- */
- public static final DTDDefaultKind REQUIRED_LITERAL = new DTDDefaultKind(REQUIRED, "REQUIRED"); //$NON-NLS-1$
-
- /**
- * The '<em><b>FIXED</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>FIXED</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #FIXED
- * @generated
- * @ordered
- */
- public static final DTDDefaultKind FIXED_LITERAL = new DTDDefaultKind(FIXED, "FIXED"); //$NON-NLS-1$
-
- /**
- * The '<em><b>NOFIXED</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>NOFIXED</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #NOFIXED
- * @generated
- * @ordered
- */
- public static final DTDDefaultKind NOFIXED_LITERAL = new DTDDefaultKind(NOFIXED, "NOFIXED"); //$NON-NLS-1$
-
- /**
- * An array of all the '<em><b>Default Kind</b></em>' enumerators.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private static final DTDDefaultKind[] VALUES_ARRAY = new DTDDefaultKind[]{IMPLIED_LITERAL, REQUIRED_LITERAL, FIXED_LITERAL, NOFIXED_LITERAL,};
-
- /**
- * A public read-only list of all the '<em><b>Default Kind</b></em>'
- * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Default Kind</b></em>' literal with the
- * specified name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDDefaultKind get(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- DTDDefaultKind result = VALUES_ARRAY[i];
- if (result.toString().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Default Kind</b></em>' literal with the
- * specified value. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDDefaultKind get(int value) {
- switch (value) {
- case IMPLIED :
- return IMPLIED_LITERAL;
- case REQUIRED :
- return REQUIRED_LITERAL;
- case FIXED :
- return FIXED_LITERAL;
- case NOFIXED :
- return NOFIXED_LITERAL;
- }
- return null;
- }
-
- /**
- * Only this class can construct instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- private DTDDefaultKind(int value, String name) {
- super(value, name);
- }
-
-} // DTDDefaultKind
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElement.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElement.java
deleted file mode 100644
index d81097cca5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElement.java
+++ /dev/null
@@ -1,126 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Element</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent <em>Content</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute <em>DTD Attribute</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElement()
- * @model
- * @generated
- */
-public interface DTDElement extends EClass, DTDContent, DTDObject, DTDSourceOffset {
-
- public void addDTDAttribute(DTDAttribute attribute);
-
- // returns all references in the same DTDFile that reference this element
- public Collection getReferences();
-
- // return a brief string listing the attributes
- public String getAttributeDetail();
-
- /**
- * Returns the value of the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Comment</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Comment</em>' attribute.
- * @see #setComment(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElement_Comment()
- * @model
- * @generated
- */
- String getComment();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getComment <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Comment</em>' attribute.
- * @see #getComment()
- * @generated
- */
- void setComment(String value);
-
- /**
- * Returns the value of the '<em><b>Content</b></em>' containment
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement <em>Element</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Content</em>' containment reference
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Content</em>' containment reference.
- * @see #setContent(DTDElementContent)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElement_Content()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement
- * @model opposite="element" containment="true" required="true"
- * @generated
- */
- DTDElementContent getContent();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent <em>Content</em>}'
- * containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Content</em>' containment
- * reference.
- * @see #getContent()
- * @generated
- */
- void setContent(DTDElementContent value);
-
- /**
- * Returns the value of the '<em><b>DTD Attribute</b></em>'
- * containment reference list. The list contents are of type
- * {@link DTDAttribute}. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement <em>DTD Element</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>DTD Attribute</em>' containment
- * reference list isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>DTD Attribute</em>' containment
- * reference list.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElement_DTDAttribute()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement
- * @model type="DTDAttribute" opposite="DTDElement" containment="true"
- * @generated
- */
- EList getDTDAttribute();
-
-} // DTDElement
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementContent.java
deleted file mode 100644
index 1736ab2316..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementContent.java
+++ /dev/null
@@ -1,112 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Element Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement <em>Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementContent()
- * @model abstract="true"
- * @generated
- */
-public interface DTDElementContent extends EObject, DTDObject, DTDSourceOffset {
-
- // for showing names to be used in the tree
- public String getContentName();
-
- // for showing items in the table
- public String getContentDetail();
-
- public DTDElement getDTDElement();
-
- // get the most outer DTDGroupContent
- public DTDGroupContent getDTDGroupContent();
-
- // returns true if this element content is the first
- // in the element
- // eg <!ELEMENT blah firstElement>
- // <!ELEMENT blah ((firstElement, secondElement) | lastElement)
- public boolean isFirstElementContent();
-
- /**
- * Returns the value of the '<em><b>Group</b></em>' container
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent <em>Content</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group</em>' container reference isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Group</em>' container reference.
- * @see #setGroup(DTDGroupContent)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementContent_Group()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent
- * @model opposite="content"
- * @generated
- */
- DTDGroupContent getGroup();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup <em>Group</em>}'
- * container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Group</em>' container
- * reference.
- * @see #getGroup()
- * @generated
- */
- void setGroup(DTDGroupContent value);
-
- /**
- * Returns the value of the '<em><b>Element</b></em>' container
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent <em>Content</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Element</em>' container reference isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Element</em>' container reference.
- * @see #setElement(DTDElement)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementContent_Element()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent
- * @model opposite="content"
- * @generated
- */
- DTDElement getElement();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement <em>Element</em>}'
- * container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Element</em>' container
- * reference.
- * @see #getElement()
- * @generated
- */
- void setElement(DTDElement value);
-
-} // DTDElementContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementReferenceContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementReferenceContent.java
deleted file mode 100644
index 44e1bbe51b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementReferenceContent.java
+++ /dev/null
@@ -1,59 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Element Reference Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent#getReferencedElement <em>Referenced Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementReferenceContent()
- * @model
- * @generated
- */
-public interface DTDElementReferenceContent extends DTDRepeatableContent {
- /**
- * Returns the value of the '<em><b>Referenced Element</b></em>'
- * reference. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Referenced Element</em>' reference isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Referenced Element</em>' reference.
- * @see #setReferencedElement(DTDElement)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDElementReferenceContent_ReferencedElement()
- * @model required="true"
- * @generated
- */
- DTDElement getReferencedElement();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent#getReferencedElement <em>Referenced Element</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Referenced Element</em>'
- * reference.
- * @see #getReferencedElement()
- * @generated
- */
- void setReferencedElement(DTDElement value);
-
-} // DTDElementReferenceContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEmptyContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEmptyContent.java
deleted file mode 100644
index 5626827cf4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEmptyContent.java
+++ /dev/null
@@ -1,26 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Empty Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEmptyContent()
- * @model
- * @generated
- */
-public interface DTDEmptyContent extends DTDElementContent {
-} // DTDEmptyContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntity.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntity.java
deleted file mode 100644
index bd4b4547f5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntity.java
+++ /dev/null
@@ -1,220 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.ENamedElement;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Entity</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#isParameterEntity <em>Parameter Entity</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent <em>Content</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef <em>Parm Entity Ref</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference <em>Entity Reference</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference <em>Attribute Name Reference</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference <em>Attribute Type Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity()
- * @model
- * @generated
- */
-public interface DTDEntity extends ENamedElement, DTDContent, DTDObject, DTDSourceOffset {
- /**
- * Returns the value of the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Comment</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Comment</em>' attribute.
- * @see #setComment(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_Comment()
- * @model
- * @generated
- */
- String getComment();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getComment <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Comment</em>' attribute.
- * @see #getComment()
- * @generated
- */
- void setComment(String value);
-
- /**
- * Returns the value of the '<em><b>Parameter Entity</b></em>'
- * attribute. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Parameter Entity</em>' attribute isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Parameter Entity</em>' attribute.
- * @see #setParameterEntity(boolean)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_ParameterEntity()
- * @model
- * @generated
- */
- boolean isParameterEntity();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#isParameterEntity <em>Parameter Entity</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Parameter Entity</em>'
- * attribute.
- * @see #isParameterEntity()
- * @generated
- */
- void setParameterEntity(boolean value);
-
- /**
- * Returns the value of the '<em><b>Content</b></em>' containment
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity <em>DTD Entity</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Content</em>' containment reference
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Content</em>' containment reference.
- * @see #setContent(DTDEntityContent)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_Content()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity
- * @model opposite="DTDEntity" containment="true" required="true"
- * @generated
- */
- DTDEntityContent getContent();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent <em>Content</em>}'
- * containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Content</em>' containment
- * reference.
- * @see #getContent()
- * @generated
- */
- void setContent(DTDEntityContent value);
-
- /**
- * Returns the value of the '<em><b>Parm Entity Ref</b></em>'
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity <em>Entity</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Parm Entity Ref</em>' reference isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Parm Entity Ref</em>' reference.
- * @see #setParmEntityRef(DTDParameterEntityReference)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_ParmEntityRef()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity
- * @model opposite="entity" required="true"
- * @generated
- */
- DTDParameterEntityReference getParmEntityRef();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef <em>Parm Entity Ref</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Parm Entity Ref</em>'
- * reference.
- * @see #getParmEntityRef()
- * @generated
- */
- void setParmEntityRef(DTDParameterEntityReference value);
-
- /**
- * Returns the value of the '<em><b>Entity Reference</b></em>'
- * reference list. The list contents are of type
- * {@link DTDEntityReferenceContent}. It is bidirectional and its
- * opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity <em>Element Referenced Entity</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity Reference</em>' reference list
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Entity Reference</em>' reference
- * list.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_EntityReference()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity
- * @model type="DTDEntityReferenceContent"
- * opposite="elementReferencedEntity"
- * @generated
- */
- EList getEntityReference();
-
- /**
- * Returns the value of the '<em><b>Attribute Name Reference</b></em>'
- * reference list. The list contents are of type {@link DTDAttribute}. It
- * is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute Name Reference</em>' reference
- * list isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Attribute Name Reference</em>'
- * reference list.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_AttributeNameReference()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity
- * @model type="DTDAttribute" opposite="attributeNameReferencedEntity"
- * @generated
- */
- EList getAttributeNameReference();
-
- /**
- * Returns the value of the '<em><b>Attribute Type Reference</b></em>'
- * reference list. The list contents are of type {@link DTDAttribute}. It
- * is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attribute Type Reference</em>' reference
- * list isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Attribute Type Reference</em>'
- * reference list.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntity_AttributeTypeReference()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity
- * @model type="DTDAttribute" opposite="attributeTypeReferencedEntity"
- * @generated
- */
- EList getAttributeTypeReference();
-
-} // DTDEntity
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityContent.java
deleted file mode 100644
index 90626c6161..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityContent.java
+++ /dev/null
@@ -1,65 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Entity Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity <em>DTD Entity</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntityContent()
- * @model abstract="true"
- * @generated
- */
-public interface DTDEntityContent extends EObject, DTDObject {
-
- public String unparse();
-
- /**
- * Returns the value of the '<em><b>DTD Entity</b></em>' container
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent <em>Content</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>DTD Entity</em>' container reference
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>DTD Entity</em>' container reference.
- * @see #setDTDEntity(DTDEntity)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntityContent_DTDEntity()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent
- * @model opposite="content"
- * @generated
- */
- DTDEntity getDTDEntity();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity <em>DTD Entity</em>}'
- * container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>DTD Entity</em>' container
- * reference.
- * @see #getDTDEntity()
- * @generated
- */
- void setDTDEntity(DTDEntity value);
-
-} // DTDEntityContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityReferenceContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityReferenceContent.java
deleted file mode 100644
index 55b97f7b28..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityReferenceContent.java
+++ /dev/null
@@ -1,64 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Entity Reference Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity <em>Element Referenced Entity</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntityReferenceContent()
- * @model
- * @generated
- */
-public interface DTDEntityReferenceContent extends DTDRepeatableContent {
-
- /**
- * Returns the value of the '<em><b>Element Referenced Entity</b></em>'
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference <em>Entity Reference</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Element Referenced Entity</em>'
- * reference isn't clear, there really should be more of a description
- * here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Element Referenced Entity</em>'
- * reference.
- * @see #setElementReferencedEntity(DTDEntity)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEntityReferenceContent_ElementReferencedEntity()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference
- * @model opposite="entityReference" required="true"
- * @generated
- */
- DTDEntity getElementReferencedEntity();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity <em>Element Referenced Entity</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Element Referenced Entity</em>'
- * reference.
- * @see #getElementReferencedEntity()
- * @generated
- */
- void setElementReferencedEntity(DTDEntity value);
-
-} // DTDEntityReferenceContent
-
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumGroupKind.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumGroupKind.java
deleted file mode 100644
index 1003dc1cc8..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumGroupKind.java
+++ /dev/null
@@ -1,139 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.AbstractEnumerator;
-
-/**
- * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Enum Group Kind</b></em>',
- * and utility methods for working with them. <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEnumGroupKind()
- * @model
- * @generated
- */
-public final class DTDEnumGroupKind extends AbstractEnumerator {
- /**
- * The '<em><b>NAME TOKEN GROUP</b></em>' literal value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #NAME_TOKEN_GROUP_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int NAME_TOKEN_GROUP = 1;
-
- /**
- * The '<em><b>NOTATION GROUP</b></em>' literal value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #NOTATION_GROUP_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int NOTATION_GROUP = 2;
-
- /**
- * The '<em><b>NAME TOKEN GROUP</b></em>' literal object. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>NAME TOKEN GROUP</b></em>' literal
- * object isn't clear, there really should be more of a description
- * here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #NAME_TOKEN_GROUP
- * @generated
- * @ordered
- */
- public static final DTDEnumGroupKind NAME_TOKEN_GROUP_LITERAL = new DTDEnumGroupKind(NAME_TOKEN_GROUP, "NAME_TOKEN_GROUP"); //$NON-NLS-1$
-
- /**
- * The '<em><b>NOTATION GROUP</b></em>' literal object. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>NOTATION GROUP</b></em>' literal object
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #NOTATION_GROUP
- * @generated
- * @ordered
- */
- public static final DTDEnumGroupKind NOTATION_GROUP_LITERAL = new DTDEnumGroupKind(NOTATION_GROUP, "NOTATION_GROUP"); //$NON-NLS-1$
-
- /**
- * An array of all the '<em><b>Enum Group Kind</b></em>' enumerators.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private static final DTDEnumGroupKind[] VALUES_ARRAY = new DTDEnumGroupKind[]{NAME_TOKEN_GROUP_LITERAL, NOTATION_GROUP_LITERAL,};
-
- /**
- * A public read-only list of all the '<em><b>Enum Group Kind</b></em>'
- * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Enum Group Kind</b></em>' literal with the
- * specified name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDEnumGroupKind get(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- DTDEnumGroupKind result = VALUES_ARRAY[i];
- if (result.toString().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Enum Group Kind</b></em>' literal with the
- * specified value. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDEnumGroupKind get(int value) {
- switch (value) {
- case NAME_TOKEN_GROUP :
- return NAME_TOKEN_GROUP_LITERAL;
- case NOTATION_GROUP :
- return NOTATION_GROUP_LITERAL;
- }
- return null;
- }
-
- /**
- * Only this class can construct instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- private DTDEnumGroupKind(int value, String name) {
- super(value, name);
- }
-
-} // DTDEnumGroupKind
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumerationType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumerationType.java
deleted file mode 100644
index 4901b2b18b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumerationType.java
+++ /dev/null
@@ -1,101 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EEnum;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Enumeration Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getKind <em>Kind</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile <em>DTD File</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEnumerationType()
- * @model
- * @generated
- */
-public interface DTDEnumerationType extends EEnum, DTDType {
-
- public EList getEnumLiterals();
-
- public String getEnumerationTypeDescription();
-
- /**
- * Returns the value of the '<em><b>Kind</b></em>' attribute. The
- * literals are from the enumeration
- * {@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind}. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Kind</em>' attribute isn't clear, there
- * really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Kind</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind
- * @see #setKind(DTDEnumGroupKind)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEnumerationType_Kind()
- * @model
- * @generated
- */
- DTDEnumGroupKind getKind();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getKind <em>Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Kind</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind
- * @see #getKind()
- * @generated
- */
- void setKind(DTDEnumGroupKind value);
-
- /**
- * Returns the value of the '<em><b>DTD File</b></em>' container
- * reference. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType <em>DTD Enumeration Type</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>DTD File</em>' container reference isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>DTD File</em>' container reference.
- * @see #setDTDFile(DTDFile)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDEnumerationType_DTDFile()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType
- * @model opposite="DTDEnumerationType"
- * @generated
- */
- DTDFile getDTDFile();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile <em>DTD File</em>}'
- * container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>DTD File</em>' container
- * reference.
- * @see #getDTDFile()
- * @generated
- */
- void setDTDFile(DTDFile value);
-
-} // DTDEnumerationType
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDErrorMessage.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDErrorMessage.java
deleted file mode 100644
index 613e9c5574..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDErrorMessage.java
+++ /dev/null
@@ -1,49 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-public class DTDErrorMessage {
- public String errorKey;
- public String errorMessage;
- public String lineNo;
- public String charOffSet;
- public String declarationType;
- public String declarationName;
- public String sourceLine;
-
-
- public DTDErrorMessage(String declarationType, String declarationName, String lineNo, String charOffSet, String errorKey, String errorMessage) {
- this(declarationType, declarationName, lineNo, charOffSet, errorKey, errorMessage, null);
- }
-
- public DTDErrorMessage(String declarationType, String declarationName, String lineNo, String charOffSet, String errorKey, String errorMessage, String srcLine) {
- this.declarationType = declarationType;
- this.declarationName = declarationName;
- this.lineNo = lineNo;
- this.charOffSet = charOffSet;
- this.errorKey = errorKey;
- this.errorMessage = errorMessage;
- this.sourceLine = srcLine;
- }
-
- public String toString() {
- return "(" + declarationType + ":" + declarationName + ") " + lineNo + ":" + charOffSet + " " + errorMessage; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
-
- /**
- * @generated
- */
- protected String toStringGen() {
-
- return "(" + declarationType + ":" + declarationName + ") " + lineNo + ":" + charOffSet + " " + errorMessage; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExtender.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExtender.java
deleted file mode 100644
index 59de3608a2..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExtender.java
+++ /dev/null
@@ -1,19 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-/**
- * This interface can be implemented by an IDomainModel to augment
- * getElementProperty for any DTD object.
- */
-public interface DTDExtender {
- public Object getElementProperty(DTDObject dtdObject, Object object);
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExternalEntity.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExternalEntity.java
deleted file mode 100644
index 2f8b34f8ea..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExternalEntity.java
+++ /dev/null
@@ -1,151 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>External Entity</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getSystemID <em>System ID</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getPublicID <em>Public ID</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation <em>Notation</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getEntityReferencedFromAnotherFile <em>Entity Referenced From Another File</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity()
- * @model
- * @generated
- */
-public interface DTDExternalEntity extends DTDEntityContent {
-
- /**
- * Returns the value of the '<em><b>System ID</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>System ID</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>System ID</em>' attribute.
- * @see #setSystemID(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity_SystemID()
- * @model
- * @generated
- */
- String getSystemID();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getSystemID <em>System ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>System ID</em>' attribute.
- * @see #getSystemID()
- * @generated
- */
- void setSystemID(String value);
-
- /**
- * Returns the value of the '<em><b>Public ID</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Public ID</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Public ID</em>' attribute.
- * @see #setPublicID(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity_PublicID()
- * @model
- * @generated
- */
- String getPublicID();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getPublicID <em>Public ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Public ID</em>' attribute.
- * @see #getPublicID()
- * @generated
- */
- void setPublicID(String value);
-
- /**
- * Returns the value of the '<em><b>Notation</b></em>' reference. It
- * is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity <em>Entity</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Notation</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Notation</em>' reference.
- * @see #setNotation(DTDNotation)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity_Notation()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity
- * @model opposite="entity"
- * @generated
- */
- DTDNotation getNotation();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation <em>Notation</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Notation</em>' reference.
- * @see #getNotation()
- * @generated
- */
- void setNotation(DTDNotation value);
-
- /**
- * Returns the value of the '<em><b>Entity Referenced From Another File</b></em>'
- * reference. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity Referenced From Another File</em>'
- * reference isn't clear, there really should be more of a description
- * here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Entity Referenced From Another File</em>'
- * reference.
- * @see #setEntityReferencedFromAnotherFile(DTDFile)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDExternalEntity_EntityReferencedFromAnotherFile()
- * @model
- * @generated
- */
- DTDFile getEntityReferencedFromAnotherFile();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getEntityReferencedFromAnotherFile <em>Entity Referenced From Another File</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Entity Referenced From Another File</em>'
- * reference.
- * @see #getEntityReferencedFromAnotherFile()
- * @generated
- */
- void setEntityReferencedFromAnotherFile(DTDFile value);
-
-} // DTDExternalEntity
-
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFactory.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFactory.java
deleted file mode 100644
index 282777a02c..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFactory.java
+++ /dev/null
@@ -1,186 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
- * create method for each non-abstract class of the model. <!-- end-user-doc
- * -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage
- * @generated
- */
-public interface DTDFactory extends EFactory {
-
- /**
- * The singleton instance of the factory. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- DTDFactory eINSTANCE = new org.eclipse.wst.dtd.core.internal.emf.impl.DTDFactoryImpl();
-
- /**
- * Returns a new object of class '<em>Group Content</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Group Content</em>'.
- * @generated
- */
- DTDGroupContent createDTDGroupContent();
-
- /**
- * Returns a new object of class '<em>Attribute</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Attribute</em>'.
- * @generated
- */
- DTDAttribute createDTDAttribute();
-
- /**
- * Returns a new object of class '<em>Element</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Element</em>'.
- * @generated
- */
- DTDElement createDTDElement();
-
- /**
- * Returns a new object of class '<em>Empty Content</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Empty Content</em>'.
- * @generated
- */
- DTDEmptyContent createDTDEmptyContent();
-
- /**
- * Returns a new object of class '<em>Any Content</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Any Content</em>'.
- * @generated
- */
- DTDAnyContent createDTDAnyContent();
-
- /**
- * Returns a new object of class '<em>PC Data Content</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>PC Data Content</em>'.
- * @generated
- */
- DTDPCDataContent createDTDPCDataContent();
-
- /**
- * Returns a new object of class '<em>Element Reference Content</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Element Reference Content</em>'.
- * @generated
- */
- DTDElementReferenceContent createDTDElementReferenceContent();
-
- /**
- * Returns a new object of class '<em>File</em>'. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>File</em>'.
- * @generated
- */
- DTDFile createDTDFile();
-
- /**
- * Returns a new object of class '<em>Basic Type</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Basic Type</em>'.
- * @generated
- */
- DTDBasicType createDTDBasicType();
-
- /**
- * Returns a new object of class '<em>Enumeration Type</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Enumeration Type</em>'.
- * @generated
- */
- DTDEnumerationType createDTDEnumerationType();
-
- /**
- * Returns a new object of class '<em>Notation</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Notation</em>'.
- * @generated
- */
- DTDNotation createDTDNotation();
-
- /**
- * Returns a new object of class '<em>Entity</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Entity</em>'.
- * @generated
- */
- DTDEntity createDTDEntity();
-
- /**
- * Returns a new object of class '<em>External Entity</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>External Entity</em>'.
- * @generated
- */
- DTDExternalEntity createDTDExternalEntity();
-
- /**
- * Returns a new object of class '<em>Internal Entity</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Internal Entity</em>'.
- * @generated
- */
- DTDInternalEntity createDTDInternalEntity();
-
- /**
- * Returns a new object of class '<em>Parameter Entity Reference</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Parameter Entity Reference</em>'.
- * @generated
- */
- DTDParameterEntityReference createDTDParameterEntityReference();
-
- /**
- * Returns a new object of class '<em>Entity Reference Content</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Entity Reference Content</em>'.
- * @generated
- */
- DTDEntityReferenceContent createDTDEntityReferenceContent();
-
- /**
- * Returns the package supported by this factory. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @return the package supported by this factory.
- * @generated
- */
- DTDPackage getDTDPackage();
-
-} // DTDFactory
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFile.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFile.java
deleted file mode 100644
index 52ae28a8b0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFile.java
+++ /dev/null
@@ -1,157 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.List;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.ENamedElement;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>File</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#isParseError <em>Parse Error</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent <em>DTD Content</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType <em>DTD Enumeration Type</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile()
- * @model
- * @generated
- */
-public interface DTDFile extends ENamedElement, DTDObject {
-
- public EList getDTDObject();
-
- public List listDTDElement();
-
- public List listDTDNotation();
-
- public List listDTDEntity();
-
- public List listDTDParameterEntityReference();
-
- public List listDTDElementAndDTDParameterEntityReference();
-
- public DTDElement findElement(String name);
-
- public DTDEntity findEntity(String name);
-
- public DTDNotation findNotation(String name);
-
- public DTDParameterEntityReference findParameterEntityReference(String name);
-
- public String unparse(boolean includeError);
-
- /**
- * Returns the value of the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Comment</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Comment</em>' attribute.
- * @see #setComment(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile_Comment()
- * @model
- * @generated
- */
- String getComment();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getComment <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Comment</em>' attribute.
- * @see #getComment()
- * @generated
- */
- void setComment(String value);
-
- /**
- * Returns the value of the '<em><b>Parse Error</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Parse Error</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Parse Error</em>' attribute.
- * @see #setParseError(boolean)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile_ParseError()
- * @model
- * @generated
- */
- boolean isParseError();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#isParseError <em>Parse Error</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Parse Error</em>' attribute.
- * @see #isParseError()
- * @generated
- */
- void setParseError(boolean value);
-
- /**
- * Returns the value of the '<em><b>DTD Content</b></em>' containment
- * reference list. The list contents are of type {@link DTDContent}. It
- * is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile <em>DTD File</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>DTD Content</em>' containment reference
- * list isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>DTD Content</em>' containment
- * reference list.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile_DTDContent()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile
- * @model type="DTDContent" opposite="DTDFile" containment="true"
- * @generated
- */
- EList getDTDContent();
-
- /**
- * Returns the value of the '<em><b>DTD Enumeration Type</b></em>'
- * containment reference list. The list contents are of type
- * {@link DTDEnumerationType}. It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile <em>DTD File</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>DTD Enumeration Type</em>' containment
- * reference list isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>DTD Enumeration Type</em>'
- * containment reference list.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDFile_DTDEnumerationType()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile
- * @model type="DTDEnumerationType" opposite="DTDFile" containment="true"
- * @generated
- */
- EList getDTDEnumerationType();
-
-} // DTDFile
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupContent.java
deleted file mode 100644
index f72720506c..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupContent.java
+++ /dev/null
@@ -1,88 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Group Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getGroupKind <em>Group Kind</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent <em>Content</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDGroupContent()
- * @model
- * @generated
- */
-public interface DTDGroupContent extends DTDRepeatableContent {
-
- public int getContentPosition(DTDElementContent content);
-
- /**
- * Returns the value of the '<em><b>Group Kind</b></em>' attribute.
- * The literals are from the enumeration
- * {@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind}. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of the '<em>Group Kind</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Group Kind</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind
- * @see #setGroupKind(DTDGroupKind)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDGroupContent_GroupKind()
- * @model
- * @generated
- */
- DTDGroupKind getGroupKind();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getGroupKind <em>Group Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Group Kind</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind
- * @see #getGroupKind()
- * @generated
- */
- void setGroupKind(DTDGroupKind value);
-
- /**
- * Returns the value of the '<em><b>Content</b></em>' containment
- * reference list. The list contents are of type {@link DTDElementContent}.
- * It is bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup <em>Group</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Content</em>' containment reference list
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Content</em>' containment reference
- * list.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDGroupContent_Content()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup
- * @model type="DTDElementContent" opposite="group" containment="true"
- * required="true"
- * @generated
- */
- EList getContent();
-
-} // DTDGroupContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupKind.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupKind.java
deleted file mode 100644
index 4dd8b107f6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupKind.java
+++ /dev/null
@@ -1,139 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.AbstractEnumerator;
-
-/**
- * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Group Kind</b></em>',
- * and utility methods for working with them. <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDGroupKind()
- * @model
- * @generated
- */
-public final class DTDGroupKind extends AbstractEnumerator {
- /**
- * The '<em><b>SEQUENCE</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #SEQUENCE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int SEQUENCE = 1;
-
- /**
- * The '<em><b>CHOICE</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #CHOICE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int CHOICE = 2;
-
- /**
- * The '<em><b>SEQUENCE</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>SEQUENCE</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #SEQUENCE
- * @generated
- * @ordered
- */
- public static final DTDGroupKind SEQUENCE_LITERAL = new DTDGroupKind(SEQUENCE, "SEQUENCE"); //$NON-NLS-1$
-
- /**
- * The '<em><b>CHOICE</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>CHOICE</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #CHOICE
- * @generated
- * @ordered
- */
- public static final DTDGroupKind CHOICE_LITERAL = new DTDGroupKind(CHOICE, "CHOICE"); //$NON-NLS-1$
-
- /**
- * An array of all the '<em><b>Group Kind</b></em>' enumerators. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private static final DTDGroupKind[] VALUES_ARRAY = new DTDGroupKind[]{SEQUENCE_LITERAL, CHOICE_LITERAL,};
-
- /**
- * A public read-only list of all the '<em><b>Group Kind</b></em>'
- * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Group Kind</b></em>' literal with the
- * specified name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDGroupKind get(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- DTDGroupKind result = VALUES_ARRAY[i];
- if (result.toString().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Group Kind</b></em>' literal with the
- * specified value. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDGroupKind get(int value) {
- switch (value) {
- case SEQUENCE :
- return SEQUENCE_LITERAL;
- case CHOICE :
- return CHOICE_LITERAL;
- }
- return null;
- }
-
- /**
- * Only this class can construct instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- private DTDGroupKind(int value, String name) {
- super(value, name);
- }
-
-} // DTDGroupKind
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDInternalEntity.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDInternalEntity.java
deleted file mode 100644
index 0b28725ec5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDInternalEntity.java
+++ /dev/null
@@ -1,57 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Internal Entity</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity#getValue <em>Value</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDInternalEntity()
- * @model
- * @generated
- */
-public interface DTDInternalEntity extends DTDEntityContent {
- /**
- * Returns the value of the '<em><b>Value</b></em>' attribute. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value</em>' attribute isn't clear, there
- * really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Value</em>' attribute.
- * @see #setValue(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDInternalEntity_Value()
- * @model
- * @generated
- */
- String getValue();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity#getValue <em>Value</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Value</em>' attribute.
- * @see #getValue()
- * @generated
- */
- void setValue(String value);
-
-} // DTDInternalEntity
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDLexicalInfo.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDLexicalInfo.java
deleted file mode 100644
index 997997fa7d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDLexicalInfo.java
+++ /dev/null
@@ -1,99 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-public class DTDLexicalInfo implements DTDSourceOffset {
- // Begin User Defined Methods
- int startOffset;
- int endOffset;
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset() {
- return startOffset;
- }
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v) {
- this.startOffset = v;
- }
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset() {
- return endOffset;
- }
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v) {
-
- this.endOffset = v;
- }
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- protected int getStartOffsetGen() {
-
- return startOffset;
- }
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- protected void setStartOffsetGen(int v) {
-
- this.startOffset = v;
- }
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- protected int getEndOffsetGen() {
-
- return endOffset;
- }
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- protected void setEndOffsetGen(int v) {
-
-
- this.endOffset = v;
- }
-}// DTDSourceOffset
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDNotation.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDNotation.java
deleted file mode 100644
index 446bb7a203..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDNotation.java
+++ /dev/null
@@ -1,140 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.ENamedElement;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Notation</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getSystemID <em>System ID</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getPublicID <em>Public ID</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity <em>Entity</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation()
- * @model
- * @generated
- */
-public interface DTDNotation extends ENamedElement, DTDContent, DTDObject, DTDSourceOffset {
-
- /**
- * Returns the value of the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Comment</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Comment</em>' attribute.
- * @see #setComment(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation_Comment()
- * @model
- * @generated
- */
- String getComment();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getComment <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Comment</em>' attribute.
- * @see #getComment()
- * @generated
- */
- void setComment(String value);
-
- /**
- * Returns the value of the '<em><b>System ID</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>System ID</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>System ID</em>' attribute.
- * @see #setSystemID(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation_SystemID()
- * @model
- * @generated
- */
- String getSystemID();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getSystemID <em>System ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>System ID</em>' attribute.
- * @see #getSystemID()
- * @generated
- */
- void setSystemID(String value);
-
- /**
- * Returns the value of the '<em><b>Public ID</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Public ID</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Public ID</em>' attribute.
- * @see #setPublicID(String)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation_PublicID()
- * @model
- * @generated
- */
- String getPublicID();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getPublicID <em>Public ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Public ID</em>' attribute.
- * @see #getPublicID()
- * @generated
- */
- void setPublicID(String value);
-
- /**
- * Returns the value of the '<em><b>Entity</b></em>' reference list.
- * The list contents are of type {@link DTDExternalEntity}. It is
- * bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation <em>Notation</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Entity</em>' reference list.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDNotation_Entity()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation
- * @model type="DTDExternalEntity" opposite="notation"
- * @generated
- */
- EList getEntity();
-
-} // DTDNotation
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDObject.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDObject.java
deleted file mode 100644
index 603db71c0f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDObject.java
+++ /dev/null
@@ -1,21 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-// Ref package
-import org.eclipse.emf.ecore.EObject;
-
-public interface DTDObject extends EObject {
- public String getPathname();
-
- public DTDObject findObject(String relativePath);
-
-} // DTDObject
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDOccurrenceType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDOccurrenceType.java
deleted file mode 100644
index f38fb43ddd..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDOccurrenceType.java
+++ /dev/null
@@ -1,193 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.AbstractEnumerator;
-
-/**
- * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Occurrence Type</b></em>',
- * and utility methods for working with them. <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDOccurrenceType()
- * @model
- * @generated
- */
-public final class DTDOccurrenceType extends AbstractEnumerator {
- /**
- * The '<em><b>ONE</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #ONE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int ONE = 49;
-
- /**
- * The '<em><b>OPTIONAL</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #OPTIONAL_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int OPTIONAL = 63;
-
- /**
- * The '<em><b>ONE OR MORE</b></em>' literal value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #ONE_OR_MORE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int ONE_OR_MORE = 43;
-
- /**
- * The '<em><b>ZERO OR MORE</b></em>' literal value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #ZERO_OR_MORE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int ZERO_OR_MORE = 42;
-
- /**
- * The '<em><b>ONE</b></em>' literal object. <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>ONE</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #ONE
- * @generated
- * @ordered
- */
- public static final DTDOccurrenceType ONE_LITERAL = new DTDOccurrenceType(ONE, "ONE"); //$NON-NLS-1$
-
- /**
- * The '<em><b>OPTIONAL</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>OPTIONAL</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #OPTIONAL
- * @generated
- * @ordered
- */
- public static final DTDOccurrenceType OPTIONAL_LITERAL = new DTDOccurrenceType(OPTIONAL, "OPTIONAL"); //$NON-NLS-1$
-
- /**
- * The '<em><b>ONE OR MORE</b></em>' literal object. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>ONE OR MORE</b></em>' literal object
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #ONE_OR_MORE
- * @generated
- * @ordered
- */
- public static final DTDOccurrenceType ONE_OR_MORE_LITERAL = new DTDOccurrenceType(ONE_OR_MORE, "ONE_OR_MORE"); //$NON-NLS-1$
-
- /**
- * The '<em><b>ZERO OR MORE</b></em>' literal object. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>ZERO OR MORE</b></em>' literal object
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #ZERO_OR_MORE
- * @generated
- * @ordered
- */
- public static final DTDOccurrenceType ZERO_OR_MORE_LITERAL = new DTDOccurrenceType(ZERO_OR_MORE, "ZERO_OR_MORE"); //$NON-NLS-1$
-
- /**
- * An array of all the '<em><b>Occurrence Type</b></em>' enumerators.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private static final DTDOccurrenceType[] VALUES_ARRAY = new DTDOccurrenceType[]{ONE_LITERAL, OPTIONAL_LITERAL, ONE_OR_MORE_LITERAL, ZERO_OR_MORE_LITERAL,};
-
- /**
- * A public read-only list of all the '<em><b>Occurrence Type</b></em>'
- * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Occurrence Type</b></em>' literal with the
- * specified name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDOccurrenceType get(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- DTDOccurrenceType result = VALUES_ARRAY[i];
- if (result.toString().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Occurrence Type</b></em>' literal with the
- * specified value. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDOccurrenceType get(int value) {
- switch (value) {
- case ONE :
- return ONE_LITERAL;
- case OPTIONAL :
- return OPTIONAL_LITERAL;
- case ONE_OR_MORE :
- return ONE_OR_MORE_LITERAL;
- case ZERO_OR_MORE :
- return ZERO_OR_MORE_LITERAL;
- }
- return null;
- }
-
- /**
- * Only this class can construct instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- private DTDOccurrenceType(int value, String name) {
- super(value, name);
- }
-
-} // DTDOccurrenceType
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPCDataContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPCDataContent.java
deleted file mode 100644
index 23af5dd41e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPCDataContent.java
+++ /dev/null
@@ -1,25 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>PC Data Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDPCDataContent()
- * @model
- * @generated
- */
-public interface DTDPCDataContent extends DTDElementContent {
-} // DTDPCDataContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPackage.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPackage.java
deleted file mode 100644
index c8e84c1f79..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPackage.java
+++ /dev/null
@@ -1,2392 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-
-/**
- * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
- * accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDFactory
- * @generated
- */
-public interface DTDPackage extends EPackage {
-
- /**
- * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNAME = "dtd"; //$NON-NLS-1$
-
- /**
- * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- String eNS_URI = "http:///com/ibm/etools/dtd.ecore"; //$NON-NLS-1$
-
- /**
- * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- String eNS_PREFIX = "org.eclipse.wst.dtd.core.internal.emf"; //$NON-NLS-1$
-
- /**
- * The singleton instance of the package. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- DTDPackage eINSTANCE = org.eclipse.wst.dtd.core.internal.emf.impl.DTDPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementContentImpl <em>Element Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDElementContent()
- * @generated
- */
- int DTD_ELEMENT_CONTENT = 0;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_CONTENT__GROUP = 0;
-
- /**
- * The feature id for the '<em><b>Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_CONTENT__ELEMENT = 1;
-
- /**
- * The number of structural features of the the '<em>Element Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_CONTENT_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDRepeatableContentImpl <em>Repeatable Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDRepeatableContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDRepeatableContent()
- * @generated
- */
- int DTD_REPEATABLE_CONTENT = 8;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_REPEATABLE_CONTENT__GROUP = DTD_ELEMENT_CONTENT__GROUP;
-
- /**
- * The feature id for the '<em><b>Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_REPEATABLE_CONTENT__ELEMENT = DTD_ELEMENT_CONTENT__ELEMENT;
-
- /**
- * The feature id for the '<em><b>Occurrence</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_REPEATABLE_CONTENT__OCCURRENCE = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the the '<em>Repeatable Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_REPEATABLE_CONTENT_FEATURE_COUNT = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDGroupContentImpl <em>Group Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDGroupContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDGroupContent()
- * @generated
- */
- int DTD_GROUP_CONTENT = 1;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_GROUP_CONTENT__GROUP = DTD_REPEATABLE_CONTENT__GROUP;
-
- /**
- * The feature id for the '<em><b>Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_GROUP_CONTENT__ELEMENT = DTD_REPEATABLE_CONTENT__ELEMENT;
-
- /**
- * The feature id for the '<em><b>Occurrence</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_GROUP_CONTENT__OCCURRENCE = DTD_REPEATABLE_CONTENT__OCCURRENCE;
-
- /**
- * The feature id for the '<em><b>Group Kind</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_GROUP_CONTENT__GROUP_KIND = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Content</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_GROUP_CONTENT__CONTENT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the the '<em>Group Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_GROUP_CONTENT_FEATURE_COUNT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl <em>Attribute</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDAttribute()
- * @generated
- */
- int DTD_ATTRIBUTE = 2;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__EANNOTATIONS = EcorePackage.EATTRIBUTE__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__NAME = EcorePackage.EATTRIBUTE__NAME;
-
- /**
- * The feature id for the '<em><b>EType</b></em>' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__ETYPE = EcorePackage.EATTRIBUTE__ETYPE;
-
- /**
- * The feature id for the '<em><b>Changeable</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__CHANGEABLE = EcorePackage.EATTRIBUTE__CHANGEABLE;
-
- /**
- * The feature id for the '<em><b>Volatile</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__VOLATILE = EcorePackage.EATTRIBUTE__VOLATILE;
-
- /**
- * The feature id for the '<em><b>Transient</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__TRANSIENT = EcorePackage.EATTRIBUTE__TRANSIENT;
-
- /**
- * The feature id for the '<em><b>Unique</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__UNIQUE = EcorePackage.EATTRIBUTE__UNIQUE;
-
- /**
- * The feature id for the '<em><b>Default Value Literal</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL = EcorePackage.EATTRIBUTE__DEFAULT_VALUE_LITERAL;
-
- /**
- * The feature id for the '<em><b>Default Value</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__DEFAULT_VALUE = EcorePackage.EATTRIBUTE__DEFAULT_VALUE;
-
- /**
- * The feature id for the '<em><b>Lower Bound</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__LOWER_BOUND = EcorePackage.EATTRIBUTE__LOWER_BOUND;
-
- /**
- * The feature id for the '<em><b>Upper Bound</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__UPPER_BOUND = EcorePackage.EATTRIBUTE__UPPER_BOUND;
-
- /**
- * The feature id for the '<em><b>Many</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__MANY = EcorePackage.EATTRIBUTE__MANY;
-
- /**
- * The feature id for the '<em><b>Required</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__REQUIRED = EcorePackage.EATTRIBUTE__REQUIRED;
-
- /**
- * The feature id for the '<em><b>EContaining Class</b></em>'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__ECONTAINING_CLASS = EcorePackage.EATTRIBUTE__ECONTAINING_CLASS;
-
- /**
- * The feature id for the '<em><b>Unsettable</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__UNSETTABLE = EcorePackage.EATTRIBUTE__UNSETTABLE;
-
- /**
- * The feature id for the '<em><b>ID</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__ID = EcorePackage.EATTRIBUTE__ID;
-
- /**
- * The feature id for the '<em><b>EAttribute Type</b></em>'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__EATTRIBUTE_TYPE = EcorePackage.EATTRIBUTE__EATTRIBUTE_TYPE;
-
- /**
- * The feature id for the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__COMMENT = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Default Kind</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__DEFAULT_KIND = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Default Value String</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__DEFAULT_VALUE_STRING = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Attribute Name Referenced Entity</b></em>'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Attribute Type Referenced Entity</b></em>'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>DTD Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE__DTD_ELEMENT = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the the '<em>Attribute</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ATTRIBUTE_FEATURE_COUNT = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 6;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementImpl <em>Element</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDElement()
- * @generated
- */
- int DTD_ELEMENT = 3;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EANNOTATIONS = EcorePackage.ECLASS__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__NAME = EcorePackage.ECLASS__NAME;
-
- /**
- * The feature id for the '<em><b>Instance Class Name</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__INSTANCE_CLASS_NAME = EcorePackage.ECLASS__INSTANCE_CLASS_NAME;
-
- /**
- * The feature id for the '<em><b>Instance Class</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__INSTANCE_CLASS = EcorePackage.ECLASS__INSTANCE_CLASS;
-
- /**
- * The feature id for the '<em><b>Default Value</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__DEFAULT_VALUE = EcorePackage.ECLASS__DEFAULT_VALUE;
-
- /**
- * The feature id for the '<em><b>EPackage</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EPACKAGE = EcorePackage.ECLASS__EPACKAGE;
-
- /**
- * The feature id for the '<em><b>Abstract</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__ABSTRACT = EcorePackage.ECLASS__ABSTRACT;
-
- /**
- * The feature id for the '<em><b>Interface</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__INTERFACE = EcorePackage.ECLASS__INTERFACE;
-
- /**
- * The feature id for the '<em><b>ESuper Types</b></em>' reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__ESUPER_TYPES = EcorePackage.ECLASS__ESUPER_TYPES;
-
- /**
- * The feature id for the '<em><b>EOperations</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EOPERATIONS = EcorePackage.ECLASS__EOPERATIONS;
-
- /**
- * The feature id for the '<em><b>EAll Attributes</b></em>' reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EALL_ATTRIBUTES = EcorePackage.ECLASS__EALL_ATTRIBUTES;
-
- /**
- * The feature id for the '<em><b>EAll References</b></em>' reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EALL_REFERENCES = EcorePackage.ECLASS__EALL_REFERENCES;
-
- /**
- * The feature id for the '<em><b>EReferences</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EREFERENCES = EcorePackage.ECLASS__EREFERENCES;
-
- /**
- * The feature id for the '<em><b>EAttributes</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EATTRIBUTES = EcorePackage.ECLASS__EATTRIBUTES;
-
- /**
- * The feature id for the '<em><b>EAll Containments</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EALL_CONTAINMENTS = EcorePackage.ECLASS__EALL_CONTAINMENTS;
-
- /**
- * The feature id for the '<em><b>EAll Operations</b></em>' reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EALL_OPERATIONS = EcorePackage.ECLASS__EALL_OPERATIONS;
-
- /**
- * The feature id for the '<em><b>EAll Structural Features</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EALL_STRUCTURAL_FEATURES = EcorePackage.ECLASS__EALL_STRUCTURAL_FEATURES;
-
- /**
- * The feature id for the '<em><b>EAll Super Types</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EALL_SUPER_TYPES = EcorePackage.ECLASS__EALL_SUPER_TYPES;
-
- /**
- * The feature id for the '<em><b>EID Attribute</b></em>' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__EID_ATTRIBUTE = EcorePackage.ECLASS__EID_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>DTD File</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__DTD_FILE = EcorePackage.ECLASS_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__COMMENT = EcorePackage.ECLASS_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Content</b></em>' containment
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__CONTENT = EcorePackage.ECLASS_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>DTD Attribute</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT__DTD_ATTRIBUTE = EcorePackage.ECLASS_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the the '<em>Element</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_FEATURE_COUNT = EcorePackage.ECLASS_FEATURE_COUNT + 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEmptyContentImpl <em>Empty Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEmptyContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEmptyContent()
- * @generated
- */
- int DTD_EMPTY_CONTENT = 4;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EMPTY_CONTENT__GROUP = DTD_ELEMENT_CONTENT__GROUP;
-
- /**
- * The feature id for the '<em><b>Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EMPTY_CONTENT__ELEMENT = DTD_ELEMENT_CONTENT__ELEMENT;
-
- /**
- * The number of structural features of the the '<em>Empty Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EMPTY_CONTENT_FEATURE_COUNT = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAnyContentImpl <em>Any Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAnyContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDAnyContent()
- * @generated
- */
- int DTD_ANY_CONTENT = 5;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ANY_CONTENT__GROUP = DTD_ELEMENT_CONTENT__GROUP;
-
- /**
- * The feature id for the '<em><b>Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ANY_CONTENT__ELEMENT = DTD_ELEMENT_CONTENT__ELEMENT;
-
- /**
- * The number of structural features of the the '<em>Any Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ANY_CONTENT_FEATURE_COUNT = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPCDataContentImpl <em>PC Data Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPCDataContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDPCDataContent()
- * @generated
- */
- int DTD_PC_DATA_CONTENT = 6;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_PC_DATA_CONTENT__GROUP = DTD_ELEMENT_CONTENT__GROUP;
-
- /**
- * The feature id for the '<em><b>Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_PC_DATA_CONTENT__ELEMENT = DTD_ELEMENT_CONTENT__ELEMENT;
-
- /**
- * The number of structural features of the the '<em>PC Data Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_PC_DATA_CONTENT_FEATURE_COUNT = DTD_ELEMENT_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementReferenceContentImpl <em>Element Reference Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementReferenceContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDElementReferenceContent()
- * @generated
- */
- int DTD_ELEMENT_REFERENCE_CONTENT = 7;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_REFERENCE_CONTENT__GROUP = DTD_REPEATABLE_CONTENT__GROUP;
-
- /**
- * The feature id for the '<em><b>Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT = DTD_REPEATABLE_CONTENT__ELEMENT;
-
- /**
- * The feature id for the '<em><b>Occurrence</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE = DTD_REPEATABLE_CONTENT__OCCURRENCE;
-
- /**
- * The feature id for the '<em><b>Referenced Element</b></em>'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the the '<em>Element Reference Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ELEMENT_REFERENCE_CONTENT_FEATURE_COUNT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl <em>File</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDFile()
- * @generated
- */
- int DTD_FILE = 9;
-
- /**
- * The feature id for the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_FILE__COMMENT = 0;
-
- /**
- * The feature id for the '<em><b>Parse Error</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_FILE__PARSE_ERROR = 1;
-
- /**
- * The feature id for the '<em><b>DTD Content</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_FILE__DTD_CONTENT = 2;
-
- /**
- * The feature id for the '<em><b>DTD Enumeration Type</b></em>'
- * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int DTD_FILE__DTD_ENUMERATION_TYPE = 3;
-
- /**
- * The number of structural features of the the '<em>File</em>' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_FILE_FEATURE_COUNT = 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDBasicTypeImpl <em>Basic Type</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDBasicTypeImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDBasicType()
- * @generated
- */
- int DTD_BASIC_TYPE = 10;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EANNOTATIONS = EcorePackage.ECLASS__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__NAME = EcorePackage.ECLASS__NAME;
-
- /**
- * The feature id for the '<em><b>Instance Class Name</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__INSTANCE_CLASS_NAME = EcorePackage.ECLASS__INSTANCE_CLASS_NAME;
-
- /**
- * The feature id for the '<em><b>Instance Class</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__INSTANCE_CLASS = EcorePackage.ECLASS__INSTANCE_CLASS;
-
- /**
- * The feature id for the '<em><b>Default Value</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__DEFAULT_VALUE = EcorePackage.ECLASS__DEFAULT_VALUE;
-
- /**
- * The feature id for the '<em><b>EPackage</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EPACKAGE = EcorePackage.ECLASS__EPACKAGE;
-
- /**
- * The feature id for the '<em><b>Abstract</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__ABSTRACT = EcorePackage.ECLASS__ABSTRACT;
-
- /**
- * The feature id for the '<em><b>Interface</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__INTERFACE = EcorePackage.ECLASS__INTERFACE;
-
- /**
- * The feature id for the '<em><b>ESuper Types</b></em>' reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__ESUPER_TYPES = EcorePackage.ECLASS__ESUPER_TYPES;
-
- /**
- * The feature id for the '<em><b>EOperations</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EOPERATIONS = EcorePackage.ECLASS__EOPERATIONS;
-
- /**
- * The feature id for the '<em><b>EAll Attributes</b></em>' reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EALL_ATTRIBUTES = EcorePackage.ECLASS__EALL_ATTRIBUTES;
-
- /**
- * The feature id for the '<em><b>EAll References</b></em>' reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EALL_REFERENCES = EcorePackage.ECLASS__EALL_REFERENCES;
-
- /**
- * The feature id for the '<em><b>EReferences</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EREFERENCES = EcorePackage.ECLASS__EREFERENCES;
-
- /**
- * The feature id for the '<em><b>EAttributes</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EATTRIBUTES = EcorePackage.ECLASS__EATTRIBUTES;
-
- /**
- * The feature id for the '<em><b>EAll Containments</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EALL_CONTAINMENTS = EcorePackage.ECLASS__EALL_CONTAINMENTS;
-
- /**
- * The feature id for the '<em><b>EAll Operations</b></em>' reference
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EALL_OPERATIONS = EcorePackage.ECLASS__EALL_OPERATIONS;
-
- /**
- * The feature id for the '<em><b>EAll Structural Features</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EALL_STRUCTURAL_FEATURES = EcorePackage.ECLASS__EALL_STRUCTURAL_FEATURES;
-
- /**
- * The feature id for the '<em><b>EAll Super Types</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EALL_SUPER_TYPES = EcorePackage.ECLASS__EALL_SUPER_TYPES;
-
- /**
- * The feature id for the '<em><b>EID Attribute</b></em>' reference.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__EID_ATTRIBUTE = EcorePackage.ECLASS__EID_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE__KIND = EcorePackage.ECLASS_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the the '<em>Basic Type</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_BASIC_TYPE_FEATURE_COUNT = EcorePackage.ECLASS_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEnumerationTypeImpl <em>Enumeration Type</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEnumerationTypeImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEnumerationType()
- * @generated
- */
- int DTD_ENUMERATION_TYPE = 11;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__EANNOTATIONS = EcorePackage.EENUM__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__NAME = EcorePackage.EENUM__NAME;
-
- /**
- * The feature id for the '<em><b>Instance Class Name</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME = EcorePackage.EENUM__INSTANCE_CLASS_NAME;
-
- /**
- * The feature id for the '<em><b>Instance Class</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__INSTANCE_CLASS = EcorePackage.EENUM__INSTANCE_CLASS;
-
- /**
- * The feature id for the '<em><b>Default Value</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__DEFAULT_VALUE = EcorePackage.EENUM__DEFAULT_VALUE;
-
- /**
- * The feature id for the '<em><b>EPackage</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__EPACKAGE = EcorePackage.EENUM__EPACKAGE;
-
- /**
- * The feature id for the '<em><b>Serializable</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__SERIALIZABLE = EcorePackage.EENUM__SERIALIZABLE;
-
- /**
- * The feature id for the '<em><b>ELiterals</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__ELITERALS = EcorePackage.EENUM__ELITERALS;
-
- /**
- * The feature id for the '<em><b>Kind</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__KIND = EcorePackage.EENUM_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>DTD File</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE__DTD_FILE = EcorePackage.EENUM_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the the '<em>Enumeration Type</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENUMERATION_TYPE_FEATURE_COUNT = EcorePackage.EENUM_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDContentImpl <em>Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDContent()
- * @generated
- */
- int DTD_CONTENT = 19;
-
- /**
- * The feature id for the '<em><b>DTD File</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_CONTENT__DTD_FILE = 0;
-
- /**
- * The number of structural features of the the '<em>Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_CONTENT_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl <em>Notation</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDNotation()
- * @generated
- */
- int DTD_NOTATION = 12;
-
- /**
- * The feature id for the '<em><b>DTD File</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_NOTATION__DTD_FILE = DTD_CONTENT__DTD_FILE;
-
- /**
- * The feature id for the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_NOTATION__COMMENT = DTD_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>System ID</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_NOTATION__SYSTEM_ID = DTD_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Public ID</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_NOTATION__PUBLIC_ID = DTD_CONTENT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Entity</b></em>' reference list.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_NOTATION__ENTITY = DTD_CONTENT_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the the '<em>Notation</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_NOTATION_FEATURE_COUNT = DTD_CONTENT_FEATURE_COUNT + 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl <em>Entity</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEntity()
- * @generated
- */
- int DTD_ENTITY = 13;
-
- /**
- * The feature id for the '<em><b>DTD File</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY__DTD_FILE = DTD_CONTENT__DTD_FILE;
-
- /**
- * The feature id for the '<em><b>Comment</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY__COMMENT = DTD_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Parameter Entity</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY__PARAMETER_ENTITY = DTD_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Content</b></em>' containment
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY__CONTENT = DTD_CONTENT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Parm Entity Ref</b></em>'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY__PARM_ENTITY_REF = DTD_CONTENT_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Entity Reference</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY__ENTITY_REFERENCE = DTD_CONTENT_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Attribute Name Reference</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE = DTD_CONTENT_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Attribute Type Reference</b></em>'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE = DTD_CONTENT_FEATURE_COUNT + 6;
-
- /**
- * The number of structural features of the the '<em>Entity</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY_FEATURE_COUNT = DTD_CONTENT_FEATURE_COUNT + 7;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityContentImpl <em>Entity Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEntityContent()
- * @generated
- */
- int DTD_ENTITY_CONTENT = 14;
-
- /**
- * The feature id for the '<em><b>DTD Entity</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY_CONTENT__DTD_ENTITY = 0;
-
- /**
- * The number of structural features of the the '<em>Entity Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY_CONTENT_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDExternalEntityImpl <em>External Entity</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDExternalEntityImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDExternalEntity()
- * @generated
- */
- int DTD_EXTERNAL_ENTITY = 15;
-
- /**
- * The feature id for the '<em><b>DTD Entity</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EXTERNAL_ENTITY__DTD_ENTITY = DTD_ENTITY_CONTENT__DTD_ENTITY;
-
- /**
- * The feature id for the '<em><b>System ID</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EXTERNAL_ENTITY__SYSTEM_ID = DTD_ENTITY_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Public ID</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EXTERNAL_ENTITY__PUBLIC_ID = DTD_ENTITY_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Notation</b></em>' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EXTERNAL_ENTITY__NOTATION = DTD_ENTITY_CONTENT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Entity Referenced From Another File</b></em>'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE = DTD_ENTITY_CONTENT_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the the '<em>External Entity</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_EXTERNAL_ENTITY_FEATURE_COUNT = DTD_ENTITY_CONTENT_FEATURE_COUNT + 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDInternalEntityImpl <em>Internal Entity</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDInternalEntityImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDInternalEntity()
- * @generated
- */
- int DTD_INTERNAL_ENTITY = 16;
-
- /**
- * The feature id for the '<em><b>DTD Entity</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_INTERNAL_ENTITY__DTD_ENTITY = DTD_ENTITY_CONTENT__DTD_ENTITY;
-
- /**
- * The feature id for the '<em><b>Value</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_INTERNAL_ENTITY__VALUE = DTD_ENTITY_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the the '<em>Internal Entity</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_INTERNAL_ENTITY_FEATURE_COUNT = DTD_ENTITY_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDParameterEntityReferenceImpl <em>Parameter Entity Reference</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDParameterEntityReferenceImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDParameterEntityReference()
- * @generated
- */
- int DTD_PARAMETER_ENTITY_REFERENCE = 17;
-
- /**
- * The feature id for the '<em><b>DTD File</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE = DTD_CONTENT__DTD_FILE;
-
- /**
- * The feature id for the '<em><b>Entity</b></em>' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_PARAMETER_ENTITY_REFERENCE__ENTITY = DTD_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the the '<em>Parameter Entity Reference</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_PARAMETER_ENTITY_REFERENCE_FEATURE_COUNT = DTD_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityReferenceContentImpl <em>Entity Reference Content</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityReferenceContentImpl
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEntityReferenceContent()
- * @generated
- */
- int DTD_ENTITY_REFERENCE_CONTENT = 18;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY_REFERENCE_CONTENT__GROUP = DTD_REPEATABLE_CONTENT__GROUP;
-
- /**
- * The feature id for the '<em><b>Element</b></em>' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY_REFERENCE_CONTENT__ELEMENT = DTD_REPEATABLE_CONTENT__ELEMENT;
-
- /**
- * The feature id for the '<em><b>Occurrence</b></em>' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE = DTD_REPEATABLE_CONTENT__OCCURRENCE;
-
- /**
- * The feature id for the '<em><b>Element Referenced Entity</b></em>'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the the '<em>Entity Reference Content</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int DTD_ENTITY_REFERENCE_CONTENT_FEATURE_COUNT = DTD_REPEATABLE_CONTENT_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType <em>Occurrence Type</em>}'
- * enum. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDOccurrenceType()
- * @generated
- */
- int DTD_OCCURRENCE_TYPE = 20;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind <em>Default Kind</em>}'
- * enum. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDDefaultKind()
- * @generated
- */
- int DTD_DEFAULT_KIND = 21;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind <em>Basic Type Kind</em>}'
- * enum. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDBasicTypeKind()
- * @generated
- */
- int DTD_BASIC_TYPE_KIND = 22;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind <em>Enum Group Kind</em>}'
- * enum. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDEnumGroupKind()
- * @generated
- */
- int DTD_ENUM_GROUP_KIND = 23;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind <em>Group Kind</em>}'
- * enum. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getDTDGroupKind()
- * @generated
- */
- int DTD_GROUP_KIND = 24;
-
- /**
- * The meta object id for the '{@link org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType <em>XML Schema Defined Type</em>}'
- * enum. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType
- * @see org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDPackageImpl#getXMLSchemaDefinedType()
- * @generated
- */
- int XML_SCHEMA_DEFINED_TYPE = 25;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent <em>Element Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Element Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent
- * @generated
- */
- EClass getDTDElementContent();
-
- /**
- * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup <em>Group</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the container reference '<em>Group</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getGroup()
- * @see #getDTDElementContent()
- * @generated
- */
- EReference getDTDElementContent_Group();
-
- /**
- * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement <em>Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the container reference '<em>Element</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementContent#getElement()
- * @see #getDTDElementContent()
- * @generated
- */
- EReference getDTDElementContent_Element();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent <em>Group Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Group Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent
- * @generated
- */
- EClass getDTDGroupContent();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getGroupKind <em>Group Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Group Kind</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getGroupKind()
- * @see #getDTDGroupContent()
- * @generated
- */
- EAttribute getDTDGroupContent_GroupKind();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent <em>Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the containment reference list '<em>Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent#getContent()
- * @see #getDTDGroupContent()
- * @generated
- */
- EReference getDTDGroupContent_Content();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute <em>Attribute</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Attribute</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute
- * @generated
- */
- EClass getDTDAttribute();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getComment <em>Comment</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Comment</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getComment()
- * @see #getDTDAttribute()
- * @generated
- */
- EAttribute getDTDAttribute_Comment();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultKind <em>Default Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Default Kind</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultKind()
- * @see #getDTDAttribute()
- * @generated
- */
- EAttribute getDTDAttribute_DefaultKind();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultValueString <em>Default Value String</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Default Value String</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDefaultValueString()
- * @see #getDTDAttribute()
- * @generated
- */
- EAttribute getDTDAttribute_DefaultValueString();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Attribute Name Referenced Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeNameReferencedEntity()
- * @see #getDTDAttribute()
- * @generated
- */
- EReference getDTDAttribute_AttributeNameReferencedEntity();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Attribute Type Referenced Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getAttributeTypeReferencedEntity()
- * @see #getDTDAttribute()
- * @generated
- */
- EReference getDTDAttribute_AttributeTypeReferencedEntity();
-
- /**
- * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement <em>DTD Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the container reference '<em>DTD Element</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAttribute#getDTDElement()
- * @see #getDTDAttribute()
- * @generated
- */
- EReference getDTDAttribute_DTDElement();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement <em>Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Element</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement
- * @generated
- */
- EClass getDTDElement();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getComment <em>Comment</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Comment</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getComment()
- * @see #getDTDElement()
- * @generated
- */
- EAttribute getDTDElement_Comment();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent <em>Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the containment reference '<em>Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getContent()
- * @see #getDTDElement()
- * @generated
- */
- EReference getDTDElement_Content();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute <em>DTD Attribute</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the containment reference list '<em>DTD Attribute</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElement#getDTDAttribute()
- * @see #getDTDElement()
- * @generated
- */
- EReference getDTDElement_DTDAttribute();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent <em>Empty Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Empty Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent
- * @generated
- */
- EClass getDTDEmptyContent();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent <em>Any Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Any Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent
- * @generated
- */
- EClass getDTDAnyContent();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent <em>PC Data Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>PC Data Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent
- * @generated
- */
- EClass getDTDPCDataContent();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent <em>Element Reference Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Element Reference Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent
- * @generated
- */
- EClass getDTDElementReferenceContent();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent#getReferencedElement <em>Referenced Element</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Referenced Element</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent#getReferencedElement()
- * @see #getDTDElementReferenceContent()
- * @generated
- */
- EReference getDTDElementReferenceContent_ReferencedElement();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent <em>Repeatable Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Repeatable Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent
- * @generated
- */
- EClass getDTDRepeatableContent();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent#getOccurrence <em>Occurrence</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Occurrence</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent#getOccurrence()
- * @see #getDTDRepeatableContent()
- * @generated
- */
- EAttribute getDTDRepeatableContent_Occurrence();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile <em>File</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>File</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile
- * @generated
- */
- EClass getDTDFile();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getComment <em>Comment</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Comment</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getComment()
- * @see #getDTDFile()
- * @generated
- */
- EAttribute getDTDFile_Comment();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#isParseError <em>Parse Error</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Parse Error</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#isParseError()
- * @see #getDTDFile()
- * @generated
- */
- EAttribute getDTDFile_ParseError();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent <em>DTD Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the containment reference list '<em>DTD Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDContent()
- * @see #getDTDFile()
- * @generated
- */
- EReference getDTDFile_DTDContent();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType <em>DTD Enumeration Type</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the containment reference list '<em>DTD Enumeration Type</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDFile#getDTDEnumerationType()
- * @see #getDTDFile()
- * @generated
- */
- EReference getDTDFile_DTDEnumerationType();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicType <em>Basic Type</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Basic Type</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicType
- * @generated
- */
- EClass getDTDBasicType();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicType#getKind <em>Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Kind</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicType#getKind()
- * @see #getDTDBasicType()
- * @generated
- */
- EAttribute getDTDBasicType_Kind();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType <em>Enumeration Type</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Enumeration Type</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType
- * @generated
- */
- EClass getDTDEnumerationType();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getKind <em>Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Kind</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getKind()
- * @see #getDTDEnumerationType()
- * @generated
- */
- EAttribute getDTDEnumerationType_Kind();
-
- /**
- * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile <em>DTD File</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the container reference '<em>DTD File</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType#getDTDFile()
- * @see #getDTDEnumerationType()
- * @generated
- */
- EReference getDTDEnumerationType_DTDFile();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation <em>Notation</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Notation</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation
- * @generated
- */
- EClass getDTDNotation();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getComment <em>Comment</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Comment</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getComment()
- * @see #getDTDNotation()
- * @generated
- */
- EAttribute getDTDNotation_Comment();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getSystemID <em>System ID</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>System ID</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getSystemID()
- * @see #getDTDNotation()
- * @generated
- */
- EAttribute getDTDNotation_SystemID();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getPublicID <em>Public ID</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Public ID</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getPublicID()
- * @see #getDTDNotation()
- * @generated
- */
- EAttribute getDTDNotation_PublicID();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity <em>Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference list '<em>Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDNotation#getEntity()
- * @see #getDTDNotation()
- * @generated
- */
- EReference getDTDNotation_Entity();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity <em>Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity
- * @generated
- */
- EClass getDTDEntity();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getComment <em>Comment</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Comment</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getComment()
- * @see #getDTDEntity()
- * @generated
- */
- EAttribute getDTDEntity_Comment();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#isParameterEntity <em>Parameter Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Parameter Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#isParameterEntity()
- * @see #getDTDEntity()
- * @generated
- */
- EAttribute getDTDEntity_ParameterEntity();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent <em>Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the containment reference '<em>Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getContent()
- * @see #getDTDEntity()
- * @generated
- */
- EReference getDTDEntity_Content();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef <em>Parm Entity Ref</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Parm Entity Ref</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef()
- * @see #getDTDEntity()
- * @generated
- */
- EReference getDTDEntity_ParmEntityRef();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference <em>Entity Reference</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference list '<em>Entity Reference</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getEntityReference()
- * @see #getDTDEntity()
- * @generated
- */
- EReference getDTDEntity_EntityReference();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference <em>Attribute Name Reference</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference list '<em>Attribute Name Reference</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeNameReference()
- * @see #getDTDEntity()
- * @generated
- */
- EReference getDTDEntity_AttributeNameReference();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference <em>Attribute Type Reference</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference list '<em>Attribute Type Reference</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getAttributeTypeReference()
- * @see #getDTDEntity()
- * @generated
- */
- EReference getDTDEntity_AttributeTypeReference();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent <em>Entity Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Entity Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent
- * @generated
- */
- EClass getDTDEntityContent();
-
- /**
- * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity <em>DTD Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the container reference '<em>DTD Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent#getDTDEntity()
- * @see #getDTDEntityContent()
- * @generated
- */
- EReference getDTDEntityContent_DTDEntity();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity <em>External Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>External Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity
- * @generated
- */
- EClass getDTDExternalEntity();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getSystemID <em>System ID</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>System ID</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getSystemID()
- * @see #getDTDExternalEntity()
- * @generated
- */
- EAttribute getDTDExternalEntity_SystemID();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getPublicID <em>Public ID</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Public ID</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getPublicID()
- * @see #getDTDExternalEntity()
- * @generated
- */
- EAttribute getDTDExternalEntity_PublicID();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation <em>Notation</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Notation</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getNotation()
- * @see #getDTDExternalEntity()
- * @generated
- */
- EReference getDTDExternalEntity_Notation();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getEntityReferencedFromAnotherFile <em>Entity Referenced From Another File</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Entity Referenced From Another File</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity#getEntityReferencedFromAnotherFile()
- * @see #getDTDExternalEntity()
- * @generated
- */
- EReference getDTDExternalEntity_EntityReferencedFromAnotherFile();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity <em>Internal Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Internal Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity
- * @generated
- */
- EClass getDTDInternalEntity();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity#getValue <em>Value</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Value</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity#getValue()
- * @see #getDTDInternalEntity()
- * @generated
- */
- EAttribute getDTDInternalEntity_Value();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference <em>Parameter Entity Reference</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Parameter Entity Reference</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference
- * @generated
- */
- EClass getDTDParameterEntityReference();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity <em>Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity()
- * @see #getDTDParameterEntityReference()
- * @generated
- */
- EReference getDTDParameterEntityReference_Entity();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent <em>Entity Reference Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Entity Reference Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent
- * @generated
- */
- EClass getDTDEntityReferenceContent();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity <em>Element Referenced Entity</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Element Referenced Entity</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent#getElementReferencedEntity()
- * @see #getDTDEntityReferenceContent()
- * @generated
- */
- EReference getDTDEntityReferenceContent_ElementReferencedEntity();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent <em>Content</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Content</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDContent
- * @generated
- */
- EClass getDTDContent();
-
- /**
- * Returns the meta object for the container reference '{@link org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile <em>DTD File</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the container reference '<em>DTD File</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDContent#getDTDFile()
- * @see #getDTDContent()
- * @generated
- */
- EReference getDTDContent_DTDFile();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType <em>Occurrence Type</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for enum '<em>Occurrence Type</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType
- * @generated
- */
- EEnum getDTDOccurrenceType();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind <em>Default Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for enum '<em>Default Kind</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind
- * @generated
- */
- EEnum getDTDDefaultKind();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind <em>Basic Type Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for enum '<em>Basic Type Kind</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind
- * @generated
- */
- EEnum getDTDBasicTypeKind();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind <em>Enum Group Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for enum '<em>Enum Group Kind</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind
- * @generated
- */
- EEnum getDTDEnumGroupKind();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind <em>Group Kind</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for enum '<em>Group Kind</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind
- * @generated
- */
- EEnum getDTDGroupKind();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType <em>XML Schema Defined Type</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for enum '<em>XML Schema Defined Type</em>'.
- * @see org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType
- * @generated
- */
- EEnum getXMLSchemaDefinedType();
-
- /**
- * Returns the factory that creates the instances of the model. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the factory that creates the instances of the model.
- * @generated
- */
- DTDFactory getDTDFactory();
-
-} // DTDPackage
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDParameterEntityReference.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDParameterEntityReference.java
deleted file mode 100644
index 1f4f918855..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDParameterEntityReference.java
+++ /dev/null
@@ -1,61 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import org.eclipse.emf.ecore.ENamedElement;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Parameter Entity Reference</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity <em>Entity</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDParameterEntityReference()
- * @model
- * @generated
- */
-public interface DTDParameterEntityReference extends ENamedElement, DTDContent, DTDObject, DTDSourceOffset {
- /**
- * Returns the value of the '<em><b>Entity</b></em>' reference. It is
- * bidirectional and its opposite is '{@link org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef <em>Parm Entity Ref</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Entity</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Entity</em>' reference.
- * @see #setEntity(DTDEntity)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDParameterEntityReference_Entity()
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDEntity#getParmEntityRef
- * @model opposite="parmEntityRef" required="true"
- * @generated
- */
- DTDEntity getEntity();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference#getEntity <em>Entity</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Entity</em>' reference.
- * @see #getEntity()
- * @generated
- */
- void setEntity(DTDEntity value);
-
-} // DTDParameterEntityReference
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDRepeatableContent.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDRepeatableContent.java
deleted file mode 100644
index b9b5123dff..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDRepeatableContent.java
+++ /dev/null
@@ -1,65 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>Repeatable Content</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent#getOccurrence <em>Occurrence</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDRepeatableContent()
- * @model abstract="true"
- * @generated
- */
-public interface DTDRepeatableContent extends DTDElementContent {
-
- public abstract String unparseRepeatableContent();
-
- /**
- * Returns the value of the '<em><b>Occurrence</b></em>' attribute.
- * The literals are from the enumeration
- * {@link org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType}. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Occurrence</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Occurrence</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType
- * @see #setOccurrence(DTDOccurrenceType)
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getDTDRepeatableContent_Occurrence()
- * @model
- * @generated
- */
- DTDOccurrenceType getOccurrence();
-
- /**
- * Sets the value of the '{@link org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent#getOccurrence <em>Occurrence</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Occurrence</em>' attribute.
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType
- * @see #getOccurrence()
- * @generated
- */
- void setOccurrence(DTDOccurrenceType value);
-
-} // DTDRepeatableContent
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDResource.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDResource.java
deleted file mode 100644
index 21dd1feebc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDResource.java
+++ /dev/null
@@ -1,45 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-
-public interface DTDResource {
- // Enumeration Constants
- public static final String ANYICON = "icons/any.gif"; //$NON-NLS-1$
- public static final String ELEMENTICON = "icons/element.gif"; //$NON-NLS-1$
- public static final String ENTITYICON = "icons/entity.gif"; //$NON-NLS-1$
- public static final String ATTRIBUTEICON = "icons/attribute.gif"; //$NON-NLS-1$
- public static final String NOTATIONICON = "icons/notation.gif"; //$NON-NLS-1$
- public static final String EMPTYICON = "icons/emptycontent.gif"; //$NON-NLS-1$
- public static final String PCDATAICON = "icons/one.gif"; //$NON-NLS-1$
- public static final String ENTITYREFERENCEICON = "icons/entity_reference.gif"; //$NON-NLS-1$
-
- public static final String ONEICON = "icons/one.gif"; //$NON-NLS-1$
- public static final String OPTIONALICON = "icons/optional.gif"; //$NON-NLS-1$
- public static final String ONEORMOREICON = "icons/oneormore.gif"; //$NON-NLS-1$
- public static final String ZEROORMOREICON = "icons/zeroormore.gif"; //$NON-NLS-1$
-
- public static final String ONESEQUENCEICON = "icons/onesequence.gif"; //$NON-NLS-1$
- public static final String OPTIONALSEQUENCEICON = "icons/optionalsequence.gif"; //$NON-NLS-1$
- public static final String ONEORMORESEQUENCEICON = "icons/oneormoresequence.gif"; //$NON-NLS-1$
- public static final String ZEROORMORESEQUENCEICON = "icons/zeroormoresequence.gif"; //$NON-NLS-1$
-
- public static final String ONECHOICEICON = "icons/onechoice.gif"; //$NON-NLS-1$
- public static final String OPTIONALCHOICEICON = "icons/optionalchoice.gif"; //$NON-NLS-1$
- public static final String ONEORMORECHOICEICON = "icons/oneormorechoice.gif"; //$NON-NLS-1$
- public static final String ZEROORMORECHOICEICON = "icons/zeroormorechoice.gif"; //$NON-NLS-1$
-
- public static final String DTDFILEICON = "icons/DTDFile.gif"; //$NON-NLS-1$
-
- public static final String NEWDTD = "icons/newdtd_wiz.gif"; //$NON-NLS-1$
- public static final String NEWHTMLFORM = "icons/genhtmform_wiz.gif"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDSourceOffset.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDSourceOffset.java
deleted file mode 100644
index c63628869b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDSourceOffset.java
+++ /dev/null
@@ -1,45 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-public interface DTDSourceOffset {
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset();
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v);
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset();
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v);
-
-}// DTDSourceOffset
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDType.java
deleted file mode 100644
index 7774623fb3..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDType.java
+++ /dev/null
@@ -1,31 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf;
-
-public interface DTDType extends DTDObject {
- // constant strings for dtd attribute types
- public static final String NONE = "None"; //$NON-NLS-1$
-
- public static final String CDATA = "Character Data (CDATA)"; //$NON-NLS-1$
- public static final String ID = "Identifier (ID)"; //$NON-NLS-1$
- public static final String IDREF = "ID Reference (IDREF)"; //$NON-NLS-1$
- public static final String IDREFS = "ID References (IDREFS)"; //$NON-NLS-1$
- public static final String ENTITY = "Entity Name (ENTITY)"; //$NON-NLS-1$
- public static final String ENTITIES = "Entity Names (ENTITIES)"; //$NON-NLS-1$
- public static final String NMTOKEN = "Name Token (NMTOKEN)"; //$NON-NLS-1$
- public static final String NMTOKENS = "Name Tokens (NMTOKENS)"; //$NON-NLS-1$
- public static final String ENUM_NAME_TOKEN_GROUP = "Enumerated Name Tokens"; //$NON-NLS-1$
- public static final String ENUM_NOTATION_GROUP = "Enumerated NOTATION"; //$NON-NLS-1$
-
- public String toString();
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/XMLSchemaDefinedType.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/XMLSchemaDefinedType.java
deleted file mode 100644
index b0c68abbdc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/XMLSchemaDefinedType.java
+++ /dev/null
@@ -1,471 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.AbstractEnumerator;
-
-/**
- * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>XML Schema Defined Type</b></em>',
- * and utility methods for working with them. <!-- end-user-doc -->
- *
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#getXMLSchemaDefinedType()
- * @model
- * @generated
- */
-public final class XMLSchemaDefinedType extends AbstractEnumerator {
- /**
- * The '<em><b>NONE</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #NONE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int NONE = -1;
-
- /**
- * The '<em><b>STRING</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #STRING_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int STRING = 1;
-
- /**
- * The '<em><b>BOOLEAN</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #BOOLEAN_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int BOOLEAN = 2;
-
- /**
- * The '<em><b>FLOAT</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #FLOAT_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int FLOAT = 3;
-
- /**
- * The '<em><b>DOUBLE</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #DOUBLE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int DOUBLE = 4;
-
- /**
- * The '<em><b>DECIMAL</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #DECIMAL_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int DECIMAL = 5;
-
- /**
- * The '<em><b>TIMEINSTANT</b></em>' literal value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #TIMEINSTANT_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int TIMEINSTANT = 6;
-
- /**
- * The '<em><b>TIMEDURATION</b></em>' literal value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #TIMEDURATION_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int TIMEDURATION = 7;
-
- /**
- * The '<em><b>RECURRINGINSTANT</b></em>' literal value. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #RECURRINGINSTANT_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int RECURRINGINSTANT = 8;
-
- /**
- * The '<em><b>BINARY</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #BINARY_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int BINARY = 9;
-
- /**
- * The '<em><b>URI</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #URI_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int URI = 10;
-
- /**
- * The '<em><b>INTEGER</b></em>' literal value. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #INTEGER_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int INTEGER = 11;
-
- /**
- * The '<em><b>DATE</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #DATE_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int DATE = 12;
-
- /**
- * The '<em><b>TIME</b></em>' literal value. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #TIME_LITERAL
- * @model
- * @generated
- * @ordered
- */
- public static final int TIME = 13;
-
- /**
- * The '<em><b>NONE</b></em>' literal object. <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>NONE</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #NONE
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType NONE_LITERAL = new XMLSchemaDefinedType(NONE, "NONE"); //$NON-NLS-1$
-
- /**
- * The '<em><b>STRING</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>STRING</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #STRING
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType STRING_LITERAL = new XMLSchemaDefinedType(STRING, "STRING"); //$NON-NLS-1$
-
- /**
- * The '<em><b>BOOLEAN</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>BOOLEAN</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #BOOLEAN
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType BOOLEAN_LITERAL = new XMLSchemaDefinedType(BOOLEAN, "BOOLEAN"); //$NON-NLS-1$
-
- /**
- * The '<em><b>FLOAT</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>FLOAT</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #FLOAT
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType FLOAT_LITERAL = new XMLSchemaDefinedType(FLOAT, "FLOAT"); //$NON-NLS-1$
-
- /**
- * The '<em><b>DOUBLE</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>DOUBLE</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #DOUBLE
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType DOUBLE_LITERAL = new XMLSchemaDefinedType(DOUBLE, "DOUBLE"); //$NON-NLS-1$
-
- /**
- * The '<em><b>DECIMAL</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>DECIMAL</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #DECIMAL
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType DECIMAL_LITERAL = new XMLSchemaDefinedType(DECIMAL, "DECIMAL"); //$NON-NLS-1$
-
- /**
- * The '<em><b>TIMEINSTANT</b></em>' literal object. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>TIMEINSTANT</b></em>' literal object
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #TIMEINSTANT
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType TIMEINSTANT_LITERAL = new XMLSchemaDefinedType(TIMEINSTANT, "TIMEINSTANT"); //$NON-NLS-1$
-
- /**
- * The '<em><b>TIMEDURATION</b></em>' literal object. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>TIMEDURATION</b></em>' literal object
- * isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #TIMEDURATION
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType TIMEDURATION_LITERAL = new XMLSchemaDefinedType(TIMEDURATION, "TIMEDURATION"); //$NON-NLS-1$
-
- /**
- * The '<em><b>RECURRINGINSTANT</b></em>' literal object. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>RECURRINGINSTANT</b></em>' literal
- * object isn't clear, there really should be more of a description
- * here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #RECURRINGINSTANT
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType RECURRINGINSTANT_LITERAL = new XMLSchemaDefinedType(RECURRINGINSTANT, "RECURRINGINSTANT"); //$NON-NLS-1$
-
- /**
- * The '<em><b>BINARY</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>BINARY</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #BINARY
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType BINARY_LITERAL = new XMLSchemaDefinedType(BINARY, "BINARY"); //$NON-NLS-1$
-
- /**
- * The '<em><b>URI</b></em>' literal object. <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>URI</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #URI
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType URI_LITERAL = new XMLSchemaDefinedType(URI, "URI"); //$NON-NLS-1$
-
- /**
- * The '<em><b>INTEGER</b></em>' literal object. <!-- begin-user-doc
- * -->
- * <p>
- * If the meaning of '<em><b>INTEGER</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #INTEGER
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType INTEGER_LITERAL = new XMLSchemaDefinedType(INTEGER, "INTEGER"); //$NON-NLS-1$
-
- /**
- * The '<em><b>DATE</b></em>' literal object. <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>DATE</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #DATE
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType DATE_LITERAL = new XMLSchemaDefinedType(DATE, "DATE"); //$NON-NLS-1$
-
- /**
- * The '<em><b>TIME</b></em>' literal object. <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>TIME</b></em>' literal object isn't
- * clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @see #TIME
- * @generated
- * @ordered
- */
- public static final XMLSchemaDefinedType TIME_LITERAL = new XMLSchemaDefinedType(TIME, "TIME"); //$NON-NLS-1$
-
- /**
- * An array of all the '<em><b>XML Schema Defined Type</b></em>'
- * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private static final XMLSchemaDefinedType[] VALUES_ARRAY = new XMLSchemaDefinedType[]{NONE_LITERAL, STRING_LITERAL, BOOLEAN_LITERAL, FLOAT_LITERAL, DOUBLE_LITERAL, DECIMAL_LITERAL, TIMEINSTANT_LITERAL, TIMEDURATION_LITERAL, RECURRINGINSTANT_LITERAL, BINARY_LITERAL, URI_LITERAL, INTEGER_LITERAL, DATE_LITERAL, TIME_LITERAL,};
-
- /**
- * A public read-only list of all the '<em><b>XML Schema Defined Type</b></em>'
- * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>XML Schema Defined Type</b></em>' literal with
- * the specified name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static XMLSchemaDefinedType get(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- XMLSchemaDefinedType result = VALUES_ARRAY[i];
- if (result.toString().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>XML Schema Defined Type</b></em>' literal with
- * the specified value. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static XMLSchemaDefinedType get(int value) {
- switch (value) {
- case NONE :
- return NONE_LITERAL;
- case STRING :
- return STRING_LITERAL;
- case BOOLEAN :
- return BOOLEAN_LITERAL;
- case FLOAT :
- return FLOAT_LITERAL;
- case DOUBLE :
- return DOUBLE_LITERAL;
- case DECIMAL :
- return DECIMAL_LITERAL;
- case TIMEINSTANT :
- return TIMEINSTANT_LITERAL;
- case TIMEDURATION :
- return TIMEDURATION_LITERAL;
- case RECURRINGINSTANT :
- return RECURRINGINSTANT_LITERAL;
- case BINARY :
- return BINARY_LITERAL;
- case URI :
- return URI_LITERAL;
- case INTEGER :
- return INTEGER_LITERAL;
- case DATE :
- return DATE_LITERAL;
- case TIME :
- return TIME_LITERAL;
- }
- return null;
- }
-
- /**
- * Only this class can construct instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- private XMLSchemaDefinedType(int value, String name) {
- super(value, name);
- }
-
-} // XMLSchemaDefinedType
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAnyContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAnyContentImpl.java
deleted file mode 100644
index 2e81288764..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAnyContentImpl.java
+++ /dev/null
@@ -1,181 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Any Content</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class DTDAnyContentImpl extends DTDElementContentImpl implements DTDAnyContent {
- public String getContentName() {
- return "ANY"; //$NON-NLS-1$
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DTDAnyContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDAnyContent();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ANY_CONTENT__GROUP :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ANY_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_ANY_CONTENT__ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ANY_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ANY_CONTENT__GROUP :
- return eBasicSetContainer(null, DTDPackage.DTD_ANY_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_ANY_CONTENT__ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_ANY_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ANY_CONTENT__GROUP :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- case DTDPackage.DTD_ANY_CONTENT__ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ANY_CONTENT__GROUP :
- return getGroup();
- case DTDPackage.DTD_ANY_CONTENT__ELEMENT :
- return getElement();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ANY_CONTENT__GROUP :
- setGroup((DTDGroupContent) newValue);
- return;
- case DTDPackage.DTD_ANY_CONTENT__ELEMENT :
- setElement((DTDElement) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ANY_CONTENT__GROUP :
- setGroup((DTDGroupContent) null);
- return;
- case DTDPackage.DTD_ANY_CONTENT__ELEMENT :
- setElement((DTDElement) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ANY_CONTENT__GROUP :
- return getGroup() != null;
- case DTDPackage.DTD_ANY_CONTENT__ELEMENT :
- return getElement() != null;
- }
- return eDynamicIsSet(eFeature);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAttributeImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAttributeImpl.java
deleted file mode 100644
index a860207f2a..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAttributeImpl.java
+++ /dev/null
@@ -1,980 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.notify.impl.NotificationChainImpl;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EAttributeImpl;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDType;
-
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Attribute</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getDefaultKind <em>Default Kind</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getDefaultValueString <em>Default Value String</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getAttributeNameReferencedEntity <em>Attribute Name Referenced Entity</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getAttributeTypeReferencedEntity <em>Attribute Type Referenced Entity</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDAttributeImpl#getDTDElement <em>DTD Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DTDAttributeImpl extends EAttributeImpl implements DTDAttribute {
-
- public DTDAttributeImpl() {
- super();
- }
-
- public DTDType getDTDType() {
- return (DTDType) getEType();
- }
-
-
- public void setDTDType(DTDType type) {
- setEType((EClassifier) type);
- }
-
- public void setDTDBasicType(int value) {
- DTDFactoryImpl factory = (DTDFactoryImpl) DTDFactoryImpl.instance();
- // set attribute type
- switch (value) {
- case 0 :
- setDTDType(factory.getDTDBasicType_NONE());
- break;
- case 1 :
- setDTDType(factory.getDTDBasicType_CDATA());
- break;
- case 2 :
- setDTDType(factory.getDTDBasicType_ID());
- break;
- case 3 :
- setDTDType(factory.getDTDBasicType_IDREF());
- break;
- case 4 :
- setDTDType(factory.getDTDBasicType_IDREFS());
- break;
- case 5 :
- setDTDType(factory.getDTDBasicType_ENTITY());
- break;
- case 6 :
- setDTDType(factory.getDTDBasicType_ENTITIES());
- break;
- case 7 :
- setDTDType(factory.getDTDBasicType_NMTOKEN());
- break;
- case 8 :
- setDTDType(factory.getDTDBasicType_NMTOKENS());
- break;
- }
- }
-
- public String unparse() {
- StringBuffer result = new StringBuffer(128);
-
-
- result.append(getName());
-
-
- StringBuffer value = new StringBuffer();
- switch (getDefaultKind().getValue()) {
- case DTDDefaultKind.IMPLIED :
- value.append("#IMPLIED"); //$NON-NLS-1$
- break;
- case DTDDefaultKind.REQUIRED :
- value.append("#REQUIRED"); //$NON-NLS-1$
- break;
- case DTDDefaultKind.FIXED :
- String type = getDTDType().toString();
- if (!(type.equals(DTDType.ID) || type.equals(DTDType.IDREF) || type.equals(DTDType.ENUM_NAME_TOKEN_GROUP) || type.equals(DTDType.IDREFS))) {
- value.append("#FIXED \"").append(getDefaultValueString()).append("\""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- break;
- case DTDDefaultKind.NOFIXED :
- String defaultValue = getDefaultValueString();
- if (defaultValue != null)
- value.append("\"").append(defaultValue).append("\""); //$NON-NLS-1$ //$NON-NLS-2$
- break;
- }
-
-
- // Get the attribute type
- DTDEntity typeEnt = getAttributeTypeReferencedEntity();
- if (typeEnt != null) {
- result.append(" %" + typeEnt.getName() + "; ").append(value); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- DTDType dtdType = getDTDType();
- if (dtdType instanceof DTDBasicType) {
- switch (((DTDBasicType) dtdType).getKind().getValue()) {
- case DTDBasicTypeKind.CDATA :
- result.append(" CDATA ").append(value); //$NON-NLS-1$
- break;
- case DTDBasicTypeKind.ID :
- result.append(" ID ").append(value); //$NON-NLS-1$
- break;
- case DTDBasicTypeKind.IDREF :
- result.append(" IDREF ").append(value); //$NON-NLS-1$
- break;
- case DTDBasicTypeKind.IDREFS :
- result.append(" IDREFS ").append(value); //$NON-NLS-1$
- break;
- case DTDBasicTypeKind.ENTITY :
- result.append(" ENTITY ").append(value); //$NON-NLS-1$
- break;
- case DTDBasicTypeKind.ENTITIES :
- result.append(" ENTITIES ").append(value); //$NON-NLS-1$
- break;
- case DTDBasicTypeKind.NMTOKEN :
- result.append(" NMTOKEN ").append(value); //$NON-NLS-1$
- break;
- case DTDBasicTypeKind.NMTOKENS :
- result.append(" NMTOKENS ").append(value); //$NON-NLS-1$
- break;
- }
- }
- else if (dtdType instanceof DTDEnumerationType) {
- result.append(" ").append(buildEnumString((DTDEnumerationType) dtdType)).append(value); //$NON-NLS-1$
- }
- }
-
-
- return result.toString();
- }
-
-
- private String buildEnumString(DTDEnumerationType enumType) {
- String result = ""; //$NON-NLS-1$
-
-
- if (enumType.getKind().getValue() == DTDEnumGroupKind.NOTATION_GROUP)
- result += "NOTATION "; //$NON-NLS-1$
-
-
- Iterator i = enumType.getEnumLiterals().iterator();
- if (i.hasNext()) {
- result += "(" + ((EEnumLiteral) i.next()).toString(); //$NON-NLS-1$
- while (i.hasNext()) {
- result += " | " + ((EEnumLiteral) i.next()).toString(); //$NON-NLS-1$
- }
- result += ") "; //$NON-NLS-1$
- }
-
-
- return result;
- }
-
- public DTDEnumerationType createDTDEnumeration(String[] enumValues, int enumKind) {
- DTDEnumerationType enumeration = DTDFactoryImpl.instance().createDTDEnumerationType();
- // enum.setID("Enum_" + ((DTDElement)getMOFDomain()).getName() + "_" +
- // getName());
- DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind);
- enumeration.setKind(groupKind);
- // Enumeration values
- if (enumValues != null) {
- for (int i = 0; i < enumValues.length; i++) {
- EcorePackage ePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
- EEnumLiteral enumLiteral = ((EcoreFactory) ePackage.getEFactoryInstance()).createEEnumLiteral();
- // MOF2EMF Port
- // enumLiteral.refSetLiteral(enumValues[i]);
- enumLiteral.setName(enumValues[i]);
- // MOF2EMF Port
- // enumLiteral.refSetLiteral(i);
- enumLiteral.setValue(i);
-
- enumeration.getEnumLiterals().add(enumLiteral);
- }
- }
- getDTDElement().getDTDFile().getDTDEnumerationType().add(enumeration);
- return enumeration;
- }
-
- public String getPathname() {
- return null;
- // TODO: finish port
- // return DTDPathnameUtil.makePath(getDTDElement().getPathname(),
- // "Attr", getName(), -1);
- }
-
-
- public DTDObject findObject(String relativePath) {
- return null;
- // TODO: finish port
- /*
- * Object[] result = DTDPathnameUtil.parsePathComponent(relativePath);
- *
- *
- * String type = (String)result[0];
- *
- *
- * if (type == null) return null;
- *
- *
- * DTDObject obj = null; if (type.equals("Type")) { obj =
- * getDataType(); } else { return null; }
- *
- *
- * String restPath = (String)result[3];
- *
- * if ((restPath == null) || (obj == null)) { return obj; } else {
- * return obj.findObject(restPath); }
- */
- }
-
- public Collection getEnumeratedValues() {
- Collection result = new ArrayList();
-
-
- DTDType type = getDTDType();
- if (type instanceof DTDEnumerationType) {
- DTDEnumerationType enumType = (DTDEnumerationType) type;
- Iterator i = enumType.getEnumLiterals().iterator();
- while (i.hasNext()) {
- result.add(((EEnumLiteral) i.next()).toString());
- }
- }
- return result;
- }
-
-
- // ugly hack for now since we don't have multiple inheritance.
- // Would rather have all this stuff in a base class but these
- // classes are inheriting from sometimes different mof classes
- DTDLexicalInfo lexInfo = new DTDLexicalInfo();
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset() {
- return lexInfo.getStartOffset();
- }
-
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v) {
- lexInfo.setStartOffset(v);
- }
-
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset() {
- return lexInfo.getEndOffset();
- }
-
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v) {
- lexInfo.setEndOffset(v);
- }
-
-
- /**
- * The default value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected static final String COMMENT_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected String comment = COMMENT_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultKind() <em>Default Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getDefaultKind()
- * @generated
- * @ordered
- */
- protected static final DTDDefaultKind DEFAULT_KIND_EDEFAULT = DTDDefaultKind.IMPLIED_LITERAL;
-
- /**
- * The cached value of the '{@link #getDefaultKind() <em>Default Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getDefaultKind()
- * @generated
- * @ordered
- */
- protected DTDDefaultKind defaultKind = DEFAULT_KIND_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefaultValueString() <em>Default Value String</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getDefaultValueString()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_VALUE_STRING_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefaultValueString() <em>Default Value String</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getDefaultValueString()
- * @generated
- * @ordered
- */
- protected String defaultValueString = DEFAULT_VALUE_STRING_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getAttributeNameReferencedEntity() <em>Attribute Name Referenced Entity</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getAttributeNameReferencedEntity()
- * @generated
- * @ordered
- */
- protected DTDEntity attributeNameReferencedEntity = null;
-
- /**
- * The cached value of the '{@link #getAttributeTypeReferencedEntity() <em>Attribute Type Referenced Entity</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getAttributeTypeReferencedEntity()
- * @generated
- * @ordered
- */
- protected DTDEntity attributeTypeReferencedEntity = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDAttribute();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getComment() {
- return comment;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setComment(String newComment) {
- String oldComment = comment;
- comment = newComment;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__COMMENT, oldComment, comment));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDDefaultKind getDefaultKind() {
- return defaultKind;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setDefaultKind(DTDDefaultKind newDefaultKind) {
- DTDDefaultKind oldDefaultKind = defaultKind;
- defaultKind = newDefaultKind == null ? DEFAULT_KIND_EDEFAULT : newDefaultKind;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND, oldDefaultKind, defaultKind));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getDefaultValueString() {
- return defaultValueString;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setDefaultValueString(String newDefaultValueString) {
- String oldDefaultValueString = defaultValueString;
- defaultValueString = newDefaultValueString;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING, oldDefaultValueString, defaultValueString));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntity getAttributeNameReferencedEntity() {
- if (attributeNameReferencedEntity != null && attributeNameReferencedEntity.eIsProxy()) {
- DTDEntity oldAttributeNameReferencedEntity = attributeNameReferencedEntity;
- attributeNameReferencedEntity = (DTDEntity) EcoreUtil.resolve(attributeNameReferencedEntity, this);
- if (attributeNameReferencedEntity != oldAttributeNameReferencedEntity) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY, oldAttributeNameReferencedEntity, attributeNameReferencedEntity));
- }
- }
- return attributeNameReferencedEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntity basicGetAttributeNameReferencedEntity() {
- return attributeNameReferencedEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetAttributeNameReferencedEntity(DTDEntity newAttributeNameReferencedEntity, NotificationChain msgs) {
- DTDEntity oldAttributeNameReferencedEntity = attributeNameReferencedEntity;
- attributeNameReferencedEntity = newAttributeNameReferencedEntity;
- if (eNotificationRequired()) {
- if (msgs == null)
- msgs = new NotificationChainImpl(4);
- msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY, oldAttributeNameReferencedEntity, newAttributeNameReferencedEntity));
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setAttributeNameReferencedEntity(DTDEntity newAttributeNameReferencedEntity) {
- if (newAttributeNameReferencedEntity != attributeNameReferencedEntity) {
- NotificationChain msgs = null;
- if (attributeNameReferencedEntity != null)
- msgs = ((InternalEObject) attributeNameReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE, DTDEntity.class, msgs);
- if (newAttributeNameReferencedEntity != null)
- msgs = ((InternalEObject) newAttributeNameReferencedEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE, DTDEntity.class, msgs);
- msgs = basicSetAttributeNameReferencedEntity(newAttributeNameReferencedEntity, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY, newAttributeNameReferencedEntity, newAttributeNameReferencedEntity));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntity getAttributeTypeReferencedEntity() {
- if (attributeTypeReferencedEntity != null && attributeTypeReferencedEntity.eIsProxy()) {
- DTDEntity oldAttributeTypeReferencedEntity = attributeTypeReferencedEntity;
- attributeTypeReferencedEntity = (DTDEntity) EcoreUtil.resolve(attributeTypeReferencedEntity, this);
- if (attributeTypeReferencedEntity != oldAttributeTypeReferencedEntity) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY, oldAttributeTypeReferencedEntity, attributeTypeReferencedEntity));
- }
- }
- return attributeTypeReferencedEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntity basicGetAttributeTypeReferencedEntity() {
- return attributeTypeReferencedEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetAttributeTypeReferencedEntity(DTDEntity newAttributeTypeReferencedEntity, NotificationChain msgs) {
- DTDEntity oldAttributeTypeReferencedEntity = attributeTypeReferencedEntity;
- attributeTypeReferencedEntity = newAttributeTypeReferencedEntity;
- if (eNotificationRequired()) {
- if (msgs == null)
- msgs = new NotificationChainImpl(4);
- msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY, oldAttributeTypeReferencedEntity, newAttributeTypeReferencedEntity));
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setAttributeTypeReferencedEntity(DTDEntity newAttributeTypeReferencedEntity) {
- if (newAttributeTypeReferencedEntity != attributeTypeReferencedEntity) {
- NotificationChain msgs = null;
- if (attributeTypeReferencedEntity != null)
- msgs = ((InternalEObject) attributeTypeReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE, DTDEntity.class, msgs);
- if (newAttributeTypeReferencedEntity != null)
- msgs = ((InternalEObject) newAttributeTypeReferencedEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE, DTDEntity.class, msgs);
- msgs = basicSetAttributeTypeReferencedEntity(newAttributeTypeReferencedEntity, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY, newAttributeTypeReferencedEntity, newAttributeTypeReferencedEntity));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDElement getDTDElement() {
- if (eContainerFeatureID != DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT)
- return null;
- return (DTDElement) eContainer;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setDTDElement(DTDElement newDTDElement) {
- if (newDTDElement != eContainer || (eContainerFeatureID != DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT && newDTDElement != null)) {
- if (EcoreUtil.isAncestor(this, newDTDElement))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- NotificationChain msgs = null;
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newDTDElement != null)
- msgs = ((InternalEObject) newDTDElement).eInverseAdd(this, DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE, DTDElement.class, msgs);
- msgs = eBasicSetContainer((InternalEObject) newDTDElement, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT, newDTDElement, newDTDElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS :
- return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY :
- if (attributeNameReferencedEntity != null)
- msgs = ((InternalEObject) attributeNameReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE, DTDEntity.class, msgs);
- return basicSetAttributeNameReferencedEntity((DTDEntity) otherEnd, msgs);
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY :
- if (attributeTypeReferencedEntity != null)
- msgs = ((InternalEObject) attributeTypeReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE, DTDEntity.class, msgs);
- return basicSetAttributeTypeReferencedEntity((DTDEntity) otherEnd, msgs);
- case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS :
- return ((InternalEList) getEAnnotations()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY :
- return basicSetAttributeNameReferencedEntity(null, msgs);
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY :
- return basicSetAttributeTypeReferencedEntity(null, msgs);
- case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS :
- return getEAnnotations();
- case DTDPackage.DTD_ATTRIBUTE__NAME :
- return getName();
- case DTDPackage.DTD_ATTRIBUTE__ETYPE :
- if (resolve)
- return getEType();
- return basicGetEType();
- case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE :
- return isChangeable() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ATTRIBUTE__VOLATILE :
- return isVolatile() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ATTRIBUTE__TRANSIENT :
- return isTransient() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ATTRIBUTE__UNIQUE :
- return isUnique() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL :
- return getDefaultValueLiteral();
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE :
- return getDefaultValue();
- case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND :
- return new Integer(getLowerBound());
- case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND :
- return new Integer(getUpperBound());
- case DTDPackage.DTD_ATTRIBUTE__MANY :
- return isMany() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ATTRIBUTE__REQUIRED :
- return isRequired() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ATTRIBUTE__ECONTAINING_CLASS :
- return getEContainingClass();
- case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE :
- return isUnsettable() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ATTRIBUTE__ID :
- return isID() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ATTRIBUTE__EATTRIBUTE_TYPE :
- if (resolve)
- return getEAttributeType();
- return basicGetEAttributeType();
- case DTDPackage.DTD_ATTRIBUTE__COMMENT :
- return getComment();
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND :
- return getDefaultKind();
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING :
- return getDefaultValueString();
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY :
- if (resolve)
- return getAttributeNameReferencedEntity();
- return basicGetAttributeNameReferencedEntity();
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY :
- if (resolve)
- return getAttributeTypeReferencedEntity();
- return basicGetAttributeTypeReferencedEntity();
- case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT :
- return getDTDElement();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS :
- getEAnnotations().clear();
- getEAnnotations().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__NAME :
- setName((String) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__ETYPE :
- setEType((EClassifier) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE :
- setChangeable(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ATTRIBUTE__VOLATILE :
- setVolatile(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ATTRIBUTE__TRANSIENT :
- setTransient(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ATTRIBUTE__UNIQUE :
- setUnique(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL :
- setDefaultValueLiteral((String) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND :
- setLowerBound(((Integer) newValue).intValue());
- return;
- case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND :
- setUpperBound(((Integer) newValue).intValue());
- return;
- case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE :
- setUnsettable(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ATTRIBUTE__ID :
- setID(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ATTRIBUTE__COMMENT :
- setComment((String) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND :
- setDefaultKind((DTDDefaultKind) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING :
- setDefaultValueString((String) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY :
- setAttributeNameReferencedEntity((DTDEntity) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY :
- setAttributeTypeReferencedEntity((DTDEntity) newValue);
- return;
- case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT :
- setDTDElement((DTDElement) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS :
- getEAnnotations().clear();
- return;
- case DTDPackage.DTD_ATTRIBUTE__NAME :
- setName(NAME_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__ETYPE :
- setEType((EClassifier) null);
- return;
- case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE :
- setChangeable(CHANGEABLE_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__VOLATILE :
- setVolatile(VOLATILE_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__TRANSIENT :
- setTransient(TRANSIENT_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__UNIQUE :
- setUnique(UNIQUE_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL :
- setDefaultValueLiteral(DEFAULT_VALUE_LITERAL_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND :
- setLowerBound(LOWER_BOUND_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND :
- setUpperBound(UPPER_BOUND_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE :
- setUnsettable(UNSETTABLE_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__ID :
- setID(ID_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__COMMENT :
- setComment(COMMENT_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND :
- setDefaultKind(DEFAULT_KIND_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING :
- setDefaultValueString(DEFAULT_VALUE_STRING_EDEFAULT);
- return;
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY :
- setAttributeNameReferencedEntity((DTDEntity) null);
- return;
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY :
- setAttributeTypeReferencedEntity((DTDEntity) null);
- return;
- case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT :
- setDTDElement((DTDElement) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ATTRIBUTE__EANNOTATIONS :
- return eAnnotations != null && !getEAnnotations().isEmpty();
- case DTDPackage.DTD_ATTRIBUTE__NAME :
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case DTDPackage.DTD_ATTRIBUTE__ETYPE :
- return eType != null;
- case DTDPackage.DTD_ATTRIBUTE__CHANGEABLE :
- return ((eFlags & CHANGEABLE_EFLAG) != 0) != CHANGEABLE_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__VOLATILE :
- return ((eFlags & VOLATILE_EFLAG) != 0) != VOLATILE_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__TRANSIENT :
- return ((eFlags & TRANSIENT_EFLAG) != 0) != TRANSIENT_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__UNIQUE :
- return ((eFlags & UNIQUE_EFLAG) != 0) != UNIQUE_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_LITERAL :
- return DEFAULT_VALUE_LITERAL_EDEFAULT == null ? defaultValueLiteral != null : !DEFAULT_VALUE_LITERAL_EDEFAULT.equals(defaultValueLiteral);
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE :
- return getDefaultValue() != null;
- case DTDPackage.DTD_ATTRIBUTE__LOWER_BOUND :
- return lowerBound != LOWER_BOUND_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__UPPER_BOUND :
- return upperBound != UPPER_BOUND_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__MANY :
- return isMany() != false;
- case DTDPackage.DTD_ATTRIBUTE__REQUIRED :
- return isRequired() != false;
- case DTDPackage.DTD_ATTRIBUTE__ECONTAINING_CLASS :
- return getEContainingClass() != null;
- case DTDPackage.DTD_ATTRIBUTE__UNSETTABLE :
- return ((eFlags & UNSETTABLE_EFLAG) != 0) != UNSETTABLE_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__ID :
- return ((eFlags & ID_EFLAG) != 0) != ID_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__EATTRIBUTE_TYPE :
- return basicGetEAttributeType() != null;
- case DTDPackage.DTD_ATTRIBUTE__COMMENT :
- return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_KIND :
- return defaultKind != DEFAULT_KIND_EDEFAULT;
- case DTDPackage.DTD_ATTRIBUTE__DEFAULT_VALUE_STRING :
- return DEFAULT_VALUE_STRING_EDEFAULT == null ? defaultValueString != null : !DEFAULT_VALUE_STRING_EDEFAULT.equals(defaultValueString);
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY :
- return attributeNameReferencedEntity != null;
- case DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY :
- return attributeTypeReferencedEntity != null;
- case DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT :
- return getDTDElement() != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (comment: "); //$NON-NLS-1$
- result.append(comment);
- result.append(", defaultKind: "); //$NON-NLS-1$
- result.append(defaultKind);
- result.append(", defaultValueString: "); //$NON-NLS-1$
- result.append(defaultValueString);
- result.append(')');
- return result.toString();
- }
-
-} // DTDAttributeImpl
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDBasicTypeImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDBasicTypeImpl.java
deleted file mode 100644
index f7f9a8834f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDBasicTypeImpl.java
+++ /dev/null
@@ -1,427 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EClassImpl;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.dtd.core.internal.DTDCoreMessages;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDType;
-
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Basic Type</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDBasicTypeImpl#getKind <em>Kind</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DTDBasicTypeImpl extends EClassImpl implements DTDBasicType, EClass {
-
- public final static String basicTypeStrings[] = {DTDType.NONE, DTDType.CDATA, DTDType.ID, DTDType.IDREF, DTDType.IDREFS, DTDType.ENTITY, DTDType.ENTITIES, DTDType.NMTOKEN, DTDType.NMTOKENS};
-
- public final static String basicTypeDescriptions[] = {DTDCoreMessages._UI_NONE_DESC, DTDCoreMessages._UI_CHARACTER_DATA_DESC, DTDCoreMessages._UI_IDENTIFIER_DESC, DTDCoreMessages._UI_ID_REFERENCE_DESC, DTDCoreMessages._UI_ID_REFERENCES_DESC, DTDCoreMessages._UI_ENTITY_NAME_DESC, DTDCoreMessages._UI_ENTITY_NAMES_DESC, DTDCoreMessages._UI_NAME_TOKEN_DESC, DTDCoreMessages._UI_NAME_TOKENS_DESC}; //$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$
-
- public final static int basicTypeKinds[] = {DTDBasicTypeKind.NONE, DTDBasicTypeKind.CDATA, DTDBasicTypeKind.ID, DTDBasicTypeKind.IDREF, DTDBasicTypeKind.IDREFS, DTDBasicTypeKind.ENTITY, DTDBasicTypeKind.ENTITIES, DTDBasicTypeKind.NMTOKEN, DTDBasicTypeKind.NMTOKENS};
-
- public String unparse() {
- return getTypeString();
- }
-
- public String getTypeString() {
- int kind = getKind().getValue();
- if (kind >= 0 && kind < basicTypeStrings.length) {
- return basicTypeStrings[kind];
- } // end of if ()
-
- return null;
- }
-
-
- public String getTypeDescription() {
- return getTypeDescription(getKind().getValue());
- }
-
-
- public static String getTypeDescription(int typeKind) {
- if (typeKind >= 0 && typeKind < basicTypeDescriptions.length) {
- return basicTypeDescriptions[typeKind];
- }
- return null;
- }
-
- public String getPathname() {
- // TBD
- return ""; //$NON-NLS-1$
- }
-
- public DTDObject findObject(String relativePath) {
- return null;
- }
-
-
-
- /**
- * The default value of the '{@link #getKind() <em>Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected static final DTDBasicTypeKind KIND_EDEFAULT = DTDBasicTypeKind.NONE_LITERAL;
-
- /**
- * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected DTDBasicTypeKind kind = KIND_EDEFAULT;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DTDBasicTypeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDBasicType();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDBasicTypeKind getKind() {
- return kind;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setKind(DTDBasicTypeKind newKind) {
- DTDBasicTypeKind oldKind = kind;
- kind = newKind == null ? KIND_EDEFAULT : newKind;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_BASIC_TYPE__KIND, oldKind, kind));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS :
- return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_BASIC_TYPE__EPACKAGE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_BASIC_TYPE__EPACKAGE, msgs);
- case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS :
- return ((InternalEList) getEOperations()).basicAdd(otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS :
- return ((InternalEList) getEAnnotations()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_BASIC_TYPE__EPACKAGE :
- return eBasicSetContainer(null, DTDPackage.DTD_BASIC_TYPE__EPACKAGE, msgs);
- case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS :
- return ((InternalEList) getEOperations()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_BASIC_TYPE__EREFERENCES :
- return ((InternalEList) getEReferences()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES :
- return ((InternalEList) getEAttributes()).basicRemove(otherEnd, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_BASIC_TYPE__EPACKAGE :
- return eContainer.eInverseRemove(this, EcorePackage.EPACKAGE__ECLASSIFIERS, EPackage.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS :
- return getEAnnotations();
- case DTDPackage.DTD_BASIC_TYPE__NAME :
- return getName();
- case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS_NAME :
- return getInstanceClassName();
- case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS :
- return getInstanceClass();
- case DTDPackage.DTD_BASIC_TYPE__DEFAULT_VALUE :
- return getDefaultValue();
- case DTDPackage.DTD_BASIC_TYPE__EPACKAGE :
- return getEPackage();
- case DTDPackage.DTD_BASIC_TYPE__ABSTRACT :
- return isAbstract() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_BASIC_TYPE__INTERFACE :
- return isInterface() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_BASIC_TYPE__ESUPER_TYPES :
- return getESuperTypes();
- case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS :
- return getEOperations();
- case DTDPackage.DTD_BASIC_TYPE__EALL_ATTRIBUTES :
- return getEAllAttributes();
- case DTDPackage.DTD_BASIC_TYPE__EALL_REFERENCES :
- return getEAllReferences();
- case DTDPackage.DTD_BASIC_TYPE__EREFERENCES :
- return getEReferences();
- case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES :
- return getEAttributes();
- case DTDPackage.DTD_BASIC_TYPE__EALL_CONTAINMENTS :
- return getEAllContainments();
- case DTDPackage.DTD_BASIC_TYPE__EALL_OPERATIONS :
- return getEAllOperations();
- case DTDPackage.DTD_BASIC_TYPE__EALL_STRUCTURAL_FEATURES :
- return getEAllStructuralFeatures();
- case DTDPackage.DTD_BASIC_TYPE__EALL_SUPER_TYPES :
- return getEAllSuperTypes();
- case DTDPackage.DTD_BASIC_TYPE__EID_ATTRIBUTE :
- return getEIDAttribute();
- case DTDPackage.DTD_BASIC_TYPE__KIND :
- return getKind();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS :
- getEAnnotations().clear();
- getEAnnotations().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_BASIC_TYPE__NAME :
- setName((String) newValue);
- return;
- case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS_NAME :
- setInstanceClassName((String) newValue);
- return;
- case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS :
- setInstanceClass((Class) newValue);
- return;
- case DTDPackage.DTD_BASIC_TYPE__ABSTRACT :
- setAbstract(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_BASIC_TYPE__INTERFACE :
- setInterface(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_BASIC_TYPE__ESUPER_TYPES :
- getESuperTypes().clear();
- getESuperTypes().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS :
- getEOperations().clear();
- getEOperations().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_BASIC_TYPE__EREFERENCES :
- getEReferences().clear();
- getEReferences().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES :
- getEAttributes().clear();
- getEAttributes().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_BASIC_TYPE__KIND :
- setKind((DTDBasicTypeKind) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS :
- getEAnnotations().clear();
- return;
- case DTDPackage.DTD_BASIC_TYPE__NAME :
- setName(NAME_EDEFAULT);
- return;
- case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS_NAME :
- setInstanceClassName(INSTANCE_CLASS_NAME_EDEFAULT);
- return;
- case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS :
- setInstanceClass(INSTANCE_CLASS_EDEFAULT);
- return;
- case DTDPackage.DTD_BASIC_TYPE__ABSTRACT :
- setAbstract(ABSTRACT_EDEFAULT);
- return;
- case DTDPackage.DTD_BASIC_TYPE__INTERFACE :
- setInterface(INTERFACE_EDEFAULT);
- return;
- case DTDPackage.DTD_BASIC_TYPE__ESUPER_TYPES :
- getESuperTypes().clear();
- return;
- case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS :
- getEOperations().clear();
- return;
- case DTDPackage.DTD_BASIC_TYPE__EREFERENCES :
- getEReferences().clear();
- return;
- case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES :
- getEAttributes().clear();
- return;
- case DTDPackage.DTD_BASIC_TYPE__KIND :
- setKind(KIND_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_BASIC_TYPE__EANNOTATIONS :
- return eAnnotations != null && !getEAnnotations().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__NAME :
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS_NAME :
- return INSTANCE_CLASS_NAME_EDEFAULT == null ? instanceClassName != null : !INSTANCE_CLASS_NAME_EDEFAULT.equals(instanceClassName);
- case DTDPackage.DTD_BASIC_TYPE__INSTANCE_CLASS :
- return INSTANCE_CLASS_EDEFAULT == null ? instanceClass != null : !INSTANCE_CLASS_EDEFAULT.equals(instanceClass);
- case DTDPackage.DTD_BASIC_TYPE__DEFAULT_VALUE :
- return getDefaultValue() != null;
- case DTDPackage.DTD_BASIC_TYPE__EPACKAGE :
- return getEPackage() != null;
- case DTDPackage.DTD_BASIC_TYPE__ABSTRACT :
- return ((eFlags & ABSTRACT_EFLAG) != 0) != ABSTRACT_EDEFAULT;
- case DTDPackage.DTD_BASIC_TYPE__INTERFACE :
- return ((eFlags & INTERFACE_EFLAG) != 0) != INTERFACE_EDEFAULT;
- case DTDPackage.DTD_BASIC_TYPE__ESUPER_TYPES :
- return eSuperTypes != null && !getESuperTypes().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EOPERATIONS :
- return eOperations != null && !getEOperations().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EALL_ATTRIBUTES :
- return !getEAllAttributes().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EALL_REFERENCES :
- return !getEAllReferences().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EREFERENCES :
- return eReferences != null && !getEReferences().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EATTRIBUTES :
- return eAttributes != null && !getEAttributes().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EALL_CONTAINMENTS :
- return !getEAllContainments().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EALL_OPERATIONS :
- return !getEAllOperations().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EALL_STRUCTURAL_FEATURES :
- return !getEAllStructuralFeatures().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EALL_SUPER_TYPES :
- return !getEAllSuperTypes().isEmpty();
- case DTDPackage.DTD_BASIC_TYPE__EID_ATTRIBUTE :
- return getEIDAttribute() != null;
- case DTDPackage.DTD_BASIC_TYPE__KIND :
- return kind != KIND_EDEFAULT;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (kind: "); //$NON-NLS-1$
- result.append(kind);
- result.append(')');
- return result.toString();
- }
-
-} // DTDBasicTypeImpl
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDContentImpl.java
deleted file mode 100644
index b6147cdb8b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDContentImpl.java
+++ /dev/null
@@ -1,189 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENamedElementImpl;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-
-public class DTDContentImpl extends ENamedElementImpl implements DTDContent, EObject {
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DTDContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDContent();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDFile getDTDFile() {
- if (eContainerFeatureID != DTDPackage.DTD_CONTENT__DTD_FILE)
- return null;
- return (DTDFile) eContainer;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setDTDFile(DTDFile newDTDFile) {
- if (newDTDFile != eContainer || (eContainerFeatureID != DTDPackage.DTD_CONTENT__DTD_FILE && newDTDFile != null)) {
- if (EcoreUtil.isAncestor(this, newDTDFile))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- NotificationChain msgs = null;
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newDTDFile != null)
- msgs = ((InternalEObject) newDTDFile).eInverseAdd(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs);
- msgs = eBasicSetContainer((InternalEObject) newDTDFile, DTDPackage.DTD_CONTENT__DTD_FILE, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_CONTENT__DTD_FILE, newDTDFile, newDTDFile));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_CONTENT__DTD_FILE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_CONTENT__DTD_FILE, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_CONTENT__DTD_FILE :
- return eBasicSetContainer(null, DTDPackage.DTD_CONTENT__DTD_FILE, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_CONTENT__DTD_FILE :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_CONTENT__DTD_FILE :
- return getDTDFile();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_CONTENT__DTD_FILE :
- setDTDFile((DTDFile) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_CONTENT__DTD_FILE :
- setDTDFile((DTDFile) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_CONTENT__DTD_FILE :
- return getDTDFile() != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
-} // DTDContentImpl
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementContentImpl.java
deleted file mode 100644
index 7c669483df..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementContentImpl.java
+++ /dev/null
@@ -1,377 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-
-import java.util.Iterator;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil;
-
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Element Content</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementContentImpl#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDElementContentImpl#getElement <em>Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public abstract class DTDElementContentImpl extends EObjectImpl implements DTDElementContent {
-
- public DTDElementContentImpl() {
- super();
- }
-
- public DTDElement getDTDElement() {
- DTDElementContent c = getDTDGroupContent();
- if (c != null)
- return c.getElement();
- else
- return getElement();
- }
-
- // get the most outer DTDGroupContent
- public DTDGroupContent getDTDGroupContent() {
- DTDElementContent c = this;
- while (c.getGroup() != null) {
- c = c.getGroup();
- }
- return ((c instanceof DTDGroupContent) ? (DTDGroupContent) c : null);
- }
-
- public String getPathname() {
- int cnt = 0;
- DTDObject parent = getGroup();
- if (parent == null) {
- parent = getElement();
- }
- else {
- DTDGroupContent group = (DTDGroupContent) parent;
- Iterator i = group.getContent().iterator();
- while (i.hasNext()) {
- DTDElementContent content = (DTDElementContent) i.next();
- if (content == this) {
- break;
- }
- if ((content instanceof DTDElementReferenceContent) || (content instanceof DTDEntityReferenceContent)) {
- continue;
- }
- cnt++;
- }
- }
- return DTDPathnameUtil.makePath(((parent == null) ? "NULL_PARENT" : parent.getPathname()), "Content", null, cnt); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public DTDObject findObject(String relativePath) {
- return null;
- }
-
- public boolean isFirstElementContent() {
- DTDElement element = getElement();
-
- if (element != null) {
- // This means this is the only element content in the element
- return true;
- } // end of if ()
-
- DTDGroupContent group = getGroup();
- int pos = group.getContentPosition(this);
- if (pos == 0) {
- // now recurse and ensure this group is the first group
- return group.isFirstElementContent();
- } // end of if ()
- else {
- return false;
- }
- }
-
- public String getContentDetail() {
- // most times, content name is fine. However for groups,
- // we didn't want a long name to show up in the tree,
- // so we created a get contentdetail to get to the long
- // name (getContentName will get the short one.
- return getContentName();
- }
-
- // ugly hack for now since we don't have multiple inheritance.
- // Would rather have all this stuff in a base class but these
- // classes are inheriting from sometimes different mof classes
- DTDLexicalInfo lexInfo = new DTDLexicalInfo();
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset() {
- return lexInfo.getStartOffset();
- }
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v) {
- lexInfo.setStartOffset(v);
- }
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset() {
- return lexInfo.getEndOffset();
- }
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v) {
- lexInfo.setEndOffset(v);
- }
-
- /*
- * @see DTDElementContent#getContentName()
- */
- public String getContentName() {
- return null;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDElementContent();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDGroupContent getGroup() {
- if (eContainerFeatureID != DTDPackage.DTD_ELEMENT_CONTENT__GROUP)
- return null;
- return (DTDGroupContent) eContainer;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setGroup(DTDGroupContent newGroup) {
- if (newGroup != eContainer || (eContainerFeatureID != DTDPackage.DTD_ELEMENT_CONTENT__GROUP && newGroup != null)) {
- if (EcoreUtil.isAncestor(this, newGroup))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- NotificationChain msgs = null;
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newGroup != null)
- msgs = ((InternalEObject) newGroup).eInverseAdd(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- msgs = eBasicSetContainer((InternalEObject) newGroup, DTDPackage.DTD_ELEMENT_CONTENT__GROUP, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT_CONTENT__GROUP, newGroup, newGroup));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDElement getElement() {
- if (eContainerFeatureID != DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT)
- return null;
- return (DTDElement) eContainer;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setElement(DTDElement newElement) {
- if (newElement != eContainer || (eContainerFeatureID != DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT && newElement != null)) {
- if (EcoreUtil.isAncestor(this, newElement))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- NotificationChain msgs = null;
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newElement != null)
- msgs = ((InternalEObject) newElement).eInverseAdd(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- msgs = eBasicSetContainer((InternalEObject) newElement, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, newElement, newElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ELEMENT_CONTENT__GROUP :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ELEMENT_CONTENT__GROUP :
- return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ELEMENT_CONTENT__GROUP :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT_CONTENT__GROUP :
- return getGroup();
- case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT :
- return getElement();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT_CONTENT__GROUP :
- setGroup((DTDGroupContent) newValue);
- return;
- case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT :
- setElement((DTDElement) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT_CONTENT__GROUP :
- setGroup((DTDGroupContent) null);
- return;
- case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT :
- setElement((DTDElement) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT_CONTENT__GROUP :
- return getGroup() != null;
- case DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT :
- return getElement() != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
-} // DTDElementContentImpl
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementImpl.java
deleted file mode 100644
index 4a274d7a67..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementImpl.java
+++ /dev/null
@@ -1,654 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.notify.impl.NotificationChainImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EClassImpl;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDVisitor;
-
-
-/**
- * @generated
- */
-public class DTDElementImpl extends EClassImpl implements DTDElement {
- /**
- * The default value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected static final String COMMENT_EDEFAULT = null;
-
- public DTDElementImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDElement();
- }
-
- public void addDTDAttribute(DTDAttribute attribute) {
- getDTDAttribute().add(attribute);
- }
-
- public String getPathname() {
- return DTDPathnameUtil.makePath(null, "Elem", getName(), -1); //$NON-NLS-1$
- }
-
- public DTDObject findObject(String relativePath) {
- Object[] result = DTDPathnameUtil.parsePathComponent(relativePath);
-
- String type = (String) result[0];
-
- if (type == null)
- return null;
-
- DTDObject obj = null;
- if (type.equals("Attr")) { //$NON-NLS-1$
- // TODO: fix port
- // obj = findAttribute(name);
- }
- else if ((type.equals("Content")) || (type.equals("ElemRef")) || (type.equals("EntRef"))) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- obj = getContent();
- }
- else {
- return null;
- }
-
- String restPath = (String) result[3];
-
- if ((restPath == null) || (obj == null)) {
- return obj;
- }
- else {
- return obj.findObject(restPath);
- }
- }
-
- // returns all references in the same DTDFile that reference this element
- public Collection getReferences() {
- DTDFile file = getDTDFile();
- final Collection result = new ArrayList();
-
- DTDVisitor visitRefs = new DTDVisitor() {
- public void visitDTDElementReferenceContent(DTDElementReferenceContent elementReferenceContent) {
- if (elementReferenceContent.getReferencedElement() == DTDElementImpl.this) {
- result.add(elementReferenceContent);
- } // end of if ()
- }
- };
- visitRefs.visitDTDFile(file);
- return result;
- }
-
- public String getAttributeDetail() {
- String attributeString = ""; //$NON-NLS-1$
- Collection attributes = getDTDAttribute();
- if (attributes != null) {
- boolean seenOne = false;
- for (java.util.Iterator i = attributes.iterator(); i.hasNext();) {
- if (seenOne) {
- attributeString = attributeString + ", "; //$NON-NLS-1$
- }
- else {
- seenOne = true;
- } // end of else
-
- attributeString = attributeString + ((DTDAttribute) i.next()).getName();
- }
- } // end of if ()
- return attributeString;
- }
-
-
- // ugly hack for now since we don't have multiple inheritance.
- // Would rather have all this stuff in a base class but these
- // classes are inheriting from sometimes different mof classes
- DTDLexicalInfo lexInfo = new DTDLexicalInfo();
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String comment = COMMENT_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DTDElementContent content = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList dtdAttribute = null;
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset() {
- return lexInfo.getStartOffset();
- }
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v) {
- lexInfo.setStartOffset(v);
- }
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset() {
- return lexInfo.getEndOffset();
- }
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v) {
- lexInfo.setEndOffset(v);
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getComment() {
- return comment;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setComment(String newComment) {
- String oldComment = comment;
- comment = newComment;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT__COMMENT, oldComment, comment));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDElementContent getContent() {
- return content;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetContent(DTDElementContent newContent, NotificationChain msgs) {
- DTDElementContent oldContent = content;
- content = newContent;
- if (eNotificationRequired()) {
- if (msgs == null)
- msgs = new NotificationChainImpl(4);
- msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT__CONTENT, oldContent, newContent));
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setContent(DTDElementContent newContent) {
- if (newContent != content) {
- NotificationChain msgs = null;
- if (content != null)
- msgs = ((InternalEObject) content).eInverseRemove(this, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, DTDElementContent.class, msgs);
- if (newContent != null)
- msgs = ((InternalEObject) newContent).eInverseAdd(this, DTDPackage.DTD_ELEMENT_CONTENT__ELEMENT, DTDElementContent.class, msgs);
- msgs = basicSetContent(newContent, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT__CONTENT, newContent, newContent));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getDTDAttribute() {
- if (dtdAttribute == null) {
- dtdAttribute = new EObjectContainmentWithInverseEList(DTDAttribute.class, this, DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE, DTDPackage.DTD_ATTRIBUTE__DTD_ELEMENT);
- }
- return dtdAttribute;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ELEMENT__EANNOTATIONS :
- return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_ELEMENT__EPACKAGE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT__EPACKAGE, msgs);
- case DTDPackage.DTD_ELEMENT__EOPERATIONS :
- return ((InternalEList) getEOperations()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_ELEMENT__DTD_FILE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT__DTD_FILE, msgs);
- case DTDPackage.DTD_ELEMENT__CONTENT :
- if (content != null)
- msgs = ((InternalEObject) content).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DTDPackage.DTD_ELEMENT__CONTENT, null, msgs);
- return basicSetContent((DTDElementContent) otherEnd, msgs);
- case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE :
- return ((InternalEList) getDTDAttribute()).basicAdd(otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ELEMENT__EANNOTATIONS :
- return ((InternalEList) getEAnnotations()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ELEMENT__EPACKAGE :
- return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT__EPACKAGE, msgs);
- case DTDPackage.DTD_ELEMENT__EOPERATIONS :
- return ((InternalEList) getEOperations()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ELEMENT__EREFERENCES :
- return ((InternalEList) getEReferences()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ELEMENT__EATTRIBUTES :
- return ((InternalEList) getEAttributes()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ELEMENT__DTD_FILE :
- return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT__DTD_FILE, msgs);
- case DTDPackage.DTD_ELEMENT__CONTENT :
- return basicSetContent(null, msgs);
- case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE :
- return ((InternalEList) getDTDAttribute()).basicRemove(otherEnd, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ELEMENT__EPACKAGE :
- return eContainer.eInverseRemove(this, EcorePackage.EPACKAGE__ECLASSIFIERS, EPackage.class, msgs);
- case DTDPackage.DTD_ELEMENT__DTD_FILE :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT__EANNOTATIONS :
- return getEAnnotations();
- case DTDPackage.DTD_ELEMENT__NAME :
- return getName();
- case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS_NAME :
- return getInstanceClassName();
- case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS :
- return getInstanceClass();
- case DTDPackage.DTD_ELEMENT__DEFAULT_VALUE :
- return getDefaultValue();
- case DTDPackage.DTD_ELEMENT__EPACKAGE :
- return getEPackage();
- case DTDPackage.DTD_ELEMENT__ABSTRACT :
- return isAbstract() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ELEMENT__INTERFACE :
- return isInterface() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ELEMENT__ESUPER_TYPES :
- return getESuperTypes();
- case DTDPackage.DTD_ELEMENT__EOPERATIONS :
- return getEOperations();
- case DTDPackage.DTD_ELEMENT__EALL_ATTRIBUTES :
- return getEAllAttributes();
- case DTDPackage.DTD_ELEMENT__EALL_REFERENCES :
- return getEAllReferences();
- case DTDPackage.DTD_ELEMENT__EREFERENCES :
- return getEReferences();
- case DTDPackage.DTD_ELEMENT__EATTRIBUTES :
- return getEAttributes();
- case DTDPackage.DTD_ELEMENT__EALL_CONTAINMENTS :
- return getEAllContainments();
- case DTDPackage.DTD_ELEMENT__EALL_OPERATIONS :
- return getEAllOperations();
- case DTDPackage.DTD_ELEMENT__EALL_STRUCTURAL_FEATURES :
- return getEAllStructuralFeatures();
- case DTDPackage.DTD_ELEMENT__EALL_SUPER_TYPES :
- return getEAllSuperTypes();
- case DTDPackage.DTD_ELEMENT__EID_ATTRIBUTE :
- return getEIDAttribute();
- case DTDPackage.DTD_ELEMENT__DTD_FILE :
- return getDTDFile();
- case DTDPackage.DTD_ELEMENT__COMMENT :
- return getComment();
- case DTDPackage.DTD_ELEMENT__CONTENT :
- return getContent();
- case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE :
- return getDTDAttribute();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT__EANNOTATIONS :
- return eAnnotations != null && !getEAnnotations().isEmpty();
- case DTDPackage.DTD_ELEMENT__NAME :
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS_NAME :
- return INSTANCE_CLASS_NAME_EDEFAULT == null ? instanceClassName != null : !INSTANCE_CLASS_NAME_EDEFAULT.equals(instanceClassName);
- case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS :
- return INSTANCE_CLASS_EDEFAULT == null ? instanceClass != null : !INSTANCE_CLASS_EDEFAULT.equals(instanceClass);
- case DTDPackage.DTD_ELEMENT__DEFAULT_VALUE :
- return getDefaultValue() != null;
- case DTDPackage.DTD_ELEMENT__EPACKAGE :
- return getEPackage() != null;
- case DTDPackage.DTD_ELEMENT__ABSTRACT :
- return ((eFlags & ABSTRACT_EFLAG) != 0) != ABSTRACT_EDEFAULT;
- case DTDPackage.DTD_ELEMENT__INTERFACE :
- return ((eFlags & INTERFACE_EFLAG) != 0) != INTERFACE_EDEFAULT;
- case DTDPackage.DTD_ELEMENT__ESUPER_TYPES :
- return eSuperTypes != null && !getESuperTypes().isEmpty();
- case DTDPackage.DTD_ELEMENT__EOPERATIONS :
- return eOperations != null && !getEOperations().isEmpty();
- case DTDPackage.DTD_ELEMENT__EALL_ATTRIBUTES :
- return !getEAllAttributes().isEmpty();
- case DTDPackage.DTD_ELEMENT__EALL_REFERENCES :
- return !getEAllReferences().isEmpty();
- case DTDPackage.DTD_ELEMENT__EREFERENCES :
- return eReferences != null && !getEReferences().isEmpty();
- case DTDPackage.DTD_ELEMENT__EATTRIBUTES :
- return eAttributes != null && !getEAttributes().isEmpty();
- case DTDPackage.DTD_ELEMENT__EALL_CONTAINMENTS :
- return !getEAllContainments().isEmpty();
- case DTDPackage.DTD_ELEMENT__EALL_OPERATIONS :
- return !getEAllOperations().isEmpty();
- case DTDPackage.DTD_ELEMENT__EALL_STRUCTURAL_FEATURES :
- return !getEAllStructuralFeatures().isEmpty();
- case DTDPackage.DTD_ELEMENT__EALL_SUPER_TYPES :
- return !getEAllSuperTypes().isEmpty();
- case DTDPackage.DTD_ELEMENT__EID_ATTRIBUTE :
- return getEIDAttribute() != null;
- case DTDPackage.DTD_ELEMENT__DTD_FILE :
- return getDTDFile() != null;
- case DTDPackage.DTD_ELEMENT__COMMENT :
- return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
- case DTDPackage.DTD_ELEMENT__CONTENT :
- return content != null;
- case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE :
- return dtdAttribute != null && !getDTDAttribute().isEmpty();
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) {
- if (baseClass == DTDContent.class) {
- switch (derivedFeatureID) {
- case DTDPackage.DTD_ELEMENT__DTD_FILE :
- return DTDPackage.DTD_CONTENT__DTD_FILE;
- default :
- return -1;
- }
- }
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) {
- if (baseClass == DTDContent.class) {
- switch (baseFeatureID) {
- case DTDPackage.DTD_CONTENT__DTD_FILE :
- return DTDPackage.DTD_ELEMENT__DTD_FILE;
- default :
- return -1;
- }
- }
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (comment: "); //$NON-NLS-1$
- result.append(comment);
- result.append(')');
- return result.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT__EANNOTATIONS :
- getEAnnotations().clear();
- getEAnnotations().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__NAME :
- setName((String) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS_NAME :
- setInstanceClassName((String) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS :
- setInstanceClass((Class) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__ABSTRACT :
- setAbstract(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ELEMENT__INTERFACE :
- setInterface(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ELEMENT__ESUPER_TYPES :
- getESuperTypes().clear();
- getESuperTypes().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__EOPERATIONS :
- getEOperations().clear();
- getEOperations().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__EREFERENCES :
- getEReferences().clear();
- getEReferences().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__EATTRIBUTES :
- getEAttributes().clear();
- getEAttributes().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__DTD_FILE :
- setDTDFile((DTDFile) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__COMMENT :
- setComment((String) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__CONTENT :
- setContent((DTDElementContent) newValue);
- return;
- case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE :
- getDTDAttribute().clear();
- getDTDAttribute().addAll((Collection) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT__EANNOTATIONS :
- getEAnnotations().clear();
- return;
- case DTDPackage.DTD_ELEMENT__NAME :
- setName(NAME_EDEFAULT);
- return;
- case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS_NAME :
- setInstanceClassName(INSTANCE_CLASS_NAME_EDEFAULT);
- return;
- case DTDPackage.DTD_ELEMENT__INSTANCE_CLASS :
- setInstanceClass(INSTANCE_CLASS_EDEFAULT);
- return;
- case DTDPackage.DTD_ELEMENT__ABSTRACT :
- setAbstract(ABSTRACT_EDEFAULT);
- return;
- case DTDPackage.DTD_ELEMENT__INTERFACE :
- setInterface(INTERFACE_EDEFAULT);
- return;
- case DTDPackage.DTD_ELEMENT__ESUPER_TYPES :
- getESuperTypes().clear();
- return;
- case DTDPackage.DTD_ELEMENT__EOPERATIONS :
- getEOperations().clear();
- return;
- case DTDPackage.DTD_ELEMENT__EREFERENCES :
- getEReferences().clear();
- return;
- case DTDPackage.DTD_ELEMENT__EATTRIBUTES :
- getEAttributes().clear();
- return;
- case DTDPackage.DTD_ELEMENT__DTD_FILE :
- setDTDFile((DTDFile) null);
- return;
- case DTDPackage.DTD_ELEMENT__COMMENT :
- setComment(COMMENT_EDEFAULT);
- return;
- case DTDPackage.DTD_ELEMENT__CONTENT :
- setContent((DTDElementContent) null);
- return;
- case DTDPackage.DTD_ELEMENT__DTD_ATTRIBUTE :
- getDTDAttribute().clear();
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public DTDFile getDTDFile() {
- if (eContainerFeatureID != DTDPackage.DTD_ELEMENT__DTD_FILE)
- return null;
- return (DTDFile) eContainer;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDTDFile(DTDFile newDTDFile) {
- if (newDTDFile != eContainer || (eContainerFeatureID != DTDPackage.DTD_ELEMENT__DTD_FILE && newDTDFile != null)) {
- if (EcoreUtil.isAncestor(this, newDTDFile))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- NotificationChain msgs = null;
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newDTDFile != null)
- msgs = ((InternalEObject) newDTDFile).eInverseAdd(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs);
- msgs = eBasicSetContainer((InternalEObject) newDTDFile, DTDPackage.DTD_ELEMENT__DTD_FILE, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT__DTD_FILE, newDTDFile, newDTDFile));
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementReferenceContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementReferenceContentImpl.java
deleted file mode 100644
index cbd9933680..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementReferenceContentImpl.java
+++ /dev/null
@@ -1,242 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-
-/**
- * @generated
- */
-public class DTDElementReferenceContentImpl extends DTDRepeatableContentImpl implements DTDElementReferenceContent {
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DTDElement referencedElement = null;
-
- public DTDElementReferenceContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDElementReferenceContent();
- }
-
- public String unparseRepeatableContent() {
- return getContentName();
- }
-
- public String getContentName() {
- DTDElement e = getReferencedElement();
- if (e == null)
- return ""; //$NON-NLS-1$
- return e.getName();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDElement getReferencedElement() {
- if (referencedElement != null && referencedElement.eIsProxy()) {
- DTDElement oldReferencedElement = referencedElement;
- referencedElement = (DTDElement) EcoreUtil.resolve(referencedElement, this);
- if (referencedElement != oldReferencedElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT, oldReferencedElement, referencedElement));
- }
- }
- return referencedElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDElement basicGetReferencedElement() {
- return referencedElement;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setReferencedElement(DTDElement newReferencedElement) {
- DTDElement oldReferencedElement = referencedElement;
- referencedElement = newReferencedElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT, oldReferencedElement, referencedElement));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP :
- return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP :
- return getGroup();
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT :
- return getElement();
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE :
- return getOccurrence();
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT :
- if (resolve)
- return getReferencedElement();
- return basicGetReferencedElement();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP :
- return getGroup() != null;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT :
- return getElement() != null;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE :
- return occurrence != OCCURRENCE_EDEFAULT;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT :
- return referencedElement != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP :
- setGroup((DTDGroupContent) newValue);
- return;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT :
- setElement((DTDElement) newValue);
- return;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE :
- setOccurrence((DTDOccurrenceType) newValue);
- return;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT :
- setReferencedElement((DTDElement) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__GROUP :
- setGroup((DTDGroupContent) null);
- return;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__ELEMENT :
- setElement((DTDElement) null);
- return;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__OCCURRENCE :
- setOccurrence(OCCURRENCE_EDEFAULT);
- return;
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT :
- setReferencedElement((DTDElement) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEmptyContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEmptyContentImpl.java
deleted file mode 100644
index 8689c516b5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEmptyContentImpl.java
+++ /dev/null
@@ -1,172 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-/**
- * @generated
- */
-public class DTDEmptyContentImpl extends DTDElementContentImpl implements DTDEmptyContent {
-
- public DTDEmptyContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDEmptyContent();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_EMPTY_CONTENT__GROUP :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_EMPTY_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_EMPTY_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_EMPTY_CONTENT__GROUP :
- return eBasicSetContainer(null, DTDPackage.DTD_EMPTY_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_EMPTY_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_EMPTY_CONTENT__GROUP :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_EMPTY_CONTENT__GROUP :
- return getGroup();
- case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT :
- return getElement();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_EMPTY_CONTENT__GROUP :
- setGroup((DTDGroupContent) newValue);
- return;
- case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT :
- setElement((DTDElement) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_EMPTY_CONTENT__GROUP :
- setGroup((DTDGroupContent) null);
- return;
- case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT :
- setElement((DTDElement) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_EMPTY_CONTENT__GROUP :
- return getGroup() != null;
- case DTDPackage.DTD_EMPTY_CONTENT__ELEMENT :
- return getElement() != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- public String getContentName() {
- return "EMPTY"; //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityContentImpl.java
deleted file mode 100644
index 2617d336bc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityContentImpl.java
+++ /dev/null
@@ -1,193 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil;
-
-/**
- * @generated
- */
-public abstract class DTDEntityContentImpl extends EObjectImpl implements DTDEntityContent {
-
- public DTDEntityContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDEntityContent();
- }
-
- public String getPathname() {
- return DTDPathnameUtil.makePath(getDTDEntity().getPathname(), "Content", null, -1); //$NON-NLS-1$
- }
-
- public DTDObject findObject(String relativePath) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDEntity getDTDEntity() {
- if (eContainerFeatureID != DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY)
- return null;
- return (DTDEntity) eContainer;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDTDEntity(DTDEntity newDTDEntity) {
- if (newDTDEntity != eContainer || (eContainerFeatureID != DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY && newDTDEntity != null)) {
- if (EcoreUtil.isAncestor(this, newDTDEntity))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- NotificationChain msgs = null;
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newDTDEntity != null)
- msgs = ((InternalEObject) newDTDEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__CONTENT, DTDEntity.class, msgs);
- msgs = eBasicSetContainer((InternalEObject) newDTDEntity, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, newDTDEntity, newDTDEntity));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY :
- return eBasicSetContainer(null, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ENTITY__CONTENT, DTDEntity.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY :
- return getDTDEntity();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY :
- return getDTDEntity() != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY :
- setDTDEntity((DTDEntity) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY :
- setDTDEntity((DTDEntity) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /*
- * @see DTDEntityContent#unparse()
- */
- public String unparse() {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityImpl.java
deleted file mode 100644
index b3f7963568..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityImpl.java
+++ /dev/null
@@ -1,1198 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.notify.impl.NotificationChainImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil;
-
-
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Entity</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#isParameterEntity <em>Parameter Entity</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getContent <em>Content</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getParmEntityRef <em>Parm Entity Ref</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getEntityReference <em>Entity Reference</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getAttributeNameReference <em>Attribute Name Reference</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDEntityImpl#getAttributeTypeReference <em>Attribute Type Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DTDEntityImpl extends DTDContentImpl implements DTDEntity, ENamedElement, DTDContent {
-
- public String getPathname() {
- return DTDPathnameUtil.makePath(null, "Ent", getName(), -1); //$NON-NLS-1$
- }
-
-
- public DTDObject findObject(String relativePath) {
- Object[] result = DTDPathnameUtil.parsePathComponent(relativePath);
-
-
- String type = (String) result[0];
-
-
- if (type == null)
- return null;
-
-
- DTDObject obj = null;
- if (type.equals("Content")) { //$NON-NLS-1$
- obj = getContent();
- }
- else {
- return null;
- }
-
-
- String restPath = (String) result[3];
-
- if ((restPath == null) || (obj == null)) {
- return obj;
- }
- else {
- return obj.findObject(restPath);
- }
- }
-
-
- // ugly hack for now since we don't have multiple inheritance.
- // Would rather have all this stuff in a base class but these
- // classes are inheriting from sometimes different mof classes
- DTDLexicalInfo lexInfo = new DTDLexicalInfo();
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset() {
- return lexInfo.getStartOffset();
- }
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v) {
- lexInfo.setStartOffset(v);
- }
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset() {
- return lexInfo.getEndOffset();
- }
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v) {
- lexInfo.setEndOffset(v);
- }
-
-
-
- /**
- * The default value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected static final String COMMENT_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected String comment = COMMENT_EDEFAULT;
-
- /**
- * The default value of the '{@link #isParameterEntity() <em>Parameter Entity</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #isParameterEntity()
- * @generated
- * @ordered
- */
- protected static final boolean PARAMETER_ENTITY_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isParameterEntity() <em>Parameter Entity</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #isParameterEntity()
- * @generated
- * @ordered
- */
- protected boolean parameterEntity = PARAMETER_ENTITY_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getContent() <em>Content</em>}'
- * containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getContent()
- * @generated
- * @ordered
- */
- protected DTDEntityContent content = null;
-
- /**
- * The cached value of the '{@link #getParmEntityRef() <em>Parm Entity Ref</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getParmEntityRef()
- * @generated
- * @ordered
- */
- protected DTDParameterEntityReference parmEntityRef = null;
-
- /**
- * The cached value of the '{@link #getEntityReference() <em>Entity Reference</em>}'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getEntityReference()
- * @generated
- * @ordered
- */
- protected EList entityReference = null;
-
- /**
- * The cached value of the '{@link #getAttributeNameReference() <em>Attribute Name Reference</em>}'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getAttributeNameReference()
- * @generated
- * @ordered
- */
- protected EList attributeNameReference = null;
-
- /**
- * The cached value of the '{@link #getAttributeTypeReference() <em>Attribute Type Reference</em>}'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getAttributeTypeReference()
- * @generated
- * @ordered
- */
- protected EList attributeTypeReference = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DTDEntityImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDEntity();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getComment() {
- return comment;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setComment(String newComment) {
- String oldComment = comment;
- comment = newComment;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__COMMENT, oldComment, comment));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean isParameterEntity() {
- return parameterEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setParameterEntity(boolean newParameterEntity) {
- boolean oldParameterEntity = parameterEntity;
- parameterEntity = newParameterEntity;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__PARAMETER_ENTITY, oldParameterEntity, parameterEntity));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntityContent getContent() {
- return content;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetContent(DTDEntityContent newContent, NotificationChain msgs) {
- DTDEntityContent oldContent = content;
- content = newContent;
- if (eNotificationRequired()) {
- if (msgs == null)
- msgs = new NotificationChainImpl(4);
- msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__CONTENT, oldContent, newContent));
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setContent(DTDEntityContent newContent) {
- if (newContent != content) {
- NotificationChain msgs = null;
- if (content != null)
- msgs = ((InternalEObject) content).eInverseRemove(this, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, DTDEntityContent.class, msgs);
- if (newContent != null)
- msgs = ((InternalEObject) newContent).eInverseAdd(this, DTDPackage.DTD_ENTITY_CONTENT__DTD_ENTITY, DTDEntityContent.class, msgs);
- msgs = basicSetContent(newContent, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__CONTENT, newContent, newContent));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDParameterEntityReference getParmEntityRef() {
- if (parmEntityRef != null && parmEntityRef.eIsProxy()) {
- DTDParameterEntityReference oldParmEntityRef = parmEntityRef;
- parmEntityRef = (DTDParameterEntityReference) EcoreUtil.resolve(parmEntityRef, this);
- if (parmEntityRef != oldParmEntityRef) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, oldParmEntityRef, parmEntityRef));
- }
- }
- return parmEntityRef;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDParameterEntityReference basicGetParmEntityRef() {
- return parmEntityRef;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetParmEntityRef(DTDParameterEntityReference newParmEntityRef, NotificationChain msgs) {
- DTDParameterEntityReference oldParmEntityRef = parmEntityRef;
- parmEntityRef = newParmEntityRef;
- if (eNotificationRequired()) {
- if (msgs == null)
- msgs = new NotificationChainImpl(4);
- msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, oldParmEntityRef, newParmEntityRef));
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setParmEntityRef(DTDParameterEntityReference newParmEntityRef) {
- if (newParmEntityRef != parmEntityRef) {
- NotificationChain msgs = null;
- if (parmEntityRef != null)
- msgs = ((InternalEObject) parmEntityRef).eInverseRemove(this, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, DTDParameterEntityReference.class, msgs);
- if (newParmEntityRef != null)
- msgs = ((InternalEObject) newParmEntityRef).eInverseAdd(this, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, DTDParameterEntityReference.class, msgs);
- msgs = basicSetParmEntityRef(newParmEntityRef, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, newParmEntityRef, newParmEntityRef));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList getEntityReference() {
- if (entityReference == null) {
- entityReference = new EObjectWithInverseResolvingEList(DTDEntityReferenceContent.class, this, DTDPackage.DTD_ENTITY__ENTITY_REFERENCE, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY);
- }
- return entityReference;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList getAttributeNameReference() {
- if (attributeNameReference == null) {
- attributeNameReference = new EObjectWithInverseResolvingEList(DTDAttribute.class, this, DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY);
- }
- return attributeNameReference;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList getAttributeTypeReference() {
- if (attributeTypeReference == null) {
- attributeTypeReference = new EObjectWithInverseResolvingEList(DTDAttribute.class, this, DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE, DTDPackage.DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY);
- }
- return attributeTypeReference;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ENTITY__DTD_FILE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENTITY__DTD_FILE, msgs);
- case DTDPackage.DTD_ENTITY__CONTENT :
- if (content != null)
- msgs = ((InternalEObject) content).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DTDPackage.DTD_ENTITY__CONTENT, null, msgs);
- return basicSetContent((DTDEntityContent) otherEnd, msgs);
- case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF :
- if (parmEntityRef != null)
- msgs = ((InternalEObject) parmEntityRef).eInverseRemove(this, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, DTDParameterEntityReference.class, msgs);
- return basicSetParmEntityRef((DTDParameterEntityReference) otherEnd, msgs);
- case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE :
- return ((InternalEList) getEntityReference()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE :
- return ((InternalEList) getAttributeNameReference()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE :
- return ((InternalEList) getAttributeTypeReference()).basicAdd(otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ENTITY__DTD_FILE :
- return eBasicSetContainer(null, DTDPackage.DTD_ENTITY__DTD_FILE, msgs);
- case DTDPackage.DTD_ENTITY__CONTENT :
- return basicSetContent(null, msgs);
- case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF :
- return basicSetParmEntityRef(null, msgs);
- case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE :
- return ((InternalEList) getEntityReference()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE :
- return ((InternalEList) getAttributeNameReference()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE :
- return ((InternalEList) getAttributeTypeReference()).basicRemove(otherEnd, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ENTITY__DTD_FILE :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY__DTD_FILE :
- return getDTDFile();
- case DTDPackage.DTD_ENTITY__COMMENT :
- return getComment();
- case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY :
- return isParameterEntity() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ENTITY__CONTENT :
- return getContent();
- case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF :
- if (resolve)
- return getParmEntityRef();
- return basicGetParmEntityRef();
- case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE :
- return getEntityReference();
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE :
- return getAttributeNameReference();
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE :
- return getAttributeTypeReference();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY__DTD_FILE :
- setDTDFile((DTDFile) newValue);
- return;
- case DTDPackage.DTD_ENTITY__COMMENT :
- setComment((String) newValue);
- return;
- case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY :
- setParameterEntity(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ENTITY__CONTENT :
- setContent((DTDEntityContent) newValue);
- return;
- case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF :
- setParmEntityRef((DTDParameterEntityReference) newValue);
- return;
- case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE :
- getEntityReference().clear();
- getEntityReference().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE :
- getAttributeNameReference().clear();
- getAttributeNameReference().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE :
- getAttributeTypeReference().clear();
- getAttributeTypeReference().addAll((Collection) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY__DTD_FILE :
- setDTDFile((DTDFile) null);
- return;
- case DTDPackage.DTD_ENTITY__COMMENT :
- setComment(COMMENT_EDEFAULT);
- return;
- case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY :
- setParameterEntity(PARAMETER_ENTITY_EDEFAULT);
- return;
- case DTDPackage.DTD_ENTITY__CONTENT :
- setContent((DTDEntityContent) null);
- return;
- case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF :
- setParmEntityRef((DTDParameterEntityReference) null);
- return;
- case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE :
- getEntityReference().clear();
- return;
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE :
- getAttributeNameReference().clear();
- return;
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE :
- getAttributeTypeReference().clear();
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY__DTD_FILE :
- return getDTDFile() != null;
- case DTDPackage.DTD_ENTITY__COMMENT :
- return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
- case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY :
- return parameterEntity != PARAMETER_ENTITY_EDEFAULT;
- case DTDPackage.DTD_ENTITY__CONTENT :
- return content != null;
- case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF :
- return parmEntityRef != null;
- case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE :
- return entityReference != null && !getEntityReference().isEmpty();
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE :
- return attributeNameReference != null && !getAttributeNameReference().isEmpty();
- case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE :
- return attributeTypeReference != null && !getAttributeTypeReference().isEmpty();
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (comment: "); //$NON-NLS-1$
- result.append(comment);
- result.append(", parameterEntity: "); //$NON-NLS-1$
- result.append(parameterEntity);
- result.append(')');
- return result.toString();
- }
-
-} // DTDEntityImpl
-
-// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
-//
-
-// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
-// //public class DTDEntityImpl extends ENamespaceImpl implements DTDEntity,
-// ENamespace, DTDContent{
-// -------------------GENERICRULES.JSED-------------------
-
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected String comment = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected Boolean parameterEntity = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected DTDEntityContent content = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected DTDParameterEntityReference parmEntityRef = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected EList entityReference = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected EList attributeNameReference = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected EList attributeTypeReference = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setComment = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setParameterEntity = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setContent = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setParmEntityRef = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// private DTDContentImpl dtdContentDelegate = null;
-
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EObject initInstance() {
-// setEMetaObj(eClassDTDEntity());
-// initInstanceDelegates();
-// return this;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected void initInstanceDelegates() {
-// super.initInstanceDelegates();
-//
-// getDtdContentDelegate().refSetDelegateOwner(this);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public DTDPackage ePackageDTD() {
-// return
-// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EClass eClassDTDEntity() {
-// return
-// ((DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI)).getDTDEntity();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public String getComment() {
-// if (this.setComment) return this.comment;
-// else return
-// (String)DTDPackage.eINSTANCE.getDTDEntity_Comment().getDefaultValue();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setComment(String value) {
-// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDEntity_Comment(),this.comment,value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetComment() {
-// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDEntity_Comment()));
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetComment() {
-// return setComment;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public Boolean getParameterEntity() {
-// if (this.setParameterEntity) return this.parameterEntity;
-// else return
-// (Boolean)DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity().getDefaultValue();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public boolean isParameterEntity() {
-// Boolean result = getParameterEntity();
-// return result != null ? result.booleanValue() : false;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setParameterEntity(Boolean value) {
-// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity(),this.parameterEntity,value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setParameterEntity(boolean value) {
-// setParameterEntity(value?Boolean.TRUE:Boolean.FALSE);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetParameterEntity() {
-// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity()));
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetParameterEntity() {
-// return setParameterEntity;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public DTDEntityContent getContent() {
-// try {
-// if (this.content == null) return null;
-// this.content = (DTDEntityContent)
-// ((InternalEObject)this.content).resolve(this);
-// if (this.content==null) this.setContent = false;
-// return this.content;
-// } catch (Exception e) {
-// return null;
-// }
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setContent(DTDEntityContent l) {
-// refSetValueForRefObjectSF(DTDPackage.eINSTANCE.getDTDEntity_Content(),this.content,l);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetContent() {
-// refUnsetValueForRefObjectSF(DTDPackage.eINSTANCE.getDTDEntity_Content(),this.content);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetContent() {
-// return setContent;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public DTDParameterEntityReference getParmEntityRef() {
-// try {
-// if (this.parmEntityRef == null) return null;
-// this.parmEntityRef = (DTDParameterEntityReference)
-// ((InternalEObject)this.parmEntityRef).resolve(this,
-// DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef());
-// if (this.parmEntityRef==null) this.setParmEntityRef = false;
-// return this.parmEntityRef;
-// } catch (Exception e) {
-// return null;
-// }
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setParmEntityRef(DTDParameterEntityReference l) {
-// refSetValueForSVReference(DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef(),this.parmEntityRef,l);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetParmEntityRef() {
-// refUnsetValueForSVReference(DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef(),this.parmEntityRef);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetParmEntityRef() {
-// return setParmEntityRef;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public EList getEntityReference() {
-// if (this.entityReference==null) {
-// this.entityReference=newCollection(this,DTDPackage.eINSTANCE.getDTDEntity_EntityReference(),
-// true);
-// }
-// return this.entityReference;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public EList getAttributeNameReference() {
-// if (this.attributeNameReference==null) {
-// this.attributeNameReference=newCollection(this,DTDPackage.eINSTANCE.getDTDEntity_AttributeNameReference(),
-// true);
-// }
-// return this.attributeNameReference;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public EList getAttributeTypeReference() {
-// if (this.attributeTypeReference==null) {
-// this.attributeTypeReference=newCollection(this,DTDPackage.eINSTANCE.getDTDEntity_AttributeTypeReference(),
-// true);
-// }
-// return this.attributeTypeReference;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Object eGet(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eGet(feature);
-// }
-// switch (eClassDTDEntity().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_ENTITY__COMMENT: return getComment();
-// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: return getParameterEntity();
-// case DTDPackage.DTD_ENTITY__CONTENT: return getContent();
-// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: return getParmEntityRef();
-// case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE: return getEntityReference();
-// case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE: return
-// getAttributeNameReference();
-// case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE: return
-// getAttributeTypeReference();
-// case DTDPackage.DTD_ENTITY__DTD_FILE: return getDTDFile();
-//
-// }
-// return super.eGet(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Object refBasicValue(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.refBasicValue(feature);
-// }
-// switch (eClassDTDEntity().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_ENTITY__COMMENT:
-// return this.setComment? this.comment : null;
-// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY:
-// return this.setParameterEntity? this.parameterEntity : null;
-// case DTDPackage.DTD_ENTITY__CONTENT:
-// if (!this.setContent||this.content==null) return null;
-// if (((InternalEObject)this.content).refIsDeleted()) {this.content=null;
-// this.setContent=false;}
-// return this.content;
-// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF:
-// if (!this.setParmEntityRef||this.parmEntityRef==null) return null;
-// if (((InternalEObject)this.parmEntityRef).refIsDeleted())
-// {this.parmEntityRef=null; this.setParmEntityRef=false;}
-// return this.parmEntityRef;
-// case DTDPackage.DTD_ENTITY__ENTITY_REFERENCE:
-// return this.entityReference;
-// case DTDPackage.DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE:
-// return this.attributeNameReference;
-// case DTDPackage.DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE:
-// return this.attributeTypeReference;
-// case DTDPackage.DTD_ENTITY__DTD_FILE: return
-// ((InternalEObject)getDtdContentDelegate()).refBasicValue(feature);
-//
-// }
-// return super.refBasicValue(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean eIsSet(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eIsSet(feature);
-// }
-// switch (eClassDTDEntity().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_ENTITY__COMMENT: return isSetComment();
-// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: return
-// isSetParameterEntity();
-// case DTDPackage.DTD_ENTITY__CONTENT: return isSetContent();
-// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: return isSetParmEntityRef();
-// case DTDPackage.DTD_ENTITY__DTD_FILE: return isSetDTDFile();
-//
-// }
-// return super.eIsSet(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void eSet(EStructuralFeature feature, Object newValue) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// super.eSet(feature, newValue);
-// }
-// switch (eClassDTDEntity().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_ENTITY__COMMENT: {
-// setComment((String)newValue);
-// return;
-// }
-// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: {
-// setParameterEntity((newValue instanceof
-// String)?Boolean.valueOf((String)newValue):(Boolean)newValue);
-// return;
-// }
-// case DTDPackage.DTD_ENTITY__CONTENT: {
-// setContent((DTDEntityContent)newValue);
-// return;
-// }
-// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: {
-// setParmEntityRef((DTDParameterEntityReference)newValue);
-// return;
-// }
-// case DTDPackage.DTD_ENTITY__DTD_FILE: {
-// setDTDFile((DTDFile)newValue);
-// return;
-// }
-//
-// }
-// super.eSet(feature, newValue);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Notification eBasicSet(EStructuralFeature feature, Object newValue)
-// {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eBasicSet(feature, newValue);
-// }
-// switch (eClassDTDEntity().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_ENTITY__COMMENT: {
-// Object oldValue = this.comment;
-// this.comment = (String)newValue;
-// this.setComment = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_Comment(),oldValue,newValue);
-// }
-// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: {
-// Object oldValue = this.parameterEntity;
-// this.parameterEntity = (Boolean)newValue;
-// this.setParameterEntity = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity(),oldValue,newValue);
-// }
-// case DTDPackage.DTD_ENTITY__CONTENT: {
-// Object oldValue = this.content;
-// this.content = (DTDEntityContent)newValue;
-// this.setContent = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_Content(),oldValue,newValue);
-// }
-// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: {
-// Object oldValue = this.parmEntityRef;
-// this.parmEntityRef = (DTDParameterEntityReference)newValue;
-// this.setParmEntityRef = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef(),oldValue,newValue);
-// }
-//
-// }
-// return super.eBasicSet(feature, newValue);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void eUnset(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// super.eUnset(feature);
-// }
-// switch (eClassDTDEntity().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_ENTITY__COMMENT: {
-// unsetComment();
-// return;
-// }
-// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: {
-// unsetParameterEntity();
-// return;
-// }
-// case DTDPackage.DTD_ENTITY__CONTENT: {
-// unsetContent();
-// return;
-// }
-// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: {
-// unsetParmEntityRef();
-// return;
-// }
-// case DTDPackage.DTD_ENTITY__DTD_FILE: {
-// unsetDTDFile();
-// return;
-// }
-//
-// }
-// super.eUnset(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Notification refBasicUnsetValue(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.refBasicUnsetValue(feature);
-// }
-// switch (eClassDTDEntity().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_ENTITY__COMMENT: {
-// Object oldValue = this.comment;
-// this.comment = null;
-// this.setComment = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_Comment(),oldValue,getComment());
-// }
-// case DTDPackage.DTD_ENTITY__PARAMETER_ENTITY: {
-// Object oldValue = this.parameterEntity;
-// this.parameterEntity = null;
-// this.setParameterEntity = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_ParameterEntity(),oldValue,getParameterEntity());
-// }
-// case DTDPackage.DTD_ENTITY__CONTENT: {
-// Object oldValue = this.content;
-// this.content = null;
-// this.setContent = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_Content(),oldValue,null);
-// }
-// case DTDPackage.DTD_ENTITY__PARM_ENTITY_REF: {
-// Object oldValue = this.parmEntityRef;
-// this.parmEntityRef = null;
-// this.setParmEntityRef = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDEntity_ParmEntityRef(),oldValue,null);
-// }
-//
-// }
-// return super.refBasicUnsetValue(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected DTDContentImpl getDtdContentDelegate() {
-// if (dtdContentDelegate == null) {
-// DTDPackage pkg =
-// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI);
-// dtdContentDelegate=(DTDContentImpl)pkg.eCreateInstance(pkg.DTD_CONTENT);
-// dtdContentDelegate.initInstance();
-// }
-// return dtdContentDelegate;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EClass eClassDTDContent() {
-// return getDtdContentDelegate().eClass();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public DTDFile getDTDFile() {
-// return getDtdContentDelegate().getDTDFile();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setDTDFile(DTDFile value) {
-// getDtdContentDelegate().setDTDFile(value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetDTDFile() {
-// getDtdContentDelegate().unsetDTDFile();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetDTDFile() {
-// return getDtdContentDelegate().isSetDTDFile();
-// }
-// }
-// -------------------GENERICRULES.JSED-------------------
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityReferenceContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityReferenceContentImpl.java
deleted file mode 100644
index 3e97fff8aa..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityReferenceContentImpl.java
+++ /dev/null
@@ -1,323 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.notify.impl.NotificationChainImpl;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-
-/**
- * @generated
- */
-public class DTDEntityReferenceContentImpl extends DTDRepeatableContentImpl implements DTDEntityReferenceContent {
-
- public DTDEntityReferenceContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDEntityReferenceContent();
- }
-
- public String getContentName() {
- DTDEntity e = getElementReferencedEntity();
- if (e == null)
- return ""; //$NON-NLS-1$
- return e.getName();
- }
-
- public String unparseRepeatableContent() {
- DTDEntity entityRef = getElementReferencedEntity();
- if (entityRef.isParameterEntity()) {
- return "%" + getContentName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- return "&" + getContentName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- // ugly hack for now since we don't have multiple inheritance.
- // Would rather have all this stuff in a base class but these
- // classes are inheriting from sometimes different mof classes
- DTDLexicalInfo lexInfo = new DTDLexicalInfo();
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DTDEntity elementReferencedEntity = null;
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset() {
- return lexInfo.getStartOffset();
- }
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v) {
- lexInfo.setStartOffset(v);
- }
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset() {
- return lexInfo.getEndOffset();
- }
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v) {
- lexInfo.setEndOffset(v);
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDEntity getElementReferencedEntity() {
- if (elementReferencedEntity != null && elementReferencedEntity.eIsProxy()) {
- DTDEntity oldElementReferencedEntity = elementReferencedEntity;
- elementReferencedEntity = (DTDEntity) EcoreUtil.resolve(elementReferencedEntity, this);
- if (elementReferencedEntity != oldElementReferencedEntity) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY, oldElementReferencedEntity, elementReferencedEntity));
- }
- }
- return elementReferencedEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntity basicGetElementReferencedEntity() {
- return elementReferencedEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetElementReferencedEntity(DTDEntity newElementReferencedEntity, NotificationChain msgs) {
- DTDEntity oldElementReferencedEntity = elementReferencedEntity;
- elementReferencedEntity = newElementReferencedEntity;
- if (eNotificationRequired()) {
- if (msgs == null)
- msgs = new NotificationChainImpl(4);
- msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY, oldElementReferencedEntity, newElementReferencedEntity));
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setElementReferencedEntity(DTDEntity newElementReferencedEntity) {
- if (newElementReferencedEntity != elementReferencedEntity) {
- NotificationChain msgs = null;
- if (elementReferencedEntity != null)
- msgs = ((InternalEObject) elementReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ENTITY_REFERENCE, DTDEntity.class, msgs);
- if (newElementReferencedEntity != null)
- msgs = ((InternalEObject) newElementReferencedEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__ENTITY_REFERENCE, DTDEntity.class, msgs);
- msgs = basicSetElementReferencedEntity(newElementReferencedEntity, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY, newElementReferencedEntity, newElementReferencedEntity));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT, msgs);
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY :
- if (elementReferencedEntity != null)
- msgs = ((InternalEObject) elementReferencedEntity).eInverseRemove(this, DTDPackage.DTD_ENTITY__ENTITY_REFERENCE, DTDEntity.class, msgs);
- return basicSetElementReferencedEntity((DTDEntity) otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP :
- return eBasicSetContainer(null, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT, msgs);
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY :
- return basicSetElementReferencedEntity(null, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP :
- return getGroup();
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT :
- return getElement();
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE :
- return getOccurrence();
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY :
- if (resolve)
- return getElementReferencedEntity();
- return basicGetElementReferencedEntity();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP :
- return getGroup() != null;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT :
- return getElement() != null;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE :
- return occurrence != OCCURRENCE_EDEFAULT;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY :
- return elementReferencedEntity != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP :
- setGroup((DTDGroupContent) newValue);
- return;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT :
- setElement((DTDElement) newValue);
- return;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE :
- setOccurrence((DTDOccurrenceType) newValue);
- return;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY :
- setElementReferencedEntity((DTDEntity) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__GROUP :
- setGroup((DTDGroupContent) null);
- return;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT :
- setElement((DTDElement) null);
- return;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__OCCURRENCE :
- setOccurrence(OCCURRENCE_EDEFAULT);
- return;
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY :
- setElementReferencedEntity((DTDEntity) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEnumerationTypeImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEnumerationTypeImpl.java
deleted file mode 100644
index a93f6531d4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEnumerationTypeImpl.java
+++ /dev/null
@@ -1,362 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EEnumImpl;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.dtd.core.internal.DTDCoreMessages;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-
-/**
- * @generated
- */
-public class DTDEnumerationTypeImpl extends EEnumImpl implements DTDEnumerationType {
- /**
- * The default value of the '{@link #getKind() <em>Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getKind()
- * @generated
- * @ordered
- */
- protected static final DTDEnumGroupKind KIND_EDEFAULT = DTDEnumGroupKind.NAME_TOKEN_GROUP_LITERAL;
-
- public final static String enumerationTypeDescriptions[] = {DTDCoreMessages._UI_ENUM_NAME_TOKENS_DESC, DTDCoreMessages._UI_ENUM_NOTATION_DESC}; //$NON-NLS-1$ //$NON-NLS-2$
-
- public final static int enumerationTypeKinds[] = {DTDEnumGroupKind.NAME_TOKEN_GROUP, DTDEnumGroupKind.NOTATION_GROUP};
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DTDEnumGroupKind kind = KIND_EDEFAULT;
-
- public DTDEnumerationTypeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDEnumerationType();
- }
-
- public EList getEnumLiterals() {
- return getELiterals();
- }
-
- public String getEnumerationTypeDescription() {
- return getEnumerationTypeDescription(getKind().getValue());
- }
-
- public static String getEnumerationTypeDescription(int kind) {
- // it can only be 1 or 2, but maybe later...
- if (kind >= 1 && kind <= 2) {
- // we subtract 1 since the kind is 1 - based not zero based
- return enumerationTypeDescriptions[kind - 1];
- }
- return null;
- }
-
- public String getPathname() {
- // TBD
- return ""; //$NON-NLS-1$
- }
-
- public DTDObject findObject(String relativePath) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDEnumGroupKind getKind() {
- return kind;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setKind(DTDEnumGroupKind newKind) {
- DTDEnumGroupKind oldKind = kind;
- kind = newKind == null ? KIND_EDEFAULT : newKind;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENUMERATION_TYPE__KIND, oldKind, kind));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDFile getDTDFile() {
- if (eContainerFeatureID != DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE)
- return null;
- return (DTDFile) eContainer;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDTDFile(DTDFile newDTDFile) {
- if (newDTDFile != eContainer || (eContainerFeatureID != DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE && newDTDFile != null)) {
- if (EcoreUtil.isAncestor(this, newDTDFile))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString() + "."); //$NON-NLS-1$ //$NON-NLS-2$
- NotificationChain msgs = null;
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newDTDFile != null)
- msgs = ((InternalEObject) newDTDFile).eInverseAdd(this, DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE, DTDFile.class, msgs);
- msgs = eBasicSetContainer((InternalEObject) newDTDFile, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE, newDTDFile, newDTDFile));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS :
- return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE, msgs);
- case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS :
- return ((InternalEList) getELiterals()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS :
- return ((InternalEList) getEAnnotations()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE :
- return eBasicSetContainer(null, DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE, msgs);
- case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS :
- return ((InternalEList) getELiterals()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE :
- return eBasicSetContainer(null, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE :
- return eContainer.eInverseRemove(this, EcorePackage.EPACKAGE__ECLASSIFIERS, EPackage.class, msgs);
- case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE, DTDFile.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS :
- return getEAnnotations();
- case DTDPackage.DTD_ENUMERATION_TYPE__NAME :
- return getName();
- case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME :
- return getInstanceClassName();
- case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS :
- return getInstanceClass();
- case DTDPackage.DTD_ENUMERATION_TYPE__DEFAULT_VALUE :
- return getDefaultValue();
- case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE :
- return getEPackage();
- case DTDPackage.DTD_ENUMERATION_TYPE__SERIALIZABLE :
- return isSerializable() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS :
- return getELiterals();
- case DTDPackage.DTD_ENUMERATION_TYPE__KIND :
- return getKind();
- case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE :
- return getDTDFile();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS :
- return eAnnotations != null && !getEAnnotations().isEmpty();
- case DTDPackage.DTD_ENUMERATION_TYPE__NAME :
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME :
- return INSTANCE_CLASS_NAME_EDEFAULT == null ? instanceClassName != null : !INSTANCE_CLASS_NAME_EDEFAULT.equals(instanceClassName);
- case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS :
- return INSTANCE_CLASS_EDEFAULT == null ? instanceClass != null : !INSTANCE_CLASS_EDEFAULT.equals(instanceClass);
- case DTDPackage.DTD_ENUMERATION_TYPE__DEFAULT_VALUE :
- return getDefaultValue() != null;
- case DTDPackage.DTD_ENUMERATION_TYPE__EPACKAGE :
- return getEPackage() != null;
- case DTDPackage.DTD_ENUMERATION_TYPE__SERIALIZABLE :
- return ((eFlags & SERIALIZABLE_EFLAG) != 0) != SERIALIZABLE_EDEFAULT;
- case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS :
- return eLiterals != null && !getELiterals().isEmpty();
- case DTDPackage.DTD_ENUMERATION_TYPE__KIND :
- return kind != KIND_EDEFAULT;
- case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE :
- return getDTDFile() != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS :
- getEAnnotations().clear();
- getEAnnotations().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__NAME :
- setName((String) newValue);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME :
- setInstanceClassName((String) newValue);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS :
- setInstanceClass((Class) newValue);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__SERIALIZABLE :
- setSerializable(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS :
- getELiterals().clear();
- getELiterals().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__KIND :
- setKind((DTDEnumGroupKind) newValue);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE :
- setDTDFile((DTDFile) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_ENUMERATION_TYPE__EANNOTATIONS :
- getEAnnotations().clear();
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__NAME :
- setName(NAME_EDEFAULT);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS_NAME :
- setInstanceClassName(INSTANCE_CLASS_NAME_EDEFAULT);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__INSTANCE_CLASS :
- setInstanceClass(INSTANCE_CLASS_EDEFAULT);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__SERIALIZABLE :
- setSerializable(SERIALIZABLE_EDEFAULT);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__ELITERALS :
- getELiterals().clear();
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__KIND :
- setKind(KIND_EDEFAULT);
- return;
- case DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE :
- setDTDFile((DTDFile) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (kind: "); //$NON-NLS-1$
- result.append(kind);
- result.append(')');
- return result.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDExternalEntityImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDExternalEntityImpl.java
deleted file mode 100644
index 7bb5d03af3..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDExternalEntityImpl.java
+++ /dev/null
@@ -1,400 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.notify.impl.NotificationChainImpl;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-
-/**
- * @generated
- */
-public class DTDExternalEntityImpl extends DTDEntityContentImpl implements DTDExternalEntity {
- /**
- * The default value of the '{@link #getSystemID() <em>System ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getSystemID()
- * @generated
- * @ordered
- */
- protected static final String SYSTEM_ID_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String systemID = SYSTEM_ID_EDEFAULT;
- /**
- * The default value of the '{@link #getPublicID() <em>Public ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getPublicID()
- * @generated
- * @ordered
- */
- protected static final String PUBLIC_ID_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String publicID = PUBLIC_ID_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DTDNotation notation = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DTDFile entityReferencedFromAnotherFile = null;
-
- public DTDExternalEntityImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDExternalEntity();
- }
-
- public String unparse() {
- StringBuffer text = new StringBuffer(100);
- if (getPublicID() == null || getPublicID().equals("")) { //$NON-NLS-1$
- text.append("SYSTEM "); //$NON-NLS-1$
- }
- else {
- text.append("PUBLIC \"").append(getPublicID()).append("\" "); //$NON-NLS-1$ //$NON-NLS-2$
- }
- String systemId = getSystemID();
-
- text.append("\"").append(systemId).append("\""); //$NON-NLS-1$ //$NON-NLS-2$
-
- DTDNotation notation = getNotation();
- if (notation != null)
- text.append(" NDATA ").append(notation.getName()); //$NON-NLS-1$
-
- return text.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getSystemID() {
- return systemID;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setSystemID(String newSystemID) {
- String oldSystemID = systemID;
- systemID = newSystemID;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID, oldSystemID, systemID));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getPublicID() {
- return publicID;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setPublicID(String newPublicID) {
- String oldPublicID = publicID;
- publicID = newPublicID;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID, oldPublicID, publicID));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDNotation getNotation() {
- if (notation != null && notation.eIsProxy()) {
- DTDNotation oldNotation = notation;
- notation = (DTDNotation) EcoreUtil.resolve(notation, this);
- if (notation != oldNotation) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION, oldNotation, notation));
- }
- }
- return notation;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDNotation basicGetNotation() {
- return notation;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetNotation(DTDNotation newNotation, NotificationChain msgs) {
- DTDNotation oldNotation = notation;
- notation = newNotation;
- if (eNotificationRequired()) {
- if (msgs == null)
- msgs = new NotificationChainImpl(4);
- msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION, oldNotation, newNotation));
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setNotation(DTDNotation newNotation) {
- if (newNotation != notation) {
- NotificationChain msgs = null;
- if (notation != null)
- msgs = ((InternalEObject) notation).eInverseRemove(this, DTDPackage.DTD_NOTATION__ENTITY, DTDNotation.class, msgs);
- if (newNotation != null)
- msgs = ((InternalEObject) newNotation).eInverseAdd(this, DTDPackage.DTD_NOTATION__ENTITY, DTDNotation.class, msgs);
- msgs = basicSetNotation(newNotation, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION, newNotation, newNotation));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDFile getEntityReferencedFromAnotherFile() {
- if (entityReferencedFromAnotherFile != null && entityReferencedFromAnotherFile.eIsProxy()) {
- DTDFile oldEntityReferencedFromAnotherFile = entityReferencedFromAnotherFile;
- entityReferencedFromAnotherFile = (DTDFile) EcoreUtil.resolve(entityReferencedFromAnotherFile, this);
- if (entityReferencedFromAnotherFile != oldEntityReferencedFromAnotherFile) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE, oldEntityReferencedFromAnotherFile, entityReferencedFromAnotherFile));
- }
- }
- return entityReferencedFromAnotherFile;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDFile basicGetEntityReferencedFromAnotherFile() {
- return entityReferencedFromAnotherFile;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setEntityReferencedFromAnotherFile(DTDFile newEntityReferencedFromAnotherFile) {
- DTDFile oldEntityReferencedFromAnotherFile = entityReferencedFromAnotherFile;
- entityReferencedFromAnotherFile = newEntityReferencedFromAnotherFile;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE, oldEntityReferencedFromAnotherFile, entityReferencedFromAnotherFile));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY, msgs);
- case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION :
- if (notation != null)
- msgs = ((InternalEObject) notation).eInverseRemove(this, DTDPackage.DTD_NOTATION__ENTITY, DTDNotation.class, msgs);
- return basicSetNotation((DTDNotation) otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY :
- return eBasicSetContainer(null, DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY, msgs);
- case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION :
- return basicSetNotation(null, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ENTITY__CONTENT, DTDEntity.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY :
- return getDTDEntity();
- case DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID :
- return getSystemID();
- case DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID :
- return getPublicID();
- case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION :
- if (resolve)
- return getNotation();
- return basicGetNotation();
- case DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE :
- if (resolve)
- return getEntityReferencedFromAnotherFile();
- return basicGetEntityReferencedFromAnotherFile();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY :
- return getDTDEntity() != null;
- case DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID :
- return SYSTEM_ID_EDEFAULT == null ? systemID != null : !SYSTEM_ID_EDEFAULT.equals(systemID);
- case DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID :
- return PUBLIC_ID_EDEFAULT == null ? publicID != null : !PUBLIC_ID_EDEFAULT.equals(publicID);
- case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION :
- return notation != null;
- case DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE :
- return entityReferencedFromAnotherFile != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY :
- setDTDEntity((DTDEntity) newValue);
- return;
- case DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID :
- setSystemID((String) newValue);
- return;
- case DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID :
- setPublicID((String) newValue);
- return;
- case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION :
- setNotation((DTDNotation) newValue);
- return;
- case DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE :
- setEntityReferencedFromAnotherFile((DTDFile) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_EXTERNAL_ENTITY__DTD_ENTITY :
- setDTDEntity((DTDEntity) null);
- return;
- case DTDPackage.DTD_EXTERNAL_ENTITY__SYSTEM_ID :
- setSystemID(SYSTEM_ID_EDEFAULT);
- return;
- case DTDPackage.DTD_EXTERNAL_ENTITY__PUBLIC_ID :
- setPublicID(PUBLIC_ID_EDEFAULT);
- return;
- case DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION :
- setNotation((DTDNotation) null);
- return;
- case DTDPackage.DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE :
- setEntityReferencedFromAnotherFile((DTDFile) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (systemID: "); //$NON-NLS-1$
- result.append(systemID);
- result.append(", publicID: "); //$NON-NLS-1$
- result.append(publicID);
- result.append(')');
- return result.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFactoryImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFactoryImpl.java
deleted file mode 100644
index a2defc4d33..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFactoryImpl.java
+++ /dev/null
@@ -1,448 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFactory;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.DTDType;
-import org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType;
-
-/**
- * @generated
- */
-public class DTDFactoryImpl extends EFactoryImpl implements DTDFactory {
- protected DTDBasicType dtdBasicType_NONE;
- protected DTDBasicType dtdBasicType_CDATA;
- protected DTDBasicType dtdBasicType_ID;
- protected DTDBasicType dtdBasicType_IDREF;
- protected DTDBasicType dtdBasicType_IDREFS;
- protected DTDBasicType dtdBasicType_ENTITY;
- protected DTDBasicType dtdBasicType_ENTITIES;
- protected DTDBasicType dtdBasicType_NMTOKEN;
- protected DTDBasicType dtdBasicType_NMTOKENS;
-
-
-
- public static DTDFactory instance() {
- return (DTDFactory) getPackage().getEFactoryInstance();
- }
-
- /**
- * Gets the dtdBasicType_NONE.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_NONE() {
- if (dtdBasicType_NONE == null) {
- (dtdBasicType_NONE = createDTDBasicType()).setKind(DTDBasicTypeKind.CDATA_LITERAL);
- }
- return dtdBasicType_NONE;
- }
-
- /**
- * Gets the dtdBasicType_CDATA.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_CDATA() {
- if (dtdBasicType_CDATA == null) {
- (dtdBasicType_CDATA = createDTDBasicType()).setKind(DTDBasicTypeKind.CDATA_LITERAL);
- }
- return dtdBasicType_CDATA;
- }
-
- /**
- * Gets the dtdBasicType_ID.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_ID() {
- if (dtdBasicType_ID == null) {
- (dtdBasicType_ID = createDTDBasicType()).setKind(DTDBasicTypeKind.ID_LITERAL);
- }
- return dtdBasicType_ID;
- }
-
- /**
- * Gets the dtdBasicType_IDREF.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_IDREF() {
- if (dtdBasicType_IDREF == null) {
- (dtdBasicType_IDREF = createDTDBasicType()).setKind(DTDBasicTypeKind.IDREF_LITERAL);
- }
- return dtdBasicType_IDREF;
- }
-
- /**
- * Gets the dtdBasicType_IDREFS.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_IDREFS() {
- if (dtdBasicType_IDREFS == null) {
- (dtdBasicType_IDREFS = createDTDBasicType()).setKind(DTDBasicTypeKind.IDREFS_LITERAL);
- }
- return dtdBasicType_IDREFS;
- }
-
- /**
- * Gets the dtdBasicType_ENTITY.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_ENTITY() {
- if (dtdBasicType_ENTITY == null) {
- (dtdBasicType_ENTITY = createDTDBasicType()).setKind(DTDBasicTypeKind.ENTITY_LITERAL);
- }
- return dtdBasicType_ENTITY;
- }
-
- /**
- * Gets the dtdBasicType_ENTITIES.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_ENTITIES() {
- if (dtdBasicType_ENTITIES == null) {
- (dtdBasicType_ENTITIES = createDTDBasicType()).setKind(DTDBasicTypeKind.ENTITIES_LITERAL);
- }
- return dtdBasicType_ENTITIES;
- }
-
- /**
- * Gets the dtdBasicType_NMTOKEN.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_NMTOKEN() {
- if (dtdBasicType_NMTOKEN == null) {
- (dtdBasicType_NMTOKEN = createDTDBasicType()).setKind(DTDBasicTypeKind.NMTOKEN_LITERAL);
- }
- return dtdBasicType_NMTOKEN;
- }
-
- /**
- * Gets the dtdBasicType_NMTOKENS.
- *
- * @return Returns a DTDType
- */
- public DTDType getDTDBasicType_NMTOKENS() {
- if (dtdBasicType_NMTOKENS == null) {
- (dtdBasicType_NMTOKENS = createDTDBasicType()).setKind(DTDBasicTypeKind.NMTOKENS_LITERAL);
- }
- return dtdBasicType_NMTOKENS;
- }
-
- /**
- * Creates and instance of the factory. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public DTDFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case DTDPackage.DTD_GROUP_CONTENT :
- return createDTDGroupContent();
- case DTDPackage.DTD_ATTRIBUTE :
- return createDTDAttribute();
- case DTDPackage.DTD_ELEMENT :
- return createDTDElement();
- case DTDPackage.DTD_EMPTY_CONTENT :
- return createDTDEmptyContent();
- case DTDPackage.DTD_ANY_CONTENT :
- return createDTDAnyContent();
- case DTDPackage.DTD_PC_DATA_CONTENT :
- return createDTDPCDataContent();
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT :
- return createDTDElementReferenceContent();
- case DTDPackage.DTD_FILE :
- return createDTDFile();
- case DTDPackage.DTD_BASIC_TYPE :
- return createDTDBasicType();
- case DTDPackage.DTD_ENUMERATION_TYPE :
- return createDTDEnumerationType();
- case DTDPackage.DTD_NOTATION :
- return createDTDNotation();
- case DTDPackage.DTD_ENTITY :
- return createDTDEntity();
- case DTDPackage.DTD_EXTERNAL_ENTITY :
- return createDTDExternalEntity();
- case DTDPackage.DTD_INTERNAL_ENTITY :
- return createDTDInternalEntity();
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE :
- return createDTDParameterEntityReference();
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT :
- return createDTDEntityReferenceContent();
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case DTDPackage.DTD_OCCURRENCE_TYPE :
- return DTDOccurrenceType.get(initialValue);
- case DTDPackage.DTD_DEFAULT_KIND :
- return DTDDefaultKind.get(initialValue);
- case DTDPackage.DTD_BASIC_TYPE_KIND :
- return DTDBasicTypeKind.get(initialValue);
- case DTDPackage.DTD_ENUM_GROUP_KIND :
- return DTDEnumGroupKind.get(initialValue);
- case DTDPackage.DTD_GROUP_KIND :
- return DTDGroupKind.get(initialValue);
- case DTDPackage.XML_SCHEMA_DEFINED_TYPE :
- return XMLSchemaDefinedType.get(initialValue);
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case DTDPackage.DTD_OCCURRENCE_TYPE :
- return instanceValue == null ? null : instanceValue.toString();
- case DTDPackage.DTD_DEFAULT_KIND :
- return instanceValue == null ? null : instanceValue.toString();
- case DTDPackage.DTD_BASIC_TYPE_KIND :
- return instanceValue == null ? null : instanceValue.toString();
- case DTDPackage.DTD_ENUM_GROUP_KIND :
- return instanceValue == null ? null : instanceValue.toString();
- case DTDPackage.DTD_GROUP_KIND :
- return instanceValue == null ? null : instanceValue.toString();
- case DTDPackage.XML_SCHEMA_DEFINED_TYPE :
- return instanceValue == null ? null : instanceValue.toString();
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDGroupContent createDTDGroupContent() {
- DTDGroupContentImpl dtdGroupContent = new DTDGroupContentImpl();
- return dtdGroupContent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDAttribute createDTDAttribute() {
- DTDAttributeImpl dtdAttribute = new DTDAttributeImpl();
- return dtdAttribute;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDElement createDTDElement() {
- DTDElementImpl dtdElement = new DTDElementImpl();
- return dtdElement;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEmptyContent createDTDEmptyContent() {
- DTDEmptyContentImpl dtdEmptyContent = new DTDEmptyContentImpl();
- return dtdEmptyContent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDAnyContent createDTDAnyContent() {
- DTDAnyContentImpl dtdAnyContent = new DTDAnyContentImpl();
- return dtdAnyContent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDPCDataContent createDTDPCDataContent() {
- DTDPCDataContentImpl dtdpcDataContent = new DTDPCDataContentImpl();
- return dtdpcDataContent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDElementReferenceContent createDTDElementReferenceContent() {
- DTDElementReferenceContentImpl dtdElementReferenceContent = new DTDElementReferenceContentImpl();
- return dtdElementReferenceContent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDFile createDTDFile() {
- DTDFileImpl dtdFile = new DTDFileImpl();
- return dtdFile;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDBasicType createDTDBasicType() {
- DTDBasicTypeImpl dtdBasicType = new DTDBasicTypeImpl();
- return dtdBasicType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEnumerationType createDTDEnumerationType() {
- DTDEnumerationTypeImpl dtdEnumerationType = new DTDEnumerationTypeImpl();
- return dtdEnumerationType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDNotation createDTDNotation() {
- DTDNotationImpl dtdNotation = new DTDNotationImpl();
- return dtdNotation;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntity createDTDEntity() {
- DTDEntityImpl dtdEntity = new DTDEntityImpl();
- return dtdEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDExternalEntity createDTDExternalEntity() {
- DTDExternalEntityImpl dtdExternalEntity = new DTDExternalEntityImpl();
- return dtdExternalEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDInternalEntity createDTDInternalEntity() {
- DTDInternalEntityImpl dtdInternalEntity = new DTDInternalEntityImpl();
- return dtdInternalEntity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDParameterEntityReference createDTDParameterEntityReference() {
- DTDParameterEntityReferenceImpl dtdParameterEntityReference = new DTDParameterEntityReferenceImpl();
- return dtdParameterEntityReference;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntityReferenceContent createDTDEntityReferenceContent() {
- DTDEntityReferenceContentImpl dtdEntityReferenceContent = new DTDEntityReferenceContentImpl();
- return dtdEntityReferenceContent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDPackage getDTDPackage() {
- return (DTDPackage) getEPackage();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static DTDPackage getPackage() {
- return DTDPackage.eINSTANCE;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFileImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFileImpl.java
deleted file mode 100644
index 0c846dc606..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFileImpl.java
+++ /dev/null
@@ -1,821 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENamedElementImpl;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPrinter;
-
-
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>File</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl#isParseError <em>Parse Error</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl#getDTDContent <em>DTD Content</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDFileImpl#getDTDEnumerationType <em>DTD Enumeration Type</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DTDFileImpl extends ENamedElementImpl implements DTDFile, ENamedElement {
-
- public EList getDTDObject() {
- return getDTDContent();
- }
-
-
- public List listDTDElement() {
- return getContentListOf(DTDElement.class, null);
- }
-
-
- public List listDTDNotation() {
- return getContentListOf(DTDNotation.class, null);
- }
-
- public List listDTDEntity() {
- return getContentListOf(DTDEntity.class, null);
- }
-
- public List listDTDParameterEntityReference() {
- return getContentListOf(DTDParameterEntityReference.class, null);
- }
-
- public List listDTDElementAndDTDParameterEntityReference() {
- return getContentListOf(DTDElement.class, DTDParameterEntityReference.class);
- }
-
- private List getContentListOf(Class class1, Class class2) {
- List v = new ArrayList();
- Iterator i = getDTDContent().iterator();
- while (i.hasNext()) {
- Object obj = i.next();
- if (class1.isInstance(obj)) {
- v.add(obj);
- }
- else if ((class2 != null) && (class2.isInstance(obj))) {
- v.add(obj);
- }
- }
- return v;
- }
-
- public DTDElement findElement(String name) {
- for (Iterator i = listDTDElement().iterator(); i.hasNext();) {
- DTDElement e = (DTDElement) i.next();
- if (e.getName().equals(name)) {
- return e;
- }
- }
- return null;
- }
-
- public DTDEntity findEntity(String name) {
- for (Iterator i = listDTDEntity().iterator(); i.hasNext();) {
- DTDEntity e = (DTDEntity) i.next();
- if (e.getName().equals(name)) {
- return e;
- }
- }
- return null;
- }
-
- public DTDNotation findNotation(String name) {
- for (Iterator i = listDTDNotation().iterator(); i.hasNext();) {
- DTDNotation e = (DTDNotation) i.next();
- if (e.getName().equals(name)) {
- return e;
- }
- }
- return null;
- }
-
- public DTDParameterEntityReference findParameterEntityReference(String name) {
- for (Iterator i = listDTDParameterEntityReference().iterator(); i.hasNext();) {
- DTDParameterEntityReference e = (DTDParameterEntityReference) i.next();
- if (e.getName().equals(name)) {
- return e;
- }
- }
- return null;
- }
-
- public String unparse(boolean include) {
- DTDPrinter printer = new DTDPrinter(true);
- printer.visitDTDFile(this);
- return printer.getBuffer().toString();
- }
-
-
- public String getPathname() {
- return ""; //$NON-NLS-1$
- }
-
-
- public DTDObject findObject(String relativePath) {
- Object[] result = DTDPathnameUtil.parsePathComponent(relativePath);
-
-
- String type = (String) result[0];
-
-
- if (type == null)
- return null;
-
-
- String name = (String) result[1];
-
- DTDObject obj = null;
- if (type.equals("Elem")) { //$NON-NLS-1$
- obj = findElement(name);
- }
- else if (type.equals("Ent")) { //$NON-NLS-1$
- obj = findEntity(name);
- }
- else if (type.equals("PEnt")) { //$NON-NLS-1$
- obj = findParameterEntityReference(name);
- }
- else if (type.equals("Nota")) { //$NON-NLS-1$
- obj = findNotation(name);
- }
- else {
- return null;
- }
-
-
- String restPath = (String) result[3];
-
- if ((restPath == null) || (obj == null)) {
- return obj;
- }
- else {
- return obj.findObject(restPath);
- }
- }
-
-
-
- /**
- * The default value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected static final String COMMENT_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected String comment = COMMENT_EDEFAULT;
-
- /**
- * The default value of the '{@link #isParseError() <em>Parse Error</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #isParseError()
- * @generated
- * @ordered
- */
- protected static final boolean PARSE_ERROR_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isParseError() <em>Parse Error</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #isParseError()
- * @generated
- * @ordered
- */
- protected boolean parseError = PARSE_ERROR_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getDTDContent() <em>DTD Content</em>}'
- * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @see #getDTDContent()
- * @generated
- * @ordered
- */
- protected EList dtdContent = null;
-
- /**
- * The cached value of the '{@link #getDTDEnumerationType() <em>DTD Enumeration Type</em>}'
- * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @see #getDTDEnumerationType()
- * @generated
- * @ordered
- */
- protected EList dtdEnumerationType = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DTDFileImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDFile();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getComment() {
- return comment;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setComment(String newComment) {
- String oldComment = comment;
- comment = newComment;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_FILE__COMMENT, oldComment, comment));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean isParseError() {
- return parseError;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setParseError(boolean newParseError) {
- boolean oldParseError = parseError;
- parseError = newParseError;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_FILE__PARSE_ERROR, oldParseError, parseError));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList getDTDContent() {
- if (dtdContent == null) {
- dtdContent = new EObjectContainmentWithInverseEList(DTDContent.class, this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDPackage.DTD_CONTENT__DTD_FILE);
- }
- return dtdContent;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList getDTDEnumerationType() {
- if (dtdEnumerationType == null) {
- dtdEnumerationType = new EObjectContainmentWithInverseEList(DTDEnumerationType.class, this, DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE, DTDPackage.DTD_ENUMERATION_TYPE__DTD_FILE);
- }
- return dtdEnumerationType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_FILE__DTD_CONTENT :
- return ((InternalEList) getDTDContent()).basicAdd(otherEnd, msgs);
- case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE :
- return ((InternalEList) getDTDEnumerationType()).basicAdd(otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_FILE__DTD_CONTENT :
- return ((InternalEList) getDTDContent()).basicRemove(otherEnd, msgs);
- case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE :
- return ((InternalEList) getDTDEnumerationType()).basicRemove(otherEnd, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_FILE__COMMENT :
- return getComment();
- case DTDPackage.DTD_FILE__PARSE_ERROR :
- return isParseError() ? Boolean.TRUE : Boolean.FALSE;
- case DTDPackage.DTD_FILE__DTD_CONTENT :
- return getDTDContent();
- case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE :
- return getDTDEnumerationType();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_FILE__COMMENT :
- setComment((String) newValue);
- return;
- case DTDPackage.DTD_FILE__PARSE_ERROR :
- setParseError(((Boolean) newValue).booleanValue());
- return;
- case DTDPackage.DTD_FILE__DTD_CONTENT :
- getDTDContent().clear();
- getDTDContent().addAll((Collection) newValue);
- return;
- case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE :
- getDTDEnumerationType().clear();
- getDTDEnumerationType().addAll((Collection) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_FILE__COMMENT :
- setComment(COMMENT_EDEFAULT);
- return;
- case DTDPackage.DTD_FILE__PARSE_ERROR :
- setParseError(PARSE_ERROR_EDEFAULT);
- return;
- case DTDPackage.DTD_FILE__DTD_CONTENT :
- getDTDContent().clear();
- return;
- case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE :
- getDTDEnumerationType().clear();
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_FILE__COMMENT :
- return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
- case DTDPackage.DTD_FILE__PARSE_ERROR :
- return parseError != PARSE_ERROR_EDEFAULT;
- case DTDPackage.DTD_FILE__DTD_CONTENT :
- return dtdContent != null && !getDTDContent().isEmpty();
- case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE :
- return dtdEnumerationType != null && !getDTDEnumerationType().isEmpty();
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (comment: "); //$NON-NLS-1$
- result.append(comment);
- result.append(", parseError: "); //$NON-NLS-1$
- result.append(parseError);
- result.append(')');
- return result.toString();
- }
-
-} // DTDFileImpl
-
-// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
-//
-
-// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
-// //public class DTDFileImpl extends ENamespaceImpl implements DTDFile,
-// ENamespace{
-// -------------------GENERICRULES.JSED-------------------
-
-// public static final String copyright = "(c) Copyright IBM Corporation
-// 2002.";
-//
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected String comment = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected Boolean parseError = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected EList dtdContent = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected EList dtdEnumerationType = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setComment = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setParseError = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EObject initInstance() {
-// setEMetaObj(eClassDTDFile());
-// initInstanceDelegates();
-// return this;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public DTDPackage ePackageDTD() {
-// return
-// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EClass eClassDTDFile() {
-// return
-// ((DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI)).getDTDFile();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public String getComment() {
-// if (this.setComment) return this.comment;
-// else return
-// (String)DTDPackage.eINSTANCE.getDTDFile_Comment().getDefaultValue();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setComment(String value) {
-// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDFile_Comment(),this.comment,value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetComment() {
-// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDFile_Comment()));
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetComment() {
-// return setComment;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public Boolean getParseError() {
-// if (this.setParseError) return this.parseError;
-// else return
-// (Boolean)DTDPackage.eINSTANCE.getDTDFile_ParseError().getDefaultValue();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public boolean isParseError() {
-// Boolean result = getParseError();
-// return result != null ? result.booleanValue() : false;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setParseError(Boolean value) {
-// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDFile_ParseError(),this.parseError,value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setParseError(boolean value) {
-// setParseError(value?Boolean.TRUE:Boolean.FALSE);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetParseError() {
-// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDFile_ParseError()));
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetParseError() {
-// return setParseError;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public EList getDTDContent() {
-// if (this.dtdContent==null) {
-// this.dtdContent=newCollection(this,DTDPackage.eINSTANCE.getDTDFile_DTDContent(),
-// true);
-// }
-// return this.dtdContent;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public EList getDTDEnumerationType() {
-// if (this.dtdEnumerationType==null) {
-// this.dtdEnumerationType=newCollection(this,DTDPackage.eINSTANCE.getDTDFile_DTDEnumerationType(),
-// true);
-// }
-// return this.dtdEnumerationType;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Object eGet(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eGet(feature);
-// }
-// switch (eClassDTDFile().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_FILE__COMMENT: return getComment();
-// case DTDPackage.DTD_FILE__PARSE_ERROR: return getParseError();
-// case DTDPackage.DTD_FILE__DTD_CONTENT: return getDTDContent();
-// case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE: return
-// getDTDEnumerationType();
-//
-// }
-// return super.eGet(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Object refBasicValue(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.refBasicValue(feature);
-// }
-// switch (eClassDTDFile().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_FILE__COMMENT:
-// return this.setComment? this.comment : null;
-// case DTDPackage.DTD_FILE__PARSE_ERROR:
-// return this.setParseError? this.parseError : null;
-// case DTDPackage.DTD_FILE__DTD_CONTENT:
-// return this.dtdContent;
-// case DTDPackage.DTD_FILE__DTD_ENUMERATION_TYPE:
-// return this.dtdEnumerationType;
-//
-// }
-// return super.refBasicValue(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean eIsSet(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eIsSet(feature);
-// }
-// switch (eClassDTDFile().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_FILE__COMMENT: return isSetComment();
-// case DTDPackage.DTD_FILE__PARSE_ERROR: return isSetParseError();
-//
-// }
-// return super.eIsSet(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void eSet(EStructuralFeature feature, Object newValue) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// super.eSet(feature, newValue);
-// }
-// switch (eClassDTDFile().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_FILE__COMMENT: {
-// setComment((String)newValue);
-// return;
-// }
-// case DTDPackage.DTD_FILE__PARSE_ERROR: {
-// setParseError((newValue instanceof
-// String)?Boolean.valueOf((String)newValue):(Boolean)newValue);
-// return;
-// }
-//
-// }
-// super.eSet(feature, newValue);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Notification eBasicSet(EStructuralFeature feature, Object newValue)
-// {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eBasicSet(feature, newValue);
-// }
-// switch (eClassDTDFile().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_FILE__COMMENT: {
-// Object oldValue = this.comment;
-// this.comment = (String)newValue;
-// this.setComment = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDFile_Comment(),oldValue,newValue);
-// }
-// case DTDPackage.DTD_FILE__PARSE_ERROR: {
-// Object oldValue = this.parseError;
-// this.parseError = (Boolean)newValue;
-// this.setParseError = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDFile_ParseError(),oldValue,newValue);
-// }
-//
-// }
-// return super.eBasicSet(feature, newValue);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void eUnset(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// super.eUnset(feature);
-// }
-// switch (eClassDTDFile().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_FILE__COMMENT: {
-// unsetComment();
-// return;
-// }
-// case DTDPackage.DTD_FILE__PARSE_ERROR: {
-// unsetParseError();
-// return;
-// }
-//
-// }
-// super.eUnset(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Notification refBasicUnsetValue(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.refBasicUnsetValue(feature);
-// }
-// switch (eClassDTDFile().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_FILE__COMMENT: {
-// Object oldValue = this.comment;
-// this.comment = null;
-// this.setComment = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDFile_Comment(),oldValue,getComment());
-// }
-// case DTDPackage.DTD_FILE__PARSE_ERROR: {
-// Object oldValue = this.parseError;
-// this.parseError = null;
-// this.setParseError = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDFile_ParseError(),oldValue,getParseError());
-// }
-//
-// }
-// return super.refBasicUnsetValue(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public String toString() {
-// String out="("; //$NON-NLS-2$//$NON-NLS-1$
-// boolean first=true;
-// boolean emptyList=true;
-// if(isSetComment()) {
-// if(!emptyList) out+=", "; //$NON-NLS-2$//$NON-NLS-1$
-// out+="comment: "+this.comment; //$NON-NLS-2$//$NON-NLS-1$
-// first=false;
-// emptyList=false;
-// }
-// if(isSetParseError()) {
-// if(!emptyList) out+=", "; //$NON-NLS-2$//$NON-NLS-1$
-// out+="parseError: "+this.parseError; //$NON-NLS-2$//$NON-NLS-1$
-// first=false;
-// emptyList=false;
-// }
-// out+=")";
-// if (!first) return super.toString() + " " +out; //$NON-NLS-2$//$NON-NLS-1$
-// return super.toString();
-// }
-// }
-// -------------------GENERICRULES.JSED-------------------
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDGroupContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDGroupContentImpl.java
deleted file mode 100644
index 44e021e78c..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDGroupContentImpl.java
+++ /dev/null
@@ -1,292 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPrinter;
-
-
-/**
- * @generated
- */
-public class DTDGroupContentImpl extends DTDRepeatableContentImpl implements DTDGroupContent {
- /**
- * The default value of the '{@link #getGroupKind() <em>Group Kind</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getGroupKind()
- * @generated
- * @ordered
- */
- protected static final DTDGroupKind GROUP_KIND_EDEFAULT = DTDGroupKind.SEQUENCE_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DTDGroupKind groupKind = GROUP_KIND_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList content = null;
-
- public DTDGroupContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDGroupContent();
- }
-
- public int getContentPosition(DTDElementContent content) {
- EList list = getContent();
- return list.indexOf(content);
- }
-
- public String getContentName() {
- return ""; //$NON-NLS-1$
- }
-
- public String getContentDetail() {
- DTDPrinter printer = new DTDPrinter(false);
- printer.visitDTDGroupContent(this);
-
- return printer.getBuffer().toString();
- }
-
- public String unparseRepeatableContent() {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public DTDGroupKind getGroupKind() {
- return groupKind;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setGroupKind(DTDGroupKind newGroupKind) {
- DTDGroupKind oldGroupKind = groupKind;
- groupKind = newGroupKind == null ? GROUP_KIND_EDEFAULT : newGroupKind;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND, oldGroupKind, groupKind));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getContent() {
- if (content == null) {
- content = new EObjectContainmentWithInverseEList(DTDElementContent.class, this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDPackage.DTD_ELEMENT_CONTENT__GROUP);
- }
- return content;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_GROUP_CONTENT__GROUP :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_GROUP_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_GROUP_CONTENT__ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_GROUP_CONTENT__ELEMENT, msgs);
- case DTDPackage.DTD_GROUP_CONTENT__CONTENT :
- return ((InternalEList) getContent()).basicAdd(otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_GROUP_CONTENT__GROUP :
- return eBasicSetContainer(null, DTDPackage.DTD_GROUP_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_GROUP_CONTENT__ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_GROUP_CONTENT__ELEMENT, msgs);
- case DTDPackage.DTD_GROUP_CONTENT__CONTENT :
- return ((InternalEList) getContent()).basicRemove(otherEnd, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_GROUP_CONTENT__GROUP :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- case DTDPackage.DTD_GROUP_CONTENT__ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_GROUP_CONTENT__GROUP :
- return getGroup();
- case DTDPackage.DTD_GROUP_CONTENT__ELEMENT :
- return getElement();
- case DTDPackage.DTD_GROUP_CONTENT__OCCURRENCE :
- return getOccurrence();
- case DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND :
- return getGroupKind();
- case DTDPackage.DTD_GROUP_CONTENT__CONTENT :
- return getContent();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_GROUP_CONTENT__GROUP :
- return getGroup() != null;
- case DTDPackage.DTD_GROUP_CONTENT__ELEMENT :
- return getElement() != null;
- case DTDPackage.DTD_GROUP_CONTENT__OCCURRENCE :
- return occurrence != OCCURRENCE_EDEFAULT;
- case DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND :
- return groupKind != GROUP_KIND_EDEFAULT;
- case DTDPackage.DTD_GROUP_CONTENT__CONTENT :
- return content != null && !getContent().isEmpty();
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_GROUP_CONTENT__GROUP :
- setGroup((DTDGroupContent) newValue);
- return;
- case DTDPackage.DTD_GROUP_CONTENT__ELEMENT :
- setElement((DTDElement) newValue);
- return;
- case DTDPackage.DTD_GROUP_CONTENT__OCCURRENCE :
- setOccurrence((DTDOccurrenceType) newValue);
- return;
- case DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND :
- setGroupKind((DTDGroupKind) newValue);
- return;
- case DTDPackage.DTD_GROUP_CONTENT__CONTENT :
- getContent().clear();
- getContent().addAll((Collection) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_GROUP_CONTENT__GROUP :
- setGroup((DTDGroupContent) null);
- return;
- case DTDPackage.DTD_GROUP_CONTENT__ELEMENT :
- setElement((DTDElement) null);
- return;
- case DTDPackage.DTD_GROUP_CONTENT__OCCURRENCE :
- setOccurrence(OCCURRENCE_EDEFAULT);
- return;
- case DTDPackage.DTD_GROUP_CONTENT__GROUP_KIND :
- setGroupKind(GROUP_KIND_EDEFAULT);
- return;
- case DTDPackage.DTD_GROUP_CONTENT__CONTENT :
- getContent().clear();
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (groupKind: "); //$NON-NLS-1$
- result.append(groupKind);
- result.append(')');
- return result.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDIdHelper.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDIdHelper.java
deleted file mode 100644
index 4ddeeb03e6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDIdHelper.java
+++ /dev/null
@@ -1,88 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-
-public class DTDIdHelper {
- public DTDIdHelper() {
- }
-
- public String computeContentId(DTDElementContent content) {
- String id = ""; //$NON-NLS-1$
- if (content instanceof DTDEmptyContent) {
- id = "#EMPTY"; //$NON-NLS-1$
- }
- else if (content instanceof DTDPCDataContent) {
- id = "#PCDATA"; //$NON-NLS-1$
- }
- else if (content instanceof DTDEmptyContent) {
- id = "#EMPTY"; //$NON-NLS-1$
- }
- else if (content instanceof DTDElementReferenceContent) {
- id = "#" + ((DTDElementReferenceContent) content).getReferencedElement().getName(); //$NON-NLS-1$
- }
- else if (content instanceof DTDEntityReferenceContent) {
- id = "#" + ((DTDEntityReferenceContent) content).getElementReferencedEntity().getName(); //$NON-NLS-1$
- }
- else if (content instanceof DTDGroupContent) {
- id = computeGroupId((DTDGroupContent) content);
- }
- return id;
- }
-
- public String computeGroupId(DTDGroupContent grp) {
- String groupId = "_"; //$NON-NLS-1$
- return groupId;
- }
-
- /**
- * @generated
- */
- protected String computeContentIdGen(DTDElementContent content) {
-
- String id = ""; //$NON-NLS-1$
- if (content instanceof DTDEmptyContent) {
- id = "#EMPTY"; //$NON-NLS-1$
- }
- else if (content instanceof DTDPCDataContent) {
- id = "#PCDATA"; //$NON-NLS-1$
- }
- else if (content instanceof DTDEmptyContent) {
- id = "#EMPTY"; //$NON-NLS-1$
- }
- else if (content instanceof DTDElementReferenceContent) {
- id = "#" + ((DTDElementReferenceContent) content).getReferencedElement().getName(); //$NON-NLS-1$
- }
- else if (content instanceof DTDEntityReferenceContent) {
- id = "#" + ((DTDEntityReferenceContent) content).getElementReferencedEntity().getName(); //$NON-NLS-1$
- }
- else if (content instanceof DTDGroupContent) {
- id = computeGroupId((DTDGroupContent) content);
- }
- return id;
- }
-
- /**
- * @generated
- */
- protected String computeGroupIdGen(DTDGroupContent grp) {
-
- String groupId = "_"; //$NON-NLS-1$
- return groupId;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDInternalEntityImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDInternalEntityImpl.java
deleted file mode 100644
index 1d47e55868..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDInternalEntityImpl.java
+++ /dev/null
@@ -1,239 +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.wst.dtd.core.internal.emf.impl;
-
-import java.text.CharacterIterator;
-import com.ibm.icu.text.StringCharacterIterator;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-
-/**
- * @generated
- */
-public class DTDInternalEntityImpl extends DTDEntityContentImpl implements DTDInternalEntity {
- /**
- * The default value of the '{@link #getValue() <em>Value</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String value = VALUE_EDEFAULT;
-
- public DTDInternalEntityImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDInternalEntity();
- }
-
- public String unparse() {
- StringBuffer sb = new StringBuffer(64);
- if (getValue() == null)
- sb.append("\"\""); //$NON-NLS-1$
- else {
- sb.append("\"").append(replaceDoubleQuotes(getValue())).append("\""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return sb.toString();
- }
-
- // this method replaces any occurrence of ' " ' with the equivalent value
- // of &#34;
- private String replaceDoubleQuotes(String input) {
- StringBuffer newValue = new StringBuffer();
-
- StringCharacterIterator characters = new StringCharacterIterator(input);
-
- while (characters.current() != CharacterIterator.DONE) {
- char current = characters.current();
-
- if (current == '"') {
- newValue.append("&#34;"); //$NON-NLS-1$
- }
- else {
- newValue.append(current);
- }
- characters.next();
- }
-
- return newValue.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getValue() {
- return value;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setValue(String newValue) {
- String oldValue = value;
- value = newValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_INTERNAL_ENTITY__VALUE, oldValue, value));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY :
- return eBasicSetContainer(null, DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ENTITY__CONTENT, DTDEntity.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY :
- return getDTDEntity();
- case DTDPackage.DTD_INTERNAL_ENTITY__VALUE :
- return getValue();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY :
- return getDTDEntity() != null;
- case DTDPackage.DTD_INTERNAL_ENTITY__VALUE :
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY :
- setDTDEntity((DTDEntity) newValue);
- return;
- case DTDPackage.DTD_INTERNAL_ENTITY__VALUE :
- setValue((String) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_INTERNAL_ENTITY__DTD_ENTITY :
- setDTDEntity((DTDEntity) null);
- return;
- case DTDPackage.DTD_INTERNAL_ENTITY__VALUE :
- setValue(VALUE_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (value: "); //$NON-NLS-1$
- result.append(value);
- result.append(')');
- return result.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDNotationImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDNotationImpl.java
deleted file mode 100644
index 47ec928cd8..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDNotationImpl.java
+++ /dev/null
@@ -1,904 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil;
-
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Notation</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl#getComment <em>Comment</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl#getSystemID <em>System ID</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl#getPublicID <em>Public ID</em>}</li>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDNotationImpl#getEntity <em>Entity</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DTDNotationImpl extends DTDContentImpl implements DTDNotation, DTDContent {
-
- public String getPathname() {
- return DTDPathnameUtil.makePath(null, "Nota", getName(), -1); //$NON-NLS-1$
- }
-
-
- public DTDObject findObject(String relativePath) {
- return null;
- }
-
-
- // ugly hack for now since we don't have multiple inheritance.
- // Would rather have all this stuff in a base class but these
- // classes are inheriting from sometimes different mof classes
- DTDLexicalInfo lexInfo = new DTDLexicalInfo();
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset() {
- return lexInfo.getStartOffset();
- }
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v) {
- lexInfo.setStartOffset(v);
- }
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset() {
- return lexInfo.getEndOffset();
- }
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v) {
- lexInfo.setEndOffset(v);
- }
-
- /**
- * The default value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected static final String COMMENT_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getComment() <em>Comment</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getComment()
- * @generated
- * @ordered
- */
- protected String comment = COMMENT_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSystemID() <em>System ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getSystemID()
- * @generated
- * @ordered
- */
- protected static final String SYSTEM_ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSystemID() <em>System ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getSystemID()
- * @generated
- * @ordered
- */
- protected String systemID = SYSTEM_ID_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPublicID() <em>Public ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getPublicID()
- * @generated
- * @ordered
- */
- protected static final String PUBLIC_ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPublicID() <em>Public ID</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getPublicID()
- * @generated
- * @ordered
- */
- protected String publicID = PUBLIC_ID_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getEntity() <em>Entity</em>}'
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getEntity()
- * @generated
- * @ordered
- */
- protected EList entity = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DTDNotationImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDNotation();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getComment() {
- return comment;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setComment(String newComment) {
- String oldComment = comment;
- comment = newComment;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_NOTATION__COMMENT, oldComment, comment));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getSystemID() {
- return systemID;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setSystemID(String newSystemID) {
- String oldSystemID = systemID;
- systemID = newSystemID;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_NOTATION__SYSTEM_ID, oldSystemID, systemID));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getPublicID() {
- return publicID;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setPublicID(String newPublicID) {
- String oldPublicID = publicID;
- publicID = newPublicID;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_NOTATION__PUBLIC_ID, oldPublicID, publicID));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList getEntity() {
- if (entity == null) {
- entity = new EObjectWithInverseResolvingEList(DTDExternalEntity.class, this, DTDPackage.DTD_NOTATION__ENTITY, DTDPackage.DTD_EXTERNAL_ENTITY__NOTATION);
- }
- return entity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_NOTATION__DTD_FILE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_NOTATION__DTD_FILE, msgs);
- case DTDPackage.DTD_NOTATION__ENTITY :
- return ((InternalEList) getEntity()).basicAdd(otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_NOTATION__DTD_FILE :
- return eBasicSetContainer(null, DTDPackage.DTD_NOTATION__DTD_FILE, msgs);
- case DTDPackage.DTD_NOTATION__ENTITY :
- return ((InternalEList) getEntity()).basicRemove(otherEnd, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_NOTATION__DTD_FILE :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_NOTATION__DTD_FILE :
- return getDTDFile();
- case DTDPackage.DTD_NOTATION__COMMENT :
- return getComment();
- case DTDPackage.DTD_NOTATION__SYSTEM_ID :
- return getSystemID();
- case DTDPackage.DTD_NOTATION__PUBLIC_ID :
- return getPublicID();
- case DTDPackage.DTD_NOTATION__ENTITY :
- return getEntity();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_NOTATION__DTD_FILE :
- setDTDFile((DTDFile) newValue);
- return;
- case DTDPackage.DTD_NOTATION__COMMENT :
- setComment((String) newValue);
- return;
- case DTDPackage.DTD_NOTATION__SYSTEM_ID :
- setSystemID((String) newValue);
- return;
- case DTDPackage.DTD_NOTATION__PUBLIC_ID :
- setPublicID((String) newValue);
- return;
- case DTDPackage.DTD_NOTATION__ENTITY :
- getEntity().clear();
- getEntity().addAll((Collection) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_NOTATION__DTD_FILE :
- setDTDFile((DTDFile) null);
- return;
- case DTDPackage.DTD_NOTATION__COMMENT :
- setComment(COMMENT_EDEFAULT);
- return;
- case DTDPackage.DTD_NOTATION__SYSTEM_ID :
- setSystemID(SYSTEM_ID_EDEFAULT);
- return;
- case DTDPackage.DTD_NOTATION__PUBLIC_ID :
- setPublicID(PUBLIC_ID_EDEFAULT);
- return;
- case DTDPackage.DTD_NOTATION__ENTITY :
- getEntity().clear();
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_NOTATION__DTD_FILE :
- return getDTDFile() != null;
- case DTDPackage.DTD_NOTATION__COMMENT :
- return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
- case DTDPackage.DTD_NOTATION__SYSTEM_ID :
- return SYSTEM_ID_EDEFAULT == null ? systemID != null : !SYSTEM_ID_EDEFAULT.equals(systemID);
- case DTDPackage.DTD_NOTATION__PUBLIC_ID :
- return PUBLIC_ID_EDEFAULT == null ? publicID != null : !PUBLIC_ID_EDEFAULT.equals(publicID);
- case DTDPackage.DTD_NOTATION__ENTITY :
- return entity != null && !getEntity().isEmpty();
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (comment: "); //$NON-NLS-1$
- result.append(comment);
- result.append(", systemID: "); //$NON-NLS-1$
- result.append(systemID);
- result.append(", publicID: "); //$NON-NLS-1$
- result.append(publicID);
- result.append(')');
- return result.toString();
- }
-
-} // DTDNotationImpl
-
-// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
-//
-
-// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
-// //public class DTDNotationImpl extends ENamespaceImpl implements
-// DTDNotation, ENamespace, DTDContent{
-// -------------------GENERICRULES.JSED-------------------
-
-// public static final String copyright = "(c) Copyright IBM Corporation
-// 2002.";
-//
-// public DTDNotationImpl()
-// {
-// super();
-// }
-// public String getPathname()
-// {
-// return DTDPathnameUtil.makePath(null, "Nota", getName(), -1);
-// }
-//
-// public DTDObject findObject(String relativePath)
-// {
-// return null;
-// }
-//
-// // ugly hack for now since we don't have multiple inheritance.
-// // Would rather have all this stuff in a base class but these
-// // classes are inheriting from sometimes different mof classes
-// DTDLexicalInfo lexInfo = new DTDLexicalInfo();
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected String comment = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected String systemID = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected String publicID = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected EList entity = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setComment = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setSystemID = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setPublicID = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// private DTDContentImpl dtdContentDelegate = null;
-// /**
-// * Get the value of startOffset.
-// * @return value of startOffset.
-// */
-// public int getStartOffset()
-// {
-// return lexInfo.getStartOffset();
-// }
-//
-// /**
-// * Set the value of startOffset.
-// * @param v Value to assign to startOffset.
-// */
-// public void setStartOffset(int v)
-// {
-// lexInfo.setStartOffset(v);
-// }
-//
-// /**
-// * Get the value of endOffset.
-// * @return value of endOffset.
-// */
-// public int getEndOffset()
-// {
-// return lexInfo.getEndOffset();
-// }
-//
-// /**
-// * Set the value of endOffset.
-// * @param v Value to assign to endOffset.
-// */
-// public void setEndOffset(int v)
-// {
-// lexInfo.setEndOffset(v);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EObject initInstance() {
-// setEMetaObj(eClassDTDNotation());
-// initInstanceDelegates();
-// return this;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected void initInstanceDelegates() {
-// super.initInstanceDelegates();
-//
-// getDtdContentDelegate().refSetDelegateOwner(this);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public DTDPackage ePackageDTD() {
-// return
-// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EClass eClassDTDNotation() {
-// return
-// ((DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI)).getDTDNotation();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public String getComment() {
-// if (this.setComment) return this.comment;
-// else return
-// (String)DTDPackage.eINSTANCE.getDTDNotation_Comment().getDefaultValue();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setComment(String value) {
-// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDNotation_Comment(),this.comment,value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetComment() {
-// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDNotation_Comment()));
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetComment() {
-// return setComment;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public String getSystemID() {
-// if (this.setSystemID) return this.systemID;
-// else return
-// (String)DTDPackage.eINSTANCE.getDTDNotation_SystemID().getDefaultValue();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setSystemID(String value) {
-// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDNotation_SystemID(),this.systemID,value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetSystemID() {
-// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDNotation_SystemID()));
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetSystemID() {
-// return setSystemID;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public String getPublicID() {
-// if (this.setPublicID) return this.publicID;
-// else return
-// (String)DTDPackage.eINSTANCE.getDTDNotation_PublicID().getDefaultValue();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setPublicID(String value) {
-// refSetValueForSimpleSF(DTDPackage.eINSTANCE.getDTDNotation_PublicID(),this.publicID,value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetPublicID() {
-// eNotify(refBasicUnsetValue(DTDPackage.eINSTANCE.getDTDNotation_PublicID()));
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetPublicID() {
-// return setPublicID;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public EList getEntity() {
-// if (this.entity==null) {
-// this.entity=newCollection(this,DTDPackage.eINSTANCE.getDTDNotation_Entity(),
-// true);
-// }
-// return this.entity;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Object eGet(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eGet(feature);
-// }
-// switch (eClassDTDNotation().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_NOTATION__COMMENT: return getComment();
-// case DTDPackage.DTD_NOTATION__SYSTEM_ID: return getSystemID();
-// case DTDPackage.DTD_NOTATION__PUBLIC_ID: return getPublicID();
-// case DTDPackage.DTD_NOTATION__ENTITY: return getEntity();
-// case DTDPackage.DTD_NOTATION__DTD_FILE: return getDTDFile();
-//
-// }
-// return super.eGet(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Object refBasicValue(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.refBasicValue(feature);
-// }
-// switch (eClassDTDNotation().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_NOTATION__COMMENT:
-// return this.setComment? this.comment : null;
-// case DTDPackage.DTD_NOTATION__SYSTEM_ID:
-// return this.setSystemID? this.systemID : null;
-// case DTDPackage.DTD_NOTATION__PUBLIC_ID:
-// return this.setPublicID? this.publicID : null;
-// case DTDPackage.DTD_NOTATION__ENTITY:
-// return this.entity;
-// case DTDPackage.DTD_NOTATION__DTD_FILE: return
-// ((InternalEObject)getDtdContentDelegate()).refBasicValue(feature);
-//
-// }
-// return super.refBasicValue(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean eIsSet(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eIsSet(feature);
-// }
-// switch (eClassDTDNotation().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_NOTATION__COMMENT: return isSetComment();
-// case DTDPackage.DTD_NOTATION__SYSTEM_ID: return isSetSystemID();
-// case DTDPackage.DTD_NOTATION__PUBLIC_ID: return isSetPublicID();
-// case DTDPackage.DTD_NOTATION__DTD_FILE: return isSetDTDFile();
-//
-// }
-// return super.eIsSet(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void eSet(EStructuralFeature feature, Object newValue) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// super.eSet(feature, newValue);
-// }
-// switch (eClassDTDNotation().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_NOTATION__COMMENT: {
-// setComment((String)newValue);
-// return;
-// }
-// case DTDPackage.DTD_NOTATION__SYSTEM_ID: {
-// setSystemID((String)newValue);
-// return;
-// }
-// case DTDPackage.DTD_NOTATION__PUBLIC_ID: {
-// setPublicID((String)newValue);
-// return;
-// }
-// case DTDPackage.DTD_NOTATION__DTD_FILE: {
-// setDTDFile((DTDFile)newValue);
-// return;
-// }
-//
-// }
-// super.eSet(feature, newValue);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Notification eBasicSet(EStructuralFeature feature, Object newValue)
-// {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eBasicSet(feature, newValue);
-// }
-// switch (eClassDTDNotation().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_NOTATION__COMMENT: {
-// Object oldValue = this.comment;
-// this.comment = (String)newValue;
-// this.setComment = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_Comment(),oldValue,newValue);
-// }
-// case DTDPackage.DTD_NOTATION__SYSTEM_ID: {
-// Object oldValue = this.systemID;
-// this.systemID = (String)newValue;
-// this.setSystemID = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_SystemID(),oldValue,newValue);
-// }
-// case DTDPackage.DTD_NOTATION__PUBLIC_ID: {
-// Object oldValue = this.publicID;
-// this.publicID = (String)newValue;
-// this.setPublicID = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_PublicID(),oldValue,newValue);
-// }
-//
-// }
-// return super.eBasicSet(feature, newValue);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void eUnset(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// super.eUnset(feature);
-// }
-// switch (eClassDTDNotation().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_NOTATION__COMMENT: {
-// unsetComment();
-// return;
-// }
-// case DTDPackage.DTD_NOTATION__SYSTEM_ID: {
-// unsetSystemID();
-// return;
-// }
-// case DTDPackage.DTD_NOTATION__PUBLIC_ID: {
-// unsetPublicID();
-// return;
-// }
-// case DTDPackage.DTD_NOTATION__DTD_FILE: {
-// unsetDTDFile();
-// return;
-// }
-//
-// }
-// super.eUnset(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Notification refBasicUnsetValue(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.refBasicUnsetValue(feature);
-// }
-// switch (eClassDTDNotation().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_NOTATION__COMMENT: {
-// Object oldValue = this.comment;
-// this.comment = null;
-// this.setComment = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_Comment(),oldValue,getComment());
-// }
-// case DTDPackage.DTD_NOTATION__SYSTEM_ID: {
-// Object oldValue = this.systemID;
-// this.systemID = null;
-// this.setSystemID = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_SystemID(),oldValue,getSystemID());
-// }
-// case DTDPackage.DTD_NOTATION__PUBLIC_ID: {
-// Object oldValue = this.publicID;
-// this.publicID = null;
-// this.setPublicID = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDNotation_PublicID(),oldValue,getPublicID());
-// }
-//
-// }
-// return super.refBasicUnsetValue(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected DTDContentImpl getDtdContentDelegate() {
-// if (dtdContentDelegate == null) {
-// DTDPackage pkg =
-// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI);
-// dtdContentDelegate=(DTDContentImpl)pkg.eCreateInstance(pkg.DTD_CONTENT);
-// dtdContentDelegate.initInstance();
-// }
-// return dtdContentDelegate;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EClass eClassDTDContent() {
-// return getDtdContentDelegate().eClass();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public DTDFile getDTDFile() {
-// return getDtdContentDelegate().getDTDFile();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setDTDFile(DTDFile value) {
-// getDtdContentDelegate().setDTDFile(value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetDTDFile() {
-// getDtdContentDelegate().unsetDTDFile();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetDTDFile() {
-// return getDtdContentDelegate().isSetDTDFile();
-// }
-// }
-// -------------------GENERICRULES.JSED-------------------
-
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPCDataContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPCDataContentImpl.java
deleted file mode 100644
index e8c00f0cb5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPCDataContentImpl.java
+++ /dev/null
@@ -1,171 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-
-/**
- * @generated
- */
-public class DTDPCDataContentImpl extends DTDElementContentImpl implements DTDPCDataContent {
-
- public DTDPCDataContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDPCDataContent();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_PC_DATA_CONTENT__GROUP :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_PC_DATA_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_PC_DATA_CONTENT__GROUP :
- return eBasicSetContainer(null, DTDPackage.DTD_PC_DATA_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_PC_DATA_CONTENT__GROUP :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_PC_DATA_CONTENT__GROUP :
- return getGroup();
- case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT :
- return getElement();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_PC_DATA_CONTENT__GROUP :
- setGroup((DTDGroupContent) newValue);
- return;
- case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT :
- setElement((DTDElement) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_PC_DATA_CONTENT__GROUP :
- setGroup((DTDGroupContent) null);
- return;
- case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT :
- setElement((DTDElement) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_PC_DATA_CONTENT__GROUP :
- return getGroup() != null;
- case DTDPackage.DTD_PC_DATA_CONTENT__ELEMENT :
- return getElement() != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
- public String getContentName() {
- return "#PCDATA"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPackageImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPackageImpl.java
deleted file mode 100644
index 5ab1d2b0fa..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPackageImpl.java
+++ /dev/null
@@ -1,1215 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.emf.ecore.impl.EcorePackageImpl;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFactory;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent;
-import org.eclipse.wst.dtd.core.internal.emf.XMLSchemaDefinedType;
-
-
-/**
- * @lastgen class DTDPackageImpl extends EPackageImpl implements DTDPackage,
- * EPackage {}
- */
-public class DTDPackageImpl extends EPackageImpl implements DTDPackage {
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdElementContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdGroupContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdAttributeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdElementEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdEmptyContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdAnyContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdpcDataContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdElementReferenceContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdRepeatableContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdFileEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdBasicTypeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdEnumerationTypeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdNotationEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdEntityEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdEntityContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdExternalEntityEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdInternalEntityEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdParameterEntityReferenceEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdEntityReferenceContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dtdContentEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EEnum dtdOccurrenceTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EEnum dtdDefaultKindEEnum = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EEnum dtdBasicTypeKindEEnum = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EEnum dtdEnumGroupKindEEnum = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EEnum dtdGroupKindEEnum = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EEnum xmlSchemaDefinedTypeEEnum = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by
- * the package package URI value.
- * <p>
- * Note: the correct way to create the package is via the static factory
- * method {@link #init init()}, which also performs initialization of the
- * package, or returns the registered package, if one already exists. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.wst.dtd.core.internal.emf.DTDPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private DTDPackageImpl() {
- super(eNS_URI, DTDFactory.eINSTANCE);
- }
-
- // public DTDPackageImpl()
- // {
- // super(eNS_URI);
- // initializePackage(null);
- // }
-
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model,
- * and for any others upon which it depends. Simple dependencies are
- * satisfied by calling this method on all dependent packages before doing
- * anything else. This method drives initialization for interdependent
- * packages directly, in parallel with this package, itself.
- * <p>
- * Of this package and its interdependencies, all packages which have not
- * yet been registered by their URI values are first created and
- * registered. The packages are then initialized in two steps: meta-model
- * objects for all of the packages are created before any are initialized,
- * since one package's meta-model objects may refer to those of another.
- * <p>
- * Invocation of this method will not affect any packages that have
- * already been initialized. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static DTDPackage init() {
- // Obtain or create and register package and interdependencies
- DTDPackageImpl theDTDPackage = (DTDPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DTDPackageImpl());
- EcorePackageImpl theEcorePackage = (EcorePackageImpl) (EPackage.Registry.INSTANCE.get(EcorePackage.eNS_URI) instanceof EPackage ? EPackage.Registry.INSTANCE.get(EcorePackage.eNS_URI) : EcorePackage.eINSTANCE);
-
- // Step 1: create meta-model objects
- theDTDPackage.createPackageContents();
- theEcorePackage.createPackageContents();
-
- // Step 2: complete initialization
- theDTDPackage.initializePackageContents();
- theEcorePackage.initializePackageContents();
-
- return theDTDPackage;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDElementContent() {
- return dtdElementContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDElementContent_Group() {
- return (EReference) dtdElementContentEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDElementContent_Element() {
- return (EReference) dtdElementContentEClass.getEReferences().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDGroupContent() {
- return dtdGroupContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDGroupContent_GroupKind() {
- return (EAttribute) dtdGroupContentEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDGroupContent_Content() {
- return (EReference) dtdGroupContentEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDAttribute() {
- return dtdAttributeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDAttribute_Comment() {
- return (EAttribute) dtdAttributeEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDAttribute_DefaultKind() {
- return (EAttribute) dtdAttributeEClass.getEAttributes().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDAttribute_DefaultValueString() {
- return (EAttribute) dtdAttributeEClass.getEAttributes().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDAttribute_AttributeNameReferencedEntity() {
- return (EReference) dtdAttributeEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDAttribute_AttributeTypeReferencedEntity() {
- return (EReference) dtdAttributeEClass.getEReferences().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDAttribute_DTDElement() {
- return (EReference) dtdAttributeEClass.getEReferences().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDElement() {
- return dtdElementEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDElement_Comment() {
- return (EAttribute) dtdElementEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDElement_Content() {
- return (EReference) dtdElementEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDElement_DTDAttribute() {
- return (EReference) dtdElementEClass.getEReferences().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDEmptyContent() {
- return dtdEmptyContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDAnyContent() {
- return dtdAnyContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDPCDataContent() {
- return dtdpcDataContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDElementReferenceContent() {
- return dtdElementReferenceContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDElementReferenceContent_ReferencedElement() {
- return (EReference) dtdElementReferenceContentEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDRepeatableContent() {
- return dtdRepeatableContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDRepeatableContent_Occurrence() {
- return (EAttribute) dtdRepeatableContentEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDFile() {
- return dtdFileEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDFile_Comment() {
- return (EAttribute) dtdFileEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDFile_ParseError() {
- return (EAttribute) dtdFileEClass.getEAttributes().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDFile_DTDContent() {
- return (EReference) dtdFileEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDFile_DTDEnumerationType() {
- return (EReference) dtdFileEClass.getEReferences().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDBasicType() {
- return dtdBasicTypeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDBasicType_Kind() {
- return (EAttribute) dtdBasicTypeEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDEnumerationType() {
- return dtdEnumerationTypeEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDEnumerationType_Kind() {
- return (EAttribute) dtdEnumerationTypeEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDEnumerationType_DTDFile() {
- return (EReference) dtdEnumerationTypeEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDNotation() {
- return dtdNotationEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDNotation_Comment() {
- return (EAttribute) dtdNotationEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDNotation_SystemID() {
- return (EAttribute) dtdNotationEClass.getEAttributes().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDNotation_PublicID() {
- return (EAttribute) dtdNotationEClass.getEAttributes().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDNotation_Entity() {
- return (EReference) dtdNotationEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDEntity() {
- return dtdEntityEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDEntity_Comment() {
- return (EAttribute) dtdEntityEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDEntity_ParameterEntity() {
- return (EAttribute) dtdEntityEClass.getEAttributes().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDEntity_Content() {
- return (EReference) dtdEntityEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDEntity_ParmEntityRef() {
- return (EReference) dtdEntityEClass.getEReferences().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDEntity_EntityReference() {
- return (EReference) dtdEntityEClass.getEReferences().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDEntity_AttributeNameReference() {
- return (EReference) dtdEntityEClass.getEReferences().get(3);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDEntity_AttributeTypeReference() {
- return (EReference) dtdEntityEClass.getEReferences().get(4);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDEntityContent() {
- return dtdEntityContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDEntityContent_DTDEntity() {
- return (EReference) dtdEntityContentEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDExternalEntity() {
- return dtdExternalEntityEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDExternalEntity_SystemID() {
- return (EAttribute) dtdExternalEntityEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDExternalEntity_PublicID() {
- return (EAttribute) dtdExternalEntityEClass.getEAttributes().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDExternalEntity_Notation() {
- return (EReference) dtdExternalEntityEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDExternalEntity_EntityReferencedFromAnotherFile() {
- return (EReference) dtdExternalEntityEClass.getEReferences().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDInternalEntity() {
- return dtdInternalEntityEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getDTDInternalEntity_Value() {
- return (EAttribute) dtdInternalEntityEClass.getEAttributes().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDParameterEntityReference() {
- return dtdParameterEntityReferenceEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDParameterEntityReference_Entity() {
- return (EReference) dtdParameterEntityReferenceEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDEntityReferenceContent() {
- return dtdEntityReferenceContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDEntityReferenceContent_ElementReferencedEntity() {
- return (EReference) dtdEntityReferenceContentEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getDTDContent() {
- return dtdContentEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getDTDContent_DTDFile() {
- return (EReference) dtdContentEClass.getEReferences().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EEnum getDTDOccurrenceType() {
- return dtdOccurrenceTypeEEnum;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EEnum getDTDDefaultKind() {
- return dtdDefaultKindEEnum;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EEnum getDTDBasicTypeKind() {
- return dtdBasicTypeKindEEnum;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EEnum getDTDEnumGroupKind() {
- return dtdEnumGroupKindEEnum;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EEnum getDTDGroupKind() {
- return dtdGroupKindEEnum;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EEnum getXMLSchemaDefinedType() {
- return xmlSchemaDefinedTypeEEnum;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDFactory getDTDFactory() {
- return (DTDFactory) getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is guarded
- * to have no affect on any invocation but its first. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void createPackageContents() {
- if (isCreated)
- return;
- isCreated = true;
-
- // Create classes and their features
- dtdElementContentEClass = createEClass(DTD_ELEMENT_CONTENT);
- createEReference(dtdElementContentEClass, DTD_ELEMENT_CONTENT__GROUP);
- createEReference(dtdElementContentEClass, DTD_ELEMENT_CONTENT__ELEMENT);
-
- dtdGroupContentEClass = createEClass(DTD_GROUP_CONTENT);
- createEAttribute(dtdGroupContentEClass, DTD_GROUP_CONTENT__GROUP_KIND);
- createEReference(dtdGroupContentEClass, DTD_GROUP_CONTENT__CONTENT);
-
- dtdAttributeEClass = createEClass(DTD_ATTRIBUTE);
- createEAttribute(dtdAttributeEClass, DTD_ATTRIBUTE__COMMENT);
- createEAttribute(dtdAttributeEClass, DTD_ATTRIBUTE__DEFAULT_KIND);
- createEAttribute(dtdAttributeEClass, DTD_ATTRIBUTE__DEFAULT_VALUE_STRING);
- createEReference(dtdAttributeEClass, DTD_ATTRIBUTE__ATTRIBUTE_NAME_REFERENCED_ENTITY);
- createEReference(dtdAttributeEClass, DTD_ATTRIBUTE__ATTRIBUTE_TYPE_REFERENCED_ENTITY);
- createEReference(dtdAttributeEClass, DTD_ATTRIBUTE__DTD_ELEMENT);
-
- dtdElementEClass = createEClass(DTD_ELEMENT);
- createEAttribute(dtdElementEClass, DTD_ELEMENT__COMMENT);
- createEReference(dtdElementEClass, DTD_ELEMENT__CONTENT);
- createEReference(dtdElementEClass, DTD_ELEMENT__DTD_ATTRIBUTE);
-
- dtdEmptyContentEClass = createEClass(DTD_EMPTY_CONTENT);
-
- dtdAnyContentEClass = createEClass(DTD_ANY_CONTENT);
-
- dtdpcDataContentEClass = createEClass(DTD_PC_DATA_CONTENT);
-
- dtdElementReferenceContentEClass = createEClass(DTD_ELEMENT_REFERENCE_CONTENT);
- createEReference(dtdElementReferenceContentEClass, DTD_ELEMENT_REFERENCE_CONTENT__REFERENCED_ELEMENT);
-
- dtdRepeatableContentEClass = createEClass(DTD_REPEATABLE_CONTENT);
- createEAttribute(dtdRepeatableContentEClass, DTD_REPEATABLE_CONTENT__OCCURRENCE);
-
- dtdFileEClass = createEClass(DTD_FILE);
- createEAttribute(dtdFileEClass, DTD_FILE__COMMENT);
- createEAttribute(dtdFileEClass, DTD_FILE__PARSE_ERROR);
- createEReference(dtdFileEClass, DTD_FILE__DTD_CONTENT);
- createEReference(dtdFileEClass, DTD_FILE__DTD_ENUMERATION_TYPE);
-
- dtdBasicTypeEClass = createEClass(DTD_BASIC_TYPE);
- createEAttribute(dtdBasicTypeEClass, DTD_BASIC_TYPE__KIND);
-
- dtdEnumerationTypeEClass = createEClass(DTD_ENUMERATION_TYPE);
- createEAttribute(dtdEnumerationTypeEClass, DTD_ENUMERATION_TYPE__KIND);
- createEReference(dtdEnumerationTypeEClass, DTD_ENUMERATION_TYPE__DTD_FILE);
-
- dtdNotationEClass = createEClass(DTD_NOTATION);
- createEAttribute(dtdNotationEClass, DTD_NOTATION__COMMENT);
- createEAttribute(dtdNotationEClass, DTD_NOTATION__SYSTEM_ID);
- createEAttribute(dtdNotationEClass, DTD_NOTATION__PUBLIC_ID);
- createEReference(dtdNotationEClass, DTD_NOTATION__ENTITY);
-
- dtdEntityEClass = createEClass(DTD_ENTITY);
- createEAttribute(dtdEntityEClass, DTD_ENTITY__COMMENT);
- createEAttribute(dtdEntityEClass, DTD_ENTITY__PARAMETER_ENTITY);
- createEReference(dtdEntityEClass, DTD_ENTITY__CONTENT);
- createEReference(dtdEntityEClass, DTD_ENTITY__PARM_ENTITY_REF);
- createEReference(dtdEntityEClass, DTD_ENTITY__ENTITY_REFERENCE);
- createEReference(dtdEntityEClass, DTD_ENTITY__ATTRIBUTE_NAME_REFERENCE);
- createEReference(dtdEntityEClass, DTD_ENTITY__ATTRIBUTE_TYPE_REFERENCE);
-
- dtdEntityContentEClass = createEClass(DTD_ENTITY_CONTENT);
- createEReference(dtdEntityContentEClass, DTD_ENTITY_CONTENT__DTD_ENTITY);
-
- dtdExternalEntityEClass = createEClass(DTD_EXTERNAL_ENTITY);
- createEAttribute(dtdExternalEntityEClass, DTD_EXTERNAL_ENTITY__SYSTEM_ID);
- createEAttribute(dtdExternalEntityEClass, DTD_EXTERNAL_ENTITY__PUBLIC_ID);
- createEReference(dtdExternalEntityEClass, DTD_EXTERNAL_ENTITY__NOTATION);
- createEReference(dtdExternalEntityEClass, DTD_EXTERNAL_ENTITY__ENTITY_REFERENCED_FROM_ANOTHER_FILE);
-
- dtdInternalEntityEClass = createEClass(DTD_INTERNAL_ENTITY);
- createEAttribute(dtdInternalEntityEClass, DTD_INTERNAL_ENTITY__VALUE);
-
- dtdParameterEntityReferenceEClass = createEClass(DTD_PARAMETER_ENTITY_REFERENCE);
- createEReference(dtdParameterEntityReferenceEClass, DTD_PARAMETER_ENTITY_REFERENCE__ENTITY);
-
- dtdEntityReferenceContentEClass = createEClass(DTD_ENTITY_REFERENCE_CONTENT);
- createEReference(dtdEntityReferenceContentEClass, DTD_ENTITY_REFERENCE_CONTENT__ELEMENT_REFERENCED_ENTITY);
-
- dtdContentEClass = createEClass(DTD_CONTENT);
- createEReference(dtdContentEClass, DTD_CONTENT__DTD_FILE);
-
- // Create enums
- dtdOccurrenceTypeEEnum = createEEnum(DTD_OCCURRENCE_TYPE);
- dtdDefaultKindEEnum = createEEnum(DTD_DEFAULT_KIND);
- dtdBasicTypeKindEEnum = createEEnum(DTD_BASIC_TYPE_KIND);
- dtdEnumGroupKindEEnum = createEEnum(DTD_ENUM_GROUP_KIND);
- dtdGroupKindEEnum = createEEnum(DTD_GROUP_KIND);
- xmlSchemaDefinedTypeEEnum = createEEnum(XML_SCHEMA_DEFINED_TYPE);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized)
- return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- EcorePackageImpl theEcorePackage = (EcorePackageImpl) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
-
- // Add supertypes to classes
- dtdGroupContentEClass.getESuperTypes().add(this.getDTDRepeatableContent());
- dtdAttributeEClass.getESuperTypes().add(theEcorePackage.getEAttribute());
- dtdElementEClass.getESuperTypes().add(theEcorePackage.getEClass());
- dtdElementEClass.getESuperTypes().add(this.getDTDContent());
- dtdEmptyContentEClass.getESuperTypes().add(this.getDTDElementContent());
- dtdAnyContentEClass.getESuperTypes().add(this.getDTDElementContent());
- dtdpcDataContentEClass.getESuperTypes().add(this.getDTDElementContent());
- dtdElementReferenceContentEClass.getESuperTypes().add(this.getDTDRepeatableContent());
- dtdRepeatableContentEClass.getESuperTypes().add(this.getDTDElementContent());
- dtdBasicTypeEClass.getESuperTypes().add(theEcorePackage.getEClass());
- dtdEnumerationTypeEClass.getESuperTypes().add(theEcorePackage.getEEnum());
- dtdNotationEClass.getESuperTypes().add(this.getDTDContent());
- dtdEntityEClass.getESuperTypes().add(this.getDTDContent());
- dtdExternalEntityEClass.getESuperTypes().add(this.getDTDEntityContent());
- dtdInternalEntityEClass.getESuperTypes().add(this.getDTDEntityContent());
- dtdParameterEntityReferenceEClass.getESuperTypes().add(this.getDTDContent());
- dtdEntityReferenceContentEClass.getESuperTypes().add(this.getDTDRepeatableContent());
-
- // Initialize classes and features; add operations and parameters
- initEClass(dtdElementContentEClass, DTDElementContent.class, "DTDElementContent", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEReference(getDTDElementContent_Group(), this.getDTDGroupContent(), this.getDTDGroupContent_Content(), "group", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDElementContent_Element(), this.getDTDElement(), this.getDTDElement_Content(), "element", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdGroupContentEClass, DTDGroupContent.class, "DTDGroupContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDGroupContent_GroupKind(), this.getDTDGroupKind(), "groupKind", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEReference(getDTDGroupContent_Content(), this.getDTDElementContent(), this.getDTDElementContent_Group(), "content", null, 1, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdAttributeEClass, DTDAttribute.class, "DTDAttribute", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDAttribute_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEAttribute(getDTDAttribute_DefaultKind(), this.getDTDDefaultKind(), "defaultKind", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEAttribute(getDTDAttribute_DefaultValueString(), ecorePackage.getEString(), "defaultValueString", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEReference(getDTDAttribute_AttributeNameReferencedEntity(), this.getDTDEntity(), this.getDTDEntity_AttributeNameReference(), "attributeNameReferencedEntity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDAttribute_AttributeTypeReferencedEntity(), this.getDTDEntity(), this.getDTDEntity_AttributeTypeReference(), "attributeTypeReferencedEntity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDAttribute_DTDElement(), this.getDTDElement(), this.getDTDElement_DTDAttribute(), "DTDElement", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdElementEClass, DTDElement.class, "DTDElement", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDElement_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEReference(getDTDElement_Content(), this.getDTDElementContent(), this.getDTDElementContent_Element(), "content", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDElement_DTDAttribute(), this.getDTDAttribute(), this.getDTDAttribute_DTDElement(), "DTDAttribute", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdEmptyContentEClass, DTDEmptyContent.class, "DTDEmptyContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
-
- initEClass(dtdAnyContentEClass, DTDAnyContent.class, "DTDAnyContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
-
- initEClass(dtdpcDataContentEClass, DTDPCDataContent.class, "DTDPCDataContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
-
- initEClass(dtdElementReferenceContentEClass, DTDElementReferenceContent.class, "DTDElementReferenceContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEReference(getDTDElementReferenceContent_ReferencedElement(), this.getDTDElement(), null, "referencedElement", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdRepeatableContentEClass, DTDRepeatableContent.class, "DTDRepeatableContent", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDRepeatableContent_Occurrence(), this.getDTDOccurrenceType(), "occurrence", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
-
- initEClass(dtdFileEClass, DTDFile.class, "DTDFile", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDFile_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEAttribute(getDTDFile_ParseError(), ecorePackage.getEBoolean(), "parseError", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEReference(getDTDFile_DTDContent(), this.getDTDContent(), this.getDTDContent_DTDFile(), "DTDContent", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDFile_DTDEnumerationType(), this.getDTDEnumerationType(), this.getDTDEnumerationType_DTDFile(), "DTDEnumerationType", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdBasicTypeEClass, DTDBasicType.class, "DTDBasicType", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDBasicType_Kind(), this.getDTDBasicTypeKind(), "kind", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
-
- initEClass(dtdEnumerationTypeEClass, DTDEnumerationType.class, "DTDEnumerationType", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDEnumerationType_Kind(), this.getDTDEnumGroupKind(), "kind", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEReference(getDTDEnumerationType_DTDFile(), this.getDTDFile(), this.getDTDFile_DTDEnumerationType(), "DTDFile", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdNotationEClass, DTDNotation.class, "DTDNotation", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDNotation_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEAttribute(getDTDNotation_SystemID(), ecorePackage.getEString(), "systemID", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEAttribute(getDTDNotation_PublicID(), ecorePackage.getEString(), "publicID", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEReference(getDTDNotation_Entity(), this.getDTDExternalEntity(), this.getDTDExternalEntity_Notation(), "entity", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdEntityEClass, DTDEntity.class, "DTDEntity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDEntity_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEAttribute(getDTDEntity_ParameterEntity(), ecorePackage.getEBoolean(), "parameterEntity", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEReference(getDTDEntity_Content(), this.getDTDEntityContent(), this.getDTDEntityContent_DTDEntity(), "content", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDEntity_ParmEntityRef(), this.getDTDParameterEntityReference(), this.getDTDParameterEntityReference_Entity(), "parmEntityRef", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDEntity_EntityReference(), this.getDTDEntityReferenceContent(), this.getDTDEntityReferenceContent_ElementReferencedEntity(), "entityReference", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDEntity_AttributeNameReference(), this.getDTDAttribute(), this.getDTDAttribute_AttributeNameReferencedEntity(), "attributeNameReference", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDEntity_AttributeTypeReference(), this.getDTDAttribute(), this.getDTDAttribute_AttributeTypeReferencedEntity(), "attributeTypeReference", null, 0, -1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdEntityContentEClass, DTDEntityContent.class, "DTDEntityContent", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEReference(getDTDEntityContent_DTDEntity(), this.getDTDEntity(), this.getDTDEntity_Content(), "DTDEntity", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdExternalEntityEClass, DTDExternalEntity.class, "DTDExternalEntity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDExternalEntity_SystemID(), ecorePackage.getEString(), "systemID", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEAttribute(getDTDExternalEntity_PublicID(), ecorePackage.getEString(), "publicID", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
- initEReference(getDTDExternalEntity_Notation(), this.getDTDNotation(), this.getDTDNotation_Entity(), "notation", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
- initEReference(getDTDExternalEntity_EntityReferencedFromAnotherFile(), this.getDTDFile(), null, "entityReferencedFromAnotherFile", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdInternalEntityEClass, DTDInternalEntity.class, "DTDInternalEntity", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEAttribute(getDTDInternalEntity_Value(), ecorePackage.getEString(), "value", null, 0, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID); //$NON-NLS-1$
-
- initEClass(dtdParameterEntityReferenceEClass, DTDParameterEntityReference.class, "DTDParameterEntityReference", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEReference(getDTDParameterEntityReference_Entity(), this.getDTDEntity(), this.getDTDEntity_ParmEntityRef(), "entity", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdEntityReferenceContentEClass, DTDEntityReferenceContent.class, "DTDEntityReferenceContent", !IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEReference(getDTDEntityReferenceContent_ElementReferencedEntity(), this.getDTDEntity(), this.getDTDEntity_EntityReference(), "elementReferencedEntity", null, 1, 1, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- initEClass(dtdContentEClass, DTDContent.class, "DTDContent", IS_ABSTRACT, !IS_INTERFACE); //$NON-NLS-1$
- initEReference(getDTDContent_DTDFile(), this.getDTDFile(), this.getDTDFile_DTDContent(), "DTDFile", null, 0, 1, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES); //$NON-NLS-1$
-
- // Initialize enums and add enum literals
- initEEnum(dtdOccurrenceTypeEEnum, DTDOccurrenceType.class, "DTDOccurrenceType"); //$NON-NLS-1$
- addEEnumLiteral(dtdOccurrenceTypeEEnum, DTDOccurrenceType.ONE_LITERAL);
- addEEnumLiteral(dtdOccurrenceTypeEEnum, DTDOccurrenceType.OPTIONAL_LITERAL);
- addEEnumLiteral(dtdOccurrenceTypeEEnum, DTDOccurrenceType.ONE_OR_MORE_LITERAL);
- addEEnumLiteral(dtdOccurrenceTypeEEnum, DTDOccurrenceType.ZERO_OR_MORE_LITERAL);
-
- initEEnum(dtdDefaultKindEEnum, DTDDefaultKind.class, "DTDDefaultKind"); //$NON-NLS-1$
- addEEnumLiteral(dtdDefaultKindEEnum, DTDDefaultKind.IMPLIED_LITERAL);
- addEEnumLiteral(dtdDefaultKindEEnum, DTDDefaultKind.REQUIRED_LITERAL);
- addEEnumLiteral(dtdDefaultKindEEnum, DTDDefaultKind.FIXED_LITERAL);
- addEEnumLiteral(dtdDefaultKindEEnum, DTDDefaultKind.NOFIXED_LITERAL);
-
- initEEnum(dtdBasicTypeKindEEnum, DTDBasicTypeKind.class, "DTDBasicTypeKind"); //$NON-NLS-1$
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.NONE_LITERAL);
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.CDATA_LITERAL);
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.ID_LITERAL);
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.IDREF_LITERAL);
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.IDREFS_LITERAL);
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.ENTITY_LITERAL);
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.ENTITIES_LITERAL);
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.NMTOKEN_LITERAL);
- addEEnumLiteral(dtdBasicTypeKindEEnum, DTDBasicTypeKind.NMTOKENS_LITERAL);
-
- initEEnum(dtdEnumGroupKindEEnum, DTDEnumGroupKind.class, "DTDEnumGroupKind"); //$NON-NLS-1$
- addEEnumLiteral(dtdEnumGroupKindEEnum, DTDEnumGroupKind.NAME_TOKEN_GROUP_LITERAL);
- addEEnumLiteral(dtdEnumGroupKindEEnum, DTDEnumGroupKind.NOTATION_GROUP_LITERAL);
-
- initEEnum(dtdGroupKindEEnum, DTDGroupKind.class, "DTDGroupKind"); //$NON-NLS-1$
- addEEnumLiteral(dtdGroupKindEEnum, DTDGroupKind.SEQUENCE_LITERAL);
- addEEnumLiteral(dtdGroupKindEEnum, DTDGroupKind.CHOICE_LITERAL);
-
- initEEnum(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.class, "XMLSchemaDefinedType"); //$NON-NLS-1$
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.NONE_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.STRING_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.BOOLEAN_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.FLOAT_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.DOUBLE_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.DECIMAL_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.TIMEINSTANT_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.TIMEDURATION_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.RECURRINGINSTANT_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.BINARY_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.URI_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.INTEGER_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.DATE_LITERAL);
- addEEnumLiteral(xmlSchemaDefinedTypeEEnum, XMLSchemaDefinedType.TIME_LITERAL);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-
-} // DTDPackageImpl
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDParameterEntityReferenceImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDParameterEntityReferenceImpl.java
deleted file mode 100644
index e1e26bee57..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDParameterEntityReferenceImpl.java
+++ /dev/null
@@ -1,610 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.notify.impl.NotificationChainImpl;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDLexicalInfo;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.util.DTDPathnameUtil;
-
-
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Parameter Entity Reference</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.wst.dtd.core.internal.emf.internal.impl.DTDParameterEntityReferenceImpl#getEntity <em>Entity</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DTDParameterEntityReferenceImpl extends DTDContentImpl implements DTDParameterEntityReference, ENamedElement, DTDContent {
-
- public String getName() {
- DTDEntity entity = getEntity();
- if (entity != null) {
- return getEntity().getName();
- } // end of if ()
- return ""; //$NON-NLS-1$
- }
-
- public String getPathname() {
- return DTDPathnameUtil.makePath(null, "PEnt", getName(), -1); //$NON-NLS-1$
- }
-
- public DTDObject findObject(String relativePath) {
- return null;
- }
-
- // ugly hack for now since we don't have multiple inheritance.
- // Would rather have all this stuff in a base class but these
- // classes are inheriting from sometimes different mof classes
- DTDLexicalInfo lexInfo = new DTDLexicalInfo();
-
- /**
- * Get the value of startOffset.
- *
- * @return value of startOffset.
- */
- public int getStartOffset() {
- return lexInfo.getStartOffset();
- }
-
- /**
- * Set the value of startOffset.
- *
- * @param v
- * Value to assign to startOffset.
- */
- public void setStartOffset(int v) {
- lexInfo.setStartOffset(v);
- }
-
- /**
- * Get the value of endOffset.
- *
- * @return value of endOffset.
- */
- public int getEndOffset() {
- return lexInfo.getEndOffset();
- }
-
- /**
- * Set the value of endOffset.
- *
- * @param v
- * Value to assign to endOffset.
- */
- public void setEndOffset(int v) {
- lexInfo.setEndOffset(v);
- }
-
-
- /**
- * The cached value of the '{@link #getEntity() <em>Entity</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getEntity()
- * @generated
- * @ordered
- */
- protected DTDEntity entity = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DTDParameterEntityReferenceImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDParameterEntityReference();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntity getEntity() {
- if (entity != null && entity.eIsProxy()) {
- DTDEntity oldEntity = entity;
- entity = (DTDEntity) EcoreUtil.resolve(entity, this);
- if (entity != oldEntity) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, oldEntity, entity));
- }
- }
- return entity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DTDEntity basicGetEntity() {
- return entity;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetEntity(DTDEntity newEntity, NotificationChain msgs) {
- DTDEntity oldEntity = entity;
- entity = newEntity;
- if (eNotificationRequired()) {
- if (msgs == null)
- msgs = new NotificationChainImpl(4);
- msgs.add(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, oldEntity, newEntity));
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setEntity(DTDEntity newEntity) {
- if (newEntity != entity) {
- NotificationChain msgs = null;
- if (entity != null)
- msgs = ((InternalEObject) entity).eInverseRemove(this, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, DTDEntity.class, msgs);
- if (newEntity != null)
- msgs = ((InternalEObject) newEntity).eInverseAdd(this, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, DTDEntity.class, msgs);
- msgs = basicSetEntity(newEntity, msgs);
- if (msgs != null)
- msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY, newEntity, newEntity));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE, msgs);
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY :
- if (entity != null)
- msgs = ((InternalEObject) entity).eInverseRemove(this, DTDPackage.DTD_ENTITY__PARM_ENTITY_REF, DTDEntity.class, msgs);
- return basicSetEntity((DTDEntity) otherEnd, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE :
- return eBasicSetContainer(null, DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE, msgs);
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY :
- return basicSetEntity(null, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_FILE__DTD_CONTENT, DTDFile.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE :
- return getDTDFile();
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY :
- if (resolve)
- return getEntity();
- return basicGetEntity();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE :
- setDTDFile((DTDFile) newValue);
- return;
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY :
- setEntity((DTDEntity) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE :
- setDTDFile((DTDFile) null);
- return;
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY :
- setEntity((DTDEntity) null);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE :
- return getDTDFile() != null;
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY :
- return entity != null;
- }
- return eDynamicIsSet(eFeature);
- }
-
-} // DTDParameterEntityReferenceImpl
-
-// +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
-// //public class DTDParameterEntityReferenceImpl extends ENamespaceImpl
-// implements DTDParameterEntityReference, ENamespace, DTDContent{
-// -------------------GENERICRULES.JSED-------------------
-
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected DTDEntity entity = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected boolean setEntity = false;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// private DTDContentImpl dtdContentDelegate = null;
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EObject initInstance() {
-// setEMetaObj(eClassDTDParameterEntityReference());
-// initInstanceDelegates();
-// return this;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected void initInstanceDelegates() {
-// super.initInstanceDelegates();
-//
-
-// getDtdContentDelegate().refSetDelegateOwner(this);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public DTDPackage ePackageDTD() {
-// return
-// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EClass eClassDTDParameterEntityReference() {
-// return
-// ((DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI)).getDTDParameterEntityReference();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation
-// */
-// public DTDEntity getEntity() {
-// try {
-// if (this.entity == null) return null;
-// this.entity = (DTDEntity) ((InternalEObject)this.entity).resolve(this,
-// DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity());
-// if (this.entity==null) this.setEntity = false;
-// return this.entity;
-// } catch (Exception e) {
-// return null;
-// }
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setEntity(DTDEntity l) {
-// refSetValueForSVReference(DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity(),this.entity,l);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetEntity() {
-// refUnsetValueForSVReference(DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity(),this.entity);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetEntity() {
-// return setEntity;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Object eGet(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eGet(feature);
-// }
-// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: return getEntity();
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: return
-// getDTDFile();
-//
-
-// }
-// return super.eGet(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Object refBasicValue(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.refBasicValue(feature);
-// }
-// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY:
-// if (!this.setEntity||this.entity==null) return null;
-// if (((InternalEObject)this.entity).refIsDeleted()) {this.entity=null;
-// this.setEntity=false;}
-// return this.entity;
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: return
-// ((InternalEObject)getDtdContentDelegate()).refBasicValue(feature);
-//
-
-// }
-// return super.refBasicValue(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean eIsSet(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eIsSet(feature);
-// }
-// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: return
-// isSetEntity();
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: return
-// isSetDTDFile();
-//
-
-// }
-// return super.eIsSet(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void eSet(EStructuralFeature feature, Object newValue) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// super.eSet(feature, newValue);
-// }
-// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: {
-// setEntity((DTDEntity)newValue);
-// return;
-// }
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: {
-// setDTDFile((DTDFile)newValue);
-// return;
-// }
-//
-
-// }
-// super.eSet(feature, newValue);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Notification eBasicSet(EStructuralFeature feature, Object newValue)
-// {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.eBasicSet(feature, newValue);
-// }
-// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: {
-// Object oldValue = this.entity;
-// this.entity = (DTDEntity)newValue;
-// this.setEntity = true;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.SET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity(),oldValue,newValue);
-// }
-//
-
-// }
-// return super.eBasicSet(feature, newValue);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void eUnset(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// super.eUnset(feature);
-// }
-// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: {
-// unsetEntity();
-// return;
-// }
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__DTD_FILE: {
-// unsetDTDFile();
-// return;
-// }
-//
-
-// }
-// super.eUnset(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public Notification refBasicUnsetValue(EStructuralFeature feature) {
-// EStructuralFeature eFeature=null;
-// try {
-// eFeature=(EStructuralFeature)feature;
-// } catch (ClassCastException e) {
-// return super.refBasicUnsetValue(feature);
-// }
-// switch (eClassDTDParameterEntityReference().getEFeatureId(eFeature)) {
-// case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE__ENTITY: {
-// Object oldValue = this.entity;
-// this.entity = null;
-// this.setEntity = false;
-// return new
-// ENotificationImpl((InternalEObject)this,Notification.UNSET,(EStructuralFeature)DTDPackage.eINSTANCE.getDTDParameterEntityReference_Entity(),oldValue,null);
-// }
-//
-
-// }
-// return super.refBasicUnsetValue(feature);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// protected DTDContentImpl getDtdContentDelegate() {
-// if (dtdContentDelegate == null) {
-// DTDPackage pkg =
-// (DTDPackage)EPackage.Registry.INSTANCE.getEPackage(DTDPackage.eNS_URI);
-// dtdContentDelegate=(DTDContentImpl)pkg.eCreateInstance(pkg.DTD_CONTENT);
-// dtdContentDelegate.initInstance();
-// }
-// return dtdContentDelegate;
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public EClass eClassDTDContent() {
-// return getDtdContentDelegate().eClass();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public DTDFile getDTDFile() {
-// return getDtdContentDelegate().getDTDFile();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void setDTDFile(DTDFile value) {
-// getDtdContentDelegate().setDTDFile(value);
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public void unsetDTDFile() {
-// getDtdContentDelegate().unsetDTDFile();
-// }
-// /**
-// * @generated This field/method will be replaced during code generation.
-// */
-// public boolean isSetDTDFile() {
-// return getDtdContentDelegate().isSetDTDFile();
-// }
-// }
-// -------------------GENERICRULES.JSED-------------------
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDRepeatableContentImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDRepeatableContentImpl.java
deleted file mode 100644
index c8f227cbd9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDRepeatableContentImpl.java
+++ /dev/null
@@ -1,265 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent;
-
-/**
- * @generated
- */
-public abstract class DTDRepeatableContentImpl extends DTDElementContentImpl implements DTDRepeatableContent {
- /**
- * The default value of the '{@link #getOccurrence() <em>Occurrence</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getOccurrence()
- * @generated
- * @ordered
- */
- protected static final DTDOccurrenceType OCCURRENCE_EDEFAULT = DTDOccurrenceType.ONE_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DTDOccurrenceType occurrence = OCCURRENCE_EDEFAULT;
-
- public DTDRepeatableContentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EClass eStaticClass() {
- return DTDPackage.eINSTANCE.getDTDRepeatableContent();
- }
-
- public String unparse() {
- StringBuffer sb = new StringBuffer(128);
- if (getOccurrence().getValue() != DTDOccurrenceType.ONE) {
- if (this instanceof DTDEntityReferenceContent) {
- sb.append("(").append(unparseRepeatableContent()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- sb.append(unparseRepeatableContent());
- }
-
- // MOF2EMF Port
- // EEnumLiteral lit = getOccurrence();
- DTDOccurrenceType lit = getOccurrence();
- if (lit != null) {
- sb.append((char) lit.getValue());
- }
- }
- else {
- sb.append(unparseRepeatableContent());
- }
-
- return sb.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * JUST_ONE= -1 ONE_OR_MORE=43 OPTIONAL=63 ZERO_OR_MORE=42
- */
- public DTDOccurrenceType getOccurrence() {
- return occurrence;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setOccurrence(DTDOccurrenceType newOccurrence) {
- DTDOccurrenceType oldOccurrence = occurrence;
- occurrence = newOccurrence == null ? OCCURRENCE_EDEFAULT : newOccurrence;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE, oldOccurrence, occurrence));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_REPEATABLE_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT :
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs);
- }
- }
- if (eContainer != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return eBasicSetContainer(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (baseClass == null ? featureID : eDerivedStructuralFeatureID(featureID, baseClass)) {
- case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP :
- return eBasicSetContainer(null, DTDPackage.DTD_REPEATABLE_CONTENT__GROUP, msgs);
- case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT :
- return eBasicSetContainer(null, DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT, msgs);
- default :
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) {
- if (eContainerFeatureID >= 0) {
- switch (eContainerFeatureID) {
- case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_GROUP_CONTENT__CONTENT, DTDGroupContent.class, msgs);
- case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT :
- return eContainer.eInverseRemove(this, DTDPackage.DTD_ELEMENT__CONTENT, DTDElement.class, msgs);
- default :
- return eDynamicBasicRemoveFromContainer(msgs);
- }
- }
- return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - eContainerFeatureID, null, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP :
- return getGroup();
- case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT :
- return getElement();
- case DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE :
- return getOccurrence();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP :
- return getGroup() != null;
- case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT :
- return getElement() != null;
- case DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE :
- return occurrence != OCCURRENCE_EDEFAULT;
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP :
- setGroup((DTDGroupContent) newValue);
- return;
- case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT :
- setElement((DTDElement) newValue);
- return;
- case DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE :
- setOccurrence((DTDOccurrenceType) newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature.getFeatureID(), eFeature.getContainerClass())) {
- case DTDPackage.DTD_REPEATABLE_CONTENT__GROUP :
- setGroup((DTDGroupContent) null);
- return;
- case DTDPackage.DTD_REPEATABLE_CONTENT__ELEMENT :
- setElement((DTDElement) null);
- return;
- case DTDPackage.DTD_REPEATABLE_CONTENT__OCCURRENCE :
- setOccurrence(OCCURRENCE_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (occurrence: "); //$NON-NLS-1$
- result.append(occurrence);
- result.append(')');
- return result.toString();
- }
-
- /*
- * @see DTDRepeatableContent#unparseRepeatableContent()
- */
- public String unparseRepeatableContent() {
- return null;
- }
-
- /*
- * @see DTDElementContent#getContentName()
- */
- public String getContentName() {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDAdapterFactory.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDAdapterFactory.java
deleted file mode 100644
index 3dab6b526d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDAdapterFactory.java
+++ /dev/null
@@ -1,440 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.ETypedElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent;
-
-
-
-public class DTDAdapterFactory extends AdapterFactoryImpl {
- /**
- * @generated This field/method will be replaced during code generation.
- */
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected static DTDPackage modelPackage;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public DTDAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = DTDPackage.eINSTANCE;
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject) object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch the delegates to the <code>createXXX</code> methods. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DTDSwitch modelSwitch = new DTDSwitch() {
- public Object caseDTDElementContent(DTDElementContent object) {
- return createDTDElementContentAdapter();
- }
-
- public Object caseDTDGroupContent(DTDGroupContent object) {
- return createDTDGroupContentAdapter();
- }
-
- public Object caseDTDAttribute(DTDAttribute object) {
- return createDTDAttributeAdapter();
- }
-
- public Object caseDTDElement(DTDElement object) {
- return createDTDElementAdapter();
- }
-
- public Object caseDTDEmptyContent(DTDEmptyContent object) {
- return createDTDEmptyContentAdapter();
- }
-
- public Object caseDTDAnyContent(DTDAnyContent object) {
- return createDTDAnyContentAdapter();
- }
-
- public Object caseDTDPCDataContent(DTDPCDataContent object) {
- return createDTDPCDataContentAdapter();
- }
-
- public Object caseDTDElementReferenceContent(DTDElementReferenceContent object) {
- return createDTDElementReferenceContentAdapter();
- }
-
- public Object caseDTDRepeatableContent(DTDRepeatableContent object) {
- return createDTDRepeatableContentAdapter();
- }
-
- public Object caseDTDFile(DTDFile object) {
- return createDTDFileAdapter();
- }
-
- public Object caseDTDBasicType(DTDBasicType object) {
- return createDTDBasicTypeAdapter();
- }
-
- public Object caseDTDEnumerationType(DTDEnumerationType object) {
- return createDTDEnumerationTypeAdapter();
- }
-
- public Object caseDTDNotation(DTDNotation object) {
- return createDTDNotationAdapter();
- }
-
- public Object caseDTDEntity(DTDEntity object) {
- return createDTDEntityAdapter();
- }
-
- public Object caseDTDEntityContent(DTDEntityContent object) {
- return createDTDEntityContentAdapter();
- }
-
- public Object caseDTDExternalEntity(DTDExternalEntity object) {
- return createDTDExternalEntityAdapter();
- }
-
- public Object caseDTDInternalEntity(DTDInternalEntity object) {
- return createDTDInternalEntityAdapter();
- }
-
- public Object caseDTDParameterEntityReference(DTDParameterEntityReference object) {
- return createDTDParameterEntityReferenceAdapter();
- }
-
- public Object caseDTDEntityReferenceContent(DTDEntityReferenceContent object) {
- return createDTDEntityReferenceContentAdapter();
- }
-
- public Object caseDTDContent(DTDContent object) {
- return createDTDContentAdapter();
- }
-
- public Object caseEModelElement(EModelElement object) {
- return createEModelElementAdapter();
- }
-
- public Object caseENamedElement(ENamedElement object) {
- return createENamedElementAdapter();
- }
-
- public Object caseETypedElement(ETypedElement object) {
- return createETypedElementAdapter();
- }
-
- public Object caseEStructuralFeature(EStructuralFeature object) {
- return createEStructuralFeatureAdapter();
- }
-
- public Object caseEAttribute(EAttribute object) {
- return createEAttributeAdapter();
- }
-
- public Object caseEClassifier(EClassifier object) {
- return createEClassifierAdapter();
- }
-
- public Object caseEClass(EClass object) {
- return createEClassAdapter();
- }
-
- public Object caseEDataType(EDataType object) {
- return createEDataTypeAdapter();
- }
-
- public Object caseEEnum(EEnum object) {
- return createEEnumAdapter();
- }
-
- public Object defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createAdapter(Notifier target) {
- return (Adapter) modelSwitch.doSwitch((EObject) target);
- }
-
-
- /**
- * By default create methods return null so that we can easily ignore
- * cases. It's useful to ignore a case when inheritance will catch all the
- * cases anyway.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDFileAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDNotationAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDEntityAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDEntityContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDExternalEntityAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDInternalEntityAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDParameterEntityReferenceAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDEntityReferenceContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDRepeatableContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDElementReferenceContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDElementAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDElementContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDEmptyContentAdapter() {
- return null;
- }
-
- /**
- * By default create methods return null so that we can easily ignore
- * cases. It's useful to ignore a case when inheritance will catch all the
- * cases anyway.
- */
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDAnyContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDPCDataContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDGroupContentAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDAttributeAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDEnumerationTypeAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createDTDBasicTypeAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEClassAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEAttributeAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEEnumAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEModelElementAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createENamedElementAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEStructuralFeatureAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEDataTypeAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createETypedElementAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEClassifierAdapter() {
- return null;
- }
-
-} // DTDAdapterFactory
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDMetrics.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDMetrics.java
deleted file mode 100644
index 31188de37f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDMetrics.java
+++ /dev/null
@@ -1,125 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-
-
-public class DTDMetrics {
- protected DTDFile dtdFile;
- protected Hashtable elementReferenceMap;
-
- public DTDMetrics(DTDFile dtdFile) {
- this.dtdFile = dtdFile;
- }
-
- public Hashtable getElementReferences() {
- if (elementReferenceMap == null) {
- elementReferenceMap = new Hashtable();
- new DTDVisitor() {
-
- public void visitDTDElementReferenceContent(DTDElementReferenceContent elementReferenceContent) {
- DTDElement dtdElement = elementReferenceContent.getReferencedElement();
- Object visitation = elementReferenceMap.get(dtdElement);
- if (visitation == null) {
- elementReferenceMap.put(dtdElement, visitation = new Vector());
- }
- ((Vector) visitation).addElement(elementReferenceContent);
- }
- }.visitDTDFile(dtdFile);
- }
-
- return elementReferenceMap;
- }
-
- public int getElementReferenceCount(DTDElement dtdElement) {
- Object elementReferences = getElementReferences().get(dtdElement);
- return elementReferences == null ? 0 : ((Vector) elementReferences).size();
- }
-
- public DTDElement getLeastReferencedElement() {
- DTDElement result = null;
- int lowestReferenceCount = Integer.MAX_VALUE;
-
- Collection elements = dtdFile.listDTDElement();
- for (Iterator i = elements.iterator(); i.hasNext();) {
- DTDElement element = (DTDElement) i.next();
- int count = getElementReferenceCount(element);
- if (count < lowestReferenceCount) {
- result = element;
- lowestReferenceCount = count;
- }
- }
-
- return result;
- }
-
- /**
- * @generated
- */
- protected Hashtable getElementReferencesGen() {
-
- if (elementReferenceMap == null) {
- elementReferenceMap = new Hashtable();
- new DTDVisitor() {
-
- public void visitDTDElementReferenceContent(DTDElementReferenceContent elementReferenceContent) {
- DTDElement dtdElement = elementReferenceContent.getReferencedElement();
- Object visitation = elementReferenceMap.get(dtdElement);
- if (visitation == null) {
- elementReferenceMap.put(dtdElement, visitation = new Vector());
- }
- ((Vector) visitation).addElement(elementReferenceContent);
- }
- }.visitDTDFile(dtdFile);
- }
-
- return elementReferenceMap;
- }
-
- /**
- * @generated
- */
- protected int getElementReferenceCountGen(DTDElement dtdElement) {
-
- Object elementReferences = getElementReferences().get(dtdElement);
- return elementReferences == null ? 0 : ((Vector) elementReferences).size();
- }
-
- /**
- * @generated
- */
- protected DTDElement getLeastReferencedElementGen() {
-
- DTDElement result = null;
- int lowestReferenceCount = Integer.MAX_VALUE;
-
- Collection elements = dtdFile.listDTDElement();
- for (Iterator i = elements.iterator(); i.hasNext();) {
- DTDElement element = (DTDElement) i.next();
- int count = getElementReferenceCount(element);
- if (count < lowestReferenceCount) {
- result = element;
- lowestReferenceCount = count;
- }
- }
-
- return result;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDModelBuilder.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDModelBuilder.java
deleted file mode 100644
index e8dd1daa56..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDModelBuilder.java
+++ /dev/null
@@ -1,1844 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.dtd.core.internal.DTDCoreMessages;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicTypeKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDDefaultKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFactory;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.DTDType;
-import org.eclipse.wst.dtd.core.internal.emf.impl.DTDFactoryImpl;
-import org.eclipse.wst.dtd.core.internal.saxparser.AttNode;
-import org.eclipse.wst.dtd.core.internal.saxparser.Attlist;
-import org.eclipse.wst.dtd.core.internal.saxparser.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.saxparser.CMGroupNode;
-import org.eclipse.wst.dtd.core.internal.saxparser.CMNode;
-import org.eclipse.wst.dtd.core.internal.saxparser.CMNodeType;
-import org.eclipse.wst.dtd.core.internal.saxparser.CMReferenceNode;
-import org.eclipse.wst.dtd.core.internal.saxparser.CMRepeatableNode;
-import org.eclipse.wst.dtd.core.internal.saxparser.DTD;
-import org.eclipse.wst.dtd.core.internal.saxparser.DTDSaxArtifactVisitor;
-import org.eclipse.wst.dtd.core.internal.saxparser.ElementDecl;
-import org.eclipse.wst.dtd.core.internal.saxparser.EntityDecl;
-import org.eclipse.wst.dtd.core.internal.saxparser.ErrorMessage;
-import org.eclipse.wst.dtd.core.internal.saxparser.NotationDecl;
-
-public class DTDModelBuilder extends DTDSaxArtifactVisitor {
- DTD dtd;
- DTDUtil dtdUtil;
- DTDFile dtdFile;
- ResourceSet resources;
-
- public DTDModelBuilder(ResourceSet resources, DTDUtil dtdUtil, DTD dtd, DTDFile dtdFile) {
- this.resources = resources;
- this.dtdUtil = dtdUtil;
- this.dtd = dtd;
- this.dtdFile = dtdFile;
- }
-
- public DTDFactoryImpl getFactory() {
- return (DTDFactoryImpl) dtdUtil.getFactory();
- }
-
- public DTDFile getDTDFile() {
- return dtdFile;
- }
-
- public void visitDTD(DTD dtd) {
- super.visitDTD(dtd);
-
- // - 2nd pass -
- // do final processing for Attlists and adding contentModel
- addAttlistAndContentModel(dtd, dtdFile);
- }
-
- public void visitElementDecl(ElementDecl element) {
- // Element might have been added earlier because it is referenced
- String declName = element.getNodeName();
- // System.out.println("process ElementDecl:" + declName );
- DTDElement dtdelement = (DTDElement) dtdUtil.getElementPool().get(declName);
- if (dtdelement == null) {
- // System.out.println("process ElementDecl - not found - create"
- // );
- dtdelement = getFactory().createDTDElement();
- dtdelement.setName(declName);
- dtdFile.getDTDObject().add(dtdelement);
- dtdUtil.getElementPool().put(declName, dtdelement);
- }
-
- super.visitElementDecl(element);
- }
-
- public void visitNotationDecl(NotationDecl notation) {
- // Notation might have been added earlier because it is referenced
- // by an entity
- DTDNotation dtdnot = dtdFile.findNotation(notation.getNodeName());
- if (dtdnot == null) {
- dtdnot = getFactory().createDTDNotation();
- dtdFile.getDTDObject().add(dtdnot);
- }
- dtdnot.setName(notation.getNodeName());
-
- if (notation.getSystemId() != null)
- dtdnot.setSystemID(notation.getSystemId());
- if (notation.getPublicId() != null)
- dtdnot.setPublicID(notation.getPublicId());
-
- if (notation.getComment() != null)
- dtdnot.setComment(notation.getComment());
- if (notation.getErrorMessage() != null) {
- addErrorMessage(notation.getErrorMessage(), dtdnot);
- }
-
- super.visitNotationDecl(notation);
- }
-
- public void visitParameterEntityReferenceDecl(EntityDecl entity) {
- // This is a parameter entity reference.
- // Add the link to the real entity that it references
- DTDParameterEntityReference parmEntRef = getFactory().createDTDParameterEntityReference();
- dtdFile.getDTDObject().add(parmEntRef);
-
- String entityName = entity.getNodeName();
-
- // Add the reference to the DTDEntity
- DTDEntity dtdentity = getDTDFile().findEntity(entityName);
- if (dtdentity != null) {
- parmEntRef.setEntity(dtdentity);
- }
- if (entity.getErrorMessage() != null) {
- addErrorMessage(entity.getErrorMessage(), dtdentity);
- }
- // System.out.println("adding PE reference: " + declName);
-
- super.visitParameterEntityReferenceDecl(entity);
- }
-
- public void visitExternalEntityDecl(EntityDecl entity) {
- DTDEntity dtdEntity = createDTDEntity(entity);
- // System.out.println("adding entity: " + declName);
- DTDExternalEntity extEntity = getFactory().createDTDExternalEntity();
- dtdEntity.setContent(extEntity);
-
- finishExternalEntity(extEntity, entity);
- // System.out.println(" ext entity toMof: " );
- if (dtdEntity.isParameterEntity()) {
-
- dtdUtil.getPEPool().put("%" + entity.getNodeName() + ";", dtdEntity); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- super.visitExternalEntityDecl(entity);
- }
-
- public void visitInternalEntityDecl(EntityDecl entity) {
- DTDEntity dtdEntity = createDTDEntity(entity);
-
- DTDInternalEntity intEntity = getFactory().createDTDInternalEntity();
- dtdEntity.setContent(intEntity);
- intEntity.setValue(entity.getValue());
- // System.out.println(" int entity toMof: " );
- if (dtdEntity.isParameterEntity()) {
- dtdUtil.getPEPool().put("%" + entity.getNodeName() + ";", dtdEntity); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- super.visitInternalEntityDecl(entity);
- }
-
- private void addAttlistAndContentModel(DTD dtd, DTDFile dFile) {
- // System.out.println("addAttListAndCotentModel - dtd:" +
- // dtd.getName());
- Enumeration en = dtd.externalElements();
- while (en.hasMoreElements()) {
- Object e = en.nextElement();
- if (e instanceof ElementDecl) {
- DTDElement dtdelement = (DTDElement) dtdUtil.getElementPool().get(((ElementDecl) e).getNodeName());
- if (dtdelement == null) {
- dtdelement = getFactory().createDTDElement();
- dtdFile.getDTDObject().add(dtdelement);
- }
- finishElementDecl(dtdelement, (ElementDecl) e);
- }
- else if (e instanceof Attlist) {
- processAttList((Attlist) e);
- }
- }
- }
-
-
- private void processAttList(Attlist attList) {
- DTDElement e = (DTDElement) dtdUtil.getElementPool().get(attList.getNodeName());
- if (e != null) {
- // Element has been added. Add the attributes
- // System.out.println(" processAttlist - adding Attlist:" +
- // attList.getNodeName());
- createAttributes(e, attList);
- }
- else {
- // System.out.println("!!!!!!!!! element is null ");
- }
- }
-
- // /////////////////////////////////////////////////////////////
- //
- // Methods for finishing the import of a DTDExternalEntity
- //
- // /////////////////////////////////////////////////////////////
- void finishExternalEntity(DTDExternalEntity extEntity, EntityDecl entityDecl) {
- updateSystemID(extEntity, entityDecl);
- extEntity.setPublicID(entityDecl.getPublicId());
-
- String notationName = entityDecl.getNotationName();
- if (notationName != null) {
- DTDNotation dtdNotation = createOrFindNotation(extEntity, notationName, true);
- extEntity.setNotation(dtdNotation);
- }
- }
-
- public DTDNotation createOrFindNotation(DTDExternalEntity extEntity, String name, boolean create) {
- DTDNotation aNotation = extEntity.getDTDEntity().getDTDFile().findNotation(name);
- if (aNotation != null) {
- return aNotation;
- }
-
- //
- // Create a notation for the reference
- //
- if (create) {
- aNotation = getFactory().createDTDNotation();
- dtdFile.getDTDObject().add(aNotation);
- aNotation.setName(name);
- }
- return aNotation;
- }
-
- /**
- * The SystemID attribute is set to whatever the user enters e.g.
- * com/ibm/b2b/xmimodels/xxx.dtd.xmi
- *
- * In the unparse() method, parse out the DTD file name from the classpath
- * name. e.g. returns xxx.dtd
- */
- private void updateSystemID(DTDExternalEntity extEntity, EntityDecl entityDecl) {
- String systemId = entityDecl.getSystemId();
- String publicId = entityDecl.getPublicId();
- if (systemId != null) {
- URIResolver idResolver = URIResolverPlugin.createResolver();
- String uri = idResolver.resolve(dtd.getName(), publicId, systemId);
- ExternalDTDModel ed = dtdUtil.getExternalDTDModel(resources, uri);
- if (ed != null) {
- DTDFile referenceDtdFile = ed.getExternalDTDFile();
- extEntity.setEntityReferencedFromAnotherFile(referenceDtdFile);
- extEntity.setSystemID(systemId);
- }
- else {
- if (entityDecl.getErrorMessage() == null) {
- ErrorMessage dtdError = new ErrorMessage();
- dtdError.setErrorMessage(DTDCoreMessages._ERROR_INCL_FILE_LOAD_FAILURE + " '" + systemId + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- addErrorMessage(dtdError, extEntity.getDTDEntity());
- }
-
- if (systemId != null) {
- extEntity.setSystemID(systemId);
- }
- else {
- extEntity.setSystemID(""); //$NON-NLS-1$
- }
- }
- } // end of if ()
- else {
- // set the system id to be ""
- extEntity.setSystemID(""); //$NON-NLS-1$
- }
- }
-
- public DTDEntity createDTDEntity(EntityDecl entity) {
- // create and do what we can to fill in some basic things
- DTDEntity dtdEntity = getFactory().createDTDEntity();
- dtdFile.getDTDObject().add(dtdEntity);
-
- dtdEntity.setName(entity.getNodeName());
- dtdEntity.setParameterEntity(entity.isParameter());
- if (entity.getComment() != null) {
- dtdEntity.setComment(entity.getComment());
- }
- if (entity.getErrorMessage() != null) {
- addErrorMessage(entity.getErrorMessage(), dtdEntity);
- }
-
- return dtdEntity;
- }
-
-
- // /////////////////////////////////////////////////////////////
- //
- // Methods for finishing the import of a DTDElement
- //
- // /////////////////////////////////////////////////////////////
- public void finishElementDecl(DTDElement dtdElement, ElementDecl ed) {
- dtdElement.setName(ed.getNodeName());
-
- CMNode cmNode = ed.getContentModelNode();
-
- if (ed.getComment() != null) {
- dtdElement.setComment(ed.getComment());
- }
- if (ed.getErrorMessage() != null) {
- addErrorMessage(ed.getErrorMessage(), dtdElement);
- }
-
- if (cmNode instanceof CMBasicNode) {
- CMBasicNode bn = (CMBasicNode) cmNode;
- switch (bn.getType()) {
- case CMNodeType.EMPTY :
- DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent();
- dtdElement.setContent(emptyContent);
- break;
-
- case CMNodeType.ANY :
- DTDAnyContent anyContent = getFactory().createDTDAnyContent();
- dtdElement.setContent(anyContent);
- break;
-
- case CMNodeType.PCDATA :
- DTDPCDataContent pcData = getFactory().createDTDPCDataContent();
- dtdElement.setContent(pcData);
- }
-
- }
- else if (cmNode instanceof CMReferenceNode) {
- CMReferenceNode rn = (CMReferenceNode) cmNode;
- if (rn.getType() == CMNodeType.ENTITY_REFERENCE) {
- String entityName = rn.getName().trim();
-
- DTDEntity anEntity = (DTDEntity) dtdUtil.getPEPool().get(entityName);
- if (anEntity != null) {
- //
- // Create an DTDEntityReference and set its referenced
- // element
- //
- DTDEntityReferenceContent enRef = getFactory().createDTDEntityReferenceContent();
- enRef.setElementReferencedEntity(anEntity);
-
- DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(rn));
- enRef.setOccurrence(occurrenceType);
-
- dtdElement.setContent(enRef);
- }
- else { // create default content
- DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent();
- dtdElement.setContent(emptyContent);
- }
- }
- else {
- //
- // Find the real element for this element references
- // If the real element does not yet exist, create it
- //
- DTDElement anElement = createOrFindElement(rn.getName(), dtdElement);
-
- //
- // Create an DTDElementReference and set its referenced
- // element
- //
- DTDElementReferenceContent elemRef = getFactory().createDTDElementReferenceContent();
- elemRef.setReferencedElement(anElement);
-
- DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(rn));
- elemRef.setOccurrence(occurrenceType);
-
- // setContent to DTDElementReference
- dtdElement.setContent(elemRef);
-
- }
- }
- else if (cmNode instanceof CMGroupNode) {
- CMGroupNode grpNode = (CMGroupNode) cmNode;
- DTDGroupContent groupContent = getFactory().createDTDGroupContent();
- DTDGroupKind groupKind = DTDGroupKind.get(computeMofGroupKind(grpNode.getGroupKind()));
- groupContent.setGroupKind(groupKind);
- DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(grpNode));
- groupContent.setOccurrence(occurrenceType);
-
- // just use the locator for the element as the closest guess
- processGroupContent(groupContent, grpNode);
- dtdElement.setContent(groupContent);
- }
- else if (cmNode == null) {
- // bad thing happened here, just create a pcdata
- DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent();
- dtdElement.setContent(emptyContent);
- }
-
-
- }
-
-
- /**
- * Add a new group to the current group
- *
- * @param parent -
- * the parent node for this group element
- * @param op1Node -
- * the group e.g. (a,b)
- * @param op2Node -
- * set only if called by processCM1op e.g. (a,b)+
- */
- void processGroupContent(DTDGroupContent parent, CMGroupNode grpNode) {
- Enumeration children = grpNode.getChildren().elements();
- DTDFactory factory = getFactory();
- while (children.hasMoreElements()) {
- CMNode cnode = (CMNode) children.nextElement();
-
- if (cnode instanceof CMGroupNode) {
- CMGroupNode gNode = (CMGroupNode) cnode;
- DTDGroupContent groupContent = factory.createDTDGroupContent();
- DTDGroupKind groupKind = DTDGroupKind.get(computeMofGroupKind(gNode.getGroupKind()));
- groupContent.setGroupKind(groupKind);
- DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(gNode));
- groupContent.setOccurrence(occurrenceType);
-
- parent.getContent().add(groupContent);
- processGroupContent(groupContent, gNode);
- }
- else if (cnode instanceof CMBasicNode) {
- CMBasicNode n = (CMBasicNode) cnode;
- if (n.getType() == CMNodeType.PCDATA) {
- // Create a DTDPCDataContent for a leaf PCData node
- //
- DTDPCDataContent pcData = factory.createDTDPCDataContent();
- // Add #PCDATA to the Group, i.e Mixed content model
- parent.getContent().add(pcData);
- }
- }
- else if (cnode instanceof CMReferenceNode) {
- CMReferenceNode rn = (CMReferenceNode) cnode;
- if (rn.getType() == CMNodeType.ELEMENT_REFERENCE) {
- // System.out.println("CM Element Ref name: " +
- // rn.getName());
- //
- // Create an DTDElementReference and set its referenced
- // element
- //
- DTDElementReferenceContent elemRef = factory.createDTDElementReferenceContent();
-
- //
- // Find the real element for this element references
- // If the real element does not yet exist, create it
- //
- DTDElement anElement = createOrFindElement(rn.getName(), elemRef);
-
- elemRef.setReferencedElement(anElement);
-
- DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(rn));
- elemRef.setOccurrence(occurrenceType);
-
- // Add DTDElementReference to the Group
- parent.getContent().add(elemRef);
- }
- else // PE Reference
- {
- String entityName = rn.getName().trim();
-
- // System.out.println("CM PE Ref name: " + entityName);
- DTDEntity anEntity = (DTDEntity) dtdUtil.getPEPool().get(entityName);
- if (anEntity != null) {
- //
- // Create an DTDEntityReference and set its referenced
- // element
- //
- DTDEntityReferenceContent enRef = factory.createDTDEntityReferenceContent();
- enRef.setElementReferencedEntity(anEntity);
-
- DTDOccurrenceType occurrenceType = DTDOccurrenceType.get(computeMofOccurrence(rn));
- enRef.setOccurrence(occurrenceType);
-
- // Add DTDEntityReference to the Group
- parent.getContent().add(enRef);
-
- }
- }
- }
- }
- }
-
- /**
- * Find the real element that is referenced by the current element
- */
- private DTDElement createOrFindElement(String name, Object obj) {
- // DTDElement aElement = getDTDFile().findElement(name);
-
- DTDElement aElement = (DTDElement) dtdUtil.getElementPool().get(name);
-
- if (aElement != null) {
- return aElement;
- }
-
- String errorMsg = DTDCoreMessages._ERROR_UNDECLARED_ELEMENT_1; //$NON-NLS-1$
- errorMsg += "\"" + name + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- errorMsg += DTDCoreMessages._UI_ERRORPART_UNDECLARED_ELEMENT_2; //$NON-NLS-1$
-
- ErrorMessage dtdError = new ErrorMessage();
-
- dtdError.setErrorMessage(errorMsg);
- addErrorMessage(dtdError, obj);
- // System.out.println(errorMsg);
- // setDTDErrorMessage(errorMsg);
- getDTDFile().setParseError(true);
-
- //
- // Create an empty element for the reference to make it valid
- //
-
- DTDFactory factory = getFactory();
- DTDElement dtdelement = factory.createDTDElement();
- dtdelement.setName(name);
-
- DTDEmptyContent emptyContent = factory.createDTDEmptyContent();
- dtdelement.setContent(emptyContent);
-
- getDTDFile().getDTDObject().add(dtdelement);
- dtdUtil.getElementPool().put(name, dtdelement);
- return dtdelement;
- }
-
-
- /**
- * Compute the MOF occurrence from the xml4j occurrence
- */
- private int computeMofOccurrence(CMRepeatableNode rnode) {
- int occurrence = rnode.getOccurrence();
- int mofoccur = DTDOccurrenceType.ONE;
-
- if (occurrence == CMNodeType.ZERO_OR_MORE) {
- mofoccur = DTDOccurrenceType.ZERO_OR_MORE;
- }
- else if (occurrence == CMNodeType.ONE_OR_MORE) {
- mofoccur = DTDOccurrenceType.ONE_OR_MORE;
- }
- else if (occurrence == CMNodeType.OPTIONAL) {
- mofoccur = DTDOccurrenceType.OPTIONAL;
- }
- return mofoccur;
- }
-
- /**
- * Compute the MOF model group from the xml4j model group
- */
- private int computeMofGroupKind(int type) {
- if (type == CMNodeType.GROUP_CHOICE) {
- return DTDGroupKind.CHOICE;
- }
- else {
- return DTDGroupKind.SEQUENCE;
- }
- }
-
-
- // /////////////////////////////////////////////////////////////
- //
- // Methods for creating the attributes of a DTDElement
- //
- // /////////////////////////////////////////////////////////////
- public void createAttributes(DTDElement element, Attlist attList) {
- if (attList.getErrorMessage() != null) {
- addErrorMessage(attList.getErrorMessage(), element);
- }
-
- for (int i = 0; i < attList.size(); i++) {
- AttNode ad = attList.elementAt(i);
- // DTDAttributeElement dtdAtt=
- // getDTDAttributeElement(a.getName());
-
- // only add the AttDef if it is not added yet
- // ignore the dup AttDef as documented in the XML 1.0 specs
- // if( dtdAtt==null)
- addAttribute(element, ad);
- }
-
- }
-
- /**
- * Create a DTDAttribute from the xml4j attribute
- */
- public void addAttribute(DTDElement dtdelement, AttNode ad) {
- DTDAttribute dtdattr = getFactory().createDTDAttribute();
- dtdelement.getDTDAttribute().add(dtdattr);
- finishAttribute(dtdattr, ad);
- }
-
- // Stuff for populating attribute
- public void finishAttribute(DTDAttribute dtdattr, AttNode attdef) {
- boolean parseError = false;
-
- if (attdef.name.startsWith("%")) { //$NON-NLS-1$
- String peName = attdef.name.trim();
- DTDEntity en = (DTDEntity) dtdUtil.getPEPool().get(peName);
- if (en != null) {
- dtdattr.setAttributeNameReferencedEntity(en);
- }
- }
-
- dtdattr.setName(attdef.name);
-
- int attrType = attdef.getDeclaredType();
-
- if (attrType == AttNode.PEREFERENCE && attdef.type != null) {
- String peName = attdef.type.trim();
- DTDEntity en = (DTDEntity) dtdUtil.getPEPool().get(peName);
- if (en != null) {
- dtdattr.setAttributeTypeReferencedEntity(en);
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA()); // hack,
- // so
- // we
- // can
- // get
- // back
- // the
- // default
- // value
- }
- else
- // set default type
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA());
-
- }
- else {
- switch (attrType) {
- case AttNode.CDATA :
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA());
- break;
-
- case AttNode.ENTITIES :
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ENTITIES());
- break;
-
- case AttNode.ENTITY :
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ENTITY());
- break;
-
- case AttNode.ID :
- // check for duplicate ID attribute
- if (hasIDAttribute(dtdattr)) {
- String errMsg = DTDCoreMessages._ERROR_DUP_ID_ATTRIBUTE_1; //$NON-NLS-1$
- errMsg += attdef.name + DTDCoreMessages._UI_ERRORPART_DUP_ID_ATTRIBUTE_2; //$NON-NLS-1$
- // dtdattr.getDTDElement().getIElement().setDTDErrorMessage(errMsg);
- // dtdattr.getDTDElement().getDTDFile().setParseError(true);
- parseError = true;
- }
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ID());
- break;
-
- case AttNode.IDREF :
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_IDREF());
- break;
-
- case AttNode.IDREFS :
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_IDREFS());
- break;
-
- case AttNode.ENUMERATION :
- setAttrDTDType(dtdattr, createDTDEnumeration(dtdattr, attdef, DTDEnumGroupKind.NAME_TOKEN_GROUP));
- break;
-
- case AttNode.NOTATION :
- setAttrDTDType(dtdattr, createDTDEnumeration(dtdattr, attdef, DTDEnumGroupKind.NOTATION_GROUP));
- break;
-
- case AttNode.NMTOKEN :
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_NMTOKEN());
- break;
-
- case AttNode.NMTOKENS :
- setAttrDTDType(dtdattr, getFactory().getDTDBasicType_NMTOKENS());
- break;
-
- default :
- // System.out.println("DTDATTR '" +attdef.name + "'Unknown
- // type..." + attrType);
- }
- }
-
- int attrDefault = attdef.getDefaultType();
- int defaultKind = DTDDefaultKind.IMPLIED;
- switch (attrDefault) {
- case AttNode.FIXED :
- defaultKind = DTDDefaultKind.FIXED;
- break;
-
- case AttNode.IMPLIED :
- defaultKind = DTDDefaultKind.IMPLIED;
- break;
-
- case AttNode.REQUIRED :
- defaultKind = DTDDefaultKind.REQUIRED;
- break;
-
- case AttNode.NOFIXED :
- defaultKind = DTDDefaultKind.NOFIXED;
- break;
-
- default :
- // System.out.println("DTDATTR '" +attdef.name + "' Unknown default
- // type... " + attrDefault);
- }
-
- DTDDefaultKind defaultKindObj = DTDDefaultKind.get(defaultKind);
- dtdattr.setDefaultKind(defaultKindObj);
-
- if (parseError) {
- return;
- }
-
- String defaultValue = attdef.defaultValue;
- if (defaultValue != null) {
- if (attrType == AttNode.ENUMERATION || attrType == AttNode.NOTATION) {
- if (!isDefaultEnumValueValid(attdef, defaultValue)) {
- String typeString = (attrType == AttNode.ENUMERATION ? "enumeration" : "notation"); //$NON-NLS-1$ //$NON-NLS-2$
- String errMsg = DTDCoreMessages._ERROR_INVALID_DEFAULT_ATTR_VALUE_1; //$NON-NLS-1$
- errMsg += typeString + DTDCoreMessages._UI_ERRORPART_INVALID_DEFAULT_ATTR_VALUE_2; //$NON-NLS-1$
- errMsg += attdef.name + "'"; //$NON-NLS-1$
-
- // dtdattr.getDTDElement().getIElement().setDTDErrorMessage(errMsg);
- // dtdattr.getDTDElement().getDTDFile().setParseError(true);
- return;
- }
- }
- dtdattr.setDefaultValueString(defaultValue);
- }
- // System.out.println("DTDAttr - toMof getDefaultValueString " +
- // getDefaultValueString());
- // System.out.println("DTDAttr - toMof getDefaultValue: " +
- // getDefaultValue());
- }
-
- public boolean hasIDAttribute(DTDAttribute dtdattr) {
- boolean hasID = false;
-
- DTDElement element = dtdattr.getDTDElement();
- EList attrs = element.getDTDAttribute();
-
- Iterator i = attrs.iterator();
- while (i.hasNext()) {
- DTDAttribute attr = (DTDAttribute) i.next();
- DTDType dType = attr.getDTDType();
- if (dType instanceof DTDBasicType) {
- if (((DTDBasicType) dType).getKind().getValue() == DTDBasicTypeKind.ID) {
- hasID = true;
- break;
- }
- }
- }
- return hasID;
- }
-
- public DTDEnumerationType createDTDEnumeration(DTDAttribute dtdattr, String[] enumValues, int enumKind) {
- DTDEnumerationType enumeration = getFactory().createDTDEnumerationType();
- DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind);
- enumeration.setKind(groupKind);
- // Enumeration values
- if (enumValues != null) {
- for (int i = 0; i < enumValues.length; i++) {
- EEnumLiteral enumLiteral = createEEnumLiteral();
- // enumVal.setXMIDocument(dtdattr.getXMIDocument());
- // MOF2EMF Port
- // enumLiteral.refSetLiteral(enumValues[i]);
- enumLiteral.setName(enumValues[i]);
-
- // enumLiteral.setNumber(i);
- enumeration.getEnumLiterals().add(enumLiteral);
- }
- }
- dtdattr.getDTDElement().getDTDFile().getDTDEnumerationType().add(enumeration);
- return enumeration;
- }
-
- private EEnumLiteral createEEnumLiteral() {
- EcorePackage ePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
- // MOF2EMF Port
- // return ((EcoreFactory)ePackage.getFactory()).createEEnumLiteral();
- return ePackage.getEcoreFactory().createEEnumLiteral();
- }
-
- private DTDEnumerationType createDTDEnumeration(DTDAttribute dtdattr, AttNode attdef, int enumKind) {
- DTDEnumerationType enumeration = getFactory().createDTDEnumerationType();
- DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind);
- enumeration.setKind(groupKind);
- dtdattr.getDTDElement().getDTDFile().getDTDEnumerationType().add(enumeration);
-
- // Enumeration values
- Enumeration tokenIter = attdef.elements();
- if (tokenIter != null) {
- while (tokenIter.hasMoreElements()) {
- String val = (String) tokenIter.nextElement();
- EEnumLiteral enumLiteral = createEEnumLiteral();
- // enumLiteral.setXMIDocument(dtdattr.getXMIDocument());
- // MOF2EMF Port
- // enumLiteral.refSetLiteral(val);
- enumLiteral.setName(val);
-
-
- // enumLiteral.setNumber(i++);
- enumeration.getEnumLiterals().add(enumLiteral);
- }
- }
-
- return enumeration;
- }
-
- private boolean isDefaultEnumValueValid(AttNode attdef, String defaultValue) {
- boolean valid = false;
- boolean containsPercent = false;
-
- // Enumeration values
- Enumeration enumValues = attdef.elements();
- while (enumValues.hasMoreElements()) {
- String val = (String) enumValues.nextElement();
- if (val.equals(defaultValue)) {
- valid = true;
- break;
- }
- if (val.indexOf('%') >= 0) {
- containsPercent = true;
- }
- }
- return valid || containsPercent;
- }
-
- public void setAttrDTDType(DTDAttribute dtdattr, DTDType type) {
- dtdattr.setDTDType(type);
- }
-
- protected void addErrorMessage(ErrorMessage errMsg, Object obj) {
- errMsg.setObject(obj);
- dtdUtil.addErrorMessage(errMsg);
- }
-
- // /**
- // * @generated
- // */
- // protected DTDFactoryImpl getFactoryGen() {
- //
- // return (DTDFactoryImpl)dtdUtil.getFactory();
- // }
- // /**
- // * @generated
- // */
- // protected DTDFile getDTDFileGen() {
- //
- // return dtdFile;
- // }
- // /**
- // * @generated
- // */
- // protected void visitDTDGen(DTD dtd) {
- //
- // super.visitDTD(dtd);
- //
- //
- // // - 2nd pass -
- // // do final processing for Attlists and adding contentModel
- // addAttlistAndContentModel(dtd,dtdFile);
- // }
- // /**
- // * @generated
- // */
- // protected void visitElementDeclGen(ElementDecl element) {
- //
- // // Element might have been added earlier because it is referenced
- // String declName = element.getNodeName() ;
- // // System.out.println("process ElementDecl:" + declName );
- // DTDElement dtdelement = (DTDElement)
- // dtdUtil.getElementPool().get(declName);
- // if (dtdelement == null)
- // {
- // // System.out.println("process ElementDecl - not found - create" );
- // dtdelement = getFactory().createDTDElement();
- // dtdelement.setName(declName);
- // dtdFile.getDTDObject().add(dtdelement);
- // dtdUtil.getElementPool().put(declName,dtdelement);
- // }
- //
- //
- // super.visitElementDecl(element);
- // }
- // /**
- // * @generated
- // */
- // protected void visitNotationDeclGen(NotationDecl notation) {
- //
- // // Notation might have been added earlier because it is referenced
- // // by an entity
- // DTDNotation dtdnot = dtdFile.findNotation( notation.getNodeName() );
- // if (dtdnot == null)
- // {
- // dtdnot = getFactory().createDTDNotation();
- // dtdFile.getDTDObject().add(dtdnot);
- // }
- // dtdnot.setName(notation.getNodeName());
- //
- //
- // if (notation.getSystemId()!= null )
- // dtdnot.setSystemID(notation.getSystemId());
- // if (notation.getPublicId()!= null )
- // dtdnot.setPublicID(notation.getPublicId());
- //
- //
- // if (notation.getComment()!=null)
- // dtdnot.setComment(notation.getComment());
- // if (notation.getErrorMessage()!=null)
- // {
- // addErrorMessage(notation.getErrorMessage(), dtdnot);
- // }
- //
- //
- // super.visitNotationDecl(notation);
- // }
- // /**
- // * @generated
- // */
- // protected void visitParameterEntityReferenceDeclGen(EntityDecl entity)
- // {
- //
- // // This is a parameter entity reference.
- // // Add the link to the real entity that it references
- // DTDParameterEntityReference parmEntRef =
- // getFactory().createDTDParameterEntityReference();
- // dtdFile.getDTDObject().add(parmEntRef);
- //
- //
- // String entityName = entity.getNodeName();
- //
- //
- // // Add the reference to the DTDEntity
- // DTDEntity dtdentity = getDTDFile().findEntity(entityName);
- // if (dtdentity != null)
- // {
- // parmEntRef.setEntity(dtdentity);
- // }
- // if (entity.getErrorMessage()!=null)
- // {
- // addErrorMessage(entity.getErrorMessage(), dtdentity);
- // }
- // // System.out.println("adding PE reference: " + declName);
- //
- //
- // super.visitParameterEntityReferenceDecl(entity);
- // }
- // /**
- // * @generated
- // */
- // protected void visitExternalEntityDeclGen(EntityDecl entity) {
- //
- // DTDEntity dtdEntity = createDTDEntity(entity);
- // // System.out.println("adding entity: " + declName);
- // DTDExternalEntity extEntity = getFactory().createDTDExternalEntity();
- // dtdEntity.setContent(extEntity);
- //
- //
- // finishExternalEntity(extEntity, entity);
- // // System.out.println(" ext entity toMof: " );
- // if (dtdEntity.isParameterEntity())
- // {
- //
- //
- // dtdUtil.getPEPool().put("%"+entity.getNodeName()+";", dtdEntity);
- // }
- //
- //
- // super.visitExternalEntityDecl(entity);
- // }
- // /**
- // * @generated
- // */
- // protected void visitInternalEntityDeclGen(EntityDecl entity) {
- //
- // DTDEntity dtdEntity = createDTDEntity(entity);
- //
- //
- // DTDInternalEntity intEntity = getFactory().createDTDInternalEntity();
- // dtdEntity.setContent(intEntity);
- // intEntity.setValue(entity.getValue());
- // // System.out.println(" int entity toMof: " );
- // if (dtdEntity.isParameterEntity())
- // {
- // dtdUtil.getPEPool().put("%"+entity.getNodeName()+";", dtdEntity);
- // }
- //
- //
- // super.visitInternalEntityDecl(entity);
- // }
- // /**
- // * @generated
- // */
- // protected void addAttlistAndContentModelGen(DTD dtd, DTDFile dFile) {
- //
- // //System.out.println("addAttListAndCotentModel - dtd:" +
- // dtd.getName());
- // Enumeration en = dtd.externalElements();
- // while (en.hasMoreElements())
- // {
- // Object e = en.nextElement();
- // if ( e instanceof ElementDecl )
- // {
- // DTDElement dtdelement = (DTDElement) dtdUtil.getElementPool().get(
- // ((ElementDecl)e).getNodeName() );
- // if (dtdelement == null)
- // {
- // dtdelement = getFactory().createDTDElement();
- // dtdFile.getDTDObject().add(dtdelement);
- // }
- // finishElementDecl(dtdelement, (ElementDecl) e);
- // }
- // else if ( e instanceof Attlist )
- // {
- // processAttList((Attlist) e);
- // }
- // }
- // }
- // /**
- // * @generated
- // */
- // protected void processAttListGen(Attlist attList) {
- //
- // DTDElement e = (DTDElement)
- // dtdUtil.getElementPool().get(attList.getNodeName());
- // if ( e != null )
- // {
- // // Element has been added. Add the attributes
- // //System.out.println(" processAttlist - adding Attlist:" +
- // attList.getNodeName());
- // createAttributes(e, attList);
- // }
- // else
- // {
- // //System.out.println("!!!!!!!!! element is null ");
- // }
- // }
- // /**
- // * @generated
- // */
- // protected void finishExternalEntityGen(DTDExternalEntity extEntity,
- // EntityDecl entityDecl) {
- //
- // updateSystemID(extEntity, entityDecl);
- // extEntity.setPublicID(entityDecl.getPublicId());
- //
- //
- // String notationName = entityDecl.getNotationName();
- // if (notationName != null)
- // {
- // DTDNotation dtdNotation = createOrFindNotation(extEntity,
- // notationName,true);
- // extEntity.setNotation(dtdNotation);
- // }
- // }
- // /**
- // * @generated
- // */
- // protected DTDNotation createOrFindNotationGen(DTDExternalEntity
- // extEntity, String name, boolean create) {
- //
- // DTDNotation aNotation =
- // extEntity.getDTDEntity().getDTDFile().findNotation(name);
- // if (aNotation != null)
- // {
- // return aNotation;
- // }
- //
- //
- // //
- // // Create a notation for the reference
- // //
- // if (create)
- // {
- // aNotation = getFactory().createDTDNotation();
- // dtdFile.getDTDObject().add(aNotation);
- // aNotation.setName(name);
- // }
- // return aNotation;
- // }
- // /**
- // * The SystemID attribute is set to whatever the user enters
- // * e.g. com/ibm/b2b/xmimodels/xxx.dtd.xmi
- // *
- // * In the unparse() method, parse out the DTD file name from
- // * the classpath name.
- // * e.g. returns xxx.dtd
- // */
- // protected void updateSystemIDGen(DTDExternalEntity extEntity,
- // EntityDecl entityDecl) {
- //
- // String systemId = entityDecl.getSystemId();
- // String publicId = entityDecl.getPublicId();
- // if (systemId != null)
- // {
- // IdResolver idResolver = new IdResolverImpl(dtd.getName());
- // String uri = idResolver.resolveId(publicId, systemId);
- // ExternalDTDModel ed = dtdUtil.getExternalDTDModel(resources, uri);
- // if (ed != null)
- // {
- // DTDFile referenceDtdFile = ed.getExternalDTDFile();
- // extEntity.setEntityReferencedFromAnotherFile(referenceDtdFile);
- // extEntity.setSystemID(systemId);
- // }
- // else
- // {
- // if (entityDecl.getErrorMessage() == null)
- // {
- // ErrorMessage dtdError = new ErrorMessage();
- // dtdError.setErrorMessage(DTDCoreMessages.getString("_ERROR_INCL_FILE_LOAD_FAILURE")
- // + " '" + systemId + "'");
- // addErrorMessage(dtdError, extEntity.getDTDEntity());
- // }
- //
- // if (systemId != null)
- // {
- // extEntity.setSystemID(systemId);
- // }
- // else
- // {
- // extEntity.setSystemID("");
- // }
- // }
- // } // end of if ()
- // else
- // {
- // // set the system id to be ""
- // extEntity.setSystemID("");
- // }
- // }
- // /**
- // * @generated
- // */
- // protected DTDEntity createDTDEntityGen(EntityDecl entity) {
- //
- // // create and do what we can to fill in some basic things
- // DTDEntity dtdEntity = getFactory().createDTDEntity();
- // dtdFile.getDTDObject().add(dtdEntity);
- //
- //
- // dtdEntity.setName(entity.getNodeName());
- // dtdEntity.setParameterEntity(entity.isParameter());
- // if (entity.getComment()!=null)
- // {
- // dtdEntity.setComment(entity.getComment());
- // }
- // if (entity.getErrorMessage()!=null)
- // {
- // addErrorMessage(entity.getErrorMessage(), dtdEntity);
- // }
- //
- //
- // return dtdEntity;
- // }
- // /**
- // * @generated
- // */
- // protected void finishElementDeclGen(DTDElement dtdElement, ElementDecl
- // ed) {
- //
- // dtdElement.setName(ed.getNodeName());
- //
- //
- // CMNode cmNode = ed.getContentModelNode();
- //
- //
- // if (ed.getComment()!=null)
- // {
- // dtdElement.setComment(ed.getComment());
- // }
- // if (ed.getErrorMessage()!=null)
- // {
- // addErrorMessage(ed.getErrorMessage(), dtdElement);
- // }
- //
- //
- // if (cmNode instanceof CMBasicNode)
- // {
- // CMBasicNode bn = (CMBasicNode)cmNode;
- // switch (bn.getType())
- // {
- // case CMNodeType.EMPTY :
- // DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent();
- // dtdElement.setContent(emptyContent);
- // break;
- //
- //
- // case CMNodeType.ANY :
- // DTDAnyContent anyContent = getFactory().createDTDAnyContent();
- // dtdElement.setContent(anyContent);
- // break;
- //
- //
- // case CMNodeType.PCDATA:
- // DTDPCDataContent pcData = getFactory().createDTDPCDataContent();
- // dtdElement.setContent(pcData);
- // }
- //
- //
- // }
- // else if (cmNode instanceof CMReferenceNode)
- // {
- // CMReferenceNode rn = (CMReferenceNode) cmNode;
- // if (rn.getType() == CMNodeType.ENTITY_REFERENCE)
- // {
- // String entityName = rn.getName().trim();
- //
- //
- // DTDEntity anEntity = (DTDEntity) dtdUtil.getPEPool().get(entityName);
- // if (anEntity!=null)
- // {
- // //
- // // Create an DTDEntityReference and set its referenced element
- // //
- // DTDEntityReferenceContent enRef =
- // getFactory().createDTDEntityReferenceContent();
- // enRef.setElementReferencedEntity(anEntity);
- //
- // DTDOccurrenceType occurrenceType =
- // DTDOccurrenceType.get(computeMofOccurrence(rn));
- // enRef.setOccurrence(occurrenceType);
- //
- // dtdElement.setContent(enRef);
- // }
- // else
- // { // create default content
- // DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent();
- // dtdElement.setContent(emptyContent);
- // }
- // }
- // else
- // {
- // //
- // // Find the real element for this element references
- // // If the real element does not yet exist, create it
- // //
- // DTDElement anElement = createOrFindElement(rn.getName(), dtdElement);
- //
- //
- // //
- // // Create an DTDElementReference and set its referenced element
- // //
- // DTDElementReferenceContent elemRef =
- // getFactory().createDTDElementReferenceContent();
- // elemRef.setReferencedElement(anElement);
- //
- // DTDOccurrenceType occurrenceType =
- // DTDOccurrenceType.get(computeMofOccurrence(rn));
- // elemRef.setOccurrence(occurrenceType);
- //
- // // setContent to DTDElementReference
- // dtdElement.setContent(elemRef);
- //
- //
- // }
- // }
- // else if (cmNode instanceof CMGroupNode)
- // {
- // CMGroupNode grpNode = (CMGroupNode)cmNode;
- // DTDGroupContent groupContent = getFactory().createDTDGroupContent();
- // DTDGroupKind groupKind =
- // DTDGroupKind.get(computeMofGroupKind(grpNode.getGroupKind()));
- // groupContent.setGroupKind(groupKind);
- // DTDOccurrenceType occurrenceType =
- // DTDOccurrenceType.get(computeMofOccurrence(grpNode));
- // groupContent.setOccurrence(occurrenceType);
- //
- // // just use the locator for the element as the closest guess
- // processGroupContent(groupContent, grpNode);
- // dtdElement.setContent(groupContent);
- // }
- // else if (cmNode == null)
- // {
- // // bad thing happened here, just create a pcdata
- // DTDEmptyContent emptyContent = getFactory().createDTDEmptyContent();
- // dtdElement.setContent(emptyContent);
- // }
- // }
- // /**
- // * Add a new group to the current group
- // * @param parent - the parent node for this group element
- // * @param op1Node - the group
- // * e.g. (a,b)
- // * @param op2Node - set only if called by processCM1op
- // * e.g. (a,b)+
- // */
- // protected void processGroupContentGen(DTDGroupContent parent,
- // CMGroupNode grpNode) {
- //
- // Enumeration children = grpNode.getChildren().elements();
- // DTDFactory factory = getFactory();
- // while (children.hasMoreElements())
- // {
- // CMNode cnode = (CMNode) children.nextElement();
- //
- //
- // if (cnode instanceof CMGroupNode)
- // {
- // CMGroupNode gNode = (CMGroupNode)cnode;
- // DTDGroupContent groupContent = factory.createDTDGroupContent();
- // DTDGroupKind groupKind =
- // DTDGroupKind.get(computeMofGroupKind(gNode.getGroupKind()));
- // groupContent.setGroupKind(groupKind);
- // DTDOccurrenceType occurrenceType =
- // DTDOccurrenceType.get(computeMofOccurrence(gNode));
- // groupContent.setOccurrence(occurrenceType);
- //
- // parent.getContent().add(groupContent);
- // processGroupContent(groupContent,gNode);
- // }
- // else if (cnode instanceof CMBasicNode)
- // {
- // CMBasicNode n = (CMBasicNode)cnode;
- // if (n.getType() == CMNodeType.PCDATA)
- // {
- // // Create a DTDPCDataContent for a leaf PCData node
- // //
- // DTDPCDataContent pcData = factory.createDTDPCDataContent();
- // // Add #PCDATA to the Group, i.e Mixed content model
- // parent.getContent().add(pcData);
- // }
- // }
- // else if (cnode instanceof CMReferenceNode)
- // {
- // CMReferenceNode rn = (CMReferenceNode)cnode;
- // if (rn.getType()==CMNodeType.ELEMENT_REFERENCE)
- // {
- // // System.out.println("CM Element Ref name: " + rn.getName());
- // //
- // // Create an DTDElementReference and set its referenced element
- // //
- // DTDElementReferenceContent elemRef =
- // factory.createDTDElementReferenceContent();
- //
- //
- // //
- // // Find the real element for this element references
- // // If the real element does not yet exist, create it
- // //
- // DTDElement anElement = createOrFindElement(rn.getName(), elemRef);
- //
- //
- // elemRef.setReferencedElement(anElement);
- // DTDOccurrenceType occurrenceType =
- // DTDOccurrenceType.get(computeMofOccurrence(rn));
- // elemRef.setOccurrence(occurrenceType);
- //
- // // Add DTDElementReference to the Group
- // parent.getContent().add(elemRef);
- // }
- // else // PE Reference
- // {
- // String entityName = rn.getName().trim();
- //
- //
- // // System.out.println("CM PE Ref name: " + entityName);
- // DTDEntity anEntity = (DTDEntity) dtdUtil.getPEPool().get(entityName);
- // if (anEntity!=null)
- // {
- // //
- // // Create an DTDEntityReference and set its referenced element
- // //
- // DTDEntityReferenceContent enRef =
- // factory.createDTDEntityReferenceContent();
- // enRef.setElementReferencedEntity(anEntity);
- //
- // DTDOccurrenceType occurrenceType =
- // DTDOccurrenceType.get(computeMofOccurrence(rn));
- // enRef.setOccurrence(occurrenceType);
- //
- //
- // // Add DTDEntityReference to the Group
- // parent.getContent().add(enRef);
- //
- //
- // }
- // }
- // }
- // }
- // }
- // /**
- // * Find the real element that is referenced by the current element
- // */
- // protected DTDElement createOrFindElementGen(String name, Object obj) {
- //
- // // DTDElement aElement = getDTDFile().findElement(name);
- //
- //
- // DTDElement aElement = (DTDElement) dtdUtil.getElementPool().get(name);
- //
- //
- // if (aElement != null)
- // {
- // return aElement;
- // }
- //
- //
- // String errorMsg =
- // DTDCoreMessages.getString("_ERROR_UNDECLARED_ELEMENT_1");
- // errorMsg += "\"" + name + "\"";
- // errorMsg +=
- // DTDCoreMessages.getString("_UI_ERRORPART_UNDECLARED_ELEMENT_2");
- //
- //
- // ErrorMessage dtdError = new ErrorMessage();
- //
- // dtdError.setErrorMessage(errorMsg);
- // addErrorMessage(dtdError, obj);
- // // System.out.println(errorMsg);
- // // setDTDErrorMessage(errorMsg);
- // getDTDFile().setParseError(true);
- //
- //
- // //
- // // Create an empty element for the reference to make it valid
- // //
- //
- //
- // DTDFactory factory = getFactory();
- // DTDElement dtdelement = factory.createDTDElement();
- // dtdelement.setName(name);
- //
- //
- // DTDEmptyContent emptyContent = factory.createDTDEmptyContent();
- // dtdelement.setContent(emptyContent);
- //
- //
- // getDTDFile().getDTDObject().add(dtdelement);
- // dtdUtil.getElementPool().put(name,dtdelement);
- // return dtdelement;
- // }
- // /**
- // * Compute the MOF occurrence from the xml4j occurrence
- // */
- // protected int computeMofOccurrenceGen(CMRepeatableNode rnode) {
- //
- // int occurrence = rnode.getOccurrence();
- // int mofoccur = DTDOccurrenceType.ONE;
- //
- //
- // if (occurrence == CMNodeType.ZERO_OR_MORE)
- // {
- // mofoccur = DTDOccurrenceType.ZERO_OR_MORE;
- // }
- // else if (occurrence == CMNodeType.ONE_OR_MORE)
- // {
- // mofoccur = DTDOccurrenceType.ONE_OR_MORE;
- // }
- // else if (occurrence == CMNodeType.OPTIONAL)
- // {
- // mofoccur = DTDOccurrenceType.OPTIONAL;
- // }
- // return mofoccur;
- // }
- // /**
- // * Compute the MOF model group from the xml4j model group
- // */
- // protected int computeMofGroupKindGen(int type) {
- //
- // if (type == CMNodeType.GROUP_CHOICE)
- // {
- // return DTDGroupKind.CHOICE;
- // }
- // else
- // {
- // return DTDGroupKind.SEQUENCE;
- // }
- // }
- // /**
- // * @generated
- // */
- // protected void createAttributesGen(DTDElement element, Attlist attList)
- // {
- //
- // if (attList.getErrorMessage()!=null)
- // {
- // addErrorMessage(attList.getErrorMessage(), element);
- // }
- //
- //
- // for (int i=0;i<attList.size();i++)
- // {
- // AttNode ad = (AttNode) attList.elementAt(i);
- // // DTDAttributeElement dtdAtt= getDTDAttributeElement(a.getName());
- //
- //
- // // only add the AttDef if it is not added yet
- // // ignore the dup AttDef as documented in the XML 1.0 specs
- // //if( dtdAtt==null)
- // addAttribute(element, ad);
- // }
- // }
- // /**
- // * Create a DTDAttribute from the xml4j attribute
- // */
- // protected void addAttributeGen(DTDElement dtdelement, AttNode ad) {
- //
- // DTDAttribute dtdattr = getFactory().createDTDAttribute();
- // dtdelement.getDTDAttribute().add(dtdattr);
- // finishAttribute(dtdattr, ad);
- // }
- // /**
- // * @generated
- // */
- // protected void finishAttributeGen(DTDAttribute dtdattr, AttNode attdef)
- // {
- //
- // boolean parseError = false;
- //
- //
- // if (attdef.name.startsWith("%"))
- // {
- // String peName = attdef.name.trim();
- // DTDEntity en = (DTDEntity) dtdUtil.getPEPool().get(peName);
- // if (en!=null)
- // {
- // dtdattr.setAttributeNameReferencedEntity(en);
- // }
- // }
- //
- //
- // dtdattr.setName(attdef.name);
- //
- //
- // int attrType = attdef.getDeclaredType();
- //
- //
- // if (attrType==AttNode.PEREFERENCE && attdef.type!=null)
- // {
- // String peName = attdef.type.trim();
- // DTDEntity en = (DTDEntity) dtdUtil.getPEPool().get(peName);
- // if (en!=null)
- // {
- // dtdattr.setAttributeTypeReferencedEntity(en);
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA()); // hack,
- // so we can get back the default value
- // }
- // else //set default type
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA());
- //
- //
- // }
- // else
- // {
- // switch (attrType)
- // {
- // case AttNode.CDATA:
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_CDATA());
- // break;
- //
- //
- // case AttNode.ENTITIES:
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ENTITIES());
- // break;
- //
- //
- // case AttNode.ENTITY:
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ENTITY());
- // break;
- //
- //
- // case AttNode.ID:
- // // check for duplicate ID attribute
- // if (hasIDAttribute(dtdattr))
- // {
- // String errMsg = DTDCoreMessages.getString("_ERROR_DUP_ID_ATTRIBUTE_1");
- // errMsg += attdef.name +
- // DTDCoreMessages.getString("_UI_ERRORPART_DUP_ID_ATTRIBUTE_2");
- // // dtdattr.getDTDElement().getIElement().setDTDErrorMessage(errMsg);
- // // dtdattr.getDTDElement().getDTDFile().setParseError(true);
- // parseError = true;
- // }
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_ID());
- // break;
- //
- //
- // case AttNode.IDREF:
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_IDREF());
- // break;
- //
- //
- // case AttNode.IDREFS:
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_IDREFS());
- // break;
- //
- //
- // case AttNode.ENUMERATION:
- // setAttrDTDType(dtdattr, createDTDEnumeration(dtdattr, attdef,
- // DTDEnumGroupKind.NAME_TOKEN_GROUP));
- // break;
- //
- //
- // case AttNode.NOTATION:
- // setAttrDTDType(dtdattr, createDTDEnumeration(dtdattr, attdef,
- // DTDEnumGroupKind.NOTATION_GROUP));
- // break;
- //
- //
- // case AttNode.NMTOKEN:
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_NMTOKEN());
- // break;
- //
- //
- // case AttNode.NMTOKENS:
- // setAttrDTDType(dtdattr, getFactory().getDTDBasicType_NMTOKENS());
- // break;
- //
- //
- // default:
- // // System.out.println("DTDATTR '" +attdef.name + "'Unknown type..." +
- // attrType);
- // }
- // }
- //
- //
- // int attrDefault = attdef.getDefaultType();
- // int defaultKind = DTDDefaultKind.IMPLIED;
- // switch (attrDefault)
- // {
- // case AttNode.FIXED:
- // defaultKind = DTDDefaultKind.FIXED;
- // break;
- //
- //
- // case AttNode.IMPLIED:
- // defaultKind = DTDDefaultKind.IMPLIED;
- // break;
- //
- //
- // case AttNode.REQUIRED:
- // defaultKind = DTDDefaultKind.REQUIRED;
- // break;
- //
- //
- // case AttNode.NOFIXED:
- // defaultKind = DTDDefaultKind.NOFIXED;
- // break;
- //
- //
- // default:
- // // System.out.println("DTDATTR '" +attdef.name + "' Unknown default
- // type... " + attrDefault);
- // }
- //
- // DTDDefaultKind defaultKindObj = DTDDefaultKind.get(defaultKind);
- // dtdattr.setDefaultKind(defaultKindObj);
- //
- // if (parseError)
- // {
- // return;
- // }
- //
- //
- // String defaultValue = attdef.defaultValue;
- // if (defaultValue != null)
- // {
- // if (attrType == AttNode.ENUMERATION || attrType == AttNode.NOTATION)
- // {
- // if (! isDefaultEnumValueValid(attdef,defaultValue))
- // {
- // String typeString =
- // (attrType==AttNode.ENUMERATION?"enumeration":"notation");
- // String errMsg =
- // DTDCoreMessages.getString("_ERROR_INVALID_DEFAULT_ATTR_VALUE_1");
- // errMsg += typeString +
- // DTDCoreMessages.getString("_UI_ERRORPART_INVALID_DEFAULT_ATTR_VALUE_2");
- // errMsg += attdef.name + "'";
- //
- //
- // // dtdattr.getDTDElement().getIElement().setDTDErrorMessage(errMsg);
- // // dtdattr.getDTDElement().getDTDFile().setParseError(true);
- // return;
- // }
- // }
- // dtdattr.setDefaultValueString(defaultValue);
- // }
- // // System.out.println("DTDAttr - toMof getDefaultValueString " +
- // getDefaultValueString());
- // // System.out.println("DTDAttr - toMof getDefaultValue: " +
- // getDefaultValue());
- // }
- // /**
- // * @generated
- // */
- // protected boolean hasIDAttributeGen(DTDAttribute dtdattr) {
- //
- // boolean hasID = false;
- //
- //
- // DTDElement element = dtdattr.getDTDElement();
- // EList attrs = element.getDTDAttribute();
- //
- //
- // Iterator i = attrs.iterator();
- // while (i.hasNext())
- // {
- // DTDAttribute attr = (DTDAttribute) i.next();
- // DTDType dType = attr.getDTDType();
- // if (dType instanceof DTDBasicType)
- // {
- // if ( ((DTDBasicType)dType).getKind().getValue() == DTDBasicTypeKind.ID)
- // {
- // hasID = true;
- // break;
- // }
- // }
- // }
- // return hasID;
- // }
- // /**
- // * @generated
- // */
- // protected DTDEnumerationType createDTDEnumerationGen(DTDAttribute
- // dtdattr, String[] enumValues, int enumKind) {
- //
- // DTDEnumerationType enum = getFactory().createDTDEnumerationType();
- // // This is gross, but this is what was done before.
- // DTDAttributeImpl dtdattrimpl = (DTDAttributeImpl) dtdattr;
- // // enum.setID("Enum_" +
- // ((DTDElement)dtdattrimpl.getMOFDomain()).getName() + "_" +
- // dtdattr.getName());
- // DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind);
- // enum.setKind(groupKind);
- // // Enumeration values
- // if (enumValues!=null)
- // {
- // for(int i=0;i<enumValues.length;i++)
- // {
- // EEnumLiteral enumLiteral = createEEnumLiteral();
- // // enumVal.setXMIDocument(dtdattr.getXMIDocument());
- // enumLiteral.refSetLiteral(enumValues[i]);
- // // enumLiteral.setNumber(i);
- // enum.getEnumLiterals().add(enumLiteral);
- // }
- // }
- // dtdattr.getDTDElement().getDTDFile().getDTDEnumerationType().add(enum);
- // return enum;
- // }
- // /**
- // * @generated
- // */
- // protected EEnumLiteral createEEnumLiteralGen() {
- //
- // EcorePackage ePackage =
- // (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
- // return ((EcoreFactory)ePackage.getFactory()).createEEnumLiteral();
- // }
- // /**
- // * @generated
- // */
- // protected DTDEnumerationType createDTDEnumerationGen(DTDAttribute
- // dtdattr, AttNode attdef, int enumKind) {
- //
- // DTDEnumerationType enum = getFactory().createDTDEnumerationType();
- // // This is gross, but this is what was done before.
- // DTDAttributeImpl dtdattrimpl = (DTDAttributeImpl) dtdattr;
- // // enum.setID("Enum_" +
- // ((DTDElement)dtdattrimpl.getMOFDomain()).getName() + "_" +
- // dtdattr.getName());
- // DTDEnumGroupKind groupKind = DTDEnumGroupKind.get(enumKind);
- // enum.setKind(groupKind);
- // dtdattr.getDTDElement().getDTDFile().getDTDEnumerationType().add(enum);
- //
- //
- // // Enumeration values
- // Enumeration tokenIter = attdef.elements();
- // if (tokenIter != null) {
- // int i=0;
- // while (tokenIter.hasMoreElements())
- // {
- // String val = (String)tokenIter.nextElement();
- // EEnumLiteral enumLiteral = createEEnumLiteral();
- // // enumLiteral.setXMIDocument(dtdattr.getXMIDocument());
- //
- //
- // enumLiteral.refSetLiteral(val);
- // // enumLiteral.setNumber(i++);
- // enum.getEnumLiterals().add(enumLiteral);
- // }
- // }
- //
- //
- // return enum;
- // }
- // /**
- // * @generated
- // */
- // protected boolean isDefaultEnumValueValidGen(AttNode attdef, String
- // defaultValue) {
- //
- // boolean valid = false;
- // boolean containsPercent = false;
- //
- //
- // // Enumeration values
- // Enumeration enumValues = attdef.elements();
- // while (enumValues.hasMoreElements())
- // {
- // String val = (String)enumValues.nextElement();
- // if (val.equals(defaultValue))
- // {
- // valid = true;
- // break;
- // }
- // if (val.indexOf('%') >= 0)
- // {
- // containsPercent = true;
- // }
- // }
- // return valid || containsPercent;
- // }
- // /**
- // * @generated
- // */
- // protected void setAttrDTDTypeGen(DTDAttribute dtdattr, DTDType type) {
- //
- // dtdattr.setDTDType(type);
- // }
- // /**
- // * @generated
- // */
- // protected void addErrorMessageGen(ErrorMessage errMsg, Object obj) {
- //
- // errMsg.setObject(obj);
- // dtdUtil.addErrorMessage(errMsg);
- // }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDObjectFinder.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDObjectFinder.java
deleted file mode 100644
index 0f4a31943b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDObjectFinder.java
+++ /dev/null
@@ -1,173 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.DTDSourceOffset;
-
-public class DTDObjectFinder extends DTDVisitor {
- public class SourceOffset {
- // Convenience class to find containment of object
- private int start, end;
-
- public SourceOffset(int start, int end) {
- this.start = start;
- this.end = end;
- }
-
- public boolean contains(SourceOffset other) {
- if (this.start <= other.start && other.start <= this.end) {
- return true;
- } // end of if ()
- return false;
- }
-
- }
-
- SourceOffset searchLocation;
-
- private SourceOffset offsetObjectFor(DTDSourceOffset s) {
- return new SourceOffset(s.getStartOffset(), s.getEndOffset());
- }
-
- private void checkContainment(DTDObject o) {
- if (offsetObjectFor((DTDSourceOffset) o).contains(searchLocation)) {
- closestObject = o;
- } // end of if ()
- }
-
- public DTDObjectFinder(int startOffset, int endOffset) {
- searchLocation = new SourceOffset(startOffset, endOffset);
- }
-
- public void visitDTDNotation(DTDNotation notation) {
- checkContainment(notation);
- super.visitDTDNotation(notation);
- }
-
- public void visitDTDEntity(DTDEntity entity) {
- checkContainment(entity);
- super.visitDTDEntity(entity);
- }
-
- public void visitDTDElement(DTDElement element) {
- checkContainment(element);
- super.visitDTDElement(element);
- }
-
- public void visitDTDAttribute(DTDAttribute attribute) {
- checkContainment(attribute);
- super.visitDTDAttribute(attribute);
- }
-
- public void visitDTDParameterEntityReference(DTDParameterEntityReference parmEntity) {
- checkContainment(parmEntity);
- super.visitDTDParameterEntityReference(parmEntity);
- }
-
- public void visitDTDElementContent(DTDElementContent content) {
- checkContainment(content);
- super.visitDTDElementContent(content);
- }
-
- private DTDObject closestObject = null;
-
- public DTDObject getClosestObject() {
- return closestObject;
- }
-
- /**
- * @generated
- */
- protected SourceOffset offsetObjectForGen(DTDSourceOffset s) {
-
- return new SourceOffset(s.getStartOffset(), s.getEndOffset());
- }
-
- /**
- * @generated
- */
- protected void checkContainmentGen(DTDObject o) {
-
- if (offsetObjectFor((DTDSourceOffset) o).contains(searchLocation)) {
- closestObject = o;
- } // end of if ()
- }
-
- /**
- * @generated
- */
- protected void visitDTDNotationGen(DTDNotation notation) {
-
- checkContainment(notation);
- super.visitDTDNotation(notation);
- }
-
- /**
- * @generated
- */
- protected void visitDTDEntityGen(DTDEntity entity) {
-
- checkContainment(entity);
- super.visitDTDEntity(entity);
- }
-
- /**
- * @generated
- */
- protected void visitDTDElementGen(DTDElement element) {
-
- checkContainment(element);
- super.visitDTDElement(element);
- }
-
- /**
- * @generated
- */
- protected void visitDTDAttributeGen(DTDAttribute attribute) {
-
- checkContainment(attribute);
- super.visitDTDAttribute(attribute);
- }
-
- /**
- * @generated
- */
- protected void visitDTDParameterEntityReferenceGen(DTDParameterEntityReference parmEntity) {
-
- checkContainment(parmEntity);
- super.visitDTDParameterEntityReference(parmEntity);
- }
-
- /**
- * @generated
- */
- protected void visitDTDElementContentGen(DTDElementContent content) {
-
- checkContainment(content);
- super.visitDTDElementContent(content);
- }
-
- /**
- * @generated
- */
- protected DTDObject getClosestObjectGen() {
-
- return closestObject;
- }
-}// DTDObjectFinder
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPathnameUtil.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPathnameUtil.java
deleted file mode 100644
index 72063c4811..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPathnameUtil.java
+++ /dev/null
@@ -1,352 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-
-
-public class DTDPathnameUtil {
- static public String makePath(String parentPath, String type, String name, int cnt) {
- String pn = null;
- name = encode(name);
- if ((name == null) && (cnt <= 0)) {
- pn = type;
- }
- else if (cnt <= 0) {
- pn = type + ":" + ((name == null) ? "" : name); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- pn = type + ":" + ((name == null) ? "" : name) + ":" + cnt; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- if (parentPath != null) {
- return parentPath + "." + pn; //$NON-NLS-1$
- }
- else {
- return pn;
- }
- }
-
- static public Object[] parsePathComponent(String path) {
- /*
- * This routine parse the first component of the path and returns the
- * result in an arrray of Strings. result[0] = type (String) result[1] =
- * name (String) result[2] = count (Integer) result[3] = the rest of
- * the path (String)
- *
- * E.g. PathComponent result[0] result[1] result[2] result[3]
- * ------------------------------------------------------------- type
- * type <null> <null> <null> type.rest type <null> <null> rest
- * type:name type name <null> <null> type:name.rest type name <null>
- * rest type::n type <null> n <null> type::n.rest type <null> n rest
- * type:name:n type name n <null> type:name:n.rest type name n rest
- */
-
- Object[] result = new Object[4];
- if (path == null)
- return result;
-
- int i = path.indexOf('.');
- int length = path.length();
-
- if (i < 0) {
- i = length;
- }
-
- String type = null;
- String name = null;
- Integer n = null;
- String rest = null;
-
- // get the type
- int j = path.indexOf(':');
- if (j > i)
- j = -1;
- if (j < 0) {
- type = path.substring(0, i);
- }
- else {
- type = path.substring(0, j);
-
- // get the name
- int k = path.indexOf(':', j + 1);
- if (k > i)
- k = -1;
- if (k < 0) {
- name = path.substring(j + 1, i);
- }
- else {
- name = path.substring(j + 1, k);
-
- // get the count
- try {
- n = new Integer(path.substring(k + 1, i));
- }
- catch (Exception exc) {
- }
- if ((n != null) && (n.intValue() < 0)) {
- n = null;
- }
- }
- }
-
- if ((name != null) && (name.length() == 0)) {
- name = null;
- }
-
- if (i < length) {
- rest = path.substring(i + 1);
- }
-
- result[0] = type;
- result[1] = decode(name);
- result[2] = n;
- result[3] = rest;
- return result;
- }
-
- static private String encode(String s) {
- if (s == null)
- return null;
- StringBuffer o = new StringBuffer(s.length());
- int len = s.length();
- for (int i = 0; i < len; i++) {
- char c = s.charAt(i);
- if (Character.isLetterOrDigit(c) || (c == '-')) {
- o.append(c);
- }
- else { // if ((c == '.') || (c == ':') || (c == '_') || ...)
- // convert the character to a 4 digit hex code prefixed by "_"
- String hex = Integer.toHexString(c);
- int l = hex.length();
- if (l == 1) {
- o.append("_000"); //$NON-NLS-1$
- o.append(hex);
- }
- else if (l == 2) {
- o.append("_00"); //$NON-NLS-1$
- o.append(hex);
- }
- else if (l == 3) {
- o.append("_0"); //$NON-NLS-1$
- o.append(hex);
- }
- else {
- o.append('_');
- o.append(hex);
- }
- }
- } // for
- return o.toString();
- }
-
- static private String decode(String s) {
- if (s == null)
- return null;
- StringBuffer o = new StringBuffer(s.length());
- int len = s.length();
- for (int i = 0; i < len; i++) {
- char c = s.charAt(i);
- if (c != '_') {
- o.append(c);
- }
- else { // next 4 characters are the hex code
- String hex;
- if (len > i + 4) {
- hex = s.substring(i + 1, i + 5);
- i += 4;
- }
- else {
- hex = s.substring(i + 1);
- i = len - 1;
- }
- o.append((char) Integer.parseInt(hex, 16));
- }
- } // for
- return o.toString();
- }
-
- /**
- * @generated
- */
- protected static String makePathGen(String parentPath, String type, String name, int cnt) {
-
- String pn = null;
- name = encode(name);
- if ((name == null) && (cnt <= 0)) {
- pn = type;
- }
- else if (cnt <= 0) {
- pn = type + ":" + ((name == null) ? "" : name); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- pn = type + ":" + ((name == null) ? "" : name) + ":" + cnt; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- if (parentPath != null) {
- return parentPath + "." + pn; //$NON-NLS-1$
- }
- else {
- return pn;
- }
- }
-
- /**
- * @generated
- */
- protected static Object[] parsePathComponentGen(String path) {
-
- /*
- * This routine parse the first component of the path and returns the
- * result in an arrray of Strings. result[0] = type (String) result[1] =
- * name (String) result[2] = count (Integer) result[3] = the rest of
- * the path (String)
- *
- * E.g. PathComponent result[0] result[1] result[2] result[3]
- * ------------------------------------------------------------- type
- * type <null> <null> <null> type.rest type <null> <null> rest
- * type:name type name <null> <null> type:name.rest type name <null>
- * rest type::n type <null> n <null> type::n.rest type <null> n rest
- * type:name:n type name n <null> type:name:n.rest type name n rest
- */
-
- Object[] result = new Object[4];
- if (path == null)
- return result;
-
- int i = path.indexOf('.');
- int length = path.length();
-
- if (i < 0) {
- i = length;
- }
-
- String type = null;
- String name = null;
- Integer n = null;
- String rest = null;
-
- // get the type
- int j = path.indexOf(':');
- if (j > i)
- j = -1;
- if (j < 0) {
- type = path.substring(0, i);
- }
- else {
- type = path.substring(0, j);
-
- // get the name
- int k = path.indexOf(':', j + 1);
- if (k > i)
- k = -1;
- if (k < 0) {
- name = path.substring(j + 1, i);
- }
- else {
- name = path.substring(j + 1, k);
-
- // get the count
- try {
- n = new Integer(path.substring(k + 1, i));
- }
- catch (Exception exc) {
- }
- if ((n != null) && (n.intValue() < 0)) {
- n = null;
- }
- }
- }
-
- if ((name != null) && (name.length() == 0)) {
- name = null;
- }
-
- if (i < length) {
- rest = path.substring(i + 1);
- }
-
- result[0] = type;
- result[1] = decode(name);
- result[2] = n;
- result[3] = rest;
- return result;
- }
-
- /**
- * @generated
- */
- protected static String encodeGen(String s) {
-
- if (s == null)
- return null;
- StringBuffer o = new StringBuffer(s.length());
- int len = s.length();
- for (int i = 0; i < len; i++) {
- char c = s.charAt(i);
- if (Character.isLetterOrDigit(c) || (c == '-')) {
- o.append(c);
- }
- else { // if ((c == '.') || (c == ':') || (c == '_') || ...)
- // convert the character to a 4 digit hex code prefixed by "_"
- String hex = Integer.toHexString(c);
- int l = hex.length();
- if (l == 1) {
- o.append("_000"); //$NON-NLS-1$
- o.append(hex);
- }
- else if (l == 2) {
- o.append("_00"); //$NON-NLS-1$
- o.append(hex);
- }
- else if (l == 3) {
- o.append("_0"); //$NON-NLS-1$
- o.append(hex);
- }
- else {
- o.append('_');
- o.append(hex);
- }
- }
- } // for
- return o.toString();
- }
-
- /**
- * @generated
- */
- protected static String decodeGen(String s) {
-
- if (s == null)
- return null;
- StringBuffer o = new StringBuffer(s.length());
- int len = s.length();
- for (int i = 0; i < len; i++) {
- char c = s.charAt(i);
- if (c != '_') {
- o.append(c);
- }
- else { // next 4 characters are the hex code
- String hex;
- if (len > i + 4) {
- hex = s.substring(i + 1, i + 5);
- i += 4;
- }
- else {
- hex = s.substring(i + 1);
- i = len - 1;
- }
- o.append((char) Integer.parseInt(hex, 16));
- }
- } // for
- return o.toString();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPrinter.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPrinter.java
deleted file mode 100644
index 544f8567a4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPrinter.java
+++ /dev/null
@@ -1,525 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDOccurrenceType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDSourceOffset;
-
-
-public class DTDPrinter extends DTDVisitor {
- StringBuffer sb = new StringBuffer();
- boolean updateOffset = true;
-
- public DTDPrinter(boolean updateOffset) {
- this.updateOffset = updateOffset;
- }
-
- public StringBuffer getBuffer() {
- return sb;
- }
-
- public void visitDTDFile(DTDFile file) {
- super.visitDTDFile(file);
- }
-
- public void visitDTDNotation(DTDNotation notation) {
- generateComment(notation);
- updateStartOffset(notation, sb.length());
- sb.append("<!NOTATION "); //$NON-NLS-1$
- sb.append(notation.getName()).append(" "); //$NON-NLS-1$
-
- String publicID = notation.getPublicID();
- String systemID = notation.getSystemID();
- if (publicID == null || publicID.equals("")) { //$NON-NLS-1$
- sb.append("SYSTEM "); //$NON-NLS-1$
- }
- else {
- sb.append("PUBLIC \"").append(publicID).append("\" "); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (systemID == null) {
- sb.append("\"\""); //$NON-NLS-1$
- }
- else {
- sb.append("\"").append(systemID).append("\""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- endTag();
- updateEndOffset(notation, sb.length() - 1); // -1 for the newline char
- super.visitDTDNotation(notation);
- }
-
- public void visitDTDEntity(DTDEntity entity) {
- generateComment(entity);
- updateStartOffset(entity, sb.length());
- sb.append("<!ENTITY "); //$NON-NLS-1$
-
- if (entity.isParameterEntity())
- sb.append("% "); //$NON-NLS-1$
-
- sb.append(entity.getName()).append(" "); //$NON-NLS-1$
- sb.append(entity.getContent().unparse());
-
- endTag();
- updateEndOffset(entity, sb.length() - 1); // -1 for the newline char
- super.visitDTDEntity(entity);
- }
-
- public void visitDTDElement(DTDElement element) {
- generateComment(element);
- updateStartOffset(element, sb.length());
- sb.append("<!ELEMENT " + element.getName()); //$NON-NLS-1$
- DTDElementContent content = element.getContent();
- if (content instanceof DTDPCDataContent || content instanceof DTDElementReferenceContent) {
- sb.append(" ("); //$NON-NLS-1$
- super.visitDTDElement(element);
- sb.append(")"); //$NON-NLS-1$
- } // end of if ()
- else {
- sb.append(" "); //$NON-NLS-1$
- super.visitDTDElement(element);
- } // end of else
- endTag();
- updateEndOffset(element, sb.length() - 1); // -1 for the newline char
- visitAttributes(element);
- }
-
- public void visitDTDParameterEntityReference(DTDParameterEntityReference parmEntity) {
- generateComment(parmEntity);
- updateStartOffset(parmEntity, sb.length());
- sb.append("%" + parmEntity.getName() + ";\n"); //$NON-NLS-1$ //$NON-NLS-2$
- updateEndOffset(parmEntity, sb.length() - 1); // -1 for the newline
- // char
- }
-
- public void visitDTDElementContent(DTDElementContent content) {
- updateStartOffset(content, sb.length());
- String trailingChars = ""; //$NON-NLS-1$
- if (content instanceof DTDRepeatableContent) {
- DTDRepeatableContent repeatContent = (DTDRepeatableContent) content;
- DTDOccurrenceType occurrenceType = repeatContent.getOccurrence();
- // Integer occurrence = repeatContent.getOccurrence();
- if (occurrenceType != null) {
- int occurType = occurrenceType.getValue();
- if (occurType != DTDOccurrenceType.ONE) {
- if (repeatContent instanceof DTDEntityReferenceContent) {
- sb.append("("); //$NON-NLS-1$
- trailingChars = ")"; //$NON-NLS-1$
- }
- trailingChars += (char) occurType;
- }
- } // end of if ()
- } // end of if ()
-
- if (content instanceof DTDGroupContent) {
- super.visitDTDElementContent(content);
- } // end of if ()
- else if (content instanceof DTDElementReferenceContent || content instanceof DTDEntityReferenceContent) {
- sb.append(((DTDRepeatableContent) content).unparseRepeatableContent());
- } // end of if ()
- else {
- // handle DTDPCDataContent, DTDAnyContent and DTDEmptyContent here
- sb.append(content.getContentName());
- } // end of else
- sb.append(trailingChars);
- updateEndOffset(content, sb.length());
- }
-
- public void visitDTDGroupContent(DTDGroupContent group) {
- sb.append("("); //$NON-NLS-1$
- DTDGroupKind kind = group.getGroupKind();
- // MOF2EMF Port
- // Integer groupKind = group.getGroupKind();
- if (kind == null) {
- group.setGroupKind(DTDGroupKind.get(DTDGroupKind.SEQUENCE));
- } // end of if ()
-
- String con = group.getGroupKind().getValue() == DTDGroupKind.CHOICE ? " | " : ", "; //$NON-NLS-1$ //$NON-NLS-2$
-
- // Loop thru the children of the current group
- Collection content = group.getContent();
- if (content != null) {
- boolean firstContent = true;
- for (Iterator i = content.iterator(); i.hasNext();) {
- if (!firstContent) {
- sb.append(con);
- } // end of if ()
- else {
- firstContent = false;
- } // end of else
- visitDTDElementContent((DTDElementContent) i.next());
- }
- }
-
- sb.append(")"); //$NON-NLS-1$
- }
-
- private void visitAttributes(DTDElement elem) {
- Collection attrs = elem.getDTDAttribute();
- Iterator i = attrs.iterator();
- if (attrs != null && i.hasNext()) {
- DTDAttribute attrib = (DTDAttribute) i.next();
- String comment = attrib.getComment();
- if (comment != null && comment.length() > 0)
- sb.append("<!--\n ").append(comment).append("\n-->\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("<!ATTLIST " + elem.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append(" "); //$NON-NLS-1$
- updateStartOffset(attrib, sb.length());
- sb.append(attrib.unparse());
- updateEndOffset(attrib, sb.length());
- sb.append("\n"); //$NON-NLS-1$
- for (; i.hasNext();) {
- attrib = (DTDAttribute) i.next();
- comment = attrib.getComment();
- if (comment != null && comment.length() > 0) {
- sb.append(">\n"); //$NON-NLS-1$
- if (comment != null && comment.length() > 0)
- sb.append("<!--\n ").append(comment).append("\n-->\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("<!ATTLIST " + elem.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- sb.append(" "); //$NON-NLS-1$
- updateStartOffset(attrib, sb.length());
- sb.append(attrib.unparse());
- updateEndOffset(attrib, sb.length());
- sb.append("\n"); //$NON-NLS-1$
- }
- sb.append(">\n"); //$NON-NLS-1$
- }
- }
-
- private void endTag() {
- sb.append(">\n"); //$NON-NLS-1$
- }
-
- private void updateStartOffset(DTDSourceOffset o, int offset) {
- if (updateOffset) {
- o.setStartOffset(offset);
- } // end of if ()
- }
-
- private void updateEndOffset(DTDSourceOffset o, int offset) {
- if (updateOffset) {
- o.setEndOffset(offset);
- } // end of if ()
- }
-
- private void generateComment(DTDObject dtdObject) {
- String commentString = null;
-
- if (dtdObject instanceof DTDElement)
- commentString = ((DTDElement) dtdObject).getComment();
- else if (dtdObject instanceof DTDEntity)
- commentString = ((DTDEntity) dtdObject).getComment();
- else if (dtdObject instanceof DTDNotation)
- commentString = ((DTDNotation) dtdObject).getComment();
-
- if (commentString != null && commentString.length() > 0) {
- sb.append("<!--").append(commentString).append("-->\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
-
- // /**
- // * @generated
- // */
- // protected StringBuffer getBufferGen() {
- //
- // return sb;
- // }
- // /**
- // * @generated
- // */
- // protected void visitDTDFileGen(DTDFile file) {
- //
- // super.visitDTDFile(file);
- // }
- // /**
- // * @generated
- // */
- // protected void visitDTDNotationGen(DTDNotation notation) {
- //
- // generateComment(notation);
- // updateStartOffset(notation, sb.length());
- // sb.append("<!NOTATION ");
- // sb.append(notation.getName()).append(" ");
- //
- //
- // String publicID = notation.getPublicID();
- // String systemID = notation.getSystemID();
- // if (publicID == null || publicID.equals(""))
- // {
- // sb.append("SYSTEM ");
- // }
- // else
- // {
- // sb.append("PUBLIC \"").append(publicID).append("\" ");
- // }
- //
- //
- // if (systemID==null)
- // {
- // sb.append("\"\"");
- // }
- // else
- // {
- // sb.append("\"").append(systemID).append("\"");
- // }
- // endTag();
- // updateEndOffset(notation, sb.length() - 1); // -1 for the newline char
- // super.visitDTDNotation(notation);
- // }
- // /**
- // * @generated
- // */
- // protected void visitDTDEntityGen(DTDEntity entity) {
- //
- // generateComment(entity);
- // updateStartOffset(entity, sb.length());
- // sb.append("<!ENTITY ");
- //
- //
- // if (entity.isParameterEntity())
- // sb.append("% ");
- //
- //
- // sb.append(entity.getName()).append(" ");
- // sb.append(entity.getContent().unparse());
- //
- //
- // endTag();
- // updateEndOffset(entity, sb.length() - 1); // -1 for the newline char
- // super.visitDTDEntity(entity);
- // }
- // /**
- // * @generated
- // */
- // protected void visitDTDElementGen(DTDElement element) {
- //
- // generateComment(element);
- // updateStartOffset(element, sb.length());
- // sb.append("<!ELEMENT " + element.getName());
- // DTDElementContent content = element.getContent();
- // if (content instanceof DTDPCDataContent ||
- // content instanceof DTDElementReferenceContent)
- // {
- // sb.append(" (");
- // super.visitDTDElement(element);
- // sb.append(")");
- // } // end of if ()
- // else
- // {
- // sb.append(" ");
- // super.visitDTDElement(element);
- // } // end of else
- // endTag();
- // updateEndOffset(element, sb.length() - 1); // -1 for the newline char
- // visitAttributes(element);
- // }
- // /**
- // * @generated
- // */
- // protected void
- // visitDTDParameterEntityReferenceGen(DTDParameterEntityReference
- // parmEntity) {
- //
- // generateComment(parmEntity);
- // updateStartOffset(parmEntity, sb.length());
- // sb.append("%" + parmEntity.getName() + ";\n");
- // updateEndOffset(parmEntity, sb.length() - 1); // -1 for the newline
- // char
- // }
- // /**
- // * @generated
- // */
- // protected void visitDTDElementContentGen(DTDElementContent content) {
- //
- // updateStartOffset(content, sb.length());
- // String trailingChars = "";
- // if (content instanceof DTDRepeatableContent )
- // {
- // DTDRepeatableContent repeatContent = (DTDRepeatableContent) content;
- // Integer occurrence = repeatContent.getOccurrence();
- // if (occurrence != null)
- // {
- // int occurType = occurrence.intValue();
- // if (occurType != DTDOccurrenceType.ONE)
- // {
- // if (repeatContent instanceof DTDEntityReferenceContent)
- // {
- // sb.append("(");
- // trailingChars = ")";
- // }
- // trailingChars += (char) occurType;
- // }
- // } // end of if ()
- // } // end of if ()
- //
- // if (content instanceof DTDGroupContent)
- // {
- // super.visitDTDElementContent(content);
- // } // end of if ()
- // else if (content instanceof DTDElementReferenceContent ||
- // content instanceof DTDEntityReferenceContent)
- // {
- // sb.append(((DTDRepeatableContent)content).unparseRepeatableContent());
- // } // end of if ()
- // else
- // {
- // // handle DTDPCDataContent, DTDAnyContent and DTDEmptyContent here
- // sb.append(content.getContentName());
- // } // end of else
- // sb.append(trailingChars);
- // updateEndOffset(content, sb.length());
- // }
- // /**
- // * @generated
- // */
- // protected void visitDTDGroupContentGen(DTDGroupContent group) {
- //
- // sb.append("(");
- //
- // Integer groupKind = group.getGroupKind();
- // if (groupKind == null)
- // {
- // group.setGroupKind(DTDGroupKind.SEQUENCE);
- // } // end of if ()
- //
- // String con = group.getGroupKind().intValue() == DTDGroupKind.CHOICE ? "
- // | " : ", ";
- //
- //
- // // Loop thru the children of the current group
- // Collection content = group.getContent();
- // if (content != null)
- // {
- // boolean firstContent = true;
- // for (Iterator i = content.iterator(); i.hasNext(); )
- // {
- // if (!firstContent)
- // {
- // sb.append(con);
- // } // end of if ()
- // else
- // {
- // firstContent = false;
- // } // end of else
- // visitDTDElementContent((DTDElementContent) i.next());
- // }
- // }
- //
- //
- // sb.append(")");
- // }
- // /**
- // * @generated
- // */
- // protected void visitAttributesGen(DTDElement elem) {
- //
- // Collection attrs = elem.getDTDAttribute();
- // Iterator i = attrs.iterator();
- // if (attrs != null && i.hasNext())
- // {
- // DTDAttribute attrib = (DTDAttribute) i.next();
- // String comment = attrib.getComment();
- // if (comment!=null && comment.length()>0)
- // sb.append("<!--\n ").append(comment).append("\n-->\n");
- // sb.append("<!ATTLIST " + elem.getName() + "\n");
- // sb.append(" ");
- // updateStartOffset(attrib, sb.length());
- // sb.append(attrib.unparse());
- // updateEndOffset(attrib, sb.length());
- // sb.append("\n");
- // for (; i.hasNext(); )
- // {
- // attrib = (DTDAttribute) i.next();
- // comment = attrib.getComment();
- // if (comment!=null && comment.length()>0)
- // {
- // sb.append(">\n");
- // if (comment!=null && comment.length()>0)
- // sb.append("<!--\n ").append(comment).append("\n-->\n");
- // sb.append("<!ATTLIST " + elem.getName() + "\n");
- // }
- // sb.append(" ");
- // updateStartOffset(attrib, sb.length());
- // sb.append(attrib.unparse());
- // updateEndOffset(attrib, sb.length());
- // sb.append("\n");
- // }
- // sb.append(">\n");
- // }
- // }
- // /**
- // * @generated
- // */
- // protected void endTagGen() {
- //
- // sb.append(">\n");
- // }
- // /**
- // * @generated
- // */
- // protected void updateStartOffsetGen(DTDSourceOffset o, int offset) {
- //
- // if (updateOffset)
- // {
- // o.setStartOffset(offset);
- // } // end of if ()
- // }
- // /**
- // * @generated
- // */
- // protected void updateEndOffsetGen(DTDSourceOffset o, int offset) {
- //
- // if (updateOffset)
- // {
- // o.setEndOffset(offset);
- // } // end of if ()
- // }
- // /**
- // * @generated
- // */
- // protected void generateCommentGen(DTDObject dtdObject) {
- //
- // String commentString = null;
- //
- //
- // if (dtdObject instanceof DTDElement)
- // commentString = ((DTDElement)dtdObject).getComment();
- // else if (dtdObject instanceof DTDEntity)
- // commentString = ((DTDEntity)dtdObject).getComment();
- // else if (dtdObject instanceof DTDNotation)
- // commentString = ((DTDNotation)dtdObject).getComment();
- //
- //
- // if ( commentString!=null && commentString.length()>0)
- // {
- // sb.append("<!--").append(commentString).append("-->\n");
- // }
- // }
-}// DTDPrinter
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceFactoryImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceFactoryImpl.java
deleted file mode 100644
index 5986c3e42c..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceFactoryImpl.java
+++ /dev/null
@@ -1,79 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-
-public class DTDResourceFactoryImpl extends ResourceFactoryImpl {
- public DTDResourceFactoryImpl() {
- super();
- }
-
- public Resource createResource(String filename) {
- return new DTDResourceImpl(filename);
- }
-
- public Resource createResource(URI uri) {
- return new DTDResourceImpl(uri);
- }
-
- public Resource createResource(ResourceSet resources, URI uri) {
- Resource resource = new DTDResourceImpl(uri);
- resources.getResources().add(resource);
- return resource;
- }
-
- public Resource createResource(ResourceSet resources, String uri) {
- Resource resource = new DTDResourceImpl(uri);
- resources.getResources().add(resource);
- return resource;
- }
-
- public Resource load(String uri) throws Exception {
- Resource resource = createResource(uri);
- resource.load(new HashMap());
- return resource;
- }
-
- public Resource load(URI uri) throws Exception {
- Resource resource = createResource(uri);
- resource.load(new HashMap());
- return resource;
- }
-
- public Resource load(ResourceSet resources, String uri) throws Exception {
- return load(resources, uri, new HashMap());
- }
-
- public Resource load(ResourceSet resources, URI uri) throws Exception {
- return load(resources, uri, new HashMap());
- }
-
- public Resource load(ResourceSet resources, String uri, Map options) throws Exception {
- Resource resource = createResource(resources, uri);
- resource.load(options);
- return resource;
- }
-
- public Resource load(ResourceSet resources, URI uri, Map options) throws Exception {
- Resource resource = createResource(resources, uri);
- resource.load(options);
- return resource;
- }
-} // DTDResourceFactoryImpl
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceImpl.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceImpl.java
deleted file mode 100644
index 9d085be4d6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceImpl.java
+++ /dev/null
@@ -1,166 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.io.OutputStream;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.zip.ZipOutputStream;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
-import org.eclipse.wst.dtd.core.internal.DTDCoreMessages;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-
-
-public class DTDResourceImpl extends ResourceImpl {
-
- public DTDResourceImpl() {
- super();
- }
-
- public DTDResourceImpl(String filename) {
- super(URI.createURI(filename));
- // System.out.println(">>>> DTDResourceImpl ctor 1");
- }
-
- public DTDResourceImpl(URI uri) {
- super(uri);
- // System.out.println(">>>> DTDResourceImpl ctor 2");
- }
-
- /**
- * Returns the resolved object for the given URI
- * {@link URI#fragment fragment}.
- * <p>
- * The fragment encoding will typically be that produced by
- * {@link #getURIFragment getURIFragment}.
- * </p>
- *
- * @param uriFragment
- * the fragment to resolve.
- * @return the resolved object for the given fragment.
- * @see #getURIFragment(EObject)
- * @see org.eclipse.emf.ecore.resource.ResourceSet#getEObject(URI, boolean)
- * @see org.eclipse.emf.ecore.util.EcoreUtil#resolve(EObject, org.eclipse.emf.ecore.resource.ResourceSet)
- * @see org.eclipse.emf.ecore.InternalEObject#eObjectForURIFragmentSegment(String)
- * @throws org.eclipse.emf.common.util.WrappedException
- * if a problem occurs navigating the fragment.
- */
- public EObject getEObject(java.lang.String uriFragment) {
- EList contents = getContents();
- if (contents != null) {
- Iterator i = contents.iterator();
- while (i.hasNext()) {
- Object obj = i.next();
- if (obj instanceof DTDFile) {
- // there should only be one DTDFile in a DTD extent
- EObject result = ((DTDFile) obj).findObject(uriFragment);
- return result;
- }
- }
- }
- System.out.println(">>> DTDKey Error: cannot find object " + uriFragment); //$NON-NLS-1$
- return super.getEObject(uriFragment);
- }
-
- /**
- * Returns the URI {@link URI#fragment fragment} that, when passed to
- * {@link #getEObject getEObject} will return the given object.
- * <p>
- * In other words, the following is <code>true</code> for any object
- * contained by a resource:
- *
- * <pre>
- *
- * Resource resource = eObject.eResource();
- * eObject == resource.getEObject(resource.getURIFragment(eObject))
- *
- * </pre>
- *
- * An implementation may choose to use IDs or to use structured URI
- * fragments, as supported by
- * {@link org.eclipse.emf.ecore.InternalEObject#eURIFragmentSegment eURIFragmentSegment}.
- * </p>
- *
- * @param eObject
- * the object to identify.
- * @return the URI {@link URI#fragment fragment} for the object.
- * @see #getEObject(String)
- * @see org.eclipse.emf.ecore.InternalEObject#eURIFragmentSegment(org.eclipse.emf.core.EStructuralFeature,
- * EObject)
- */
- public java.lang.String getURIFragment(EObject eObject) {
- if (eObject instanceof DTDObject) {
- return ((DTDObject) eObject).getPathname();
- }
- return super.getURIFragment(eObject);
- }
-
- private DTDUtil dtdUtil;
-
- public DTDUtil getDTDUtil() {
- return dtdUtil;
- }
-
- public void setDTDUtil(DTDUtil dtdUtil) {
- this.dtdUtil = dtdUtil;
- }
-
- public void load(Map options) {
-
- String uriString = getURI().toString();
- try {
- DTDUtil dtdUtil = new DTDUtil();
- dtdUtil.parse(getResourceSet(), uriString);
- dtdUtil.setResource(this);
- setDTDUtil(dtdUtil);
- getContents().add(dtdUtil.getDTDFile());
-
- // Reset the dirty flag after the resource is loaded
- setModified(false);
- }
- catch (Exception exc) {
- exc.printStackTrace();
- }
- }
-
- public void save(OutputStream os, Object options) throws Exception {
- if (contents != null) {
- Iterator i = contents.iterator();
- while (i.hasNext()) {
- Object obj = i.next();
- if (obj instanceof DTDFile) {
- try {
- DTDPrinter printer = new DTDPrinter(true);
- printer.visitDTDFile((DTDFile) obj);
-
- String s = printer.getBuffer().toString();
- os.write(s.getBytes());
- // Reset the dirty flag after the resource is saved
- setModified(false);
- }
- catch (Exception e) {
- }
- break;
- }
- }
- }
- }
-
- public void save(ZipOutputStream zos, String entry, String metaModelName) throws Exception {
- throw new Exception(DTDCoreMessages._EXC_OPERATION_NOT_SUPPORTED); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDSwitch.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDSwitch.java
deleted file mode 100644
index d903b643e1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDSwitch.java
+++ /dev/null
@@ -1,489 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.ETypedElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDBasicType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEnumerationType;
-import org.eclipse.wst.dtd.core.internal.emf.DTDExternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDInternalEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPackage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent;
-
-
-
-public class DTDSwitch {
- /**
- * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected static DTDPackage modelPackage;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public DTDSwitch() {
- if (modelPackage == null) {
- modelPackage = DTDPackage.eINSTANCE;
- }
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object doSwitch(EObject theEObject) {
- EClass theEClass = theEObject.eClass();
- if (theEClass.eContainer() == modelPackage) {
- switch (theEClass.getClassifierID()) {
- case DTDPackage.DTD_GROUP_CONTENT : {
- DTDGroupContent dtdGroupContent = (DTDGroupContent) theEObject;
- Object result = caseDTDGroupContent(dtdGroupContent);
- if (result == null)
- result = caseDTDRepeatableContent(dtdGroupContent);
- if (result == null)
- result = caseDTDElementContent(dtdGroupContent);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_ATTRIBUTE : {
- DTDAttribute dtdAttribute = (DTDAttribute) theEObject;
- Object result = caseDTDAttribute(dtdAttribute);
- if (result == null)
- result = caseEAttribute(dtdAttribute);
- if (result == null)
- result = caseEStructuralFeature(dtdAttribute);
- if (result == null)
- result = caseETypedElement(dtdAttribute);
- if (result == null)
- result = caseENamedElement(dtdAttribute);
- if (result == null)
- result = caseEModelElement(dtdAttribute);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_ELEMENT : {
- DTDElement dtdElement = (DTDElement) theEObject;
- Object result = caseDTDElement(dtdElement);
- if (result == null)
- result = caseEClass(dtdElement);
- if (result == null)
- result = caseDTDContent(dtdElement);
- if (result == null)
- result = caseEClassifier(dtdElement);
- if (result == null)
- result = caseENamedElement(dtdElement);
- if (result == null)
- result = caseEModelElement(dtdElement);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_EMPTY_CONTENT : {
- DTDEmptyContent dtdEmptyContent = (DTDEmptyContent) theEObject;
- Object result = caseDTDEmptyContent(dtdEmptyContent);
- if (result == null)
- result = caseDTDElementContent(dtdEmptyContent);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_ANY_CONTENT : {
- DTDAnyContent dtdAnyContent = (DTDAnyContent) theEObject;
- Object result = caseDTDAnyContent(dtdAnyContent);
- if (result == null)
- result = caseDTDElementContent(dtdAnyContent);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_PC_DATA_CONTENT : {
- DTDPCDataContent dtdpcDataContent = (DTDPCDataContent) theEObject;
- Object result = caseDTDPCDataContent(dtdpcDataContent);
- if (result == null)
- result = caseDTDElementContent(dtdpcDataContent);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_ELEMENT_REFERENCE_CONTENT : {
- DTDElementReferenceContent dtdElementReferenceContent = (DTDElementReferenceContent) theEObject;
- Object result = caseDTDElementReferenceContent(dtdElementReferenceContent);
- if (result == null)
- result = caseDTDRepeatableContent(dtdElementReferenceContent);
- if (result == null)
- result = caseDTDElementContent(dtdElementReferenceContent);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_FILE : {
- DTDFile dtdFile = (DTDFile) theEObject;
- Object result = caseDTDFile(dtdFile);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_BASIC_TYPE : {
- DTDBasicType dtdBasicType = (DTDBasicType) theEObject;
- Object result = caseDTDBasicType(dtdBasicType);
- if (result == null)
- result = caseEClass(dtdBasicType);
- if (result == null)
- result = caseEClassifier(dtdBasicType);
- if (result == null)
- result = caseENamedElement(dtdBasicType);
- if (result == null)
- result = caseEModelElement(dtdBasicType);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_ENUMERATION_TYPE : {
- DTDEnumerationType dtdEnumerationType = (DTDEnumerationType) theEObject;
- Object result = caseDTDEnumerationType(dtdEnumerationType);
- if (result == null)
- result = caseEEnum(dtdEnumerationType);
- if (result == null)
- result = caseEDataType(dtdEnumerationType);
- if (result == null)
- result = caseEClassifier(dtdEnumerationType);
- if (result == null)
- result = caseENamedElement(dtdEnumerationType);
- if (result == null)
- result = caseEModelElement(dtdEnumerationType);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_NOTATION : {
- DTDNotation dtdNotation = (DTDNotation) theEObject;
- Object result = caseDTDNotation(dtdNotation);
- if (result == null)
- result = caseDTDContent(dtdNotation);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_ENTITY : {
- DTDEntity dtdEntity = (DTDEntity) theEObject;
- Object result = caseDTDEntity(dtdEntity);
- if (result == null)
- result = caseDTDContent(dtdEntity);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_EXTERNAL_ENTITY : {
- DTDExternalEntity dtdExternalEntity = (DTDExternalEntity) theEObject;
- Object result = caseDTDExternalEntity(dtdExternalEntity);
- if (result == null)
- result = caseDTDEntityContent(dtdExternalEntity);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_INTERNAL_ENTITY : {
- DTDInternalEntity dtdInternalEntity = (DTDInternalEntity) theEObject;
- Object result = caseDTDInternalEntity(dtdInternalEntity);
- if (result == null)
- result = caseDTDEntityContent(dtdInternalEntity);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_PARAMETER_ENTITY_REFERENCE : {
- DTDParameterEntityReference dtdParameterEntityReference = (DTDParameterEntityReference) theEObject;
- Object result = caseDTDParameterEntityReference(dtdParameterEntityReference);
- if (result == null)
- result = caseDTDContent(dtdParameterEntityReference);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case DTDPackage.DTD_ENTITY_REFERENCE_CONTENT : {
- DTDEntityReferenceContent dtdEntityReferenceContent = (DTDEntityReferenceContent) theEObject;
- Object result = caseDTDEntityReferenceContent(dtdEntityReferenceContent);
- if (result == null)
- result = caseDTDRepeatableContent(dtdEntityReferenceContent);
- if (result == null)
- result = caseDTDElementContent(dtdEntityReferenceContent);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- default :
- return defaultCase(theEObject);
- }
- }
- return defaultCase(theEObject);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDFile(DTDFile object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDNotation(DTDNotation object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDContent(DTDContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDEntity(DTDEntity object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDEntityContent(DTDEntityContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDExternalEntity(DTDExternalEntity object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDInternalEntity(DTDInternalEntity object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDParameterEntityReference(DTDParameterEntityReference object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDEntityReferenceContent(DTDEntityReferenceContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDRepeatableContent(DTDRepeatableContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDElementReferenceContent(DTDElementReferenceContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDElement(DTDElement object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDElementContent(DTDElementContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDEmptyContent(DTDEmptyContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDAnyContent(DTDAnyContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDPCDataContent(DTDPCDataContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDGroupContent(DTDGroupContent object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDAttribute(DTDAttribute object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDEnumerationType(DTDEnumerationType object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseDTDBasicType(DTDBasicType object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- // +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
- //
- // +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
- // // public Object caseENamespace(ENamespace object) {
- // -------------------GENERICRULES.JSED-------------------
- // return null;
- // }
- // -------------------GENERICRULES.JSED-------------------
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseEClass(EClass object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseEAttribute(EAttribute object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseEEnum(EEnum object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseEModelElement(EModelElement object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseENamedElement(ENamedElement object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseEStructuralFeature(EStructuralFeature object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseEDataType(EDataType object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseETypedElement(ETypedElement object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object caseEClassifier(EClassifier object) {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- // +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
- //
- // +++++++++++++++++++GENERICRULES.JSED+++++++++++++++++++
- // // public Object caseInternalEClassifier(InternalEClassifier object) {
- // -------------------GENERICRULES.JSED-------------------
- // return null;
- // }
- // -------------------GENERICRULES.JSED-------------------
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Object defaultCase(EObject object) {
- return null;
- }
-
-} // DTDSwitch
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUniqueNameHelper.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUniqueNameHelper.java
deleted file mode 100644
index 2b8ff3eb83..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUniqueNameHelper.java
+++ /dev/null
@@ -1,174 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-
-
-
-public class DTDUniqueNameHelper {
- public DTDUniqueNameHelper() {
-
- }
-
- static public String getUniqueElementName(DTDFile dtdFile) {
- List elements = dtdFile.listDTDElement();
- return getUniqueName(elements, "NewElement"); //$NON-NLS-1$
- }
-
- static public String getUniqueEntityName(DTDFile dtdFile) {
- List entities = dtdFile.listDTDEntity();
- return getUniqueName(entities, "NewEntity"); //$NON-NLS-1$
- }
-
- static public String getUniqueNotationName(DTDFile dtdFile) {
- List notations = dtdFile.listDTDNotation();
- return getUniqueName(notations, "NewNotation"); //$NON-NLS-1$
- }
-
- static public String getUniqueAttributeName(DTDElement element) {
- List attrs = element.getDTDAttribute();
- return getUniqueName(attrs, "NewAttribute"); //$NON-NLS-1$
- }
-
- static public String getUniqueName(List objs, String token) {
- int counter = 1;
-
- boolean uniqueName = false;
- while (!uniqueName) {
- String newName = token + new Integer(counter++);
- uniqueName = true;
- Iterator iter = objs.iterator();
- while (iter.hasNext()) {
- Object obj = iter.next();
- String objName = getName(obj);
- if (objName.equals(newName)) {
- uniqueName = false;
- break;
- }
- }
- if (uniqueName) {
- return newName;
- }
- }
- // we shouldn't get here
- return "No Name found"; //$NON-NLS-1$
- }
-
- static public String getName(Object obj) {
- if (obj instanceof DTDElement) {
- return ((DTDElement) obj).getName();
- }
- else if (obj instanceof DTDEntity) {
- return ((DTDEntity) obj).getName();
- }
- else if (obj instanceof DTDNotation) {
- return ((DTDNotation) obj).getName();
- }
- else if (obj instanceof DTDAttribute) {
- return ((DTDAttribute) obj).getName();
- }
- return ""; //$NON-NLS-1$
- }
-
-
- /**
- * @generated
- */
- protected static String getUniqueElementNameGen(DTDFile dtdFile) {
-
- List elements = dtdFile.listDTDElement();
- return getUniqueName(elements, "NewElement"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected static String getUniqueEntityNameGen(DTDFile dtdFile) {
-
- List entities = dtdFile.listDTDEntity();
- return getUniqueName(entities, "NewEntity"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected static String getUniqueNotationNameGen(DTDFile dtdFile) {
-
- List notations = dtdFile.listDTDNotation();
- return getUniqueName(notations, "NewNotation"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected static String getUniqueAttributeNameGen(DTDElement element) {
-
- List attrs = element.getDTDAttribute();
- return getUniqueName(attrs, "NewAttribute"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected static String getUniqueNameGen(List objs, String token) {
-
- int counter = 1;
-
- boolean uniqueName = false;
- while (!uniqueName) {
- String newName = token + new Integer(counter++);
- uniqueName = true;
- Iterator iter = objs.iterator();
- while (iter.hasNext()) {
- Object obj = iter.next();
- String objName = getName(obj);
- if (objName.equals(newName)) {
- uniqueName = false;
- break;
- }
- }
- if (uniqueName) {
- return newName;
- }
- }
- // we shouldn't get here
- return "No Name found"; //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- protected static String getNameGen(Object obj) {
-
- if (obj instanceof DTDElement) {
- return ((DTDElement) obj).getName();
- }
- else if (obj instanceof DTDEntity) {
- return ((DTDEntity) obj).getName();
- }
- else if (obj instanceof DTDNotation) {
- return ((DTDNotation) obj).getName();
- }
- else if (obj instanceof DTDAttribute) {
- return ((DTDAttribute) obj).getName();
- }
- return ""; //$NON-NLS-1$
- }
-}// DTDUniqueNameHelper
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUtil.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUtil.java
deleted file mode 100644
index 8f9a7df7b0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUtil.java
+++ /dev/null
@@ -1,1217 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.wst.dtd.core.internal.emf.DTDConstants;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFactory;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.impl.DTDFactoryImpl;
-import org.eclipse.wst.dtd.core.internal.saxparser.DTD;
-import org.eclipse.wst.dtd.core.internal.saxparser.DTDParser;
-import org.eclipse.wst.dtd.core.internal.saxparser.ErrorMessage;
-
-/**
- * Create MOF objects from the parsed DTD If no DTD file is specifed, create
- * the root MOF object
- */
-public class DTDUtil {
- DTDFactory factory;
- EList extent;
- Resource resource;
- DTDFile dtdFile;
- String dtdModelFile;
- boolean expandEntityReferences;
-
- private Hashtable externalDTDModels = new Hashtable();
- private Hashtable pePool = new Hashtable();
- private Hashtable elementPool = new Hashtable();
-
- private DTDParser parser;
-
- private Vector errorMsgs = new Vector();
-
- private static Hashtable utilCache = new Hashtable();
-
- static public DTDUtil getDTDUtilFor(String filename) {
- DTDUtil util = (DTDUtil) utilCache.get(filename);
- if (util == null) {
- util = new DTDUtil();
- utilCache.put(filename, util);
- }
-
- return util;
- }
-
-
- public void parse(String uri) {
- parse(new ResourceSetImpl(), uri);
- }
-
- /**
- * Invoke parse to parse a .dtd file into a MOF object model This is
- * invoked by the RegisteredDTDParser that registers this parser for MOF
- * to use against the .dtd type
- *
- * @param filename -
- * the fully qualifed name of a .dtd file
- */
- public void parse(ResourceSet resources, String filename) {
- // Get the dtd name from the file name
- Path path = new Path(filename);
- IPath iPath = path.removeFileExtension();
- String dtdName = iPath.toFile().getName();
-
- try {
- parser = new DTDParser(false);
- if (expandEntityReferences) {
- parser.setExpandEntityReferences(expandEntityReferences);
- }
- parser.parse(filename);
- }
- catch (IOException ex) {
- ex.printStackTrace(System.err);
- }
-
- dtdModelFile = filename;
-
- factory = DTDFactoryImpl.instance();
-
- extent = new BasicEList();
-
- dtdFile = factory.createDTDFile();
- extent.add(dtdFile);
-
- dtdFile.setName(dtdName);
-
- populateDTD(resources, expandEntityReferences);
- }
-
- public DTDFactory getFactory() {
- return factory;
- }
-
- public DTDFile getDTDFile() {
- return dtdFile;
- }
-
- public Hashtable getPEPool() {
- return pePool;
- }
-
- public Hashtable getElementPool() {
- return elementPool;
- }
-
- public EList getContents() {
- return extent;
- }
-
- public void setResource(Resource resource) {
- this.resource = resource;
- }
-
- public Resource getResource(Resource resource) {
- return resource;
- }
-
- public void setexpandEntityReferences(boolean expandEntityReferences) {
- this.expandEntityReferences = expandEntityReferences;
- }
-
- public boolean getExpandEntityReferences() {
- return expandEntityReferences;
- }
-
- /**
- * Return true if the model has been modified
- */
- public boolean isModelDirty() {
- if (resource != null) {
- return resource.isModified();
- }
- return false;
- }
-
- /**
- * Save the .dtd file
- */
- public boolean save() {
- try {
- Map options = new HashMap();
- resource.save(options);
- return true;
- }
- catch (Exception ex) {
- System.out.println("Save model exception " + ex); //$NON-NLS-1$
- ex.printStackTrace();
- return false;
- }
- }
-
- public boolean saveAs(String newFilename) {
- resource.setURI(URI.createURI(newFilename));
- boolean ok = save();
-
- if (ok) {
- Path path = new Path(newFilename);
- IPath iPath = path.removeFileExtension();
- String dtdName = iPath.toFile().getName();
-
- dtdFile.setName(dtdName);
- }
- return ok;
- }
-
- public boolean saveDTDFile(String filename) {
- boolean result = true;
- try {
- PrintWriter pw = new PrintWriter(new FileWriter(filename), true);
- DTDPrinter printer = new DTDPrinter(true);
- printer.visitDTDFile(dtdFile);
-
- String s = printer.getBuffer().toString();
- pw.println(s);
- pw.close();
- }
-
- catch (Exception e) {
- result = false;
- }
- return result;
- }
-
- public String getDTDSource(boolean includeError) {
- return dtdFile.unparse(includeError); // true = include error lines
- }
-
- /**
- * Create MOF objects from DTD
- */
- private void populateDTD(ResourceSet resources, boolean expandEntityReferences) {
- Vector dtdList = parser.getDTDList();
-
- // create XMIModel for the included DTDs
- if (dtdList.size() > 0) {
- if (!expandEntityReferences) {
- for (int i = dtdList.size() - 1; i > 0; i--) {
- DTD dtd = (DTD) dtdList.elementAt(i);
- loadIncludedDTD(resources, dtd);
- }
-
- DTD dtd = (DTD) dtdList.elementAt(0);
- populateDTD(resources, dtd, dtdFile); // populate the main
- // DTD
- // validateWithModel(dtd);
- }
- else {
- for (int i = dtdList.size() - 1; i >= 0; i--) {
- DTD dtd = (DTD) dtdList.elementAt(i);
- populateDTD(resources, dtd, dtdFile);
- // validateWithModel(dtd);
- }
- }
- }
- }
-
- // return the instance unique to this DTDUtil file that represents an
- // externally loaded dtd (will create if one doesn't exist yet)
- public ExternalDTDModel getExternalDTDModel(ResourceSet resources, String uri) {
- if (expandEntityReferences) {
- return null;
- }
-
- // DefaultMsgLogger.write("External DTD name: " + uri);
-
- if (externalDTDModels.containsKey(uri)) {
- return (ExternalDTDModel) externalDTDModels.get(uri);
- }
- else {
- ExternalDTDModel extModel = new ExternalDTDModel();
- if (extModel.loadModel(resources, uri)) {
- externalDTDModels.put(uri, extModel);
- return extModel;
- }
- }
- return null;
- }
-
- // load xmiModels for included DTDs
- private void loadIncludedDTD(ResourceSet resources, DTD dtd) {
- ExternalDTDModel extModel = getExternalDTDModel(resources, dtd.getName());
- if (extModel != null) {
- // now fill our hash tables for elements and parameter entities
- // so that we know what can be referenced by our main dtd
- DTDFile file = extModel.getExternalDTDFile();
- Collection elementList = file.listDTDElement();
- Collection entityList = file.listDTDEntity();
-
- Iterator i = elementList.iterator();
- while (i.hasNext()) {
- DTDObject object = (DTDObject) i.next();
- elementPool.put(getBaseName(object), object);
- }
-
- i = entityList.iterator();
- while (i.hasNext()) {
- DTDEntity entity = (DTDEntity) i.next();
- if (entity.isParameterEntity()) {
- pePool.put(getBaseName(entity), entity);
- }
- }
- }
- }
-
- /**
- * Create MOF objects from DTD
- *
- * 1) will create the corresponding DTD Mof object for EntityDecl,
- * NotationDecl and ElementDecl declarations during the 1st pass 2) During
- * the 2nd pass, it will add the contentModel and Attlist to all
- * ElementDecl.
- *
- */
- private void populateDTD(ResourceSet resources, DTD dtd, DTDFile dFile) {
- DTDModelBuilder modelBuilder = new DTDModelBuilder(resources, this, dtd, dFile);
-
- modelBuilder.visitDTD(dtd);
- }
-
-
- public void emptyErrorMessages() {
- errorMsgs.removeAllElements();
- }
-
- public void addErrorMessage(ErrorMessage error) {
- int vectorSize = errorMsgs.size();
- boolean add = true;
-
- if (vectorSize != 0) {
- int index = 0;
-
- while (add == true && index < vectorSize) {
- if (((ErrorMessage) errorMsgs.elementAt(index)).equals(error)) {
- add = false;
- }
- else {
- index++;
- }
- }
- }
-
- if (add) {
- errorMsgs.addElement(error);
- }
- }
-
- public Vector getErrors() {
- return errorMsgs;
- }
-
- // This gets the name without any pseudo namespace prefix
- public static String getBaseName(DTDObject obj) {
- return getName(obj, null);
- }
-
- // This gets the name with pseudo namespace prefixes if dtdFile is not
- // null
- public static String getName(DTDObject obj, DTDFile dtdFile) {
- String name = ""; //$NON-NLS-1$
- if (obj instanceof DTDEntity) {
- DTDEntity entity = (DTDEntity) obj;
- if (dtdFile != null && !entity.getDTDFile().equals(dtdFile)) {
- name = new Path(entity.getDTDFile().getName()).lastSegment() + ": "; //$NON-NLS-1$
- }
- name += "%" + ((DTDEntity) obj).getName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (obj instanceof DTDElement) {
- DTDElement element = (DTDElement) obj;
- if (dtdFile != null && !element.getDTDFile().equals(dtdFile)) {
- name = new Path(element.getDTDFile().getName()).lastSegment() + ": "; //$NON-NLS-1$
- }
- name += ((DTDElement) obj).getName();
- }
- else if (obj instanceof DTDElementContent) {
- return ((DTDElementContent) obj).getContentName();
- }
- return name;
- }
-
- public static String getGroupType(int groupKind, int occurrence) {
- String type = null;
-
- switch (groupKind) {
- case DTDGroupKind.SEQUENCE :
- type = "DTDSequence"; //$NON-NLS-1$
- break;
- case DTDGroupKind.CHOICE :
- type = "DTDChoice"; //$NON-NLS-1$
- break;
- }
-
- type += getRepeatableTypeSuffix(occurrence);
- return type;
- }
-
- public static String getReferenceType(int occurrence) {
- String type = "DTDReference"; //$NON-NLS-1$
- type += getRepeatableTypeSuffix(occurrence);
- return type;
- }
-
- private static String getRepeatableTypeSuffix(int occurrence) {
- return "(" + (char) occurrence + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static void main(String args[]) {
- System.out.println("\nStarting ..."); //$NON-NLS-1$
-
- if (args.length != 1)
- System.out.println("usage: DtdUtil inputfile.dtd"); //$NON-NLS-1$
-
- java.io.File inputFile = new File(args[0]);
-
- String dtdFileName = ""; //$NON-NLS-1$
- try {
- dtdFileName = inputFile.getCanonicalPath();
- }
- catch (IOException ex) {
- }
-
- String dtdModelName = dtdFileName;
-
- if (DTDConstants.DTD_EXTENSION.equals(new Path(dtdFileName).getFileExtension())) {
- dtdModelName = new Path(dtdFileName).removeFileExtension().lastSegment();
- }
- DTDUtil d2m = new DTDUtil();
- // TODO: fix port
- // d2m.parse(dtdFileName);
- try {
- d2m.saveAs(dtdModelName + "." + DTDConstants.DTD_XMI_EXTENSION); //$NON-NLS-1$
- }
- catch (Exception e) {
- System.out.println("Exception thrown during model save: " + e); //$NON-NLS-1$
- }
- System.out.println("Done."); //$NON-NLS-1$
- }
-
- public org.eclipse.core.runtime.IPath getPath() {
- Path currentDTDPath = new Path(dtdModelFile);
- if (currentDTDPath.segmentCount() > 1) {
- return currentDTDPath.removeLastSegments(1).addTrailingSeparator();
- }
-
- return new Path(""); //$NON-NLS-1$
- }
-
- // /**
- // * @generated
- // */
- // protected static DTDUtil getDTDUtilForGen(String filename) {
- //
- // DTDUtil util = (DTDUtil) utilCache.get(filename);
- // if (util == null)
- // {
- // util = new DTDUtil();
- // utilCache.put(filename, util);
- // }
- //
- // return util;
- // }
- // /**
- // * @generated
- // */
- // protected void parseGen(String uri) {
- //
- // parse(new ResourceSetImpl(), uri);
- // }
- // /**
- // * Invoke parse to parse a .dtd file into a MOF object model
- // * This is invoked by the RegisteredDTDParser that registers this parser
- // for MOF to use
- // * against the .dtd type
- // * @param filename - the fully qualifed name of a .dtd file
- // */
- // protected void parseGen(ResourceSet resources, String filename) {
- //
- // // Get the dtd name from the file name
- // Path path = new Path(filename);
- // IPath iPath = path.removeFileExtension();
- // String dtdName = iPath.toFile().getName();
- //
- //
- // try
- // {
- // parser = new DTDParser(false);
- // if (expandEntityReferences)
- // {
- // parser.setExpandEntityReferences(expandEntityReferences);
- // }
- // parser.parse(filename);
- // }
- // catch(IOException ex)
- // {
- // ex.printStackTrace(System.err);
- // }
- //
- //
- // dtdModelFile = filename;
- //
- //
- // factory = DTDFactoryImpl.instance();
- //
- //
- // extent = new BasicEList();
- //
- //
- // dtdFile = factory.createDTDFile();
- // extent.add(dtdFile);
- //
- //
- // dtdFile.setName(dtdName);
- //
- //
- // populateDTD(resources, expandEntityReferences);
- // }
- // /**
- // * @generated
- // */
- // protected DTDFactory getFactoryGen() {
- //
- // return factory;
- // }
- // /**
- // * @generated
- // */
- // protected DTDFile getDTDFileGen() {
- //
- // return dtdFile;
- // }
- // /**
- // * @generated
- // */
- // protected Hashtable getPEPoolGen() {
- //
- // return pePool;
- // }
- // /**
- // * @generated
- // */
- // protected Hashtable getElementPoolGen() {
- //
- // return elementPool;
- // }
- // /**
- // * @generated
- // */
- // protected EList getExtentGen() {
- //
- // return extent;
- // }
- // /**
- // * @generated
- // */
- // protected void setResourceGen(Resource resource) {
- //
- // this.resource = resource;
- // }
- // /**
- // * @generated
- // */
- // protected Resource getResourceGen(Resource resource) {
- //
- // return resource;
- // }
- // /**
- // * @generated
- // */
- // protected void setexpandEntityReferencesGen(boolean
- // expandEntityReferences) {
- //
- // this.expandEntityReferences = expandEntityReferences;
- // }
- // /**
- // * @generated
- // */
- // protected boolean getExpandEntityReferencesGen() {
- //
- // return expandEntityReferences;
- // }
- // /**
- // * Return true if the model has been modified
- // */
- // protected boolean isModelDirtyGen() {
- //
- // if (resource != null)
- // {
- // return resource.isModified();
- // }
- // return false;
- // }
- // /**
- // * Save the .dtd file
- // */
- // protected boolean saveGen() {
- //
- // try
- // {
- // resource.save();
- // return true;
- // }
- // catch (Exception ex)
- // {
- // System.out.println("Save model exception " + ex);
- // ex.printStackTrace();
- // return false;
- // }
- // }
- // /**
- // * @generated
- // */
- // protected boolean saveAsGen(String newFilename) {
- //
- // resource.setURI(newFilename);
- // boolean ok = save();
- //
- //
- // if (ok)
- // {
- // Path path = new Path(newFilename);
- // IPath iPath = path.removeFileExtension();
- // String dtdName = iPath.toFile().getName();
- //
- //
- // dtdFile.setName(dtdName);
- // }
- // return ok;
- // }
- // /**
- // * @generated
- // */
- // protected boolean saveDTDFileGen(String filename) {
- //
- // boolean result=true;
- // try
- // {
- // PrintWriter pw = new PrintWriter(new FileWriter(filename),true);
- // DTDPrinter printer = new DTDPrinter(true);
- // printer.visitDTDFile(dtdFile);
- //
- //
- // String s = printer.getBuffer().getName().toString();
- // pw.println(s);
- // pw.close();
- // }
- //
- //
- // catch (Exception e)
- // {
- // result = false;
- // }
- // return result;
- // }
- // /**
- // * @generated
- // */
- // protected String getDTDSourceGen(boolean includeError) {
- //
- // return dtdFile.unparse(includeError); // true = include error lines
- // }
- // /**
- // * Create MOF objects from DTD
- // */
- // protected void populateDTDGen(ResourceSet resources, boolean
- // expandEntityReferences) {
- //
- // Vector dtdList = parser.getDTDList();
- //
- //
- // // create XMIModel for the included DTDs
- // if ( dtdList.size() > 0)
- // {
- // if (!expandEntityReferences)
- // {
- // for (int i=dtdList.size() - 1; i > 0; i--)
- // {
- // DTD dtd = (DTD) dtdList.elementAt(i);
- // loadIncludedDTD(resources, dtd);
- // }
- //
- //
- // DTD dtd = (DTD) dtdList.elementAt(0);
- // populateDTD(resources, dtd, dtdFile); // populate the main DTD
- // // validateWithModel(dtd);
- // }
- // else
- // {
- // for (int i = dtdList.size() - 1; i >= 0; i--)
- // {
- // DTD dtd = (DTD) dtdList.elementAt(i);
- // populateDTD(resources, dtd, dtdFile);
- // // validateWithModel(dtd);
- // }
- // }
- // }
- // }
- // /**
- // * @generated
- // */
- // protected ExternalDTDModel getExternalDTDModelGen(ResourceSet
- // resources, String uri) {
- //
- // if (expandEntityReferences)
- // {
- // return null;
- // }
- //
- // DefaultMsgLogger.write("External DTD name: " + uri);
- //
- //
- // if (externalDTDModels.containsKey(uri))
- // {
- // return (ExternalDTDModel) externalDTDModels.get(uri);
- // }
- // else
- // {
- // ExternalDTDModel extModel = new ExternalDTDModel();
- // if (extModel.loadModel(resources, uri))
- // {
- // externalDTDModels.put(uri, extModel);
- // return extModel;
- // }
- // }
- // return null;
- // }
- // /**
- // * @generated
- // */
- // protected void loadIncludedDTDGen(ResourceSet resources, DTD dtd) {
- //
- // ExternalDTDModel extModel = getExternalDTDModel(resources,
- // dtd.getName());
- // if (extModel != null)
- // {
- // // now fill our hash tables for elements and parameter entities
- // // so that we know what can be referenced by our main dtd
- // DTDFile file = extModel.getExternalDTDFile();
- // Collection elementList = file.listDTDElement();
- // Collection entityList = file.listDTDEntity();
- //
- //
- // Iterator i = elementList.iterator();
- // while (i.hasNext())
- // {
- // DTDObject object = (DTDObject) i.next();
- // elementPool.put(getBaseName(object), object);
- // }
- //
- // i = entityList.iterator();
- // while (i.hasNext())
- // {
- // DTDEntity entity = (DTDEntity) i.next();
- // if (entity.isParameterEntity())
- // {
- // pePool.put(getBaseName(entity), entity);
- // }
- // }
- // }
- // }
- // /**
- // * Create MOF objects from DTD
- // *
- // * 1) will create the corresponding DTD Mof object for EntityDecl,
- // NotationDecl
- // * and ElementDecl declarations during the 1st pass
- // * 2) During the 2nd pass, it will add the contentModel and Attlist to
- // all
- // * ElementDecl.
- // *
- // */
- // protected void populateDTDGen(ResourceSet resources, DTD dtd, DTDFile
- // dFile) {
- //
- // DTDModelBuilder modelBuilder = new DTDModelBuilder(resources, this,
- // dtd, dFile);
- //
- //
- // modelBuilder.visitDTD(dtd);
- // }
- // /**
- // * @generated
- // */
- // protected void emptyErrorMessagesGen() {
- //
- // errorMsgs.removeAllElements();
- // }
- // /**
- // * @generated
- // */
- // protected void addErrorMessageGen(ErrorMessage error) {
- //
- // int vectorSize = errorMsgs.size();
- // boolean add = true;
- //
- //
- // if (vectorSize != 0)
- // {
- // int index = 0;
- //
- //
- // while (add == true && index < vectorSize)
- // {
- // if (((ErrorMessage) errorMsgs.elementAt(index)).equals(error))
- // {
- // add =false;
- // }
- // else
- // {
- // index++;
- // }
- // }
- // }
- //
- //
- // if (add)
- // {
- // errorMsgs.addElement(error);
- // }
- // }
- // /**
- // * @generated
- // */
- // protected Vector getErrorsGen() {
- //
- // return errorMsgs;
- // }
- // /**
- // * @generated
- // */
- // protected boolean validateDTDGen() {
- //
- // String tempDTDFile=getPath().toOSString()+"tempValidatingFileName.dtd";
- // try
- // {
- // saveDTDFile(tempDTDFile);
- //
- //
- // parser = new DTDParser(false);
- // if (FileUtility.fileExists(tempDTDFile))
- // {
- // parser.parse(tempDTDFile);
- // }
- // Vector dtdList = parser.getDTDList();
- // if ( dtdList.size() > 0)
- // {
- // // reset the errors and update what we have in the element pool
- // emptyErrorMessages();
- // updateElementHashtable();
- //
- //
- // // TODO: do we just validate the current one?
- // validateWithModel((DTD)dtdList.elementAt(0));
- // }
- // }
- // catch(IOException ex)
- // {
- // ex.printStackTrace(System.err);
- // FileUtility.delete(tempDTDFile);
- // }
- // FileUtility.delete(tempDTDFile);
- //
- //
- // return dtdFile.isParseError();
- // }
- // /**
- // * @generated
- // */
- // protected void validateWithModelGen(DTD dtd) {
- //
- // Enumeration en = dtd.externalElements();
- // while (en.hasMoreElements())
- // {
- // Object e = en.nextElement();
- //
- //
- // if ( e instanceof EntityDecl )
- // {
- // EntityDecl entity = (EntityDecl) e;
- // ErrorMessage errMsg = entity.getErrorMessage();
- // if ( errMsg!= null)
- // {
- // addErrorMessage(errMsg);
- // // dtdFile.setParseError(true);
- // }
- // }
- // else if ( e instanceof ElementDecl )
- // {
- // ElementDecl elem = (ElementDecl) e;
- // ErrorMessage errMsg = elem.getErrorMessage();
- // DTDElement dtdelement = (DTDElement)
- // getElementPool().get(elem.getNodeName());
- //
- //
- // if ( errMsg!= null)
- // {
- // addErrorMessage(errMsg);
- // }
- // checkForMissingElementReferences(dtdelement);
- // }
- // else if ( e instanceof NotationDecl )
- // {
- // NotationDecl notation = (NotationDecl) e;
- // ErrorMessage errMsg = notation.getErrorMessage();
- // if ( errMsg!= null)
- // {
- // addErrorMessage(errMsg);
- // }
- // }
- // else if ( e instanceof Attlist )
- // {
- // Attlist attList = (Attlist) e;
- // ErrorMessage errMsg = attList.getErrorMessage();
- // if ( errMsg!= null)
- // {
- // addErrorMessage(errMsg);
- // }
- // }
- // }
- //
- //
- // checkForDuplicateIDAttribute();
- // }
- // /**
- // * @generated
- // */
- // protected void updateElementHashtableGen() {
- //
- // elementPool.clear();
- // CreateListItems itemsHelper = new CreateListItems(dtdFile);
- //
- //
- // Vector allElements = itemsHelper.getElements();
- // // go through all the dtdFiles and list the elements
- // int numElements = allElements.size();
- //
- //
- // for (int i = 0; i < numElements; i++)
- // {
- // DTDElement element = (DTDElement) allElements.elementAt(i);
- // elementPool.put(getBaseName(element), element);
- // }
- // }
- // /**
- // * @generated
- // */
- // protected void updateEntityHashtableGen() {
- //
- // updateHashTable(pePool, dtdFile.listDTDEntity());
- // }
- // /**
- // * @generated
- // */
- // protected void updateHashTableGen(Hashtable h, Collection dtdObjects) {
- //
- // h.clear();
- // Iterator i = dtdObjects.iterator();
- // while (i.hasNext())
- // {
- // String name = "";
- // DTDObject o = (DTDObject) i.next();
- // name = getBaseName(o);
- // h.put(name,o);
- // }
- // }
- // /**
- // * @generated
- // */
- // protected static String getBaseNameGen(DTDObject obj) {
- //
- // return getName(obj, null);
- // }
- // /**
- // * @generated
- // */
- // protected static String getNameGen(DTDObject obj, DTDFile dtdFile) {
- //
- // String name = "";
- // if (obj instanceof DTDEntity)
- // {
- // DTDEntity entity = (DTDEntity) obj;
- // if (dtdFile != null &&
- // !entity.getDTDFile().equals(dtdFile))
- // {
- // name = new Path(entity.getDTDFile().getName()).lastSegment() + ": ";
- // }
- // name += "%" + ((DTDEntity)obj).getName() + ";";
- // }
- // else if (obj instanceof DTDElement)
- // {
- // DTDElement element = (DTDElement) obj;
- // if (dtdFile != null &&
- // !element.getDTDFile().equals(dtdFile))
- // {
- // name = new Path(element.getDTDFile().getName()).lastSegment() + ": ";
- // }
- // name += ((DTDElement)obj).getName();
- // }
- // else if (obj instanceof DTDElementContent)
- // {
- // return ((DTDElementContent) obj).getContentName();
- // }
- // return name;
- // }
- // /**
- // * @generated
- // */
- // protected void checkForMissingElementReferencesGen(DTDElement element)
- // {
- //
- // String dtdString = null;
- // if ( element == null )
- // return;
- //
- //
- // Vector elementRefs = new Vector();
- // findElementReferences(element.getContent(),elementRefs);
- //
- //
- // Enumeration en = elementRefs.elements();
- // while (en.hasMoreElements())
- // {
- // String elementRefName = "";
- // DTDObject dtdObject = (DTDObject) en.nextElement();
- //
- //
- // if ( dtdObject instanceof DTDElement)
- // {
- // elementRefName = ((DTDElement)dtdObject).getName();
- // if ( getElementPool().get(elementRefName) == null)
- // {
- // if (dtdString == null)
- // {
- // dtdString = getDTDSource(false);
- // }
- // String errorMsg = "Element \"" + element.getName() + "\", refers to
- // undeclared element "
- // + "\"" + elementRefName + "\", in content model.\n";
- // ErrorMessage dtdError = new ErrorMessage();
- // dtdError.setErrorMessage(errorMsg);
- // SourceLocationHelper.LineColumn lineColumn =
- // SourceLocationHelper.offsetToLineColumn(dtdString,
- // element.getStartOffset());
- // dtdError.setErrorLine(lineColumn.getLine());
- // dtdError.setErrorColumn(lineColumn.getColumn());
- // addErrorMessage(dtdError);
- // }
- // }
- // }
- // }
- // /**
- // * @generated
- // */
- // protected void findElementReferencesGen(DTDElementContent content,
- // Vector result) {
- //
- //
- // if (content instanceof DTDElementReferenceContent)
- // {
- // result.addElement(((DTDElementReferenceContent)content).getReferencedElement());
- // }
- // else if (content instanceof DTDEntityReferenceContent)
- // {
- // result.addElement(((DTDEntityReferenceContent)content).getElementReferencedEntity());
- // }
- // else if (content instanceof DTDGroupContent)
- // {
- // DTDGroupContent group = (DTDGroupContent)content;
- // EList contents = group.getContent();
- // Iterator i = contents.iterator();
- // while (i.hasNext())
- // {
- // findElementReferences((DTDElementContent) i.next(), result);
- // }
- // }
- // }
- // /**
- // * @generated
- // */
- // protected void checkForDuplicateIDAttributeGen() {
- //
- // String dtdString = null;
- // Collection elements = dtdFile.listDTDElement();
- // Iterator i = elements.iterator();
- // while (i.hasNext())
- // {
- // DTDElement element = (DTDElement) i.next();
- // Iterator k = element.getDTDAttribute().iterator();
- // boolean saw1stID = false;
- // while (k.hasNext())
- // {
- // DTDAttribute attr = (DTDAttribute) k.next();
- // DTDType dType = attr.getDTDType();
- // if (dType instanceof DTDBasicType)
- // {
- // if ( ((DTDBasicType)dType).getKind().intValue() == DTDBasicTypeKind.ID)
- // {
- // if (saw1stID)
- // {
- // if (dtdString == null)
- // {
- // dtdString = getDTDSource(false);
- // }
- // String errMsg = DTDPlugin.getDTDString("_ERROR_DUP_ID_ATTRIBUTE_1");
- // errMsg += attr.getName() +
- // DTDPlugin.getDTDString("_UI_ERRORPART_DUP_ID_ATTRIBUTE_2");
- //
- // ErrorMessage dtdError = new ErrorMessage();
- // dtdError.setErrorMessage(errMsg);
- // SourceLocationHelper.LineColumn lineColumn =
- // SourceLocationHelper.offsetToLineColumn(dtdString,
- // attr.getStartOffset());
- // dtdError.setErrorLine(lineColumn.getLine());
- // dtdError.setErrorColumn(lineColumn.getColumn());
- // dtdError.setObject(attr);
- // addErrorMessage(dtdError);
- // // dtdFile.setParseError(true);
- // break;
- // }
- // else
- // {
- // saw1stID = true;
- // }
- // }
- // }
- // }
- // }
- // }
- // /**
- // * @generated
- // */
- // protected static String getGroupTypeGen(int groupKind, int occurrence)
- // {
- //
- // String type = null;
- //
- //
- // switch (groupKind)
- // {
- // case DTDGroupKind.SEQUENCE:
- // type = "DTDSequence";
- // break;
- // case DTDGroupKind.CHOICE:
- // type = "DTDChoice";
- // break;
- // }
- //
- //
- // type += getRepeatableTypeSuffix(occurrence);
- // return type;
- // }
- // /**
- // * @generated
- // */
- // protected static String getReferenceTypeGen(int occurrence) {
- //
- // String type = "DTDReference";
- // type += getRepeatableTypeSuffix(occurrence);
- // return type;
- // }
- // /**
- // * @generated
- // */
- // protected static String getRepeatableTypeSuffixGen(int occurrence) {
- //
- // return "(" + (char)occurrence + ")";
- // }
- // /**
- // * @generated
- // */
- // protected static void mainGen(String[] args) {
- //
- // System.out.println("\nStarting ...");
- //
- //
- // if (args.length != 1)
- // System.out.println("usage: DtdUtil inputfile.dtd");
- //
- //
- // java.io.File inputFile = new File(args[0]);
- //
- //
- // String dtdFileName = "";
- // try
- // {
- // dtdFileName = inputFile.getCanonicalPath();
- // }
- // catch(IOException ex)
- // {}
- //
- //
- // String dtdModelName = dtdFileName;
- //
- //
- // if (DTDConstants.DTD_EXTENSION.equals(new
- // Path(dtdFileName).getFileExtension()))
- // {
- // dtdModelName= new
- // Path(dtdFileName).removeFileExtension().lastSegment();
- // }
- // DTDUtil d2m = new DTDUtil();
- // // TODO: fix port
- // // d2m.parse(dtdFileName);
- // try
- // {
- // d2m.saveAs(dtdModelName + "." + DTDConstants.DTD_XMI_EXTENSION);
- // }
- // catch (Exception e)
- // {
- // System.out.println("Exception thrown during model save: " + e);
- // }
- // System.out.println("Done.");
- // }
- // /**
- // * @generated
- // */
- // protected org.eclipse.core.runtime.IPath getPathGen() {
- //
- // Path currentDTDPath = new Path(dtdModelFile);
- // if (currentDTDPath.segmentCount() > 1)
- // {
- // return currentDTDPath.removeLastSegments(1).addTrailingSeparator();
- // }
- //
- // return new Path("");
- // }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDVisitor.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDVisitor.java
deleted file mode 100644
index 655657ea65..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDVisitor.java
+++ /dev/null
@@ -1,315 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.emf.DTDAnyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDAttribute;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElement;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDElementReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEmptyContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntity;
-import org.eclipse.wst.dtd.core.internal.emf.DTDEntityReferenceContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDGroupKind;
-import org.eclipse.wst.dtd.core.internal.emf.DTDNotation;
-import org.eclipse.wst.dtd.core.internal.emf.DTDObject;
-import org.eclipse.wst.dtd.core.internal.emf.DTDPCDataContent;
-import org.eclipse.wst.dtd.core.internal.emf.DTDParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.emf.DTDRepeatableContent;
-
-
-
-public class DTDVisitor {
-
- public DTDVisitor() {
- }
-
- public void visitDTDFile(DTDFile file) {
- Collection notations = file.listDTDNotation();
- for (Iterator i = notations.iterator(); i.hasNext();) {
- visitDTDNotation((DTDNotation) i.next());
- }
-
- Collection entities = file.listDTDEntity();
- for (Iterator i = entities.iterator(); i.hasNext();) {
- visitDTDEntity((DTDEntity) i.next());
- }
-
- Collection objects = file.listDTDElementAndDTDParameterEntityReference();
- for (Iterator i = objects.iterator(); i.hasNext();) {
- DTDObject object = (DTDObject) i.next();
- if (object instanceof DTDElement) {
- visitDTDElement((DTDElement) object);
- } // end of if ()
- else {
- visitDTDParameterEntityReference((DTDParameterEntityReference) object);
- } // end of if ()
- }
-
- }
-
- public void visitDTDNotation(DTDNotation notation) {
- }
-
- public void visitDTDEntity(DTDEntity entity) {
- }
-
- public void visitDTDElement(DTDElement element) {
- visitDTDElementContent(element.getContent());
- visitDTDAttributeList(element.getDTDAttribute());
- }
-
- public void visitDTDParameterEntityReference(DTDParameterEntityReference parmEntity) {
-
- }
-
- public void visitDTDElementContent(DTDElementContent content) {
- // System.out.println("visitDTDElementContent : " + content);
- if (content instanceof DTDEmptyContent) {
- visitDTDEmptyContent((DTDEmptyContent) content);
- }
- else if (content instanceof DTDAnyContent) {
- visitDTDAnyContent((DTDAnyContent) content);
- }
- else if (content instanceof DTDPCDataContent) {
- visitDTDPCDataContent((DTDPCDataContent) content);
- }
- if (content instanceof DTDRepeatableContent) {
- if (content instanceof DTDGroupContent) {
- visitDTDGroupContent((DTDGroupContent) content);
- }
- else if (content instanceof DTDElementReferenceContent) {
- visitDTDElementReferenceContent((DTDElementReferenceContent) content);
- }
- else {
- visitDTDEntityReferenceContent((DTDEntityReferenceContent) content);
- } // end of else
-
- // System.out.println("occurrence: " +
- // (char)((DTDRepeatableContent)content).getOccurrence());
- }
- }
-
- public void visitDTDEmptyContent(DTDEmptyContent dtdEmptyContent) {
- // System.out.println("content: EMPTY");
- }
-
- public void visitDTDAnyContent(DTDAnyContent dtdAnyContent) {
- // System.out.println("content: ANY");
- }
-
- public void visitDTDPCDataContent(DTDPCDataContent pcDataContent) {
- // System.out.println("content: PCDATA");
- }
-
- public void visitDTDGroupContent(DTDGroupContent groupContent) {
- if (groupContent.getGroupKind().getValue() == DTDGroupKind.SEQUENCE) {
- // System.out.println("content: Sequence");
- }
- else // if (contentgetGroupKind() == DTDGroupKind.CHOICE)
- {
- // System.out.println("content: Choice");
- }
-
- Collection groupContents = groupContent.getContent();
- for (Iterator i = groupContents.iterator(); i.hasNext();) {
- visitDTDElementContent((DTDElementContent) i.next());
- }
- }
-
- public void visitDTDElementReferenceContent(DTDElementReferenceContent elementReferenceContent) {
- }
-
- public void visitDTDEntityReferenceContent(DTDEntityReferenceContent entityReferenceContent) {
- }
-
- public void visitDTDAttributeList(List attrs) {
- Iterator iter = attrs.iterator();
-
- while (iter.hasNext()) {
- visitDTDAttribute((DTDAttribute) iter.next());
- } // end of while ()
- }
-
- public void visitDTDAttribute(DTDAttribute attribute) {
- }
-
- /**
- * @generated
- */
- protected void visitDTDFileGen(DTDFile file) {
-
- Collection notations = file.listDTDNotation();
- for (Iterator i = notations.iterator(); i.hasNext();) {
- visitDTDNotation((DTDNotation) i.next());
- }
-
- Collection entities = file.listDTDEntity();
- for (Iterator i = entities.iterator(); i.hasNext();) {
- visitDTDEntity((DTDEntity) i.next());
- }
-
- Collection objects = file.listDTDElementAndDTDParameterEntityReference();
- for (Iterator i = objects.iterator(); i.hasNext();) {
- DTDObject object = (DTDObject) i.next();
- if (object instanceof DTDElement) {
- visitDTDElement((DTDElement) object);
- } // end of if ()
- else {
- visitDTDParameterEntityReference((DTDParameterEntityReference) object);
- } // end of if ()
- }
- }
-
- /**
- * @generated
- */
- protected void visitDTDNotationGen(DTDNotation notation) {
-
- }
-
- /**
- * @generated
- */
- protected void visitDTDEntityGen(DTDEntity entity) {
-
- }
-
- /**
- * @generated
- */
- protected void visitDTDElementGen(DTDElement element) {
-
- visitDTDElementContent(element.getContent());
- visitDTDAttributeList(element.getDTDAttribute());
- }
-
- /**
- * @generated
- */
- protected void visitDTDParameterEntityReferenceGen(DTDParameterEntityReference parmEntity) {
-
- }
-
- /**
- * @generated
- */
- protected void visitDTDElementContentGen(DTDElementContent content) {
-
- // System.out.println("visitDTDElementContent : " + content);
- if (content instanceof DTDEmptyContent) {
- visitDTDEmptyContent((DTDEmptyContent) content);
- }
- else if (content instanceof DTDAnyContent) {
- visitDTDAnyContent((DTDAnyContent) content);
- }
- else if (content instanceof DTDPCDataContent) {
- visitDTDPCDataContent((DTDPCDataContent) content);
- }
- if (content instanceof DTDRepeatableContent) {
- if (content instanceof DTDGroupContent) {
- visitDTDGroupContent((DTDGroupContent) content);
- }
- else if (content instanceof DTDElementReferenceContent) {
- visitDTDElementReferenceContent((DTDElementReferenceContent) content);
- }
- else {
- visitDTDEntityReferenceContent((DTDEntityReferenceContent) content);
- } // end of else
-
- // System.out.println("occurrence: " +
- // (char)((DTDRepeatableContent)content).getOccurrence());
- }
- }
-
- /**
- * @generated
- */
- protected void visitDTDEmptyContentGen(DTDEmptyContent dtdEmptyContent) {
-
- // System.out.println("content: EMPTY");
- }
-
- /**
- * @generated
- */
- protected void visitDTDAnyContentGen(DTDAnyContent dtdAnyContent) {
-
- // System.out.println("content: ANY");
- }
-
- /**
- * @generated
- */
- protected void visitDTDPCDataContentGen(DTDPCDataContent pcDataContent) {
-
- // System.out.println("content: PCDATA");
- }
-
- /**
- * @generated
- */
- protected void visitDTDGroupContentGen(DTDGroupContent groupContent) {
-
- if (groupContent.getGroupKind().getValue() == DTDGroupKind.SEQUENCE) {
- // System.out.println("content: Sequence");
- }
- else // if (contentgetGroupKind() == DTDGroupKind.CHOICE)
- {
- // System.out.println("content: Choice");
- }
-
- Collection groupContents = groupContent.getContent();
- for (Iterator i = groupContents.iterator(); i.hasNext();) {
- visitDTDElementContent((DTDElementContent) i.next());
- }
- }
-
- /**
- * @generated
- */
- protected void visitDTDElementReferenceContentGen(DTDElementReferenceContent elementReferenceContent) {
-
- }
-
- /**
- * @generated
- */
- protected void visitDTDEntityReferenceContentGen(DTDEntityReferenceContent entityReferenceContent) {
-
- }
-
- /**
- * @generated
- */
- protected void visitDTDAttributeListGen(List attrs) {
-
- Iterator iter = attrs.iterator();
-
- while (iter.hasNext()) {
- visitDTDAttribute((DTDAttribute) iter.next());
- } // end of while ()
- }
-
- /**
- * @generated
- */
- protected void visitDTDAttributeGen(DTDAttribute attribute) {
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/ExternalDTDModel.java b/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/ExternalDTDModel.java
deleted file mode 100644
index 2b0536cafb..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/ExternalDTDModel.java
+++ /dev/null
@@ -1,85 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.emf.util;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.wst.dtd.core.internal.emf.DTDFile;
-
-
-/**
- * Load another DTD model - use when there is external entity references from
- * another model
- */
-public class ExternalDTDModel {
- DTDFile dtdFile = null;
-
- public ExternalDTDModel() {
- }
-
- public DTDFile getExternalDTDFile() {
- return dtdFile;
- }
-
- /**
- * Load the DTD model specified by the uri e.g.
- * file:C:/eclipse/examples/purchaseorder.dtd
- */
- public boolean loadModel(ResourceSet resources, String uri) {
- boolean rc = true;
-
- if (uri == null || uri.equals("")) { //$NON-NLS-1$
- return false;
- }
-
- try {
- // todo... Investigate why we can not create a new DTDUtil to load
- // the external
- // without breaking the bvt test bucket on the oagis cases.
- // Are depending on mof's built in caching via
- // resources.load(uri)?
- //
- URI uriObj = URI.createURI(uri);
- Resource r = resources.createResource(uriObj);
- Map options = new HashMap();
- r.load(options);
-
- for (Iterator i = resources.getResources().iterator(); i.hasNext();) {
- DTDFile currentFile = (DTDFile) ((Resource) i.next()).getContents().get(0);
- String currentURI = currentFile.eResource().getURI().toString();
- // note : mof stores a slightly different uri than the one we
- // passed in to resources.load(uri)
- // In the 'file:' protocol case, the call
- // resource.load("file:D:\x.dtd") will store a resource with
- // uri "D:\x.dtd".
- // This is why we use 'endswith()' instead of 'equals()' to
- // compare.
- if (uri.endsWith(currentURI)) {
- dtdFile = currentFile;
- break;
- }
- }
- if (dtdFile == null) {
- rc = false;
- }
- }
- catch (Exception ex) {
- rc = false;
- }
- return rc;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/DTD.cat b/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/DTD.cat
deleted file mode 100644
index 4097274f7b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/DTD.cat
+++ /dev/null
@@ -1,3812 +0,0 @@
-
-(object Petal
- version 45
- _written "Rose 7.5.0103.1920"
- charSet 0)
-
-(object Class_Category "dtd"
- is_unit TRUE
- is_loaded TRUE
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935d5730-850b-11e1-0000-005cf4691c4c:1"))
- (object Attribute
- tool "Ecore"
- name "packageName"
- value (value Text "dtd"))
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value (value Text "org.eclipse.wst.dtd"))
- (object Attribute
- tool "Ecore"
- name "prefix"
- value (value Text "DTD")))
- quid "3857B1C00293"
- exportControl "Public"
- logical_models (list unit_reference_list
- (object Class "DTDElementContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935d5730-850b-11e1-0001-005cf4691c4c:1")))
- quid "37CBEACF0213"
- abstract TRUE)
- (object Class "DTDGroupContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0000-005cf4691c4c:1")))
- quid "37CBEAEF0232"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0001-005cf4691c4c:1")))
- quid "37D9AD920363"
- supplier "Logical View::dtd::DTDRepeatableContent"
- quidu "37D9AD4C01D1"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "groupKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0002-005cf4691c4c:1")))
- quid "37EFC9EC0189"
- type "DTDGroupKind"
- quidu "37EFCA550216"
- exportControl "Public")))
- (object Class "DTDAttribute"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0003-005cf4691c4c:1")))
- quid "37CC187900EA"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0004-005cf4691c4c:1")))
- quid "39B7F15901DA"
- supplier "Logical View::ecore::EAttribute"
- quidu "39238472039D"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0005-005cf4691c4c:1")))
- quid "3839DC9A013B"
- type "String"
- exportControl "Public")
- (object ClassAttribute "defaultKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0006-005cf4691c4c:1")))
- quid "37E144BF0261"
- type "DTDDefaultKind"
- quidu "37E144DC03AD"
- exportControl "Public")
- (object ClassAttribute "defaultValueString"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0007-005cf4691c4c:1")))
- quid "396B9BBF006B"
- type "String"
- exportControl "Public")))
- (object Class "DTDOccurrenceType"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0008-005cf4691c4c:1")))
- quid "37CC19AF007D"
- documentation
-|ONE=49
-|OPTIONAL=63 ONE_OR_MORE=43 ZERO_OR_MORE=42
-
- stereotype "enumeration")
- (object Class "DTDElement"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0009-005cf4691c4c:1")))
- quid "37D9AAF70071"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000a-005cf4691c4c:1")))
- quid "39B7F0AF02A8"
- supplier "Logical View::ecore::EClass"
- quidu "3903D5BF000A")
- (object Inheritance_Relationship
- quid "39FE2B83029B"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000b-005cf4691c4c:1")))
- quid "3839DC810062"
- type "String"
- exportControl "Public")))
- (object Class "DTDEmptyContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000c-005cf4691c4c:1")))
- quid "37D9AB47037A"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000d-005cf4691c4c:1")))
- quid "37D9ABF30327"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213")))
- (object Class "DTDAnyContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000e-005cf4691c4c:1")))
- quid "37D9AB500304"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-000f-005cf4691c4c:1")))
- quid "37D9ABEE0207"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213")))
- (object Class "DTDPCDataContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0010-005cf4691c4c:1")))
- quid "37D9AB5C0135"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0011-005cf4691c4c:1")))
- quid "37D9ABE90278"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213")))
- (object Class "DTDElementReferenceContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0012-005cf4691c4c:1")))
- quid "37D9AB7D0010"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0013-005cf4691c4c:1")))
- quid "37D9AD8C03AA"
- supplier "Logical View::dtd::DTDRepeatableContent"
- quidu "37D9AD4C01D1")))
- (object Class "DTDRepeatableContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0014-005cf4691c4c:1")))
- quid "37D9AD4C01D1"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0015-005cf4691c4c:1")))
- quid "37D9ADB703C0"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "occurrence"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0016-005cf4691c4c:1")))
- quid "37CC18A90148"
- documentation "JUST_ONE= -1 ONE_OR_MORE=43 OPTIONAL=63 ZERO_OR_MORE=42"
- type "DTDOccurrenceType"
- quidu "37CC19AF007D"
- exportControl "Public"))
- abstract TRUE)
- (object Class "DTDFile"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0017-005cf4691c4c:1")))
- quid "37D9B08E018F"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0018-005cf4691c4c:1")))
- quid "39B7F07F0118"
- supplier "Logical View::ecore::eNamedElement"
- quidu "3903D4EE0014"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-0019-005cf4691c4c:1")))
- quid "3839DBEF012B"
- type "String"
- exportControl "Public")
- (object ClassAttribute "parseError"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:935eddd0-850b-11e1-001a-005cf4691c4c:1")))
- quid "388C995F025B"
- type "boolean"
- exportControl "Public")))
- (object Class "DTDDefaultKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0000-005cf4691c4c:1")))
- quid "37E144DC03AD"
- documentation "IMPLIED=1 REQUIRED=2 FIXED=3 NOFIXED=4"
- stereotype "enumeration")
- (object Class "DTDBasicType"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0001-005cf4691c4c:1")))
- quid "37E1464F00DA"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0002-005cf4691c4c:1")))
- quid "39B7F2800315"
- supplier "Logical View::ecore::EClass"
- quidu "3903D5BF000A"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "kind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0003-005cf4691c4c:1")))
- quid "37E1468A0016"
- type "DTDBasicTypeKind"
- quidu "37E14905022C"
- exportControl "Public")))
- (object Class "DTDEnumerationType"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0004-005cf4691c4c:1")))
- quid "37E146680306"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0005-005cf4691c4c:1")))
- quid "39B7F2810302"
- supplier "Logical View::ecore::EEnum"
- quidu "39A473E901D4"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "kind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0006-005cf4691c4c:1")))
- quid "37E146AC03B8"
- type "DTDEnumGroupKind"
- quidu "37E149B201AD"
- exportControl "Public")))
- (object Class "DTDBasicTypeKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0007-005cf4691c4c:1")))
- quid "37E14905022C"
- documentation "NONE=0 CDATA=1 ID=2 IDREF=3 IDREFS=4 ENTITY=5 ENTITIES=6 NMTOKEN=7 NMTOKENS=8"
- stereotype "enumeration")
- (object Class "DTDEnumGroupKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0008-005cf4691c4c:1")))
- quid "37E149B201AD"
- documentation "NAME_TOKEN_GROUP=1 NOTATION_GROUP=2"
- stereotype "enumeration")
- (object Class "DTDGroupKind"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0009-005cf4691c4c:1")))
- quid "37EFCA550216"
- documentation "SEQUENCE=1 CHOICE=2"
- stereotype "enumeration")
- (object Class "DTDNotation"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000a-005cf4691c4c:1")))
- quid "37EFD0EF00C9"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000b-005cf4691c4c:1")))
- quid "39B7F0E30234"
- supplier "Logical View::ecore::eNamedElement"
- quidu "3903D4EE0014")
- (object Inheritance_Relationship
- quid "39FE2B850118"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000c-005cf4691c4c:1")))
- quid "3839DC0A024C"
- type "String"
- exportControl "Public")
- (object ClassAttribute "systemID"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000d-005cf4691c4c:1")))
- quid "37EFD1020397"
- type "string"
- exportControl "Public")
- (object ClassAttribute "publicID"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000e-005cf4691c4c:1")))
- quid "37EFD10E018C"
- type "string"
- exportControl "Public")))
- (object Class "DTDEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-000f-005cf4691c4c:1")))
- quid "37EFD12B03C8"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0010-005cf4691c4c:1")))
- quid "39B7F0E701EA"
- supplier "Logical View::ecore::eNamedElement"
- quidu "3903D4EE0014")
- (object Inheritance_Relationship
- quid "39FE2B860304"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "comment"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0011-005cf4691c4c:1")))
- quid "3839DC37008E"
- type "String"
- exportControl "Public")
- (object ClassAttribute "parameterEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0012-005cf4691c4c:1")))
- quid "37EFD13C017E"
- type "boolean"
- exportControl "Public")))
- (object Class "DTDEntityContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0013-005cf4691c4c:1")))
- quid "37EFD19D0083"
- abstract TRUE)
- (object Class "DTDExternalEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0014-005cf4691c4c:1")))
- quid "37EFD1F803E1"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:9361eb10-850b-11e1-0015-005cf4691c4c:1")))
- quid "37EFD32400F3"
- supplier "Logical View::dtd::DTDEntityContent"
- quidu "37EFD19D0083"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "systemID"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0000-005cf4691c4c:1")))
- quid "37EFD2E50161"
- type "string"
- exportControl "Public")
- (object ClassAttribute "publicID"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0001-005cf4691c4c:1")))
- quid "37EFD2EC01F7"
- type "string"
- exportControl "Public")))
- (object Class "DTDInternalEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0002-005cf4691c4c:1")))
- quid "37EFD2BA026E"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0003-005cf4691c4c:1")))
- quid "37EFD32B032E"
- supplier "Logical View::dtd::DTDEntityContent"
- quidu "37EFD19D0083"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "value"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0004-005cf4691c4c:1")))
- quid "37EFD2CB0268"
- type "string"
- exportControl "Public")))
- (object Class "DTDParameterEntityReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0005-005cf4691c4c:1")))
- quid "385287CA0163"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0006-005cf4691c4c:1")))
- quid "39B7F0D10076"
- supplier "Logical View::ecore::eNamedElement"
- quidu "3903D4EE0014")
- (object Inheritance_Relationship
- quid "39FE2B8A0287"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE")))
- (object Class "DTDEntityReferenceContent"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0007-005cf4691c4c:1")))
- quid "3852900E0127"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0008-005cf4691c4c:1")))
- quid "38529044011B"
- supplier "Logical View::dtd::DTDRepeatableContent"
- quidu "37D9AD4C01D1")))
- (object Class "XMLSchemaDefinedType"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0009-005cf4691c4c:1")))
- quid "389F0C6D010E"
- documentation
-|NONE=-1
-|STRING=1
-|BOOLEAN=2
-|FLOAT=3
-|DOUBLE=4
-|DECIMAL=5
-|TIMEINSTANT=6
-|TIMEDURATION=7
-|RECURRINGINSTANT=8
-|BINARY=9
-|URI=10
-|INTEGER=11
-|DATE=12
-|TIME=13
-
- stereotype "enumeration")
- (object Class "DTDContent"
- quid "39FE2B5E02DE"
- abstract TRUE)
- (object Association "$UNNAMED$0"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000a-005cf4691c4c:1")))
- quid "37CBEB6F005D"
- roles (list role_list
- (object Role "content"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000b-005cf4691c4c:1")))
- quid "37CBEB70006D"
- label "content"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213"
- client_cardinality (value cardinality "1..n")
- Constraints "ordered"
- Containment "By Value"
- is_navigable TRUE)
- (object Role "group"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000c-005cf4691c4c:1")))
- quid "37CBEB7000AB"
- label "group"
- supplier "Logical View::dtd::DTDGroupContent"
- quidu "37CBEAEF0232"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE
- is_aggregate TRUE)))
- (object Association "$UNNAMED$1"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000d-005cf4691c4c:1")))
- quid "37D9AC0E00CD"
- roles (list role_list
- (object Role "element"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000e-005cf4691c4c:1")))
- quid "37D9AC0F039F"
- label "element"
- supplier "Logical View::dtd::DTDElement"
- quidu "37D9AAF70071"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "content"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-000f-005cf4691c4c:1")))
- quid "37D9AC0F03A9"
- label "content"
- supplier "Logical View::dtd::DTDElementContent"
- quidu "37CBEACF0213"
- client_cardinality (value cardinality "1")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$2"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0010-005cf4691c4c:1")))
- quid "37D9AF11001A"
- roles (list role_list
- (object Role "elementReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0011-005cf4691c4c:1")))
- quid "37D9AF1B0209"
- label "elementReference"
- supplier "Logical View::dtd::DTDElementReferenceContent"
- quidu "37D9AB7D0010"
- client_cardinality (value cardinality "0..n"))
- (object Role "referencedElement"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0012-005cf4691c4c:1")))
- quid "37D9AF1B020A"
- label "referencedElement"
- supplier "Logical View::dtd::DTDElement"
- quidu "37D9AAF70071"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$3"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0013-005cf4691c4c:1")))
- quid "37EFD1C902DF"
- roles (list role_list
- (object Role "$UNNAMED$4"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0014-005cf4691c4c:1")))
- quid "37EFD1CA031D"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "content"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0015-005cf4691c4c:1")))
- quid "37EFD1CA0327"
- label "content"
- supplier "Logical View::dtd::DTDEntityContent"
- quidu "37EFD19D0083"
- client_cardinality (value cardinality "1")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$5"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0016-005cf4691c4c:1")))
- quid "37EFD34400E5"
- roles (list role_list
- (object Role "notation"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0017-005cf4691c4c:1"))
- (object Attribute
- tool "eCore"
- name "isTransient"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value TRUE))
- quid "37EFD3450209"
- label "notation"
- supplier "Logical View::dtd::DTDNotation"
- quidu "37EFD0EF00C9"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE)
- (object Role "entity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0018-005cf4691c4c:1")))
- quid "37EFD3450213"
- label "entity"
- supplier "Logical View::dtd::DTDExternalEntity"
- quidu "37EFD1F803E1"
- client_cardinality (value cardinality "0..n")
- is_navigable TRUE)))
- (object Association "$UNNAMED$6"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0019-005cf4691c4c:1")))
- quid "38528979005F"
- roles (list role_list
- (object Role "parmEntityRef"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001a-005cf4691c4c:1")))
- quid "3852897C0352"
- label "parmEntityRef"
- supplier "Logical View::dtd::DTDParameterEntityReference"
- quidu "385287CA0163"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)
- (object Role "entity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001b-005cf4691c4c:1")))
- quid "3852897C0353"
- label "entity"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$7"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001c-005cf4691c4c:1")))
- quid "385294EB0243"
- roles (list role_list
- (object Role "entityReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001d-005cf4691c4c:1"))
- (object Attribute
- tool "eCore"
- name "isTransient"
- value TRUE))
- quid "385294EF03BB"
- label "entityReference"
- supplier "Logical View::dtd::DTDEntityReferenceContent"
- quidu "3852900E0127"
- client_cardinality (value cardinality "0..n")
- is_navigable TRUE)
- (object Role "elementReferencedEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001e-005cf4691c4c:1")))
- quid "385294EF03BC"
- label "elementReferencedEntity"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$8"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-001f-005cf4691c4c:1")))
- quid "3852972D02CB"
- roles (list role_list
- (object Role "attributeNameReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0020-005cf4691c4c:1"))
- (object Attribute
- tool "eCore"
- name "isTransient"
- value TRUE))
- quid "385297360291"
- label "attributeNameReference"
- supplier "Logical View::dtd::DTDAttribute"
- quidu "37CC187900EA"
- client_cardinality (value cardinality "0..n")
- is_navigable TRUE)
- (object Role "attributeNameReferencedEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0021-005cf4691c4c:1")))
- quid "38529736029B"
- label "attributeNameReferencedEntity"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$9"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0022-005cf4691c4c:1")))
- quid "38B68A7302B8"
- roles (list role_list
- (object Role "$UNNAMED$10"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0023-005cf4691c4c:1")))
- quid "38B68A780084"
- supplier "Logical View::dtd::DTDExternalEntity"
- quidu "37EFD1F803E1")
- (object Role "entityReferencedFromAnotherFile"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0024-005cf4691c4c:1")))
- quid "38B68A78008E"
- label "entityReferencedFromAnotherFile"
- supplier "Logical View::dtd::DTDFile"
- quidu "37D9B08E018F"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$11"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0025-005cf4691c4c:1")))
- quid "38BD4908013D"
- roles (list role_list
- (object Role "attributeTypeReference"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0026-005cf4691c4c:1"))
- (object Attribute
- tool "eCore"
- name "isTransient"
- value TRUE))
- quid "38BD49140130"
- label "attributeTypeReference"
- supplier "Logical View::dtd::DTDAttribute"
- quidu "37CC187900EA"
- client_cardinality (value cardinality "0..n")
- is_navigable TRUE)
- (object Role "attributeTypeReferencedEntity"
- attributes (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "uuid"
- value (value Text "DCE:936371b0-850b-11e1-0027-005cf4691c4c:1")))
- quid "38BD4914014E"
- label "attributeTypeReferencedEntity"
- supplier "Logical View::dtd::DTDEntity"
- quidu "37EFD12B03C8"
- client_cardinality (value cardinality "0..1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$12"
- quid "39FE2A9500CC"
- roles (list role_list
- (object Role "$UNNAMED$13"
- quid "39FE2A950311"
- supplier "Logical View::dtd::DTDElement"
- quidu "37D9AAF70071"
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "$UNNAMED$14"
- quid "39FE2A95031B"
- supplier "Logical View::dtd::DTDAttribute"
- quidu "37CC187900EA"
- client_cardinality (value cardinality "0..n")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$15"
- quid "39FE2BBE02DC"
- roles (list role_list
- (object Role "$UNNAMED$16"
- quid "39FE2BBF01B1"
- supplier "Logical View::dtd::DTDFile"
- quidu "37D9B08E018F"
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "$UNNAMED$17"
- quid "39FE2BBF01BB"
- supplier "Logical View::dtd::DTDContent"
- quidu "39FE2B5E02DE"
- client_cardinality (value cardinality "0..n")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$18"
- quid "39FE30D8033E"
- roles (list role_list
- (object Role "$UNNAMED$19"
- quid "39FE30D90105"
- supplier "Logical View::dtd::DTDFile"
- quidu "37D9B08E018F"
- is_navigable TRUE
- is_aggregate TRUE)
- (object Role "$UNNAMED$20"
- quid "39FE30D90137"
- supplier "Logical View::dtd::DTDEnumerationType"
- quidu "37E146680306"
- client_cardinality (value cardinality "0..n")
- Containment "By Value"
- is_navigable TRUE))))
- logical_presentations (list unit_reference_list
- (object ClassDiagram "Main"
- quid "37CAB0E60177"
- title "Main"
- zoom 98
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object NoteView @1
- location (3264, 240)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @1
- location (2910, 65)
- fill_color 13434879
- nlines 7
- max_width 673
- label
-|DTDElement's,
-|DTDParameterEntityReference's, DTDEntity's, and DTDNotation's are added to DTDFile's using the
-|ownedElement relationship
-|between MOFNamespace
-|and MOFObject
- )
- line_color 3342489
- fill_color 13434879
- width 733
- height 363)
- (object ClassView "Class" "Logical View::dtd::DTDInternalEntity" @2
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1824, 1872)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @2
- location (1647, 1817)
- fill_color 13434879
- nlines 1
- max_width 354
- justify 0
- label "DTDInternalEntity")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD2BA026E"
- width 372
- height 134
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDElement" @3
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (592, 1200)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @3
- location (417, 1145)
- fill_color 13434879
- nlines 1
- max_width 350
- justify 0
- label "DTDElement")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AAF70071"
- compartment (object Compartment
- Parent_View @3
- location (417, 1204)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 1
- max_width 371)
- width 368
- height 134
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDEntityContent" @4
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1520, 1488)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @4
- location (1341, 1438)
- fill_color 13434879
- nlines 1
- max_width 358
- justify 0
- label "DTDEntityContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD19D0083"
- width 376
- height 124
- annotation 8
- autoResize TRUE)
- (object InheritTreeView "" @5
- location (1520, 1640)
- line_color 3342489
- fill_color 13434879
- supplier @4
- vertices (list Points
- (1520, 1640)
- (1520, 1550)))
- (object ClassView "Class" "Logical View::dtd::DTDParameterEntityReference" @6
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2480, 1216)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @6
- location (2186, 1166)
- fill_color 13434879
- nlines 1
- max_width 588
- justify 0
- label "DTDParameterEntityReference")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "385287CA0163"
- width 606
- height 124
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDEntity" @7
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1520, 1216)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @7
- location (1270, 1137)
- fill_color 13434879
- nlines 1
- max_width 500
- justify 0
- label "DTDEntity")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD12B03C8"
- compartment (object Compartment
- Parent_View @7
- location (1270, 1196)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 2
- max_width 525)
- width 518
- height 182
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$3" @8
- location (1546, 1366)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD1C902DF"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$4" @9
- Parent_View @8
- location (-54, 246)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD1CA031D"
- client @8
- supplier @7
- line_style 3
- origin_attachment (1546, 1366)
- terminal_attachment (1546, 1307))
- (object RoleView "content" @10
- Parent_View @8
- location (-54, 246)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @11
- Parent_View @10
- location (1443, 1407)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 191
- justify 0
- label "+content"
- pctDist 0.699248
- height 104
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD1CA0327"
- client @8
- supplier @4
- line_style 3
- origin_attachment (1546, 1366)
- terminal_attachment (1546, 1426)
- label (object SegLabel @12
- Parent_View @10
- location (1568, 1408)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.721804
- height 22
- orientation 0))))
- (object AssociationViewNew "$UNNAMED$6" @13
- location (1978, 1256)
- stereotype TRUE
- line_color 3342489
- quidu "38528979005F"
- roleview_list (list RoleViews
- (object RoleView "parmEntityRef" @14
- Parent_View @13
- location (602, 488)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @15
- Parent_View @14
- location (2038, 1299)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 328
- justify 0
- label "+parmEntityRef"
- pctDist 0.305419
- height 43
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "3852897C0352"
- client @13
- supplier @6
- line_style 3
- origin_attachment (1978, 1256)
- terminal_attachment (2177, 1256)
- label (object SegLabel @16
- Parent_View @14
- location (2141, 1228)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.826484
- height 29
- orientation 0))
- (object RoleView "entity" @17
- Parent_View @13
- location (602, 488)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @18
- Parent_View @17
- location (1862, 1217)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 150
- justify 0
- label "+entity"
- pctDist 0.589109
- height 40
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "3852897C0353"
- client @13
- supplier @7
- line_style 3
- origin_attachment (1978, 1256)
- terminal_attachment (1779, 1256)
- label (object SegLabel @19
- Parent_View @17
- location (1823, 1309)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.776923
- height 53
- orientation 0))))
- (object ClassView "Class" "Logical View::ecore::eNamedElement" @20
- ShowCompartmentStereotypes TRUE
- location (1488, 176)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @20
- location (1352, 131)
- fill_color 13434879
- nlines 1
- max_width 272
- justify 0
- label "eNamedElement")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D4EE0014"
- width 290
- height 115
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::ecore::EClass" @21
- ShowCompartmentStereotypes TRUE
- location (576, 960)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @21
- location (492, 863)
- fill_color 13434879
- nlines 2
- max_width 168
- justify 0
- label "EClass")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D5BF000A"
- width 186
- height 218
- annotation 8
- autoResize TRUE)
- (object InheritView "" @22
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0AF02A8"
- client @3
- supplier @21
- line_style 3
- origin_attachment (571, 1132)
- terminal_attachment (571, 1069))
- (object ClassView "Class" "Logical View::ecore::eNamedElement" @23
- ShowCompartmentStereotypes TRUE
- location (2560, 864)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @23
- location (2424, 819)
- fill_color 13434879
- nlines 1
- max_width 272
- justify 0
- label "eNamedElement")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D4EE0014"
- width 290
- height 115
- annotation 8
- autoResize TRUE)
- (object InheritTreeView "" @24
- location (2560, 1036)
- line_color 12615680
- fill_color 13434879
- supplier @23
- vertices (list Points
- (2560, 1036)
- (2560, 921)))
- (object InheritView "" @25
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0E701EA"
- client @7
- supplier @23
- line_style 3
- origin_attachment (1669, 1125)
- terminal_attachment (1669, 1036)
- drawSupplier @24)
- (object InheritView "" @26
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0D10076"
- client @6
- supplier @23
- line_style 3
- origin_attachment (2618, 1153)
- terminal_attachment (2618, 1036)
- drawSupplier @24)
- (object ClassView "Class" "Logical View::dtd::DTDNotation" @27
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (992, 1232)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @27
- location (817, 1129)
- fill_color 13434879
- nlines 1
- max_width 350
- justify 0
- label "DTDNotation")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD0EF00C9"
- compartment (object Compartment
- Parent_View @27
- location (817, 1188)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 3
- max_width 371)
- width 368
- height 230
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDExternalEntity" @28
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1344, 1872)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @28
- location (1158, 1793)
- fill_color 13434879
- nlines 1
- max_width 372
- justify 0
- label "DTDExternalEntity")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD1F803E1"
- width 390
- height 182
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$5" @29
- location (969, 1677)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD34400E5"
- roleview_list (list RoleViews
- (object RoleView "notation" @30
- Parent_View @29
- location (-247, 205)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @31
- Parent_View @30
- location (834, 1390)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 203
- justify 0
- label "+notation"
- pctDist 0.870734
- height 136
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD3450209"
- client @29
- supplier @27
- line_style 3
- origin_attachment (969, 1677)
- terminal_attachment (969, 1347)
- label (object SegLabel @32
- Parent_View @30
- location (1040, 1388)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 72
- justify 0
- label "0..1"
- pctDist 0.877934
- height 71
- orientation 1))
- (object RoleView "entity" @33
- Parent_View @29
- location (-247, 205)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @34
- Parent_View @33
- location (1082, 1786)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 150
- justify 0
- label "+entity"
- pctDist 0.800000
- height 42
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "37EFD3450213"
- client @29
- supplier @28
- vertices (list Points
- (969, 1677)
- (969, 1827)
- (1149, 1827))
- line_style 3
- origin_attachment (969, 1677)
- terminal_attachment (1149, 1827)
- label (object SegLabel @35
- Parent_View @33
- location (1104, 1853)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..n"
- pctDist 0.863501
- height 26
- orientation 1))))
- (object InheritView "" @36
- stereotype TRUE
- line_color 3342489
- quidu "37EFD32400F3"
- client @28
- supplier @4
- line_style 3
- origin_attachment (1274, 1781)
- terminal_attachment (1274, 1640)
- drawSupplier @5)
- (object ClassView "Class" "Logical View::dtd::DTDContent" @37
- ShowCompartmentStereotypes TRUE
- location (1472, 800)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @37
- location (1344, 750)
- fill_color 13434879
- nlines 1
- max_width 256
- justify 0
- label "DTDContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "39FE2B5E02DE"
- width 274
- height 124
- annotation 8
- autoResize TRUE)
- (object InheritTreeView "" @38
- location (1472, 990)
- line_color 3342489
- fill_color 13434879
- supplier @37
- vertices (list Points
- (1472, 990)
- (1472, 862)))
- (object InheritView "" @39
- stereotype TRUE
- line_color 3342489
- quidu "39FE2B83029B"
- client @3
- supplier @37
- line_style 3
- origin_attachment (719, 1132)
- terminal_attachment (719, 990)
- drawSupplier @38)
- (object InheritView "" @40
- stereotype TRUE
- line_color 3342489
- quidu "39FE2B860304"
- client @7
- supplier @37
- line_style 3
- origin_attachment (1452, 1124)
- terminal_attachment (1452, 990)
- drawSupplier @38)
- (object InheritView "" @41
- stereotype TRUE
- line_color 3342489
- quidu "39FE2B8A0287"
- client @6
- supplier @37
- line_style 3
- origin_attachment (2347, 1154)
- terminal_attachment (2347, 990)
- drawSupplier @38)
- (object ClassView "Class" "Logical View::dtd::DTDFile" @42
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1488, 448)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @42
- location (1281, 369)
- fill_color 13434879
- nlines 1
- max_width 414
- justify 0
- label "DTDFile")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9B08E018F"
- compartment (object Compartment
- Parent_View @42
- location (1281, 428)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 2
- max_width 425)
- width 432
- height 182
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$9" @43
- location (354, 1049)
- stereotype TRUE
- line_color 3342489
- quidu "38B68A7302B8"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$10" @44
- Parent_View @43
- location (-109, 207)
- stereotype TRUE
- line_color 3342489
- quidu "38B68A780084"
- client @43
- supplier @28
- vertices (list Points
- (354, 1049)
- (354, 1781)
- (1149, 1781))
- line_style 3
- origin_attachment (354, 1049)
- terminal_attachment (1149, 1781))
- (object RoleView "entityReferencedFromAnotherFile" @45
- Parent_View @43
- location (-109, 207)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @46
- Parent_View @45
- location (296, 4537)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 732
- justify 0
- label "+entityReferencedFromAnotherFile"
- pctDist -2.283333
- height 59
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "38B68A78008E"
- client @43
- supplier @42
- vertices (list Points
- (354, 1049)
- (354, 439)
- (1272, 439))
- line_style 3
- origin_attachment (354, 1049)
- terminal_attachment (1272, 439)
- label (object SegLabel @47
- Parent_View @45
- location (1206, 500)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.957129
- height 61
- orientation 1))))
- (object InheritView "" @48
- stereotype TRUE
- line_color 12615680
- quidu "39B7F07F0118"
- client @42
- supplier @20
- line_style 3
- origin_attachment (1488, 357)
- terminal_attachment (1488, 233))
- (object AssociationViewNew "$UNNAMED$15" @49
- location (1472, 638)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2BBE02DC"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$16" @50
- Parent_View @49
- location (0, -162)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2BBF01B1"
- client @49
- supplier @42
- line_style 3
- origin_attachment (1472, 638)
- terminal_attachment (1472, 539))
- (object RoleView "$UNNAMED$17" @51
- Parent_View @49
- location (0, -162)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2BBF01BB"
- client @49
- supplier @37
- line_style 3
- origin_attachment (1472, 638)
- terminal_attachment (1472, 738)
- label (object SegLabel @52
- Parent_View @51
- location (1526, 712)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..n"
- pctDist 0.736248
- height 54
- orientation 0))))
- (object ClassView "Class" "Logical View::dtd::DTDEnumerationType" @53
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- location (2448, 464)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @53
- location (2184, 385)
- fill_color 13434879
- nlines 1
- max_width 528
- justify 0
- label "DTDEnumerationType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37E146680306"
- compartment (object Compartment
- Parent_View @53
- location (2184, 444)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 2
- max_width 546)
- width 546
- height 182
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$18" @54
- location (1939, 449)
- stereotype TRUE
- line_color 3342489
- quidu "39FE30D8033E"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$19" @55
- Parent_View @54
- location (-461, -31)
- stereotype TRUE
- line_color 3342489
- quidu "39FE30D90105"
- client @54
- supplier @42
- line_style 3
- origin_attachment (1939, 449)
- terminal_attachment (1704, 449))
- (object RoleView "$UNNAMED$20" @56
- Parent_View @54
- location (-461, -31)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "39FE30D90137"
- client @54
- supplier @53
- line_style 3
- origin_attachment (1939, 449)
- terminal_attachment (2175, 449)
- label (object SegLabel @57
- Parent_View @56
- location (2120, 486)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..n"
- pctDist 0.767837
- height 37
- orientation 1))))
- (object InheritView "" @58
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0E30234"
- client @27
- supplier @23
- line_style 3
- origin_attachment (1064, 1116)
- terminal_attachment (1064, 1036)
- drawSupplier @24)
- (object InheritView "" @59
- stereotype TRUE
- line_color 3342489
- quidu "39FE2B850118"
- client @27
- supplier @37
- line_style 3
- origin_attachment (941, 1117)
- terminal_attachment (941, 990)
- drawSupplier @38)
- (object InheritView "" @60
- stereotype TRUE
- line_color 3342489
- quidu "37EFD32B032E"
- client @2
- supplier @4
- line_style 3
- origin_attachment (1782, 1805)
- terminal_attachment (1782, 1640)
- drawSupplier @5)))
- (object ClassDiagram "ElementDefinition"
- quid "37E14330032F"
- title "ElementDefinition"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 426
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::dtd::DTDEmptyContent" @61
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (467, 1448)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @61
- location (281, 1403)
- fill_color 13434879
- nlines 1
- max_width 372
- justify 0
- label "DTDEmptyContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AB47037A"
- width 390
- height 114
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDAnyContent" @62
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (886, 1445)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @62
- location (728, 1400)
- fill_color 13434879
- nlines 1
- max_width 316
- justify 0
- label "DTDAnyContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AB500304"
- width 334
- height 114
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDPCDataContent" @63
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1298, 1451)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @63
- location (1099, 1406)
- fill_color 13434879
- nlines 1
- max_width 398
- justify 0
- label "DTDPCDataContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AB5C0135"
- width 416
- height 114
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDRepeatableContent" @64
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1888, 1456)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @64
- location (1572, 1404)
- fill_color 13434879
- nlines 1
- max_width 632
- justify 0
- label "DTDRepeatableContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AD4C01D1"
- width 650
- height 128
- annotation 8
- autoResize TRUE)
- (object InheritTreeView "" @65
- location (1878, 1618)
- line_color 3342489
- fill_color 13434879
- supplier @64
- vertices (list Points
- (1878, 1618)
- (1878, 1520)))
- (object ClassView "Class" "Logical View::ecore::EAttribute" @66
- ShowCompartmentStereotypes TRUE
- location (1936, 400)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @66
- location (1855, 325)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EAttribute")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "39238472039D"
- height 174
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::ecore::EClass" @67
- ShowCompartmentStereotypes TRUE
- location (928, 384)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @67
- location (847, 309)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EClass")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D5BF000A"
- height 174
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDGroupContent" @68
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2192, 1776)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @68
- location (1931, 1727)
- fill_color 13434879
- nlines 1
- max_width 522
- justify 0
- label "DTDGroupContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37CBEAEF0232"
- width 540
- height 122
- annotation 8
- autoResize TRUE)
- (object InheritView "" @69
- stereotype TRUE
- line_color 3342489
- quidu "37D9AD920363"
- client @68
- supplier @64
- line_style 3
- origin_attachment (2221, 1714)
- terminal_attachment (2221, 1618)
- drawSupplier @65)
- (object ClassView "Class" "Logical View::dtd::DTDEntityReferenceContent" @70
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1488, 1760)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @70
- location (1223, 1715)
- fill_color 13434879
- nlines 1
- max_width 530
- justify 0
- label "DTDEntityReferenceContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3852900E0127"
- width 548
- height 114
- annotation 8
- autoResize TRUE)
- (object InheritView "" @71
- stereotype TRUE
- line_color 3342489
- quidu "38529044011B"
- client @70
- supplier @64
- line_style 3
- origin_attachment (1474, 1702)
- terminal_attachment (1474, 1618)
- drawSupplier @65)
- (object ClassView "Class" "Logical View::dtd::DTDElementContent" @72
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (912, 1056)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics TRUE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @72
- location (704, 1008)
- fill_color 13434879
- nlines 1
- max_width 416
- justify 0
- label "DTDElementContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37CBEACF0213"
- width 434
- height 120
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$0" @73
- location (2289, 1048)
- stereotype TRUE
- line_color 3342489
- quidu "37CBEB6F005D"
- roleview_list (list RoleViews
- (object RoleView "content" @74
- Parent_View @73
- location (1025, 8)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @75
- Parent_View @74
- location (1223, 1001)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 168
- justify 0
- label "+content"
- pctDist 0.919424
- height 48
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37CBEB70006D"
- client @73
- supplier @72
- line_style 3
- origin_attachment (2289, 1048)
- terminal_attachment (1129, 1048)
- label (object SegLabel @76
- Parent_View @74
- location (1186, 1083)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 72
- justify 0
- label "1..*"
- pctDist 0.951381
- height 35
- orientation 0)
- label (object SegLabel @77
- Parent_View @74
- location (1246, 941)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 3
- anchor_loc 1
- nlines 1
- max_width 159
- justify 0
- label "{ordered}"
- pctDist 0.900000
- height 108
- orientation 1))
- (object RoleView "group" @78
- Parent_View @73
- location (1025, 8)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @79
- Parent_View @78
- location (2535, 1745)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 144
- justify 0
- label "+group"
- pctDist 0.937744
- height 41
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37CBEB7000AB"
- client @73
- supplier @68
- vertices (list Points
- (2289, 1048)
- (2587, 1048)
- (2587, 1785)
- (2462, 1785))
- line_style 3
- origin_attachment (2289, 1048)
- terminal_attachment (2462, 1785)
- label (object SegLabel @80
- Parent_View @78
- location (2526, 1827)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.945085
- height 42
- orientation 0))))
- (object InheritTreeView "" @81
- location (910, 1291)
- line_color 3342489
- fill_color 13434879
- supplier @72
- vertices (list Points
- (910, 1291)
- (910, 1116)))
- (object InheritView "" @82
- stereotype TRUE
- line_color 3342489
- quidu "37D9ABE90278"
- client @63
- supplier @72
- line_style 3
- origin_attachment (1297, 1394)
- terminal_attachment (1297, 1291)
- drawSupplier @81)
- (object InheritView "" @83
- stereotype TRUE
- line_color 3342489
- quidu "37D9ABF30327"
- client @61
- supplier @72
- line_style 3
- origin_attachment (466, 1391)
- terminal_attachment (466, 1291)
- drawSupplier @81)
- (object InheritView "" @84
- stereotype TRUE
- line_color 3342489
- quidu "37D9ABEE0207"
- client @62
- supplier @72
- line_style 3
- origin_attachment (881, 1388)
- terminal_attachment (881, 1291)
- drawSupplier @81)
- (object InheritView "" @85
- stereotype TRUE
- line_color 3342489
- quidu "37D9ADB703C0"
- client @64
- supplier @72
- line_style 3
- origin_attachment (1903, 1392)
- terminal_attachment (1903, 1291)
- drawSupplier @81)
- (object ClassView "Class" "Logical View::dtd::DTDElementReferenceContent" @86
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (784, 1760)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @86
- location (492, 1715)
- fill_color 13434879
- nlines 1
- max_width 584
- justify 0
- label "DTDElementReferenceContent")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AB7D0010"
- width 602
- height 114
- annotation 8
- autoResize TRUE)
- (object InheritView "" @87
- stereotype TRUE
- line_color 3342489
- quidu "37D9AD8C03AA"
- client @86
- supplier @64
- line_style 3
- origin_attachment (650, 1703)
- terminal_attachment (650, 1618)
- drawSupplier @65)
- (object ClassView "Class" "Logical View::dtd::DTDEntity" @88
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1488, 2064)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @88
- location (1244, 1992)
- fill_color 13434879
- nlines 1
- max_width 488
- justify 0
- label "DTDEntity")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37EFD12B03C8"
- width 506
- height 168
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$7" @89
- location (1480, 1898)
- stereotype TRUE
- line_color 3342489
- quidu "385294EB0243"
- roleview_list (list RoleViews
- (object RoleView "entityReference" @90
- Parent_View @89
- location (312, -70)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @91
- Parent_View @90
- location (1280, 1842)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 312
- justify 0
- label "+entityReference"
- pctDist 0.693750
- height 201
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "385294EF03BB"
- client @89
- supplier @70
- line_style 3
- origin_attachment (1480, 1898)
- terminal_attachment (1480, 1817)
- label (object SegLabel @92
- Parent_View @90
- location (1534, 1842)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.693750
- height 54
- orientation 1))
- (object RoleView "elementReferencedEntity" @93
- Parent_View @89
- location (312, -70)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @94
- Parent_View @93
- location (1220, 1954)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 480
- justify 0
- label "+elementReferencedEntity"
- pctDist 0.685315
- height 261
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "385294EF03BC"
- client @89
- supplier @88
- line_style 3
- origin_attachment (1480, 1898)
- terminal_attachment (1480, 1980)
- label (object SegLabel @95
- Parent_View @93
- location (1524, 1958)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.734234
- height 44
- orientation 0))))
- (object ClassView "Class" "Logical View::dtd::DTDElement" @96
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (912, 752)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @96
- location (744, 702)
- fill_color 13434879
- nlines 1
- max_width 336
- justify 0
- label "DTDElement")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37D9AAF70071"
- width 354
- height 124
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$1" @97
- location (912, 904)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AC0E00CD"
- roleview_list (list RoleViews
- (object RoleView "element" @98
- Parent_View @97
- location (-25, 96)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @99
- Parent_View @98
- location (1014, 865)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 168
- justify 0
- label "+element"
- pctDist 0.428571
- height 102
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AC0F039F"
- client @97
- supplier @96
- line_style 0
- label (object SegLabel @100
- Parent_View @98
- location (857, 850)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.598214
- height 56
- orientation 0))
- (object RoleView "content" @101
- Parent_View @97
- location (-25, 96)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @102
- Parent_View @101
- location (1014, 964)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 168
- justify 0
- label "+content"
- pctDist 0.664063
- height 102
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AC0F03A9"
- client @97
- supplier @72
- line_style 0
- label (object SegLabel @103
- Parent_View @101
- location (871, 962)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.640625
- height 42
- orientation 1))))
- (object AssociationViewNew "$UNNAMED$2" @104
- location (123, 1122)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AF11001A"
- roleview_list (list RoleViews
- (object RoleView "elementReference" @105
- Parent_View @104
- location (-981, 642)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @106
- Parent_View @105
- location (321, 1825)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 348
- justify 0
- label "+elementReference"
- pctDist 0.840035
- height 56
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AF1B0209"
- client @104
- supplier @86
- vertices (list Points
- (123, 1122)
- (123, 1769)
- (483, 1769))
- line_style 3
- origin_attachment (123, 1122)
- terminal_attachment (483, 1769)
- label (object SegLabel @107
- Parent_View @105
- location (422, 1726)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.940559
- height 44
- orientation 0))
- (object RoleView "referencedElement" @108
- Parent_View @104
- location (-981, 642)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @109
- Parent_View @108
- location (532, 686)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 360
- justify 0
- label "+referencedElement"
- pctDist 0.799650
- height 43
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "37D9AF1B020A"
- client @104
- supplier @96
- vertices (list Points
- (123, 1122)
- (123, 728)
- (735, 728))
- line_style 3
- origin_attachment (123, 1122)
- terminal_attachment (735, 728)
- label (object SegLabel @110
- Parent_View @108
- location (701, 773)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.966965
- height 45
- orientation 1))))
- (object InheritView "" @111
- stereotype TRUE
- line_color 12615680
- quidu "39B7F0AF02A8"
- client @96
- supplier @67
- line_style 3
- origin_attachment (923, 690)
- terminal_attachment (923, 470))
- (object ClassView "Class" "Logical View::dtd::DTDAttribute" @112
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1888, 752)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @112
- location (1612, 657)
- fill_color 13434879
- nlines 1
- max_width 552
- justify 0
- label "DTDAttribute")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37CC187900EA"
- width 570
- height 214
- annotation 8
- autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$8" @113
- location (2775, 1628)
- stereotype TRUE
- line_color 3342489
- quidu "3852972D02CB"
- roleview_list (list RoleViews
- (object RoleView "attributeNameReference" @114
- Parent_View @113
- location (1591, -564)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @115
- Parent_View @114
- location (2422, 808)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 468
- justify 0
- label "+attributeNameReference"
- pctDist 0.829630
- height 39
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "385297360291"
- client @113
- supplier @112
- vertices (list Points
- (2775, 1628)
- (2775, 768)
- (2173, 768))
- line_style 3
- origin_attachment (2775, 1628)
- terminal_attachment (2173, 768)
- label (object SegLabel @116
- Parent_View @114
- location (2222, 871)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.966649
- height 102
- orientation 0))
- (object RoleView "attributeNameReferencedEntity" @117
- Parent_View @113
- location (1591, -564)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @118
- Parent_View @117
- location (2076, 2090)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 588
- justify 0
- label "+attributeNameReferencedEntity"
- pctDist 0.771469
- height 35
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "38529736029B"
- client @113
- supplier @88
- vertices (list Points
- (2775, 1628)
- (2775, 2055)
- (1741, 2055))
- line_style 3
- origin_attachment (2775, 1628)
- terminal_attachment (1741, 2055)
- label (object SegLabel @119
- Parent_View @117
- location (1813, 2018)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.951442
- height 38
- orientation 1))))
- (object AssociationViewNew "$UNNAMED$11" @120
- location (2945, 1891)
- stereotype TRUE
- line_color 3342489
- quidu "38BD4908013D"
- roleview_list (list RoleViews
- (object RoleView "attributeTypeReference" @121
- Parent_View @120
- location (1489, -676)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @122
- Parent_View @121
- location (2435, 656)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 444
- justify 0
- label "+attributeTypeReference"
- pctDist 0.866026
- height 54
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "38BD49140130"
- client @120
- supplier @112
- vertices (list Points
- (2945, 1891)
- (2945, 708)
- (2173, 708))
- line_style 3
- origin_attachment (2945, 1891)
- terminal_attachment (2173, 708)
- label (object SegLabel @123
- Parent_View @121
- location (2345, 603)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.912538
- height 107
- orientation 1))
- (object RoleView "attributeTypeReferencedEntity" @124
- Parent_View @120
- location (1489, -676)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object SegLabel @125
- Parent_View @124
- location (1679, 2299)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 576
- justify 0
- label "+attributeTypeReferencedEntity"
- pctDist 0.828601
- height 56
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "38BD4914014E"
- client @120
- supplier @88
- vertices (list Points
- (2945, 1891)
- (2945, 2243)
- (1438, 2243)
- (1438, 2148))
- line_style 3
- origin_attachment (2945, 1891)
- terminal_attachment (1438, 2148)
- label (object SegLabel @126
- Parent_View @124
- location (1365, 2178)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..1"
- pctDist 0.984774
- height 74
- orientation 0))))
- (object InheritView "" @127
- stereotype TRUE
- line_color 12615680
- quidu "39B7F15901DA"
- client @112
- supplier @66
- line_style 3
- origin_attachment (1950, 645)
- terminal_attachment (1950, 486))
- (object AssociationViewNew "$UNNAMED$12" @128
- location (1346, 752)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2A9500CC"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$13" @129
- Parent_View @128
- location (-542, -16)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2A950311"
- client @128
- supplier @96
- line_style 3
- origin_attachment (1346, 752)
- terminal_attachment (1089, 752))
- (object RoleView "$UNNAMED$14" @130
- Parent_View @128
- location (-542, -16)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- stereotype TRUE
- line_color 3342489
- quidu "39FE2A95031B"
- client @128
- supplier @112
- line_style 3
- origin_attachment (1346, 752)
- terminal_attachment (1603, 752)
- label (object SegLabel @131
- Parent_View @130
- location (1544, 791)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..*"
- pctDist 0.773390
- height 39
- orientation 1))))))
- (object ClassDiagram "AttributeDefinition"
- quid "37E144570257"
- title "AttributeDefinition"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::dtd::DTDAttribute" @132
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (512, 656)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @132
- location (236, 539)
- fill_color 13434879
- nlines 1
- max_width 552
- justify 0
- label "DTDAttribute")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37CC187900EA"
- width 570
- height 258
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDBasicType" @133
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1264, 656)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @133
- location (1017, 584)
- fill_color 13434879
- nlines 1
- max_width 494
- justify 0
- label "DTDBasicType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37E1464F00DA"
- width 512
- height 168
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::dtd::DTDEnumerationType" @134
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1904, 656)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @134
- location (1646, 584)
- fill_color 13434879
- nlines 1
- max_width 516
- justify 0
- label "DTDEnumerationType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "37E146680306"
- width 534
- height 168
- annotation 8
- autoResize TRUE)
- (object NoteView @135
- location (912, 1120)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @135
- location (492, 926)
- nlines 9
- max_width 805
- label
-|A DTD attribute's type and initial
-|value are represented using the eType and default value stored in eAttribute. The eType will always be either DTDBasicType (subclass of eClass) or DTDEnumerationType (subclass of eEnum).
- )
- fill_color 16777215
- width 865
- height 400)
- (object AttachView "" @136
- stereotype TRUE
- client @132
- supplier @135
- line_style 0)
- (object ClassView "Class" "Logical View::ecore::EClass" @137
- ShowCompartmentStereotypes TRUE
- location (1264, 272)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @137
- location (1183, 197)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EClass")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "3903D5BF000A"
- height 174
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::ecore::EEnum" @138
- ShowCompartmentStereotypes TRUE
- location (1904, 272)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @138
- location (1823, 197)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EEnum")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "39A473E901D4"
- height 174
- annotation 8
- autoResize TRUE)
- (object InheritView "" @139
- stereotype TRUE
- line_color 12615680
- quidu "39B7F2800315"
- client @133
- supplier @137
- line_style 3
- origin_attachment (1260, 572)
- terminal_attachment (1260, 359))
- (object InheritView "" @140
- stereotype TRUE
- line_color 12615680
- quidu "39B7F2810302"
- client @134
- supplier @138
- line_style 3
- origin_attachment (1903, 572)
- terminal_attachment (1903, 359))
- (object ClassView "Class" "Logical View::ecore::EAttribute" @141
- ShowCompartmentStereotypes TRUE
- location (528, 272)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @141
- location (447, 197)
- fill_color 13434879
- nlines 2
- max_width 162
- justify 0
- label "EAttribute")
- icon_style "Icon"
- line_color 12615680
- fill_color 16777175
- quidu "39238472039D"
- height 174
- annotation 8
- autoResize TRUE)
- (object InheritView "" @142
- stereotype TRUE
- line_color 12615680
- quidu "39B7F15901DA"
- client @132
- supplier @141
- line_style 3
- origin_attachment (520, 527)
- terminal_attachment (520, 359))))))
diff --git a/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/dtdmodel.mdl b/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/dtdmodel.mdl
deleted file mode 100644
index ce5627af41..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/emfmodel/rose/dtdmodel.mdl
+++ /dev/null
@@ -1,7526 +0,0 @@
-
-(object Petal
- version 45
- _written "Rose 7.5.0103.1920"
- charSet 0)
-
-(object Design "Logical View"
- is_unit TRUE
- is_loaded TRUE
- attributes (list Attribute_Set
- (object Attribute
- tool "Java"
- name "IDE"
- value "Internal Editor"))
- quid "3E36BEB60133"
- defaults (object defaults
- rightMargin 0.250000
- leftMargin 0.250000
- topMargin 0.250000
- bottomMargin 0.500000
- pageOverlap 0.250000
- clipIconLabels TRUE
- autoResize TRUE
- snapToGrid TRUE
- gridX 16
- gridY 16
- defaultFont (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- showMessageNum 1
- showClassOfObject TRUE
- notation "Unified")
- root_usecase_package (object Class_Category "Use Case View"
- quid "3A0C75F401F7"
- exportControl "Public"
- global TRUE
- logical_models (list unit_reference_list)
- logical_presentations (list unit_reference_list
- (object UseCaseDiagram "Main"
- quid "3A0C75F4020B"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- root_category (object Class_Category "Logical View"
- quid "3A0C75F401F6"
- exportControl "Public"
- global TRUE
- subsystem "Component View"
- quidu "3A0C75F401F8"
- logical_models (list unit_reference_list
- (object Class_Category "ecore"
- is_unit TRUE
- is_loaded FALSE
- file_name "$VABASE_PLUGINS_PATH\\org.eclipse.emf.ecore\\src\\model\\org.eclipse.emf.ECore.cat"
- quid "39A5ED04004E")
- (object Class_Category "dtd"
- is_unit TRUE
- is_loaded FALSE
- file_name "$VABASE_PLUGINS_PATH\\org.eclipse.wst.dtd\\src\\rose\\DTD.cat"
- quid "3857B1C00293"))
- logical_presentations (list unit_reference_list
- (object ClassDiagram "Main"
- quid "3A0C75F401FF"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object CategoryView "Logical View::ecore" @1
- location (960, 304)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @1
- location (816, 220)
- fill_color 13434879
- nlines 2
- max_width 288
- justify 0
- label "ecore")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "39A5ED04004E"
- width 300
- height 180)
- (object CategoryView "Logical View::dtd" @2
- location (368, 256)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @2
- location (224, 172)
- fill_color 13434879
- nlines 2
- max_width 288
- justify 0
- label "dtd")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3857B1C00293"
- width 300
- height 180)))))
- root_subsystem (object SubSystem "Component View"
- quid "3A0C75F401F8"
- physical_models (list unit_reference_list)
- physical_presentations (list unit_reference_list
- (object Module_Diagram "Main"
- quid "3A0C75F4020A"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- process_structure (object Processes
- quid "3A0C75F401F9"
- ProcsNDevs (list
- (object Process_Diagram "Deployment View"
- quid "3A0C75F401FB"
- title "Deployment View"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- properties (object Properties
- attributes (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "DDL"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "DDL"
- name "DataBase"
- value ("DataBaseSet" 800))
- (object Attribute
- tool "DDL"
- name "DataBaseSet"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "ANSI"
- value 800)
- (object Attribute
- tool "DDL"
- name "Oracle"
- value 801)
- (object Attribute
- tool "DDL"
- name "SQLServer"
- value 802)
- (object Attribute
- tool "DDL"
- name "Sybase"
- value 803)
- (object Attribute
- tool "DDL"
- name "Watcom"
- value 804)))
- (object Attribute
- tool "DDL"
- name "PrimaryKeyColumnName"
- value "Id")
- (object Attribute
- tool "DDL"
- name "PrimaryKeyColumnType"
- value "NUMBER(5)")
- (object Attribute
- tool "DDL"
- name "ViewName"
- value "V_")
- (object Attribute
- tool "DDL"
- name "TableName"
- value "T_")
- (object Attribute
- tool "DDL"
- name "InheritSuffix"
- value "_V")
- (object Attribute
- tool "DDL"
- name "DropClause"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "BaseViews"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "DDLScriptFilename"
- value "DDL1.SQL")))
- (object Attribute
- tool "DDL"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "ColumnType"
- value "VARCHAR")
- (object Attribute
- tool "DDL"
- name "Length"
- value "")
- (object Attribute
- tool "DDL"
- name "NullsOK"
- value TRUE)
- (object Attribute
- tool "DDL"
- name "PrimaryKey"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "Unique"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "CompositeUnique"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "CheckConstraint"
- value "")))
- (object Attribute
- tool "DDL"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "IDL"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "GeneratePreserveRegions"
- value TRUE)))
- (object Attribute
- tool "IDL"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "IDL"
- name "ConstValue"
- value "")
- (object Attribute
- tool "IDL"
- name "GenerateDefaultSpecifier"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "DefaultSpecifier"
- value "")
- (object Attribute
- tool "IDL"
- name "IDLElement"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "IDLSpecificationType"
- value ("IDLSpecSet" 22))
- (object Attribute
- tool "IDL"
- name "IDLSpecSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Interface"
- value 22)
- (object Attribute
- tool "IDL"
- name "Typedef"
- value 54)
- (object Attribute
- tool "IDL"
- name "Enumeration"
- value 8)
- (object Attribute
- tool "IDL"
- name "Const"
- value 71)
- (object Attribute
- tool "IDL"
- name "Exception"
- value 61)
- (object Attribute
- tool "IDL"
- name "Struct"
- value 51)
- (object Attribute
- tool "IDL"
- name "Union"
- value 81)))))
- (object Attribute
- tool "IDL"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "IDL"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "GenerateIDLModule"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "IncludeBySimpleName"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "IDL"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "IncludeBySimpleName"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "OperationIsOneWay"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "Context"
- value "")
- (object Attribute
- tool "IDL"
- name "Raises"
- value "")))
- (object Attribute
- tool "IDL"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsConst"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "ConstValue"
- value "")))
- (object Attribute
- tool "IDL"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "BoundedHasRelType"
- value ("HasRelTypeSet" 47))
- (object Attribute
- tool "IDL"
- name "HasRelTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Array"
- value 24)
- (object Attribute
- tool "IDL"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "IDL"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "BoundedRoleType"
- value ("AssocTypeSet" 47))
- (object Attribute
- tool "IDL"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Array"
- value 24)
- (object Attribute
- tool "IDL"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "IDL"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "IDL"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "SCC"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "eCore"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "eCore"
- name "Codegen Name"
- value "")))
- (object Attribute
- tool "eCore"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "eCore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "isChangeable"
- value TRUE)))
- (object Attribute
- tool "eCore"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "eCore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "eCore"
- name "isChangeable"
- value TRUE)))
- (object Attribute
- tool "Cplusplus"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Cplusplus"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "Const"
- value FALSE)
- (object Attribute
- tool "Cplusplus"
- name "InitialValue"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)))
- (object Attribute
- tool "Cplusplus"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "Copyright"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "RootPackage"
- value "C++ Reverse Engineered")
- (object Attribute
- tool "Cplusplus"
- name "InitialHeaderIncludes"
- value (value Text ""))
- (object Attribute
- tool "Cplusplus"
- name "InitialBodyIncludes"
- value (value Text ""))))
- (object Attribute
- tool "Cplusplus"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "InitialCodeBody"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "Inline"
- value FALSE)))
- (object Attribute
- tool "Cplusplus"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "Synchronize"
- value TRUE)
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "HeaderSourceFile"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "BodySourceFile"
- value "")))
- (object Attribute
- tool "Cplusplus"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Cplusplus"
- name "CodeName"
- value "")
- (object Attribute
- tool "Cplusplus"
- name "IsNamespace"
- value FALSE)))
- (object Attribute
- tool "Cplusplus"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ANSI C++ Event Watcher"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ANSIConvert"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "propertyId"
- value "838326200")
- (object Attribute
- tool "Ada83"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "SpecFileExtension"
- value "1.ada")
- (object Attribute
- tool "Ada83"
- name "SpecFileBackupExtension"
- value "1.ad~")
- (object Attribute
- tool "Ada83"
- name "SpecFileTemporaryExtension"
- value "1.ad#")
- (object Attribute
- tool "Ada83"
- name "BodyFileExtension"
- value "2.ada")
- (object Attribute
- tool "Ada83"
- name "BodyFileBackupExtension"
- value "2.ad~")
- (object Attribute
- tool "Ada83"
- name "BodyFileTemporaryExtension"
- value "2.ad#")
- (object Attribute
- tool "Ada83"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateBodies"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "DefaultCodeBody"
- value "[statement]")
- (object Attribute
- tool "Ada83"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "Ada83"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "Ada83"
- name "UseFileName"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "Directory"
- value "$ROSEADA83_SOURCE")))
- (object Attribute
- tool "Ada83"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ClassName"
- value "Object")
- (object Attribute
- tool "Ada83"
- name "ClassAccess"
- value ("ImplementationSet" 43))
- (object Attribute
- tool "Ada83"
- name "ImplementationType"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "IsSubtype"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "PolymorphicUnit"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "HandleName"
- value "Handle")
- (object Attribute
- tool "Ada83"
- name "HandleAccess"
- value ("ImplementationSet" 45))
- (object Attribute
- tool "Ada83"
- name "Discriminant"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "EnumerationLiteralPrefix"
- value "A_")
- (object Attribute
- tool "Ada83"
- name "RecordFieldPrefix"
- value "The_")
- (object Attribute
- tool "Ada83"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "ClassParameterName"
- value "This")
- (object Attribute
- tool "Ada83"
- name "DefaultConstructorKind"
- value ("ConstructorKindSet" 199))
- (object Attribute
- tool "Ada83"
- name "DefaultConstructorName"
- value "Create")
- (object Attribute
- tool "Ada83"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "CopyConstructorKind"
- value ("ConstructorKindSet" 199))
- (object Attribute
- tool "Ada83"
- name "CopyConstructorName"
- value "Copy")
- (object Attribute
- tool "Ada83"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "DestructorName"
- value "Free")
- (object Attribute
- tool "Ada83"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ClassEqualityOperation"
- value "")
- (object Attribute
- tool "Ada83"
- name "HandleEqualityOperation"
- value "")
- (object Attribute
- tool "Ada83"
- name "InlineEquality"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "IsTask"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "ImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Public"
- value 45)
- (object Attribute
- tool "Ada83"
- name "Private"
- value 43)
- (object Attribute
- tool "Ada83"
- name "LimitedPrivate"
- value 200)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada83"
- name "ConstructorKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada83"
- name "GenericFormalParameters"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "AdditionalWiths"
- value (value Text ""))))
- (object Attribute
- tool "Ada83"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada83"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada83"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "IsSubunit"
- value FALSE)))
- (object Attribute
- tool "Ada83"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SubprogramImplementation"
- value ("SubprogramImplementationSet" 2))
- (object Attribute
- tool "Ada83"
- name "Renames"
- value "")
- (object Attribute
- tool "Ada83"
- name "ClassParameterMode"
- value ("ParameterModeSet" 203))
- (object Attribute
- tool "Ada83"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "InitialCodeBody"
- value "${default}")
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SubprogramImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Spec"
- value 224)
- (object Attribute
- tool "Ada83"
- name "Body"
- value 2)
- (object Attribute
- tool "Ada83"
- name "Renaming"
- value 222)
- (object Attribute
- tool "Ada83"
- name "Separate"
- value 223)))
- (object Attribute
- tool "Ada83"
- name "ParameterModeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "In"
- value 204)
- (object Attribute
- tool "Ada83"
- name "Out"
- value 205)
- (object Attribute
- tool "Ada83"
- name "InOut"
- value 203)
- (object Attribute
- tool "Ada83"
- name "FunctionReturn"
- value 206)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${supplier}")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${relationship}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${relationship}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${relationship}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada83"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SelectorType"
- value "")))
- (object Attribute
- tool "Ada83"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${attribute}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${attribute}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${attribute}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "Variant"
- value "")
- (object Attribute
- tool "Ada83"
- name "Representation"
- value (value Text ""))))
- (object Attribute
- tool "Ada83"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${association}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${association}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "GenerateAssociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada83"
- name "AssociateName"
- value "Associate")
- (object Attribute
- tool "Ada83"
- name "InlineAssociate"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "GenerateDissociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada83"
- name "DissociateName"
- value "Dissociate")
- (object Attribute
- tool "Ada83"
- name "InlineDissociate"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada83"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada83"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada83"
- name "DataMemberName"
- value "${target}")
- (object Attribute
- tool "Ada83"
- name "GetName"
- value "Get_${target}")
- (object Attribute
- tool "Ada83"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "SetName"
- value "Set_${target}")
- (object Attribute
- tool "Ada83"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada83"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada83"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada83"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada83"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada83"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada83"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada83"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada83"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "Ada83"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "Ada83"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "propertyId"
- value "838326200")
- (object Attribute
- tool "Ada95"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "SpecFileExtension"
- value "1.ada")
- (object Attribute
- tool "Ada95"
- name "SpecFileBackupExtension"
- value "1.ad~")
- (object Attribute
- tool "Ada95"
- name "SpecFileTemporaryExtension"
- value "1.ad#")
- (object Attribute
- tool "Ada95"
- name "BodyFileExtension"
- value "2.ada")
- (object Attribute
- tool "Ada95"
- name "BodyFileBackupExtension"
- value "2.ad~")
- (object Attribute
- tool "Ada95"
- name "BodyFileTemporaryExtension"
- value "2.ad#")
- (object Attribute
- tool "Ada95"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "UseColonNotation"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateBodies"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "DefaultCodeBody"
- value "[statement]")
- (object Attribute
- tool "Ada95"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "Ada95"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "Ada95"
- name "UseFileName"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Directory"
- value "$ROSEADA95_SOURCE")))
- (object Attribute
- tool "Ada95"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "TypeName"
- value "Object")
- (object Attribute
- tool "Ada95"
- name "TypeVisibility"
- value ("TypeVisibilitySet" 43))
- (object Attribute
- tool "Ada95"
- name "TypeImplementation"
- value ("TypeImplementationSet" 208))
- (object Attribute
- tool "Ada95"
- name "TypeControl"
- value ("TypeControlSet" 225))
- (object Attribute
- tool "Ada95"
- name "TypeControlName"
- value "Controlled_${type}")
- (object Attribute
- tool "Ada95"
- name "TypeDefinition"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "RecordImplementation"
- value ("RecordImplementationSet" 209))
- (object Attribute
- tool "Ada95"
- name "RecordKindPackageName"
- value "${class}_Record_Kinds")
- (object Attribute
- tool "Ada95"
- name "IsLimited"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsSubtype"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessType"
- value ("GenerateAccessTypeSet" 230))
- (object Attribute
- tool "Ada95"
- name "AccessTypeName"
- value "Handle")
- (object Attribute
- tool "Ada95"
- name "AccessTypeVisibility"
- value ("TypeVisibilitySet" 45))
- (object Attribute
- tool "Ada95"
- name "AccessTypeDefinition"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "AccessClassWide"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "MaybeAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ParameterizedImplementation"
- value ("ParameterizedImplementationSet" 11))
- (object Attribute
- tool "Ada95"
- name "ParentClassName"
- value "Superclass")
- (object Attribute
- tool "Ada95"
- name "EnumerationLiteralPrefix"
- value "A_")
- (object Attribute
- tool "Ada95"
- name "RecordFieldPrefix"
- value "The_")
- (object Attribute
- tool "Ada95"
- name "ArrayOfTypeName"
- value "Array_Of_${type}")
- (object Attribute
- tool "Ada95"
- name "AccessArrayOfTypeName"
- value "Access_Array_Of_${type}")
- (object Attribute
- tool "Ada95"
- name "ArrayOfAccessTypeName"
- value "Array_Of_${access_type}")
- (object Attribute
- tool "Ada95"
- name "AccessArrayOfAccessTypeName"
- value "Access_Array_Of_${access_type}")
- (object Attribute
- tool "Ada95"
- name "ArrayIndexDefinition"
- value "Positive range <>")
- (object Attribute
- tool "Ada95"
- name "GenerateAccessorOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateStandardOperations"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameter"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterName"
- value "This")
- (object Attribute
- tool "Ada95"
- name "GenerateDefaultConstructor"
- value ("SubprogramKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "DefaultConstructorName"
- value "Create")
- (object Attribute
- tool "Ada95"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateCopyConstructor"
- value ("SubprogramKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "CopyConstructorName"
- value "Copy")
- (object Attribute
- tool "Ada95"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateDestructor"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "DestructorName"
- value "Free")
- (object Attribute
- tool "Ada95"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateTypeEquality"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "TypeEqualityName"
- value "${quote}=${quote}")
- (object Attribute
- tool "Ada95"
- name "InlineEquality"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "TypeImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Tagged"
- value 208)
- (object Attribute
- tool "Ada95"
- name "Record"
- value 210)
- (object Attribute
- tool "Ada95"
- name "Mixin"
- value 211)
- (object Attribute
- tool "Ada95"
- name "Protected"
- value 44)
- (object Attribute
- tool "Ada95"
- name "Task"
- value 212)))
- (object Attribute
- tool "Ada95"
- name "RecordImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "SingleType"
- value 209)
- (object Attribute
- tool "Ada95"
- name "MultipleTypes"
- value 213)))
- (object Attribute
- tool "Ada95"
- name "ParameterizedImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)
- (object Attribute
- tool "Ada95"
- name "Unconstrained"
- value 214)))
- (object Attribute
- tool "Ada95"
- name "TypeVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Public"
- value 45)
- (object Attribute
- tool "Ada95"
- name "Private"
- value 43)))
- (object Attribute
- tool "Ada95"
- name "SubprogramKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "TypeControlSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "None"
- value 225)
- (object Attribute
- tool "Ada95"
- name "InitializationOnly"
- value 226)
- (object Attribute
- tool "Ada95"
- name "AssignmentFinalizationOnly"
- value 227)
- (object Attribute
- tool "Ada95"
- name "All"
- value 228)))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Always"
- value 229)
- (object Attribute
- tool "Ada95"
- name "Auto"
- value 230)))))
- (object Attribute
- tool "Ada95"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada95"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada95"
- name "GenericFormalParameters"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "IsPrivate"
- value FALSE)))
- (object Attribute
- tool "Ada95"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "FileName"
- value "")
- (object Attribute
- tool "Ada95"
- name "ReturnType"
- value "")
- (object Attribute
- tool "Ada95"
- name "AdditionalWiths"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "IsSubunit"
- value FALSE)))
- (object Attribute
- tool "Ada95"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SubprogramImplementation"
- value ("SubprogramImplementationSet" 2))
- (object Attribute
- tool "Ada95"
- name "Renames"
- value "")
- (object Attribute
- tool "Ada95"
- name "GenerateOverriding"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterMode"
- value ("ParameterModeSet" 203))
- (object Attribute
- tool "Ada95"
- name "ImplicitParameterClassWide"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAccessOperation"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "InitialCodeBody"
- value "${default}")
- (object Attribute
- tool "Ada95"
- name "EntryBarrierCondition"
- value "True")
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SubprogramImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Spec"
- value 224)
- (object Attribute
- tool "Ada95"
- name "Body"
- value 2)
- (object Attribute
- tool "Ada95"
- name "Abstract"
- value 221)
- (object Attribute
- tool "Ada95"
- name "Renaming"
- value 222)
- (object Attribute
- tool "Ada95"
- name "RenamingAsBody"
- value 231)
- (object Attribute
- tool "Ada95"
- name "Separate"
- value 223)))
- (object Attribute
- tool "Ada95"
- name "ParameterModeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "In"
- value 204)
- (object Attribute
- tool "Ada95"
- name "Out"
- value 205)
- (object Attribute
- tool "Ada95"
- name "InOut"
- value 203)
- (object Attribute
- tool "Ada95"
- name "Access"
- value 220)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${supplier}")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${relationship}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${relationship}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${relationship}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerImplementation"
- value ("ContainerImplementationSet" 217))
- (object Attribute
- tool "Ada95"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada95"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ContainerImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Array"
- value 217)
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${attribute}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${attribute}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${attribute}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "Representation"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${association}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${association}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateAssociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "AssociateName"
- value "Associate")
- (object Attribute
- tool "Ada95"
- name "InlineAssociate"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "GenerateDissociate"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "DissociateName"
- value "Dissociate")
- (object Attribute
- tool "Ada95"
- name "InlineDissociate"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "CodeName"
- value "")
- (object Attribute
- tool "Ada95"
- name "NameIfUnlabeled"
- value "The_${targetClass}")
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementation"
- value ("RecordFieldImplementationSet" 216))
- (object Attribute
- tool "Ada95"
- name "RecordFieldName"
- value "${target}")
- (object Attribute
- tool "Ada95"
- name "GenerateGet"
- value ("FunctionKindSet" 199))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessGet"
- value ("FunctionKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "GetName"
- value "Get_${target}")
- (object Attribute
- tool "Ada95"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "GenerateSet"
- value ("ProcedureKindSet" 202))
- (object Attribute
- tool "Ada95"
- name "GenerateAccessSet"
- value ("ProcedureKindSet" 201))
- (object Attribute
- tool "Ada95"
- name "SetName"
- value "Set_${target}")
- (object Attribute
- tool "Ada95"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "Ada95"
- name "IsAliased"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "IsConstant"
- value FALSE)
- (object Attribute
- tool "Ada95"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerImplementation"
- value ("ContainerImplementationSet" 217))
- (object Attribute
- tool "Ada95"
- name "ContainerGeneric"
- value "List")
- (object Attribute
- tool "Ada95"
- name "ContainerType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ContainerDeclarations"
- value (value Text ""))
- (object Attribute
- tool "Ada95"
- name "SelectorName"
- value "")
- (object Attribute
- tool "Ada95"
- name "SelectorType"
- value "")
- (object Attribute
- tool "Ada95"
- name "ProcedureKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Procedure"
- value 202)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))
- (object Attribute
- tool "Ada95"
- name "RecordFieldImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Component"
- value 216)
- (object Attribute
- tool "Ada95"
- name "Discriminant"
- value 218)
- (object Attribute
- tool "Ada95"
- name "AccessDiscriminant"
- value 219)))
- (object Attribute
- tool "Ada95"
- name "ContainerImplementationSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Array"
- value 217)
- (object Attribute
- tool "Ada95"
- name "Generic"
- value 11)))
- (object Attribute
- tool "Ada95"
- name "FunctionKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Function"
- value 199)
- (object Attribute
- tool "Ada95"
- name "DoNotCreate"
- value 201)))))
- (object Attribute
- tool "Ada95"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "Ada95"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "Ada95"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "CORBA"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "CORBA"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "CORBA"
- name "IncludePath"
- value "")
- (object Attribute
- tool "CORBA"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "CORBA"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "CORBA"
- name "WindowsShell"
- value 101)))
- (object Attribute
- tool "CORBA"
- name "PathSeparator"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "ConstValue"
- value "")
- (object Attribute
- tool "CORBA"
- name "ImplementationType"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "CORBA"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")))
- (object Attribute
- tool "CORBA"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "CORBA"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "CORBA"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")))
- (object Attribute
- tool "CORBA"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "Context"
- value "")
- (object Attribute
- tool "CORBA"
- name "OperationIsOneWay"
- value FALSE)))
- (object Attribute
- tool "CORBA"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "CORBA"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "Order"
- value "")))
- (object Attribute
- tool "CORBA"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "ArrayDimensions"
- value "")
- (object Attribute
- tool "CORBA"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "CORBA"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "CORBA"
- name "Order"
- value "")
- (object Attribute
- tool "CORBA"
- name "BoundedRoleType"
- value ("AssocTypeSet" 47))
- (object Attribute
- tool "CORBA"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "Array"
- value 24)
- (object Attribute
- tool "CORBA"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "CORBA"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "CORBA"
- name "GenerateForwardReference"
- value FALSE)))
- (object Attribute
- tool "CORBA"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Data Modeler"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "project"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ViewCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "DomainCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "SPPackageCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TriggerCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "IndexCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ConstraintCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "StoreProcedureCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "PrimaryKeyCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ForeignKeyCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "JoinCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "cONTAINERCounter"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "TablePrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ViewPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DomainPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TriggerPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IndexPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ConstraintPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "StoreProcedurePrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "PrimaryKeyPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForeignKeyPrefix"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableSpacePrefix"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsDatabase"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TargetDatabase"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Location"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsTableSpace"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsDeault"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "BufferPool"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ExtentSize"
- value 1)
- (object Attribute
- tool "Data Modeler"
- name "PrefetchSize"
- value 1)
- (object Attribute
- tool "Data Modeler"
- name "PageSize"
- value 4)
- (object Attribute
- tool "Data Modeler"
- name "ManagedBy"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ContainerList"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "dmSchema"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "dmDomainPackage"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsSchema"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDomainPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsRootSchema"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsRootDomainPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsSchemaPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DatabaseID"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DBMS"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsTable"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsView"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDomain"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsSPPackage"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Synonymns"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TableSpaceID"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "CorrelationName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SelectClause"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsUpdateable"
- value TRUE)
- (object Attribute
- tool "Data Modeler"
- name "CheckOption"
- value "None")
- (object Attribute
- tool "Data Modeler"
- name "IsSnapShot"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDistinct"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "PersistToServer"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsPackage"
- value FALSE)))
- (object Attribute
- tool "Data Modeler"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Ordinal"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "IsIdentity"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "NullsAllowed"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "ColumnType"
- value "Native")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "OID"
- value FALSE)))
- (object Attribute
- tool "Data Modeler"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsRelationship"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "SourceId"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "SourceType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RIMethod"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentUpdateRule"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentUpdateRuleName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentDeleteRule"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ParentDeleteRuleName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ChildInsertRestrict"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ChildInsertRestrictName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ChildMultiplicity"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ChildMultiplicityName"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ConstraintName"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsConstraint"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ConstraintType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsIndex"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsTrigger"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsStoredProcedure"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsCluster"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "TableSpace"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "FillFactor"
- value 0)
- (object Attribute
- tool "Data Modeler"
- name "KeyList"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "CheckPredicate"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DeferalMode"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "InitialCheckTime"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "TriggerType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsInsertEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsUpdateEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "IsDeleteEvent"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "RefOldTable"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefNewTable"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefOldRow"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "RefNewRow"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsRow"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "WhenClause"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Language"
- value "SQL")
- (object Attribute
- tool "Data Modeler"
- name "ProcType"
- value "Procedure")
- (object Attribute
- tool "Data Modeler"
- name "IsDeterministic"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ParameterStyle"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ReturnedNull"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "ExternalName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "default__Parameter"
- value (list Attribute_Set
- (object Attribute
- tool "Data Modeler"
- name "dmItem"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DMName"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "IsInParameter"
- value TRUE)
- (object Attribute
- tool "Data Modeler"
- name "IsOutParameter"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "Ordinal"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Length"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "Scale"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "ForBitData"
- value FALSE)
- (object Attribute
- tool "Data Modeler"
- name "DefaultValueType"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "DefaultValue"
- value "")
- (object Attribute
- tool "Data Modeler"
- name "OperationID"
- value "")))
- (object Attribute
- tool "Data Modeler"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Data Modeler Communicator"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "framework"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Java"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Java"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "RootDir"
- value "")
- (object Attribute
- tool "Java"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Java"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Java"
- name "UsePrefixes"
- value FALSE)
- (object Attribute
- tool "Java"
- name "AutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "NotShowRoseIDDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ShowCodegenDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateRoseID"
- value TRUE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultReturnLine"
- value TRUE)
- (object Attribute
- tool "Java"
- name "JavadocDefaultAuthor"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocDefaultVersion"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocDefaultSince"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText1"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText2"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagName3"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagApply3"
- value "")
- (object Attribute
- tool "Java"
- name "UserDefineTagText3"
- value "")
- (object Attribute
- tool "Java"
- name "JavadocNumAsterisks"
- value 0)
- (object Attribute
- tool "Java"
- name "MaxNumChars"
- value 80)
- (object Attribute
- tool "Java"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "Java"
- name "VM"
- value ("VMType" 200))
- (object Attribute
- tool "Java"
- name "ClassPath"
- value ".;C:\\IBM\\SQLLIB\\java\\db2java.zip;C:\\IBM\\SQLLIB\\java\\db2jcc.jar;C:\\IBM\\SQLLIB\\java\\sqlj.zip;C:\\IBM\\SQLLIB\\bin;C:\\IBM\\SQLLIB\\java\\common.jar")
- (object Attribute
- tool "Java"
- name "ReferenceClasspath"
- value "")
- (object Attribute
- tool "Java"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "Java"
- name "WindowsShell"
- value 101)))
- (object Attribute
- tool "Java"
- name "VMType"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Sun"
- value 200)))
- (object Attribute
- tool "Java"
- name "VAJavaWorkingFolder"
- value "")
- (object Attribute
- tool "Java"
- name "InstanceVariablePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "ClassVariablePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "DefaultAttributeDataType"
- value "int")
- (object Attribute
- tool "Java"
- name "DefaultOperationReturnType"
- value "void")
- (object Attribute
- tool "Java"
- name "NoClassCustomDlg"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GlobalImports"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "OpenBraceClassStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "OpenBraceMethodStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "UseTabs"
- value FALSE)
- (object Attribute
- tool "Java"
- name "UseSpaces"
- value TRUE)
- (object Attribute
- tool "Java"
- name "SpacingItems"
- value 3)
- (object Attribute
- tool "Java"
- name "RoseDefaultCommentStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "AsteriskCommentStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "JavaCommentStyle"
- value TRUE)
- (object Attribute
- tool "Java"
- name "JavadocAuthor"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavadocSince"
- value FALSE)
- (object Attribute
- tool "Java"
- name "JavadocVersion"
- value FALSE)
- (object Attribute
- tool "Java"
- name "BeanPrefix"
- value "")
- (object Attribute
- tool "Java"
- name "BeanSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "RemotePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "RemoteSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "HomePrefix"
- value "")
- (object Attribute
- tool "Java"
- name "HomeSuffix"
- value "")
- (object Attribute
- tool "Java"
- name "PrimaryKeyPrefix"
- value "")
- (object Attribute
- tool "Java"
- name "PrimaryKeySuffix"
- value "")
- (object Attribute
- tool "Java"
- name "EJBDTDLocation"
- value "")
- (object Attribute
- tool "Java"
- name "ServletDTDLocation"
- value "")
- (object Attribute
- tool "Java"
- name "DefaultEJBVersion"
- value "")
- (object Attribute
- tool "Java"
- name "DefaultServletVersion"
- value "")))
- (object Attribute
- tool "Java"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultConstructor"
- value TRUE)
- (object Attribute
- tool "Java"
- name "ConstructorIs"
- value ("Ctor_Set" 62))
- (object Attribute
- tool "Java"
- name "Ctor_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "public"
- value 62)
- (object Attribute
- tool "Java"
- name "protected"
- value 63)
- (object Attribute
- tool "Java"
- name "private"
- value 64)
- (object Attribute
- tool "Java"
- name "package"
- value 65)))
- (object Attribute
- tool "Java"
- name "GenerateFinalizer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateStaticInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateInstanceInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateCode"
- value TRUE)
- (object Attribute
- tool "Java"
- name "DisableAutoSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReadOnly"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "Default_Servlet__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ServletName"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContextRef"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsSingleThread"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletInitParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletInitParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletIsSecure"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcher"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletRequestDispatcherPath"
- value "")
- (object Attribute
- tool "Java"
- name "DispatcherInclude"
- value FALSE)
- (object Attribute
- tool "Java"
- name "DispatcherForward"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "ServletgetInfo"
- value "")
- (object Attribute
- tool "Java"
- name "ServletXMLFilePath"
- value "")))
- (object Attribute
- tool "Java"
- name "Http_Servlet__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ServletRequestAttribute"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestAttributesNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestAttributes"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameter"
- value "")
- (object Attribute
- tool "Java"
- name "ServletRequestParameterNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForRequestParameters"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeader"
- value "")
- (object Attribute
- tool "Java"
- name "ServletHeaderNames"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForHeaders"
- value "")
- (object Attribute
- tool "Java"
- name "ServletIntHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletDateHeader"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ServletCookie"
- value FALSE)
- (object Attribute
- tool "Java"
- name "MethodForCookie"
- value "")
- (object Attribute
- tool "Java"
- name "ServletContentType"
- value "")
- (object Attribute
- tool "Java"
- name "GenerateHTML"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "Default_EJB__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Generate_XML_DD"
- value TRUE)
- (object Attribute
- tool "Java"
- name "EJBCmpField"
- value "")
- (object Attribute
- tool "Java"
- name "EJBEnvironmentProperties"
- value "")
- (object Attribute
- tool "Java"
- name "EJBCnxFactory"
- value "")
- (object Attribute
- tool "Java"
- name "EJBReferences"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSecurityRoles"
- value "")
- (object Attribute
- tool "Java"
- name "EJBNameInJAR"
- value "")
- (object Attribute
- tool "Java"
- name "EJBSessionType"
- value ("EJBSessionType_Set" 200))
- (object Attribute
- tool "Java"
- name "EJBSessionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 200)
- (object Attribute
- tool "Java"
- name "Stateless"
- value 201)
- (object Attribute
- tool "Java"
- name "Stateful"
- value 202)))
- (object Attribute
- tool "Java"
- name "EJBTransactionType"
- value ("EJBTransactionType_Set" 211))
- (object Attribute
- tool "Java"
- name "EJBTransactionType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Container"
- value 211)
- (object Attribute
- tool "Java"
- name "Bean"
- value 212)))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType"
- value ("EJBPersistenceType_Set" 220))
- (object Attribute
- tool "Java"
- name "EJBPersistenceType_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name ""
- value 220)
- (object Attribute
- tool "Java"
- name "Bean"
- value 221)
- (object Attribute
- tool "Java"
- name "Container"
- value 222)))
- (object Attribute
- tool "Java"
- name "EJBReentrant"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBSessionSync"
- value FALSE)
- (object Attribute
- tool "Java"
- name "EJBVersion"
- value ("EJBVersion_Set" 230))
- (object Attribute
- tool "Java"
- name "EJBVersion_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "2.0"
- value 230)
- (object Attribute
- tool "Java"
- name "1.x"
- value 231)))
- (object Attribute
- tool "Java"
- name "EJBXMLFilePath"
- value "")))
- (object Attribute
- tool "Java"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "CmIdentification"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "CopyrightNotice"
- value (value Text ""))))
- (object Attribute
- tool "Java"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "CmIdentification"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "CopyrightNotice"
- value (value Text ""))))
- (object Attribute
- tool "Java"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Abstract"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Native"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Synchronized"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedReturn"
- value FALSE)
- (object Attribute
- tool "Java"
- name "ReplaceExistingCode"
- value TRUE)))
- (object Attribute
- tool "Java"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Transient"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Volatile"
- value FALSE)
- (object Attribute
- tool "Java"
- name "PropertyType"
- value ("BeanProperty_Set" 71))
- (object Attribute
- tool "Java"
- name "BeanProperty_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Not A Property"
- value 71)
- (object Attribute
- tool "Java"
- name "Simple"
- value 72)
- (object Attribute
- tool "Java"
- name "Bound"
- value 73)
- (object Attribute
- tool "Java"
- name "Constrained"
- value 74)))
- (object Attribute
- tool "Java"
- name "IndividualChangeMgt"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Read/Write"
- value ("Read/Write_Set" 81))
- (object Attribute
- tool "Java"
- name "Read/Write_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Read & Write"
- value 81)
- (object Attribute
- tool "Java"
- name "Read Only"
- value 82)
- (object Attribute
- tool "Java"
- name "Write Only"
- value 83)))
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedTypes"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "Java"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Transient"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Volatile"
- value FALSE)
- (object Attribute
- tool "Java"
- name "PropertyType"
- value ("BeanProperty_Set" 71))
- (object Attribute
- tool "Java"
- name "BeanProperty_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Not A Property"
- value 71)
- (object Attribute
- tool "Java"
- name "Simple"
- value 72)
- (object Attribute
- tool "Java"
- name "Bound"
- value 73)
- (object Attribute
- tool "Java"
- name "Constrained"
- value 74)))
- (object Attribute
- tool "Java"
- name "IndividualChangeMgt"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Read/Write"
- value ("Read/Write_Set" 81))
- (object Attribute
- tool "Java"
- name "Read/Write_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Read & Write"
- value 81)
- (object Attribute
- tool "Java"
- name "Read Only"
- value 82)
- (object Attribute
- tool "Java"
- name "Write Only"
- value 83)))
- (object Attribute
- tool "Java"
- name "GenerateFullyQualifiedTypes"
- value FALSE)
- (object Attribute
- tool "Java"
- name "IsNavigable"
- value TRUE)))
- (object Attribute
- tool "Java"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "propertyId"
- value "360000002")
- (object Attribute
- tool "Oracle8"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "DDLScriptFilename"
- value "DDL1.SQL")
- (object Attribute
- tool "Oracle8"
- name "DropClause"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "PrimaryKeyColumnName"
- value "_ID")
- (object Attribute
- tool "Oracle8"
- name "PrimaryKeyColumnType"
- value "NUMBER(5,0)")
- (object Attribute
- tool "Oracle8"
- name "SchemaNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "SchemaNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TableNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TypeNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TypeNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ViewNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ViewNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "VarrayNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "VarrayNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "NestedTableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "NestedTableNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ObjectTableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ObjectTableNameSuffix"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "IsSchema"
- value FALSE)))
- (object Attribute
- tool "Oracle8"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OID"
- value "")
- (object Attribute
- tool "Oracle8"
- name "WhereClause"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CheckConstraint"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypeLength"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypePrecision"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypeScale"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionOfREFS"
- value FALSE)))
- (object Attribute
- tool "Oracle8"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "MethodKind"
- value ("MethodKindSet" 1903))
- (object Attribute
- tool "Oracle8"
- name "OverloadID"
- value "")
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")
- (object Attribute
- tool "Oracle8"
- name "IsReadNoDataState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsReadNoProcessState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsWriteNoDataState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsWriteNoProcessState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsSelfish"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "TriggerType"
- value ("TriggerTypeSet" 1801))
- (object Attribute
- tool "Oracle8"
- name "TriggerEvent"
- value ("TriggerEventSet" 1601))
- (object Attribute
- tool "Oracle8"
- name "TriggerText"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TriggerReferencingNames"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TriggerForEach"
- value ("TriggerForEachSet" 1701))
- (object Attribute
- tool "Oracle8"
- name "TriggerWhenClause"
- value "")
- (object Attribute
- tool "Oracle8"
- name "MethodKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "MapMethod"
- value 1901)
- (object Attribute
- tool "Oracle8"
- name "OrderMethod"
- value 1902)
- (object Attribute
- tool "Oracle8"
- name "Function"
- value 1903)
- (object Attribute
- tool "Oracle8"
- name "Procedure"
- value 1904)
- (object Attribute
- tool "Oracle8"
- name "Operator"
- value 1905)
- (object Attribute
- tool "Oracle8"
- name "Constructor"
- value 1906)
- (object Attribute
- tool "Oracle8"
- name "Destructor"
- value 1907)
- (object Attribute
- tool "Oracle8"
- name "Trigger"
- value 1908)
- (object Attribute
- tool "Oracle8"
- name "Calculated"
- value 1909)))
- (object Attribute
- tool "Oracle8"
- name "TriggerTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "AFTER"
- value 1801)
- (object Attribute
- tool "Oracle8"
- name "BEFORE"
- value 1802)
- (object Attribute
- tool "Oracle8"
- name "INSTEAD OF"
- value 1803)))
- (object Attribute
- tool "Oracle8"
- name "TriggerForEachSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "ROW"
- value 1701)
- (object Attribute
- tool "Oracle8"
- name "STATEMENT"
- value 1702)))
- (object Attribute
- tool "Oracle8"
- name "TriggerEventSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "INSERT"
- value 1601)
- (object Attribute
- tool "Oracle8"
- name "UPDATE"
- value 1602)
- (object Attribute
- tool "Oracle8"
- name "DELETE"
- value 1603)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR UPDATE"
- value 1604)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR DELETE"
- value 1605)
- (object Attribute
- tool "Oracle8"
- name "UPDATE OR DELETE"
- value 1606)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR UPDATE OR DELETE"
- value 1607)))))
- (object Attribute
- tool "Oracle8"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")
- (object Attribute
- tool "Oracle8"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "NullsAllowed"
- value TRUE)
- (object Attribute
- tool "Oracle8"
- name "Length"
- value "")
- (object Attribute
- tool "Oracle8"
- name "Precision"
- value "2")
- (object Attribute
- tool "Oracle8"
- name "Scale"
- value "6")
- (object Attribute
- tool "Oracle8"
- name "IsIndex"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsPrimaryKey"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "CompositeUnique"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "CheckConstraint"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "ComponentTest"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "cg"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "cg"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "UseMSVC"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value TRUE)
- (object Attribute
- tool "cg"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "compiler2.1__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value FALSE)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue(sizeof($targetClass))")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue(sizeof($targetClass),$limit)")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue(sizeof($targetClass),$limit)")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference($limit)")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference($limit)")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue(sizeof($targetClass))")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue(sizeof($targetClass))")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue(sizeof($qualtype), sizeof($qualcont))")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue(sizeof($qualtype), sizeof($qualcont))")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference(sizeof($qualtype), sizeof($qualcont))")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference(sizeof($qualtype), sizeof($qualcont))")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "compiler3.0__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerAnnotations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowGenerateOverNewerVersion"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value TRUE)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "AlwaysKeepOrphanedCode"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "cg"
- name "ClassKey"
- value "class")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "PutBodiesInSpec"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDefaultConstructor"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "DefaultConstructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ExplicitDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateCopyConstructor"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "CopyConstructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ExplicitCopyConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDestructor"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DestructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "DestructorKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateAssignmentOperation"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "AssignmentVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "AssignmentKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineAssignmentOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateEqualityOperations"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "EqualityVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "EqualityKind"
- value ("FriendKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineEqualityOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateRelationalOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "RelationalVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "RelationalKind"
- value ("FriendKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineRelationalOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateStorageMgmtOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "StorageMgmtVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineStorageMgmtOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateSubscriptOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "SubscriptVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "SubscriptKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "SubscriptResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineSubscriptOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDereferenceOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DereferenceVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "DereferenceKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "DereferenceResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineDereferenceOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateIndirectionOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IndirectionVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "IndirectionKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "IndirectionResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineIndirectionOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateStreamOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "StreamVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineStreamOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ThreeKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)))
- (object Attribute
- tool "cg"
- name "KindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)))
- (object Attribute
- tool "cg"
- name "FriendKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GenerateSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "DeclareAndDefine"
- value 199)
- (object Attribute
- tool "cg"
- name "DeclareOnly"
- value 205)
- (object Attribute
- tool "cg"
- name "DoNotDeclare"
- value 206)))
- (object Attribute
- tool "cg"
- name "VisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)))))
- (object Attribute
- tool "cg"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "cg"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "AllowExtensionlessFileName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "IncludeFormat"
- value (value Text
-|// $package
-|#include "$file"
-|
- ))
- (object Attribute
- tool "cg"
- name "IncludeBySimpleName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludePrecompiledHeader"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludeOrder"
- value "AMIR")
- (object Attribute
- tool "cg"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "InliningStyle"
- value ("InliningStyleSet" 207))
- (object Attribute
- tool "cg"
- name "InliningStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InClassDeclaration"
- value 208)
- (object Attribute
- tool "cg"
- name "FollowingClassDeclaration"
- value 207)))
- (object Attribute
- tool "cg"
- name "TypesDefined"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "IncludeClosure"
- value (value Text ""))))
- (object Attribute
- tool "cg"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.wst.dtd/src/rose/dtdmodel.mdl, org.eclipse.wst.dtd, wtpM1, 20041122"))
- (object Attribute
- tool "cg"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "AllowExtensionlessFileName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludeFormat"
- value (value Text
-|// $package
-|#include "$file"
-|
- ))
- (object Attribute
- tool "cg"
- name "IncludeBySimpleName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludePrecompiledHeader"
- value TRUE)
- (object Attribute
- tool "cg"
- name "IncludeOrder"
- value "AMIR")
- (object Attribute
- tool "cg"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "InliningStyle"
- value ("InliningStyleSet" 207))
- (object Attribute
- tool "cg"
- name "InliningStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InClassDeclaration"
- value 208)
- (object Attribute
- tool "cg"
- name "FollowingClassDeclaration"
- value 207)))
- (object Attribute
- tool "cg"
- name "TypesDefined"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "IncludeClosure"
- value (value Text ""))))
- (object Attribute
- tool "cg"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "OperationKind"
- value ("OperationKindSet" 200))
- (object Attribute
- tool "cg"
- name "OperationKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GenerateAbstractBody"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateFriendBody"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateFriendDecl"
- value FALSE)
- (object Attribute
- tool "cg"
- name "SpecialDeclReturnType"
- value "")
- (object Attribute
- tool "cg"
- name "OperationIsConst"
- value FALSE)
- (object Attribute
- tool "cg"
- name "OperationIsExplicit"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "cg"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "CCRegion"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "BodyAnnotations"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "Ordered"
- value TRUE)
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "InitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$relationship")
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$relationship")
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "cg"
- name "SelectorName"
- value "")
- (object Attribute
- tool "cg"
- name "SelectorType"
- value "")
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HasRelTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Array"
- value 24)
- (object Attribute
- tool "cg"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "cg"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$targetClass")))
- (object Attribute
- tool "cg"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InstanceArguments"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$targetClass")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$target")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "InitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "cg"
- name "ContainerGet"
- value "$data.get($keys)")
- (object Attribute
- tool "cg"
- name "ContainerSet"
- value "$data.set($keys,$value)")
- (object Attribute
- tool "cg"
- name "QualifiedContainer"
- value "")
- (object Attribute
- tool "cg"
- name "AssocClassContainer"
- value "$supplier *")
- (object Attribute
- tool "cg"
- name "AssocClassInitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetSetByReference"
- value ("QualifiedGetSetByReferenceSet" 2))
- (object Attribute
- tool "cg"
- name "QualifiedGetSetByReferenceSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_GetSetByReference"
- value 2)))
- (object Attribute
- tool "cg"
- name "GenerateQualifiedGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "QualifiedGetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "InlineQualifiedGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateQualifiedSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedSetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "QualifiedSetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineQualifiedSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateAssocClassDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberName"
- value "$target")
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AssocClassGetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GenerateAssocClassGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassGetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "AssocClassGetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassGetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "InlineAssocClassGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateAssocClassSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassSetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "AssocClassSetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineAssocClassSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassForwardReferenceOnly"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Array"
- value 24)
- (object Attribute
- tool "cg"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "cg"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$attribute")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtAttributeVisibility"
- value 211)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$attribute")
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$attribute")
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "CCRegion"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "BodyReferenceOnly"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "DirectoryIsOnSearchList"
- value FALSE)
- (object Attribute
- tool "cg"
- name "PrecompiledHeader"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "IsNamespace"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Indent"
- value 2)
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))))
- (object Attribute
- tool "MSVC"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "MSVC"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Version"
- value "5.0")))
- (object Attribute
- tool "MSVC"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCClassTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCClassTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Interface_Part"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Connection_Part"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Class_Factory"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "CObjectFunctionality"
- value ("CObjectFunctionalitySet" 0))
- (object Attribute
- tool "MSVC"
- name "CObjectFunctionalitySet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "None"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Dynamic"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Dyncreate"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Serial"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "GenerateOverrideGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "GenerateDataGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DATA_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateFieldGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_FIELD_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateMessageGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "GenerateMessageMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MESSAGE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "OLEFactory"
- value ("OLEFactorySet" 0))
- (object Attribute
- tool "MSVC"
- name "OLEFactorySet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "None"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Built_in"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Simple"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Licensed"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "OLEName"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLEClassID"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateOLECtlType"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLECtlType"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateOLETypeLib"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLETypeLibID"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLETypeLibMajor"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLETypeLibMinor"
- value "")
- (object Attribute
- tool "MSVC"
- name "GeneratePropPageIDs"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLEPropPageIDs"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateDispatchMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockProperties"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockFunctions"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DispatchDefValue"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateDispIdEnum"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DISP_ID_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInterfaceMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "INTERFACE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "InitInterface"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateEventMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockEvents"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateEventSinkMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "PropNotifySinks"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateConnectionMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "CONNECTION_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "ConnectionPointIID"
- value "")
- (object Attribute
- tool "MSVC"
- name "InheritanceType"
- value "")
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLECommands"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MFCDeclares"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MFCImplements"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "ATL_Declares"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateCOMMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "COM_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateConnectionPointMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "CONNECTION_POINT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateMsgMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GeneratePropertyMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "PROPERTY_MAP_Entries"
- value (value Text ""))))
- (object Attribute
- tool "MSVC"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCOperationTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCOperationTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Virtual_Override"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Message_Handler"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dispatch_Handler"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Event_Firing_Function"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Event_Sink_Handler"
- value 5)
- (object Attribute
- tool "MSVC"
- name "Std_OLE_Method"
- value 6)
- (object Attribute
- tool "MSVC"
- name "Command_Parser"
- value 7)
- (object Attribute
- tool "MSVC"
- name "Property_Get_Function"
- value 8)
- (object Attribute
- tool "MSVC"
- name "Property_Set_Function"
- value 9)
- (object Attribute
- tool "MSVC"
- name "Property_Notify_Function"
- value 10)
- (object Attribute
- tool "MSVC"
- name "Macro_Generated_Function"
- value 11)))
- (object Attribute
- tool "MSVC"
- name "AFX_MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MESSAGE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "BodyImage"
- value (value Text ""))))
- (object Attribute
- tool "MSVC"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "GenerateIncludesGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_INCLUDES_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInsertLocation"
- value FALSE)))
- (object Attribute
- tool "MSVC"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "GenerateIncludesGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_INCLUDES_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInsertLocation"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Rose Model Integrator"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Rose Web Publisher"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "TopLink"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "COM"
- name "propertyId"
- value "783606378")
- (object Attribute
- tool "COM"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "TypeKinds"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "enum"
- value 100)
- (object Attribute
- tool "COM"
- name "record"
- value 101)
- (object Attribute
- tool "COM"
- name "module"
- value 102)
- (object Attribute
- tool "COM"
- name "interface"
- value 103)
- (object Attribute
- tool "COM"
- name "dispinterface"
- value 104)
- (object Attribute
- tool "COM"
- name "coclass"
- value 105)
- (object Attribute
- tool "COM"
- name "alias"
- value 106)
- (object Attribute
- tool "COM"
- name "union"
- value 107)
- (object Attribute
- tool "COM"
- name "max"
- value 108)
- (object Attribute
- tool "COM"
- name "(none)"
- value 109)))
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "kind"
- value ("TypeKinds" 109))
- (object Attribute
- tool "COM"
- name "uuid"
- value "")
- (object Attribute
- tool "COM"
- name "version"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "helpcontext"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")
- (object Attribute
- tool "COM"
- name "dllname"
- value "")
- (object Attribute
- tool "COM"
- name "alias"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "id"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "id"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "COM"
- name "filename"
- value "")
- (object Attribute
- tool "COM"
- name "library"
- value "")
- (object Attribute
- tool "COM"
- name "uuid"
- value "")
- (object Attribute
- tool "COM"
- name "version"
- value "")
- (object Attribute
- tool "COM"
- name "helpstring"
- value "")
- (object Attribute
- tool "COM"
- name "helpfile"
- value "")
- (object Attribute
- tool "COM"
- name "helpcontext"
- value "")
- (object Attribute
- tool "COM"
- name "lcid"
- value "")
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "COM"
- name "attributes"
- value "")))
- (object Attribute
- tool "COM"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Version Control"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "propertyId"
- value "783606378")
- (object Attribute
- tool "Visual Basic"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "UpdateModel"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "InstancingSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "Private"
- value 221)
- (object Attribute
- tool "Visual Basic"
- name "PublicNotCreatable"
- value 213)
- (object Attribute
- tool "Visual Basic"
- name "SingleUse"
- value 214)
- (object Attribute
- tool "Visual Basic"
- name "GlobalSingleUse"
- value 215)
- (object Attribute
- tool "Visual Basic"
- name "MultiUse"
- value 219)
- (object Attribute
- tool "Visual Basic"
- name "GlobalMultiUse"
- value 220)))
- (object Attribute
- tool "Visual Basic"
- name "BaseSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "(none)"
- value 222)
- (object Attribute
- tool "Visual Basic"
- name "0"
- value 223)
- (object Attribute
- tool "Visual Basic"
- name "1"
- value 224)))
- (object Attribute
- tool "Visual Basic"
- name "OptionBase"
- value ("BaseSet" 222))
- (object Attribute
- tool "Visual Basic"
- name "OptionExplicit"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "OptionCompare"
- value ("CompareSet" 202))
- (object Attribute
- tool "Visual Basic"
- name "Instancing"
- value ("InstancingSet" 219))
- (object Attribute
- tool "Visual Basic"
- name "CompareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "(none)"
- value 202)
- (object Attribute
- tool "Visual Basic"
- name "Binary"
- value 203)
- (object Attribute
- tool "Visual Basic"
- name "Text"
- value 204)))))
- (object Attribute
- tool "Visual Basic"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "LibraryName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "AliasName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "IsStatic"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "ReplaceExistingBody"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "DefaultBody"
- value (value Text ""))))
- (object Attribute
- tool "Visual Basic"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "New"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "WithEvents"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "PropertyName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "Subscript"
- value "")))
- (object Attribute
- tool "Visual Basic"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "New"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "WithEvents"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "FullName"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ProcedureID"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "PropertyName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "Subscript"
- value "")))
- (object Attribute
- tool "Visual Basic"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ImplementsDelegation"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "FullName"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Param"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ByVal"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ByRef"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "Optional"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "ParamArray"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ProjectFile"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "UpdateCode"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "UpdateModel"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "ImportReferences"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "QuickImport"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "ImportBinary"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "VisualStudio"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Web Modeler"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "XML_DTD"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "XML_DTD"
- name "Editor"
- value ("EditorType" 100))
- (object Attribute
- tool "XML_DTD"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "XML_DTD"
- name "EditorType"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "BuiltIn"
- value 100)
- (object Attribute
- tool "XML_DTD"
- name "WindowsShell"
- value 101)))))
- (object Attribute
- tool "XML_DTD"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "Entity_SystemID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "Entity_PublicID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "NotationValue"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "InternalValue"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "ParameterEntity"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "ExternalEntity"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "Notation_SystemID"
- value "")
- (object Attribute
- tool "XML_DTD"
- name "Notation_PublicID"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "DefaultDeclType"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "XML_DTD"
- name "Assign All"
- value FALSE)
- (object Attribute
- tool "XML_DTD"
- name "ComponentPath"
- value "")))
- (object Attribute
- tool "XML_DTD"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsPrefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "classifierName"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "operationName"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "attributeName"
- value "")
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnsettable"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isID"
- value FALSE)))
- (object Attribute
- tool "Ecore"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "referenceName"
- value "")
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnsettable"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isResolveProxies"
- value TRUE))))
- quid "3A0C75F401FA"))
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif
deleted file mode 100644
index 64ee536107..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif
deleted file mode 100644
index 7017d91b91..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif
deleted file mode 100644
index 00bb7b475d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif
deleted file mode 100644
index 795eb5e9f4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif
deleted file mode 100644
index 28c2ccb1e7..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif
deleted file mode 100644
index 01f4889869..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif
deleted file mode 100644
index 749acfc9c9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif
deleted file mode 100644
index bc8e66c20f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif
deleted file mode 100644
index 6a91888855..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif
deleted file mode 100644
index d30b26b97a..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif
deleted file mode 100644
index 801c13388d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif
deleted file mode 100644
index 2fb2ca7a92..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif
deleted file mode 100644
index 59096688cc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif
deleted file mode 100644
index 6fd82e60e1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif
deleted file mode 100644
index f849c75d58..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif
deleted file mode 100644
index c9f09459e6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif
deleted file mode 100644
index 5f54702ffc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif
deleted file mode 100644
index ce9df985b8..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif
deleted file mode 100644
index 694c26f273..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif
deleted file mode 100644
index d13ba2e5b0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif
deleted file mode 100644
index 8b2b357f48..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif
deleted file mode 100644
index 96398c0ce1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif
deleted file mode 100644
index 041db277d1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif
deleted file mode 100644
index 5f9658e5b3..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif
deleted file mode 100644
index e7422d7738..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif
deleted file mode 100644
index fb4f9bd29e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif
deleted file mode 100644
index f8d5289f11..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif
deleted file mode 100644
index efa7a38014..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif
deleted file mode 100644
index 358997d294..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif
deleted file mode 100644
index daf514dccd..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif
deleted file mode 100644
index a1ac131e67..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif b/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif
deleted file mode 100644
index 8ed4cb7374..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.core/plugin.properties b/bundles/org.eclipse.wst.dtd.core/plugin.properties
deleted file mode 100644
index 33740d070e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 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
-# Jens Lukowski/Innoopract - initial renaming/restructuring
-#
-###############################################################################
-
-providerName=Eclipse.org
-pluginName=Structured Source DTD Core
-#
-Structured_DTD_Document_Factory_Extension.name=Structured DTD Document Factory Extension
-DTD_Content_Type_Extension_Element.name=DTD
-_DTD_VALIDATOR_NAME = DTD Validator
-_validationMarker.name=DTD Problem
-_taskMarker.name=DTD Task \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.core/plugin.xml b/bundles/org.eclipse.wst.dtd.core/plugin.xml
deleted file mode 100644
index beb460f546..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/plugin.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- class="org.eclipse.wst.dtd.core.internal.modelhandler.ModelHandlerForDTD"
- associatedContentTypeId="org.eclipse.wst.dtd.core.dtdsource"
- id="org.eclipse.wst.dtd.core.internal.modelhandler">
- </modelHandler>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.taskscanner">
- <scanner
- id="org.eclipse.wst.dtd.core.internal.tasks.DTDFileTaskScanner"
- class="org.eclipse.wst.dtd.core.internal.tasks.DTDFileTaskScanner:org.eclipse.wst.dtd.core.taskMarker"
- contentTypeIds="org.eclipse.wst.dtd.core.dtdsource" />
- </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.wst.dtd.core.documentfactories"
- name="%Structured_DTD_Document_Factory_Extension.name">
- <factory
- contentTypeId="org.eclipse.wst.dtd.core.dtdsource"
- class="org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory" />
- </extension>
-
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="dtd" />
- <fileTypes
- type="text"
- extension="mod" />
- <fileTypes
- type="text"
- extension="ent" />
- </extension>
-
- <extension point="org.eclipse.core.runtime.contentTypes">
- <content-type
- file-extensions="dtd,mod,ent"
- priority="normal"
- name="%DTD_Content_Type_Extension_Element.name"
- id="dtdsource"
- base-type="org.eclipse.core.runtime.text"
- default-charset="UTF-8">
- <describer
- class="org.eclipse.wst.dtd.core.internal.content.ContentDescriberForDTD" />
- </content-type>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="dtd"
- class="org.eclipse.wst.dtd.core.internal.emf.util.DTDResourceFactoryImpl">
- </parser>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="ent"
- class="org.eclipse.wst.dtd.core.internal.emf.util.DTDResourceFactoryImpl">
- </parser>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="DTD.xmi"
- class="org.eclipse.wst.dtd.core.internal.emf.impl.DTDPackageImpl">
- </package>
- </extension>
-
- <extension point="org.eclipse.wst.xml.core.documentFactories">
- <factory
- type="dtd, ent, mod, xml"
- class="org.eclipse.wst.dtd.core.internal.contentmodel.CMDocumentFactoryDTD">
- </factory>
- </extension>
-
- <!-- initialize dtd core preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.wst.dtd.core.internal.preferences.DTDCorePreferenceInitializer" />
- </extension>
-
- <!-- ====================================================== -->
- <!-- Register the DTD validator with the (new) validation -->
- <!-- framework. -->
- <!-- ====================================================== -->
- <extension id="dtdDTDValidator" name="%_DTD_VALIDATOR_NAME" point="org.eclipse.wst.validation.validatorV2">
- <validator
- build="true"
- class="org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator"
- manual="true"
- sourceid="org.eclipse.wst.dtd.dtdsourcevalidator"
- version="1"
- markerId="org.eclipse.wst.dtd.core.validationMarker">
- <include>
- <rules>
- <contentType id="org.eclipse.wst.dtd.core.dtdsource"/>
- <fileext caseSensitive="false" ext="dtd"/>
- <fileext caseSensitive="false" ext="ent"/>
- <fileext caseSensitive="false" ext="mod"/>
- </rules>
- </include>
- </validator>
- </extension>
-
- <!-- ====================================================== -->
- <!-- DTD as you type validation -->
- <!-- ====================================================== -->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="total"
- class="org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator"
- id="org.eclipse.wst.dtd.dtdsourcevalidator">
- <contentTypeIdentifier
- id="org.eclipse.wst.dtd.core.dtdsource">
- <partitionType id="org.eclipse.wst.dtd.DEFAULT">
- </partitionType>
- </contentTypeIdentifier>
- </validator>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/AttNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/AttNode.java
deleted file mode 100644
index 2b75366c27..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/AttNode.java
+++ /dev/null
@@ -1,95 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-public final class AttNode {
- //
- // attType
- //
- public static final int CDATA = 0, ID = 1, IDREF = 2, IDREFS = 3, ENTITY = 4, ENTITIES = 5, NMTOKEN = 6, NMTOKENS = 7, NOTATION = 8, ENUMERATION = 9, PEREFERENCE = 10;
-
- //
- // Keep this array in-sync with the ATTTYPE definitions
- //
- private static final String[] fgAttTypeString = {"CDATA", // 0 //$NON-NLS-1$
- "ID", // 1 //$NON-NLS-1$
- "IDREF", // 2 //$NON-NLS-1$
- "IDREFS", // 3 //$NON-NLS-1$
- "ENTITY", // 4 //$NON-NLS-1$
- "ENTITIES", // 5 //$NON-NLS-1$
- "NMTOKEN", // 6 //$NON-NLS-1$
- "NMTOKENS", // 7 //$NON-NLS-1$
- "NOTATION", // 8 //$NON-NLS-1$
- "ENUMERATION", // 9 (replaced with "NMTOKEN" by SAX //$NON-NLS-1$
- // AttributeList handler)
- "%ENTITYREFERENCE;"}; //$NON-NLS-1$
-
- //
- // attDefaultType
- //
- public static final int NOFIXED = 1, // AttValue
- REQUIRED = 2, // #REQUIRED
- IMPLIED = 3, // #IMPLIED
- FIXED = 4; // #FIXED AttValue
-
- public String name = null;
- public String type = null;
- public String defaultType = null;
- public String defaultValue = null;
- public Vector enumList = null; // list of Notations or Enum values
-
- public int getDeclaredType() {
- int t = -1;
- if (type == null)
- return t;
-
- if (type.startsWith("%") && type.endsWith(";")) //$NON-NLS-1$ //$NON-NLS-2$
- return PEREFERENCE;
-
- for (int i = 0; i < fgAttTypeString.length; i++) {
- if (type.equals(fgAttTypeString[i])) {
- t = i;
- break;
- }
- }
- return t;
- }
-
- public Enumeration elements() {
- if (enumList == null)
- enumList = new Vector();
- return enumList.elements();
- }
-
- public int getDefaultType() {
- if (defaultType == null)
- return -1;
-
- if (defaultType.startsWith("%") && defaultType.endsWith(";")) //$NON-NLS-1$ //$NON-NLS-2$
- return PEREFERENCE;
- else if (defaultType.equals("#REQUIRED")) //$NON-NLS-1$
- return REQUIRED;
- else if (defaultType.equals("#IMPLIED")) //$NON-NLS-1$
- return IMPLIED;
- else if (defaultType.equals("#FIXED")) //$NON-NLS-1$
- return FIXED;
- else
- return NOFIXED;
- }
-
- public String toString() {
- return "Att Name: " + name + " Type: " + type + " defaultType: " + defaultType + " defaultValue: " + defaultValue; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/Attlist.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/Attlist.java
deleted file mode 100644
index fb77a18b78..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/Attlist.java
+++ /dev/null
@@ -1,146 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-public class Attlist extends BaseNode {
- Vector attDefs = new Vector();
-
- /**
- * Constructor.
- *
- * @param name
- * This attribute list's name; this value is also known as the
- * Element type.
- */
- public Attlist(String name, String ownerDTD) {
- this(name, ownerDTD, null, null);
- }
-
- public Attlist(String name, String ownerDTD, String comment, ErrorMessage errorMessage) {
- super(name, ownerDTD, comment, errorMessage);
- }
-
-
- /**
- * Adds the specified attribute definition to the end of this attribute
- * list .
- *
- * @param attDef
- * Attribute definition to add to this atribute list.
- * @return =true if the attribute definition does not already exist in
- * this attribute list; otherwise, =false.
- * @see #elementAt
- * @see #getAttDef
- * @see #contains
- * @see #size
- */
- public boolean addElement(AttNode attDef) {
- if (contains(attDef.name))
- return false;
- this.attDefs.addElement(attDef);
- return true;
- }
-
- /**
- * Returns the attribute definition at the specified <var>index</var> in
- * this attribute list
- *
- * @param index
- * Index into this list of attribute definitions.
- * @return Attribute definition at the specified index, or <var>null</var>
- * if an invalid index.
- * @see #addElement
- * @see #getAttDef
- * @see #contains
- * @see #size
- */
- public AttNode elementAt(int index) {
- return (AttNode) this.attDefs.elementAt(index);
- }
-
- /**
- * Returns the attribute definition that matches the specified attribute
- * definition name in this attribute list.
- *
- * @param attDefName
- * Attribute definition name to match in this attribute list.
- * @return The matching attribute definition, or <var>null</var> if the
- * attribute is not currently defined.
- * @see #addElement
- * @see #elementAt
- * @see #contains
- * @see #size
- * @see #elements
- */
- public AttNode getAttDef(String attDefName) {
- for (int i = 0; i < size(); i++) {
- AttNode ad = elementAt(i);
- if (attDefName.equals(ad.name))
- return ad;
- }
- return null;
- }
-
- /**
- * Returns whether the specified attribute definition name is currently
- * defined in this attribute list.
- *
- * @param attDefName
- * Attribute definition name to match in this attribute list.
- * @return =true if <var>attDefName</var> is defined; otherwise, =false.
- * @see #addElement
- * @see #elementAt
- * @see #getAttDef
- * @see #size
- * @see #elements
- */
- public boolean contains(String attDefName) {
- return null != getAttDef(attDefName);
- }
-
- /**
- * Returns the number of attribute definitions in this attribute list.
- *
- * @return Number of attribute list definitions, or <var>null</var> if no
- * definitions defined.
- * @see #addElement
- * @see #elementAt
- * @see #getAttDef
- * @see #contains
- */
- public int size() {
- return this.attDefs.size();
- }
-
- /**
- * Returns an enumeration of all attribute definitions in this attribute
- * list.
- *
- * @return An enumeration of all attribute definitions, or <var>null</var>
- * if none specified.
- * @see #addElement
- * @see #elementAt
- * @see #getAttDef
- * @see #contains
- * @see #size
- */
- public Enumeration elements() {
- return this.attDefs.elements();
- }
-
- void setAttDefs(Vector attrs) {
- attDefs = attrs;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/BaseNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/BaseNode.java
deleted file mode 100644
index 39b39bc528..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/BaseNode.java
+++ /dev/null
@@ -1,66 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-
-public abstract class BaseNode {
- protected String name = null;
- protected ErrorMessage errorMessage = null;
- // protected String errorMessage = null;
- protected String comment = null;
- protected String ownerDTD = null;
-
- /** Default constructor. */
- public BaseNode(String name, String ownerDTD) {
- this(name, ownerDTD, null, null);
- }
-
- public BaseNode(String name, String ownerDTD, String comment, ErrorMessage errorMessage) {
- this.name = name;
- this.ownerDTD = ownerDTD;
- this.comment = comment;
- this.errorMessage = errorMessage;
- }
-
- public String getNodeName() {
- return name;
- }
-
- public void setNodeName(String name) {
- this.name = name;
- }
-
- public String getOwnerDTD() {
- return ownerDTD;
- }
-
- public void setOwnerDTD(String owner) {
- ownerDTD = owner;
- }
-
- public String getComment() {
- return comment;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- public ErrorMessage getErrorMessage() {
- return errorMessage;
- }
-
- public void setErrorMessage(ErrorMessage message) {
- errorMessage = message;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMBasicNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMBasicNode.java
deleted file mode 100644
index 15c0fc13d0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMBasicNode.java
+++ /dev/null
@@ -1,42 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public class CMBasicNode extends CMNode {
- private int type = CMNodeType.EMPTY; // possible types :
-
- // CMNodeType.EMPTY
- // CMNodeType.ANY
- // CMNodeType.PCDATA
-
- /** Default constructor. */
- public CMBasicNode(String refName) {
- super(refName);
- }
-
- public CMBasicNode(String refName, int type) {
- super(refName);
- this.type = type;
- }
-
- public int getType() {
- return type;
- }
-
- public void setType(int type) {
- this.type = type;
- }
-
- public String toString() {
- return " BasicNodeName: " + getName() + " Type: " + getType() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMGroupNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMGroupNode.java
deleted file mode 100644
index 7be202bb43..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMGroupNode.java
+++ /dev/null
@@ -1,62 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-public class CMGroupNode extends CMRepeatableNode {
- private int type = CMNodeType.GROUP;
- private int groupKind = CMNodeType.GROUP_SEQUENCE;
- private Vector children = new Vector();
-
- public CMGroupNode() {
- super("GROUP"); //$NON-NLS-1$
- }
-
- public int getType() {
- return type;
- }
-
- // implement super class
- public void setType(int type) {
- // can't change - only one type allows
- }
-
- public int getGroupKind() {
- return groupKind;
- }
-
- public void setGroupKind(int kind) {
- groupKind = kind;
- }
-
- public Vector getChildren() {
- return children;
- }
-
- public void addChild(CMNode child) {
- children.addElement(child);
- }
-
- public String toString() {
- String result = "Group ( - kind: " + getGroupKind() + " OccType: " + getOccurrence() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- Enumeration en = children.elements();
- while (en.hasMoreElements()) {
- result += " " + en.nextElement(); //$NON-NLS-1$
- }
-
- result += "Group )"; //$NON-NLS-1$
- return result;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNode.java
deleted file mode 100644
index 831bca5cdb..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNode.java
+++ /dev/null
@@ -1,30 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public abstract class CMNode {
- private String refName;
-
- /** Default constructor. */
- public CMNode(String refName) {
- this.refName = refName;
- }
-
- public String getName() {
- return refName;
- }
-
- public abstract int getType();
-
- public abstract void setType(int type);
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNodeType.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNodeType.java
deleted file mode 100644
index 12a8d8608b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNodeType.java
+++ /dev/null
@@ -1,30 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public interface CMNodeType {
- static public int EMPTY = 1;
- static public int ANY = 2;
- static public int PCDATA = 3;
- static public int ELEMENT_REFERENCE = 4;
- static public int ENTITY_REFERENCE = 5;
- static public int GROUP = 6;
-
- static public int ONE = 7;
- static public int OPTIONAL = 8;
- static public int ONE_OR_MORE = 9;
- static public int ZERO_OR_MORE = 10;
-
- static public int GROUP_CHOICE = 11;
- static public int GROUP_SEQUENCE = 12;
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMReferenceNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMReferenceNode.java
deleted file mode 100644
index 52788f9bd6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMReferenceNode.java
+++ /dev/null
@@ -1,38 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public class CMReferenceNode extends CMRepeatableNode {
- private int type = CMNodeType.ELEMENT_REFERENCE;
-
- public CMReferenceNode(String refName) {
- this(refName, CMNodeType.ELEMENT_REFERENCE);
- }
-
- public CMReferenceNode(String refName, int type) {
- super(refName);
- this.type = type;
- }
-
-
- public int getType() {
- return type;
- }
-
- public void setType(int type) {
- this.type = type;
- }
-
- public String toString() {
- return " RefName: " + getName() + " Type: " + getType() + " OccType: " + getOccurrence() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMRepeatableNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMRepeatableNode.java
deleted file mode 100644
index 056d962b63..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMRepeatableNode.java
+++ /dev/null
@@ -1,34 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public abstract class CMRepeatableNode extends CMNode {
- private int occType = CMNodeType.ONE;
-
- public CMRepeatableNode(String refName) {
- super(refName);
- }
-
- public CMRepeatableNode(String refName, int occType) {
- super(refName);
- this.occType = occType;
- }
-
- public int getOccurrence() {
- return occType;
- }
-
- public void setOccurrence(int occType) {
- this.occType = occType;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTD.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTD.java
deleted file mode 100644
index e1509b3bf4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTD.java
+++ /dev/null
@@ -1,89 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-public class DTD {
- //
- // Constants
- //
-
- Vector externalElements = new Vector();
- String name = null;
-
- boolean isExceptionDuringParse = false;
-
- //
- // Constructors
- //
-
- /**
- * Constructor.
- */
-
- /**
- * Constructor.
- *
- * @param name
- * The file name of this DTD.
- * @see #getName
- * @see #setName
- */
- public DTD(String name) {
- this.name = name;
- }
-
- /**
- * Returns this DTD's file name.
- *
- * @return This DTD's file name, or <var>null</var> if no name.
- */
- public String getName() {
- return this.name;
- }
-
- /**
- * Sets this DTD's file name.
- *
- * @param name
- * This DTD's name.
- * @see #getName
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Returns an Enumeration instance of all external subset children of this
- * DTD.
- *
- * @return An enumeration of all external subset children of this DTD.
- */
- public Enumeration externalElements() {
- return externalElements.elements();
- }
-
- public void addDecl(BaseNode decl) {
- externalElements.addElement(decl);
- }
-
- public void setIsExceptionDuringParse(boolean on) {
- isExceptionDuringParse = on;
- }
-
- public boolean getIsExceptionDuringParse() {
- return isExceptionDuringParse;
- }
-
-} // class DTD
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java
deleted file mode 100644
index 84a66a9227..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java
+++ /dev/null
@@ -1,768 +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.wst.dtd.core.internal.saxparser;
-
-import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Stack;
-import java.util.Vector;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.xml.core.internal.validation.core.LazyURLInputStream;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.DeclHandler;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class DTDParser extends DefaultHandler implements ContentHandler, DTDHandler, ErrorHandler, DeclHandler, LexicalHandler {
- private String contentString = ""; //$NON-NLS-1$
- private String declString = ""; //$NON-NLS-1$
-
- /* Canonical output. */
- protected boolean canonical;
-
- protected XMLReader reader;
- int entityDepth;
-
- // dmw 11/15 private field never read locally
- // private Vector declElements;
- private String comment = null;
- private ErrorMessage errorMessage = null;
- private List errorMessages = new ArrayList();
- private DeclNode previousDeclNode = null;
- private DeclNode currentDeclNode = null;
- private BaseNode lastBaseNode = null;
-
- private boolean entityEnd = false;
- private int lineNumber;
-
- private DTD currentDTD = null;
- private Vector dtdList = new Vector();
-
- private Stack dtdStack = new Stack();
- private Stack peRefStack = new Stack();
- private Stack parsingPERefStack = new Stack();
-
- private EntityPool entityPool = new EntityPool();
- private String expandedEntityValue = null;
- private Hashtable elementPool = new Hashtable();
-
- boolean parsingExternalPEReference = false;
- protected boolean expandEntityReferences = true;
-
- private Locator locator = null;
-
- private Locator getLocator() {
- return locator;
- }
-
- public void setDocumentLocator(Locator locator) {
- this.locator = locator;
- }
-
- public DTDParser(boolean canonical) throws UnsupportedEncodingException {
- this(null, canonical);
- }
-
- protected DTDParser(String encoding, boolean canonical) throws UnsupportedEncodingException {
-
- if (encoding == null)
- encoding = "UTF-8"; //$NON-NLS-1$
-
- this.canonical = canonical;
- try {
- SAXParser sparser = SAXParserFactory.newInstance().newSAXParser();
- reader = sparser.getXMLReader();
- reader.setProperty("http://xml.org/sax/properties/declaration-handler", this); //$NON-NLS-1$
- reader.setProperty("http://xml.org/sax/properties/lexical-handler", this); //$NON-NLS-1$
- reader.setContentHandler(this);
- reader.setDTDHandler(this);
- reader.setErrorHandler(this);
- reader.setEntityResolver(this);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-
- /* Prints the output from the SAX callbacks. */
- public void parse(String logicalURI) {
- try {
- // CS ensure that the physical URI is considered where streams are required
- // and the logicalURI is used as the DTD's baseLocation
- String physicalURI = URIResolverPlugin.createResolver().resolvePhysicalLocation("", "", logicalURI); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isReadable = URIHelper.isReadableURI(physicalURI, true);
- if (!isReadable) {
- throw new Exception("DTD parse error. Can not read the specified URI : " + logicalURI); //$NON-NLS-1$
- }
- String document = "<!DOCTYPE root SYSTEM \"" + logicalURI + "\"><root/>"; //$NON-NLS-1$ //$NON-NLS-2$
- entityDepth = 0;
- currentDTD = new DTD(logicalURI);
- InputSource inputSource = new InputSource(new StringReader(document));
- inputSource.setSystemId(logicalURI + ".xml"); //$NON-NLS-1$
- reader.parse(inputSource);
- }
- catch (SAXParseException se) {
- if (currentDTD != null)
- currentDTD.setIsExceptionDuringParse(true);
- }
- catch (Exception e) {
- if (currentDTD != null)
- currentDTD.setIsExceptionDuringParse(true);
- }
-
- }
-
- /*
- * @deprecated Entity references are always expanded.
- */
- public void setExpandEntityReferences(boolean expandEntityReferences) {
- this.expandEntityReferences = true;
- }
-
- /*
- * @deprecated Entity references are always expanded.
- */
- public boolean getExpandEntityReferences() {
- return expandEntityReferences;
- }
-
- public Vector getDTDList() {
- return dtdList;
- }
-
- public Hashtable getElementPool() {
- return elementPool;
- }
-
- public EntityPool getEntityPool() {
- return entityPool;
- }
-
- public List getErrorMessages() {
- return errorMessages;
- }
-
- //
- // DocumentHandler methods
- //
-
- public void startDocument() {
- }
-
- public void endDocument() {
- }
-
- public void processingInstruction(String target, String data) {
- }
-
- //
- // DTDHandler methods
- //
-
- public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException {
- }
-
- public void notationDecl(String name, String publicId, String systemId) throws SAXException {
- startDeclaration(DeclNode.NOTATION);
- declString = "<!NOTATION"; //$NON-NLS-1$
- if (entityDepth == 1 || parsingExternalPEReference) {
- String xs = " "; //$NON-NLS-1$
- xs += name;
- if (publicId == null)
- xs += " SYSTEM " + "\"" + systemId + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- else
- xs += " PUBLIC " + "\"" + publicId + "\" " + "\"" + systemId + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- contentString += xs;
- parseCurrentDeclaration();
- }
- }
-
- //
- // DeclHandler methods
- //
-
- public void elementDecl(String name, String model) throws SAXException {
- startDeclaration(DeclNode.ELEMENT);
- declString = "<!ELEMENT"; //$NON-NLS-1$
-
- // KB: With early versions of Xerces 2.x, startEntity("[dtd]") used to
- // be called before this method
- // so entityDepth was 1. Using JAXP changed that and startEntity() is
- // not called back anymore.
- // Because of this, we need to handle the case where entityDepth == 0
- // as well.
- if (entityDepth == 0 || entityDepth == 1 || parsingExternalPEReference)
- parseCurrentDeclarationHelper(name + " " + model); //$NON-NLS-1$
- }
-
- protected String attributeString = ""; //$NON-NLS-1$
-
- public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException {
- startDeclaration(DeclNode.ATTLIST);
- declString = "<!ATTLIST"; //$NON-NLS-1$
-
- attributeString += " " + aName; //$NON-NLS-1$
- if (type != null)
- attributeString += " " + type; //$NON-NLS-1$
- if (valueDefault != null)
- attributeString += " " + valueDefault; //$NON-NLS-1$
- if (value != null)
- attributeString += " '" + value + "'"; //$NON-NLS-1$ //$NON-NLS-2$
-
- attributeString = eName + " " + attributeString + ">"; //$NON-NLS-1$ //$NON-NLS-2$
- parseCurrentDeclarationHelper(attributeString);
- attributeString = ""; //$NON-NLS-1$
- }
-
- public void internalEntityDecl(String name, String value) throws SAXException {
- startDeclaration(DeclNode.INTERNAL_ENTITY);
- declString = "<!ENTITY"; //$NON-NLS-1$
-
- if (entityDepth == 1 || parsingExternalPEReference) {
- // build up a string: e.g. " % STRDOM "(#PCDATA)">"
- String xs = " "; //$NON-NLS-1$
- if (name.startsWith("%")) { //$NON-NLS-1$
- xs += "% "; //$NON-NLS-1$
- xs += name.substring(1);
- }
- else
- xs += name;
-
- xs += " \"" + value + "\">"; //$NON-NLS-1$ //$NON-NLS-2$
-
- contentString += xs;
- // save expanded entity value
- expandedEntityValue = value;
- parseCurrentDeclaration();
-
- }
- }
-
- public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException {
- startDeclaration(DeclNode.EXTERNAL_ENTITY);
- declString = "<!ENTITY"; //$NON-NLS-1$
-
- if (entityDepth == 1 || parsingExternalPEReference) {
- // build up a string:
- // ex1) " % FIELD SYSTEM "oagis_fields.dtd">"
- // ex2) " % FIELD PUBLIC "FOO">"
- String xs = " "; //$NON-NLS-1$
- if (name.startsWith("%")) { //$NON-NLS-1$
- xs += "% "; //$NON-NLS-1$
- xs += name.substring(1);
- }
- else
- xs += name;
-
- if (systemId != null)
- xs += " SYSTEM \"" + systemId + "\">"; //$NON-NLS-1$ //$NON-NLS-2$
- else if (publicId != null)
- xs += " PUBLIC \"" + publicId + "\">"; //$NON-NLS-1$ //$NON-NLS-2$
-
- contentString += xs;
- parseCurrentDeclaration();
- }
- }
-
- //
- // LexicalHandler methods
- //
-
- public void startCDATA() throws SAXException {
- }
-
- public void endCDATA() throws SAXException {
- }
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException {
- dtdList.removeAllElements();
- dtdList.addElement(currentDTD);
- }
-
- /**
- * Report the end of DTD declarations.
- *
- * @exception SAXException
- * The application may raise an exception.
- * @see #startDTD
- */
- public void endDTD() throws SAXException {
- startDeclaration(DeclNode.END_DTD);
- }
-
- /**
- * Report the beginning of an entity.
- *
- * The start and end of the document entity are not reported. The start
- * and end of the external DTD subset are reported using the pseudo-name
- * "[dtd]". All other events must be properly nested within start/end
- * entity events.
- *
- * @param name
- * The name of the entity. If it is a parameter entity, the
- * name will begin with '%'.
- * @exception SAXException
- * The application may raise an exception.
- * @see #endEntity
- */
-
- public void startEntity(String name) throws SAXException {
- if (name.equals("[dtd]")) { //$NON-NLS-1$
- startDeclaration(DeclNode.START_ENTITY_DTD);
- }
- else if (currentDeclNode == null) {
- // PE reference in markupdecl section
- if (name.startsWith("%")) { //$NON-NLS-1$
- String peName = name.substring(1);
- EntityDecl en = entityPool.referPara(peName);
-
- peRefStack.push(name);
- parsingPERefStack.push(new Boolean(parsingExternalPEReference));
-
- String systemId = en.getSystemId();
- String publicId = en.getPublicId();
- if (systemId == null) {
- parsingExternalPEReference = false;
- }
- else {
- URIResolver idResolver = URIResolverPlugin.createResolver();
- String uri = idResolver.resolve(currentDTD.getName(), publicId, systemId);
- if (!isDTDLoaded(uri)) {
- // not loaded
- // out.println(" DTD not loaded .. create new DTD: "
- // );
- dtdStack.push(currentDTD);
- DTD newDTD = new DTD(uri);
- dtdList.addElement(newDTD);
- currentDTD = newDTD;
- parsingExternalPEReference = true;
- }
- else {
- // out.println(" DTD already loaded .. " );
- parsingExternalPEReference = false;
- }
- }
- }
- }
- else if (entityDepth == 1 || parsingExternalPEReference) {
- String xs = (String) reader.getProperty("http://xml.org/sax/properties/xml-string"); //$NON-NLS-1$
- contentString += xs;
- }
- entityDepth++;
- }
-
- /**
- * Report the end of an entity.
- *
- * @param name
- * The name of the entity that is ending.
- * @exception SAXException
- * The application may raise an exception.
- * @see #startEntity
- */
- public void endEntity(String name) throws SAXException {
- if (name.equals("[dtd]")) { //$NON-NLS-1$
- startDeclaration(DeclNode.END_ENTITY_DTD);
- }
- else if (!peRefStack.empty()) {
- parseExternalPEReference(name);
- }
- else if (entityDepth == 1 || parsingExternalPEReference) {
- if (!contentString.endsWith(name + ";")) { //$NON-NLS-1$
- String xs = (String) reader.getProperty("http://xml.org/sax/properties/xml-string"); //$NON-NLS-1$
- contentString += xs;
- }
- }
- entityDepth--;
- entityEnd = true;
- }
-
- protected boolean parseExternalPEReference(String name) {
- if (!peRefStack.empty()) {
- if (((String) peRefStack.peek()).equals(name)) {
- peRefStack.pop();
- if (parsingExternalPEReference) {
- currentDTD = (DTD) dtdStack.pop();
- addPEReferenceNode(name);
- }
- parsingExternalPEReference = ((Boolean) parsingPERefStack.pop()).booleanValue();
- return true;
- }
- }
- return false;
- }
-
- /**
- * Report an XML comment anywhere in the document.
- *
- * This callback will be used for comments inside or outside the document
- * element, including comments in the external DTD subset (if read).
- *
- * @param ch
- * An array holding the characters in the comment.
- * @param start
- * The starting position in the array.
- * @param length
- * The number of characters to use from the array.
- * @exception SAXException
- * The application may raise an exception.
- */
- public void comment(char ch[], int start, int length) throws SAXException {
- startDeclaration(DeclNode.COMMENT);
-
- if (comment == null)
- comment = new String(ch, start, length);
- else
- comment += "\n" + new String(ch, start, length); // append all comments. //$NON-NLS-1$
- // The comment will get reset after
- // it has been attached to the following
- // declaration.
- }
-
- //
- // ErrorHandler methods
- //
-
- /* Warning. */
- public void warning(SAXParseException ex) {
- String error = "[Source Line] " + declString + contentString + "\n"; //$NON-NLS-1$//$NON-NLS-2$
- error += "[Warning ] " + getLocationString(ex) + ": " + ex.getMessage(); //$NON-NLS-1$//$NON-NLS-2$
- setErrorInformation(ex, "warning"); //$NON-NLS-1$
-
- parseCurrentDeclaration();
- }
-
- /* Error. */
- public void error(SAXParseException ex) {
- String error = "[Source Line] " + declString + contentString + "\n"; //$NON-NLS-1$//$NON-NLS-2$
- error += "[Error ] " + getLocationString(ex) + ": " + ex.getMessage(); //$NON-NLS-1$//$NON-NLS-2$
- setErrorInformation(ex, "error"); //$NON-NLS-1$
-
- parseCurrentDeclaration();
- }
-
- /* Fatal error. */
- public void fatalError(SAXParseException ex) throws SAXException {
- String error = "[Source Line] " + declString + contentString + "\n"; //$NON-NLS-1$//$NON-NLS-2$
- error += "[Fatal Error] " + getLocationString(ex) + ": " + ex.getMessage(); //$NON-NLS-1$//$NON-NLS-2$
- setErrorInformation(ex, "fatal"); //$NON-NLS-1$
-
- parseCurrentDeclaration();
- }
-
- /* Returns a string of the location. */
- private String getLocationString(SAXParseException ex) {
- StringBuffer str = new StringBuffer();
-
- String systemId = ex.getSystemId();
- if (systemId != null) {
- int index = systemId.lastIndexOf('/');
- if (index != -1)
- systemId = systemId.substring(index + 1);
- str.append(systemId);
- }
- str.append(':');
- str.append(ex.getLineNumber());
- str.append(':');
- str.append(ex.getColumnNumber());
-
- return str.toString();
-
- }
-
- private void startDeclaration(int type) {
- if (type == DeclNode.END_DTD || type == DeclNode.END_ENTITY_DTD || type == DeclNode.COMMENT || type == DeclNode.ERROR) {
- previousDeclNode = currentDeclNode;
- currentDeclNode = null;
- }
- else {
- currentDeclNode = new DeclNode(type);
- contentString = ""; //$NON-NLS-1$
- declString = ""; //$NON-NLS-1$
- expandedEntityValue = null;
- }
- }
-
- private void parseCurrentDeclaration() {
- parseCurrentDeclarationHelper(contentString);
- contentString = ""; //$NON-NLS-1$
- }
-
- private void parseCurrentDeclarationHelper(String declarationString) {
- DTDScanner scanner;
- String name;
-
- if (currentDeclNode == null && previousDeclNode != null && entityEnd) {
- currentDeclNode = previousDeclNode;
- }
-
- // save the previous declNode
- if (currentDeclNode != null) {
- BaseNode baseNode = null;
- // strip out the ending markup symbol ">"
- if (declarationString.endsWith(">")) //$NON-NLS-1$
- declarationString = declarationString.substring(0, declarationString.length() - 1);
-
- int sIndex;
- String cString;
- int type = currentDeclNode.getType();
- switch (type) {
- case DeclNode.ELEMENT : {
- name = TString.word(declarationString, 1);
-
- // strip out the name
- sIndex = declarationString.indexOf(name) + name.length();
- cString = declarationString.substring(sIndex);
-
- baseNode = new ElementDecl(name, currentDTD.getName());
- scanner = new DTDScanner(currentDTD.getName(), cString);
- CMNode contentModel = scanner.scanContentModel();
- if (contentModel == null && errorMessage == null) {
- createErrorMessage("Expecting '(' in content model", "error"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- ((ElementDecl) baseNode).setContentModelNode(contentModel);
- elementPool.put(name, baseNode);
- break;
- }
- case DeclNode.INTERNAL_ENTITY :
- case DeclNode.EXTERNAL_ENTITY : {
- if (!parseExternalPEReference(declarationString)) {
- scanner = new DTDScanner(currentDTD.getName(), declarationString);
- baseNode = scanner.scanEntityDecl();
- // System.out.println("----baseNode (" +
- // declarationString + ")" + baseNode);
- if (type == DeclNode.INTERNAL_ENTITY && expandedEntityValue != null) {
- ((EntityDecl) baseNode).expandedValue = expandedEntityValue;
- }
- if (baseNode != null) {
- entityPool.add((EntityDecl) baseNode);
- }
- }
-
- break;
- }
- case DeclNode.NOTATION : {
- scanner = new DTDScanner(currentDTD.getName(), declarationString);
- baseNode = scanner.scanNotationDecl();
- break;
- }
- case DeclNode.ATTLIST : {
- name = TString.word(declarationString, 1);
-
- // strip out the name
- sIndex = declarationString.indexOf(name) + name.length();
- cString = declarationString.substring(sIndex);
-
- baseNode = new Attlist(name, currentDTD.getName());
- scanner = new DTDScanner(currentDTD.getName(), cString.trim());
- Vector attrs = scanner.scanAttlistDecl(entityPool);
- String errorString = scanner.getErrorString();
-
- if (attrs.size() > 0) {
- ((Attlist) baseNode).setAttDefs(attrs);
- }
- if (errorString != null) {
- createErrorMessage(errorString, "error"); //$NON-NLS-1$
- }
- break;
- }
- default : {
- currentDeclNode = null;
- }
- }
-
- if (baseNode != null) {
- if (comment != null) {
- baseNode.setComment(comment);
- comment = null;
- }
-
- if (errorMessage != null) {
- baseNode.setErrorMessage(errorMessage);
- errorMessage = null;
- }
-
- if (currentDeclNode != null) {
- currentDTD.addDecl(baseNode);
- }
- lastBaseNode = baseNode;
- }
-
- currentDeclNode = null;
- }
- else {
- if (lastBaseNode != null && errorMessage != null && lastBaseNode.getErrorMessage() == null) {
- lastBaseNode.setErrorMessage(errorMessage);
- errorMessage = null;
- }
- }
- }
-
- private void addPEReferenceNode(String name) {
- if (name.startsWith("%")) { //$NON-NLS-1$
- name = name.substring(1); // strip out the % from entity name
- }
- EntityDecl e = new EntityDecl(name, currentDTD.getName(), null, true);
- e.setEntityReferenced(true);
- e.setErrorMessage(errorMessage);
- errorMessage = null;
- currentDTD.addDecl(e);
- }
-
- private boolean isDTDLoaded(String uri) {
- boolean loaded = false;
- String list = ""; //$NON-NLS-1$
- if (dtdList != null) {
- Enumeration en = dtdList.elements();
- while (en.hasMoreElements()) {
- DTD dtd = (DTD) en.nextElement();
- list += dtd.getName();
- list += ","; //$NON-NLS-1$
- if (dtd.getName().equals(uri)) {
- loaded = true;
- break;
- }
- }
- }
- return loaded;
- }
-
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
- InputSource result = null;
- URIResolver idResolver = URIResolverPlugin.createResolver();
- String logicalURI = idResolver.resolve(currentDTD.getName(), publicId, systemId);
- // bug 113537, ensure physical resolution gets done here
- // right before we attempt to open a stream
- String physicalURI = idResolver.resolvePhysicalLocation(currentDTD.getName(), publicId, logicalURI);
- result = new InputSource(logicalURI);
- if(!(physicalURI == null || physicalURI.equals("") || URIHelper.hasProtocol(physicalURI))) //$NON-NLS-1$
- {
- physicalURI = "file:///" + physicalURI; //$NON-NLS-1$
- }
- result.setByteStream(new LazyURLInputStream(physicalURI));
- return result;
- }
-
- //
- // Main
- //
-
- /** Main program entry point. */
- public static void main(String argv[]) {
-
- // is there anything to do?
- if (argv.length == 0) {
- printUsage();
- System.exit(1);
- }
-
- // vars
- boolean canonical = false;
- boolean expandEntityReferences = false;
- DTDParser parser;
-
- // check parameters
- for (int i = 0; i < argv.length; i++) {
- String arg = argv[i];
-
- // options
- if (arg.startsWith("-")) { //$NON-NLS-1$
-
- if (arg.equals("-c")) { //$NON-NLS-1$
- canonical = true;
- continue;
- }
-
- if (arg.equals("-x")) { //$NON-NLS-1$
- expandEntityReferences = true;
- continue;
- }
-
- if (arg.equals("-h")) { //$NON-NLS-1$
- printUsage();
- System.exit(1);
- }
- }
- try {
- parser = new DTDParser(canonical);
- parser.setExpandEntityReferences(expandEntityReferences);
- parser.parse(arg);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- } // main(String[])
-
- /** Prints the usage. */
- private static void printUsage() {
-
- System.err.println("usage: java sax.DTDParser (options) uri ..."); //$NON-NLS-1$
- System.err.println();
- System.err.println("options:"); //$NON-NLS-1$
- System.err.println(" -c Canonical XML output."); //$NON-NLS-1$
- System.err.println(" -x Expand entity references."); //$NON-NLS-1$
- System.err.println(" -h This help screen."); //$NON-NLS-1$
-
- } // printUsage()
-
- private void setErrorInformation(SAXParseException ex, String severity) {
- errorMessage = new ErrorMessage();
-
- if (ex.getLineNumber() == -1) {
- errorMessage.setErrorLine(lineNumber);
- }
- else {
- errorMessage.setErrorLine(ex.getLineNumber());
- }
-
-
- errorMessage.setErrorMessage(ex.getMessage());
- errorMessage.setErrorColumn(ex.getColumnNumber());
- errorMessage.setSeverity(severity);
- errorMessages.add(errorMessage);
- }
-
- private void createErrorMessage(String message, String severity) {
- errorMessage = new ErrorMessage();
-
- Locator locator = getLocator();
-
- errorMessage.setErrorLine(locator.getLineNumber());
- errorMessage.setErrorColumn(locator.getColumnNumber());
-
- errorMessage.setErrorMessage(message);
- errorMessage.setSeverity(severity);
-
- errorMessages.add(errorMessage);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDSaxArtifactVisitor.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDSaxArtifactVisitor.java
deleted file mode 100644
index 829063cede..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDSaxArtifactVisitor.java
+++ /dev/null
@@ -1,64 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-import java.util.Enumeration;
-
-
-
-public class DTDSaxArtifactVisitor {
- public void visitDTD(DTD dtd) {
- Enumeration en = dtd.externalElements();
-
- while (en.hasMoreElements()) {
- Object e = en.nextElement();
- if (e instanceof EntityDecl) {
- visitEntityDecl((EntityDecl) e);
- }
- else if (e instanceof ElementDecl) {
- visitElementDecl((ElementDecl) e);
- }
- else if (e instanceof NotationDecl) {
- visitNotationDecl((NotationDecl) e);
- }
- }
- }
-
- public void visitNotationDecl(NotationDecl notation) {
- }
-
- public void visitElementDecl(ElementDecl element) {
- }
-
- public void visitEntityDecl(EntityDecl entity) {
- if (entity.isEntityReferenced()) {
- visitParameterEntityReferenceDecl(entity);
- }
- else {
- if (entity.isExternal()) {
- visitExternalEntityDecl(entity);
- }
- else {
- visitInternalEntityDecl(entity);
- }
- }
- }
-
- public void visitParameterEntityReferenceDecl(EntityDecl entity) {
- }
-
- public void visitExternalEntityDecl(EntityDecl entity) {
- }
-
- public void visitInternalEntityDecl(EntityDecl entity) {
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDScanner.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDScanner.java
deleted file mode 100644
index 865cef1903..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDScanner.java
+++ /dev/null
@@ -1,1128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.dtd.core.internal.saxparser;
-
-import java.util.Vector;
-
-/**
- * Scanning / parsing the content string from the Decl statement
- *
- * @version
- */
-public class DTDScanner {
- // element content model strings
- private static final char[] empty_string = {'E', 'M', 'P', 'T', 'Y'};
- private static final char[] any_string = {'A', 'N', 'Y'};
- private static final char[] pcdata_string = {'#', 'P', 'C', 'D', 'A', 'T', 'A'};
-
- // attribute type and default type strings
- private static final char[] cdata_string = {'C', 'D', 'A', 'T', 'A'};
- private static final char[] id_string = {'I', 'D'};
- private static final char[] ref_string = {'R', 'E', 'F'};
- private static final char[] entit_string = {'E', 'N', 'T', 'I', 'T'};
- private static final char[] ies_string = {'I', 'E', 'S'};
- private static final char[] nmtoken_string = {'N', 'M', 'T', 'O', 'K', 'E', 'N'};
- private static final char[] notation_string = {'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N'};
- private static final char[] required_string = {'#', 'R', 'E', 'Q', 'U', 'I', 'R', 'E', 'D'};
- private static final char[] implied_string = {'#', 'I', 'M', 'P', 'L', 'I', 'E', 'D'};
- private static final char[] fixed_string = {'#', 'F', 'I', 'X', 'E', 'D'};
-
- private static final char[] system_string = {'S', 'Y', 'S', 'T', 'E', 'M'};
- private static final char[] public_string = {'P', 'U', 'B', 'L', 'I', 'C'};
- private static final char[] ndata_string = {'N', 'D', 'A', 'T', 'A'};
-
- private int[] fOpStack = null;
- private CMGroupNode[] fGrpStack = null;
-
- private EntityPool entityPool;
-
- /* Attribute Def scanner state */
- static final int Att_Scanner_State_Name = 1, Att_Scanner_State_Type = 2, Att_Scanner_State_DefaultType = 3, Att_Scanner_State_DefaultValue = 4;
-
- private StringParser contentString;
- private String cData;
- private int prevNodeOffset = 0;
- private int nodeOffset = 1;
- private String ownerDTD;
-
- private String errorString;
-
- public DTDScanner(String ownerDTD, String cm) {
- // System.out.println("Cm: " + cm);
- contentString = new StringParser(cm);
- cData = cm;
- this.ownerDTD = ownerDTD;
- }
-
- //
- // [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children
- //
- // Specific to VisualDTD : also allows %PEReference;
- //
- public CMNode scanContentModel() {
- CMNode cmNode = null;
- contentString.skipPastSpaces();
- if (contentString.skippedString(empty_string)) {
- cmNode = new CMBasicNode("EMPTY", CMNodeType.EMPTY); //$NON-NLS-1$
- }
- else if (contentString.skippedString(any_string)) {
- cmNode = new CMBasicNode("ANY", CMNodeType.ANY); //$NON-NLS-1$
- }
- else if (contentString.lookingAtChar('%', true)) {
- cmNode = new CMReferenceNode(contentString.getData(), CMNodeType.ENTITY_REFERENCE);
- }
- else if (!contentString.lookingAtChar('(', true)) {
- // This means that the contentmodel string is bad...
- // System.out.println("!!! exception - no (");
- return cmNode;
- }
- else {
- // System.out.println("Remaining String = " +
- // contentString.getRemainingString());
-
- contentString.skipPastSpaces();
- boolean skippedPCDATA = contentString.skippedString(pcdata_string);
- if (skippedPCDATA) {
- cmNode = scanMixed();
- }
- else {
- cmNode = scanChildren();
- }
-
- }
- return cmNode;
- }
-
- //
- // [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S?
- // '#PCDATA' S? ')'
- //
- // Called after scanning past '(' S? '#PCDATA'
- //
- private CMNode scanMixed() {
- // System.out.println("ScanMixed...");
- CMGroupNode cmNode = new CMGroupNode();
- cmNode.setGroupKind(CMNodeType.GROUP_CHOICE);
- cmNode.addChild(new CMBasicNode("#PCDATA", CMNodeType.PCDATA)); //$NON-NLS-1$
-
- // int prevNodeIndex = -1;
- boolean starRequired = false;
-
-
- while (true) {
- if (contentString.lookingAtSpace(true)) {
- contentString.skipPastSpaces();
- }
- prevNodeOffset = contentString.getCurrentOffset();
-
- if (!contentString.lookingAtChar('|', true)) {
- if (!contentString.lookingAtChar(')', true)) {
- break;
- }
- if (contentString.lookingAtChar('*', true)) {
- cmNode.setOccurrence(CMNodeType.ZERO_OR_MORE);
- }
- else if (starRequired) {
- // System.out.println(" * is required ... ");
- }
- break;
- }
-
- if (contentString.lookingAtSpace(true)) {
- contentString.skipPastSpaces();
- }
-
- nodeOffset = contentString.getCurrentOffset();
- if (nodeOffset != -1) {
- // skip pass "|"
- prevNodeOffset = nodeOffset;
- }
-
- starRequired = true;
- contentString.skipPastNameAndPEReference(')');
- nodeOffset = contentString.getCurrentOffset();
-
- if (nodeOffset == -1)
- break;
-
- // add leave node
- int len = nodeOffset - prevNodeOffset;
- String refName = contentString.getString(prevNodeOffset, len);
- prevNodeOffset = nodeOffset;
- if (refName.startsWith("%")) //$NON-NLS-1$
- cmNode.addChild(new CMReferenceNode(refName, CMNodeType.ENTITY_REFERENCE));
- else
- cmNode.addChild(new CMReferenceNode(refName, CMNodeType.ELEMENT_REFERENCE));
-
- } // end while
-
-
- if (cmNode.getChildren().size() == 1) {
- // simplify the contentModel if the CMGroupNode only has one child
- // node.
- return (CMBasicNode) cmNode.getChildren().elementAt(0);
- }
-
- return cmNode;
- }
-
- //
- // [47] children ::= (choice | seq) ('?' | '*' | '+')?
- // [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')'
- // [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
- // [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
- //
- // Called after scanning past '('
-
- private CMNode scanChildren() {
-
- // System.out.println("scanChildren...");
-
- if (contentString.lookingAtSpace(true)) {
- contentString.skipPastSpaces();
- }
-
- prevNodeOffset = contentString.getCurrentOffset();
- nodeOffset = contentString.getCurrentOffset();
- int depth = 1;
- initializeContentModelStack(depth);
- int len;
-
- String nodeName;
- CMGroupNode cmNode = new CMGroupNode();
- fGrpStack[depth] = cmNode;
-
- while (true) {
-
- // System.out.println(" Begin outter while loop ..." );
- if (contentString.lookingAtChar('(', true)) {
- if (contentString.lookingAtSpace(true)) {
- // skip past any white spaces after the '('
- contentString.skipPastSpaces();
- }
-
- depth++;
- initializeContentModelStack(depth);
- fGrpStack[depth] = new CMGroupNode();
- fGrpStack[depth - 1].addChild(fGrpStack[depth]);
- continue;
- }
-
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipPastNameAndPEReference(')');
- nodeOffset = contentString.getCurrentOffset();
-
- /*
- * System.out.println(" prevNodeOFfset " + prevNodeOffset);
- * System.out.println(" currentNodeOFfset " + nodeOffset);
- */
-
- len = nodeOffset - prevNodeOffset;
-
- if (nodeOffset == -1 || len < 1) {
- break;
- }
-
- nodeName = contentString.getString(prevNodeOffset, len);
-
- CMRepeatableNode rn;
- if (nodeName.startsWith("%")) { //$NON-NLS-1$
- rn = new CMReferenceNode(nodeName, CMNodeType.ENTITY_REFERENCE);
- }
- else {
- rn = new CMReferenceNode(nodeName, CMNodeType.ELEMENT_REFERENCE);
- }
-
- fGrpStack[depth].addChild(rn);
-
- prevNodeOffset = nodeOffset;
-
- if (contentString.lookingAtChar('?', true)) {
- rn.setOccurrence(CMNodeType.OPTIONAL);
- }
- else if (contentString.lookingAtChar('*', true)) {
- rn.setOccurrence(CMNodeType.ZERO_OR_MORE);
- }
- else if (contentString.lookingAtChar('+', true)) {
- rn.setOccurrence(CMNodeType.ONE_OR_MORE);
- }
-
- if (contentString.lookingAtSpace(true)) {
- contentString.skipPastSpaces();
- }
-
- prevNodeOffset = contentString.getCurrentOffset();
-
- while (true) {
- // System.out.println(" Begin inner while loop ... depth " +
- // depth );
- if (fOpStack[depth] != CMNodeType.GROUP_SEQUENCE && contentString.lookingAtChar('|', true)) {
- fOpStack[depth] = CMNodeType.GROUP_CHOICE;
- fGrpStack[depth].setGroupKind(CMNodeType.GROUP_CHOICE);
- if (contentString.lookingAtSpace(true))
- contentString.skipPastSpaces();
- break;
- }
- else if (fOpStack[depth] != CMNodeType.GROUP_CHOICE && contentString.lookingAtChar(',', true)) {
- fOpStack[depth] = CMNodeType.GROUP_SEQUENCE;
- fGrpStack[depth].setGroupKind(CMNodeType.GROUP_SEQUENCE);
- if (contentString.lookingAtSpace(true))
- contentString.skipPastSpaces();
- break;
- }
- else {
- if (contentString.lookingAtSpace(true)) {
- contentString.skipPastSpaces();
- }
- if (!contentString.lookingAtChar(')', true)) {
- // System.out.println(" error ) not found");
- }
- // end of the curent group node
- if (contentString.lookingAtChar('?', true)) {
- fGrpStack[depth].setOccurrence(CMNodeType.OPTIONAL);
- }
- else if (contentString.lookingAtChar('*', true)) {
- fGrpStack[depth].setOccurrence(CMNodeType.ZERO_OR_MORE);
- }
- else if (contentString.lookingAtChar('+', true)) {
- fGrpStack[depth].setOccurrence(CMNodeType.ONE_OR_MORE);
- }
- depth--;
- if (depth == 0) {
- break;
- }
- if (contentString.lookingAtSpace(true))
- contentString.skipPastSpaces();
-
- // System.out.println(" End end inner while loop ... depth
- // " + depth );
-
- }
- } // inner while
-
- if (depth == 0) {
- break;
- }
- } // outer while
-
- if (cmNode.getChildren().size() == 1) {
- // simplify the contentModel if the CMGroupNode only has one child
- // node and that node is an element ref.
- CMRepeatableNode rn = (CMRepeatableNode) cmNode.getChildren().elementAt(0);
- if (rn instanceof CMReferenceNode) {
- CMReferenceNode ref = (CMReferenceNode) rn;
- if (ref.getType() == CMNodeType.ELEMENT_REFERENCE) {
- if (ref.getOccurrence() == CMNodeType.ONE) {
- ref.setOccurrence(cmNode.getOccurrence());
- return ref;
- }
- else if (cmNode.getOccurrence() == CMNodeType.ONE) {
- return ref;
- }
- } // end of if ()
- }
- }
-
- return cmNode;
- }
-
- //
- // [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
- // [53] AttDef ::= S Name S AttType S DefaultDecl
- // [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)?
- // AttValue)
- //
-
- public Vector scanAttlistDecl(EntityPool entityPool) {
- Vector attList = new Vector();
- this.entityPool = entityPool;
-
- int scannerState = Att_Scanner_State_Name;
-
- AttNode attNode;
-
- while (true) {
- attNode = new AttNode();
-
- // System.out.println(" scanner state: " + scannerState);
-
- // scanning att name
- if (scannerState == Att_Scanner_State_Name) {
- // System.out.println("scan att Name...");
- scannerState = checkForAttributeWithPEReference(attNode, scannerState);
- if (scannerState == -1) {
- return attList;
- }
- }
-
- // scanning att type
- if (scannerState == Att_Scanner_State_Type) {
- // System.out.println("scan att type...");
-
- if (contentString.skippedString(cdata_string)) {
- attNode.type = new String(cdata_string);
- scannerState = Att_Scanner_State_DefaultType;
- }
- else if (contentString.skippedString(id_string)) {
- if (!contentString.skippedString(ref_string)) {
- attNode.type = new String(id_string);
- }
- else if (!contentString.lookingAtChar('S', true)) {
- attNode.type = "IDREF"; //$NON-NLS-1$
- }
- else {
- attNode.type = "IDREFS"; //$NON-NLS-1$
- }
- scannerState = Att_Scanner_State_DefaultType;
- }
- else if (contentString.skippedString(entit_string)) {
- if (contentString.lookingAtChar('Y', true)) {
- attNode.type = "ENTITY"; //$NON-NLS-1$
- }
- else if (contentString.skippedString(ies_string)) {
- attNode.type = "ENTITIES"; //$NON-NLS-1$
- }
- scannerState = Att_Scanner_State_DefaultType;
- }
- else if (contentString.skippedString(nmtoken_string)) {
- if (contentString.lookingAtChar('S', true)) {
- attNode.type = "NMTOKENS"; //$NON-NLS-1$
- }
- else {
- attNode.type = "NMTOKEN"; //$NON-NLS-1$
- }
- scannerState = Att_Scanner_State_DefaultType;
- }
- else if (contentString.skippedString(notation_string)) {
- if (contentString.lookingAtSpace(true)) {
- contentString.skipPastSpaces();
- }
- if (!contentString.lookingAtChar('(', true)) {
- System.out.println(" missing ( in notation "); //$NON-NLS-1$
- }
- attNode.type = "NOTATION"; //$NON-NLS-1$
- attNode.enumList = scanEnumeration(contentString, true);
- scannerState = Att_Scanner_State_DefaultType;
- }
- else if (contentString.lookingAtChar('(', true)) {
- attNode.type = "ENUMERATION"; //$NON-NLS-1$
- attNode.enumList = scanEnumeration(contentString, false);
- scannerState = Att_Scanner_State_DefaultType;
- }
- else {
- scannerState = checkForAttributeWithPEReference(attNode, scannerState);
- if (scannerState == Att_Scanner_State_Type) {
- setErrorString("Failed to find type for attribute '" + attNode.name + "'. Please refer to the original DTD file."); //$NON-NLS-1$ //$NON-NLS-2$
- // we failed to find a type for this attribute
- return attList;
- }
- }
- }
-
- if (scannerState == Att_Scanner_State_DefaultType) {
- contentString.skipPastSpaces();
- // System.out.println("scan default type...");
- if (contentString.skippedString(required_string)) {
- attNode.defaultType = new String(required_string);
- }
- else if (contentString.skippedString(implied_string)) {
- attNode.defaultType = new String(implied_string);
- }
- else {
- if (contentString.skippedString(fixed_string)) {
- contentString.skipPastSpaces();
- attNode.defaultType = new String(fixed_string);
- }
- else
- // "default"
- attNode.defaultType = "NOFIXED"; //$NON-NLS-1$
-
- if (contentString.lookingAtSpace(true))
- contentString.skipPastSpaces();
- attNode.defaultValue = scanDefaultAttValue(contentString);
- }
- scannerState = Att_Scanner_State_Name; // next
- }
-
-
- attList.addElement(attNode);
- if (contentString.lookingAtSpace(true))
- contentString.skipPastSpaces();
- nodeOffset = contentString.getCurrentOffset();
-
- if (nodeOffset >= cData.length())
- return attList;
-
- prevNodeOffset = contentString.getCurrentOffset();
-
- }// end while loop
- }
-
- //
- // content model stack
- //
- private void initializeContentModelStack(int depth) {
- if (fOpStack == null) {
- fOpStack = new int[8];
- fGrpStack = new CMGroupNode[8];
- }
- else if (depth == fOpStack.length) {
- int[] newStack = new int[depth * 2];
- System.arraycopy(fOpStack, 0, newStack, 0, depth);
- fOpStack = newStack;
-
- CMGroupNode[] newGrpStack = new CMGroupNode[depth * 2];
- System.arraycopy(fGrpStack, 0, newGrpStack, 0, depth);
- fGrpStack = newGrpStack;
- }
- fOpStack[depth] = -1;
- fGrpStack[depth] = null;
- }
-
- //
- private int checkForAttributeWithPEReference(AttNode attNode, int scannerState) {
- int state = -1;
- int len;
- String rawText;
- EntityDecl pEntity;
-
- // System.out.println(" checkforATTPERReference- start scannerState: "
- // + scannerState);
- if (scannerState == Att_Scanner_State_Name) {
- contentString.skipPastNameAndPEReference(' ');
- nodeOffset = contentString.getCurrentOffset();
- len = nodeOffset - prevNodeOffset;
-
- rawText = contentString.getString(prevNodeOffset, len);
- attNode.name = rawText;
-
- // System.out.println("State_name : " + rawText);
-
- if (rawText.startsWith("%") && rawText.endsWith(";")) { //$NON-NLS-1$ //$NON-NLS-2$
- String pe = rawText.substring(1, rawText.length() - 1);
-
- pEntity = entityPool.referPara(pe);
- if (pEntity != null) {
- // System.out.println(" name :" + rawText +" expandTo:" +
- // pEntity.expandedValue);
- state = whatIsTheNextAttributeScanningState(pEntity.expandedValue, scannerState);
- // System.out.println("checkForAttrwithPER - nextstate: "
- // + state);
- }
- else
- state = Att_Scanner_State_Type;
- }
- else
- state = Att_Scanner_State_Type;
-
- }
- else if (scannerState == Att_Scanner_State_Type) {
- if (contentString.lookingAtChar('%', true)) {
- rawText = getPEName();
- attNode.type = "%" + rawText; //$NON-NLS-1$
- String peName = rawText.substring(0, rawText.length() - 1);
- // System.out.println("State_type : pe- " + peName);
- pEntity = entityPool.referPara(peName);
- if (pEntity != null) {
- state = whatIsTheNextAttributeScanningState(pEntity.expandedValue, scannerState);
- }
- else
- state = Att_Scanner_State_DefaultType;
- }
- else
- state = Att_Scanner_State_Type;
- }
- else if (scannerState == Att_Scanner_State_DefaultType) {
- if (contentString.lookingAtChar('%', true)) {
- rawText = getPEName();
- attNode.defaultType = rawText;
- // System.out.println("State_defaultType : " + rawText);
- pEntity = entityPool.referPara(rawText.substring(1, rawText.length() - 1));
- if (pEntity != null) {
- state = whatIsTheNextAttributeScanningState(pEntity.expandedValue, scannerState);
- }
- else
- state = Att_Scanner_State_DefaultValue;
- }
- else
- state = Att_Scanner_State_DefaultType;
- }
- else if (scannerState == Att_Scanner_State_DefaultValue) {
- if (contentString.lookingAtChar('%', true)) {
- rawText = getPEName();
- attNode.defaultValue = rawText;
- // System.out.println("State_defaultValue : " + rawText);
-
- pEntity = entityPool.referPara(rawText.substring(1, rawText.length() - 1));
- if (pEntity != null) {
- state = whatIsTheNextAttributeScanningState(pEntity.expandedValue, scannerState);
- }
- else
- state = Att_Scanner_State_DefaultValue;
- }
- else
- state = Att_Scanner_State_DefaultValue;
- }
-
- if (contentString.lookingAtSpace(true))
- contentString.skipPastSpaces();
- prevNodeOffset = contentString.getCurrentOffset();
- return state;
- }
-
- private String getPEName() {
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipToChar(';', true);
- nodeOffset = contentString.getCurrentOffset();
- int len = nodeOffset - prevNodeOffset;
- return contentString.getString(prevNodeOffset, len);
- }
-
- private int whatIsTheNextAttributeScanningState(String attrContentString, int currentState) {
- StringParser sp = new StringParser(attrContentString.trim());
-
-
- int nextState = currentState;
- int nOffset = 0;
-
- /*
- * System.out.println("WhatistheNext AttContentStringt : " +
- * attrContentString); System.out.println("WhatistheNext
- * AttContentStringL : " + attrContentString.length());
- * System.out.println("WhatistheNext currentstate : " + currentState);
- */
-
- while (true) {
- // System.out.println("WhatistheNext inside whil nextstate : " +
- // nextState);
- if (nextState == Att_Scanner_State_Name) { // the current
- // scanning state is
- // Attr Name, is the
- // next part Attr Type
- // ?
- if (isAttrName(sp)) {
- nextState = Att_Scanner_State_Type;
- }
- }
- else if (nextState == Att_Scanner_State_Type) { // the current
- // scanning state
- // is Attr Type,
- // is the next
- // part Default
- // Attr Type ?
-
- if (isAttrType(sp)) {
- nextState = Att_Scanner_State_DefaultType;
- }
- else
- System.out.println("WhatistheNext Attr Part - is not an Attr Type"); //$NON-NLS-1$
-
- }
-
- if (nextState == Att_Scanner_State_DefaultType) {
-
- int dType = isAttrDefaultType(sp);
- // System.out.println("WhatistheNext inside dType : " +
- // dType);
- if (dType == 1) // #REQUIRED or #IMPLIED
- {
- nextState = Att_Scanner_State_Name;
- }
- else {
- if (dType == 2) // #FIXED
- {
- // need to look at this again
- nextState = Att_Scanner_State_DefaultType;
- }
-
- if (scanDefaultAttValue(sp) != null) {
- nextState = Att_Scanner_State_Name;
-
- }
- }
- }
-
- sp.skipPastSpaces();
-
- if (nOffset == sp.getCurrentOffset())
- break;
-
- nOffset = sp.getCurrentOffset();
-
- if (nOffset >= attrContentString.length() || nOffset == -1)
- break;
-
- } // end while
-
- return nextState;
- }
-
-
- private boolean isAttrName(StringParser sp) {
- // System.out.println("isAttrName - sp:" + sp.fData);
- // System.out.println("isAttrName - currentOffset:" +
- // sp.getCurrentOffset());
- boolean isAttrName = false;
- int prev = sp.getCurrentOffset();
- sp.skipPastName(' ');
- if ((sp.getCurrentOffset() - prev) > 0)
- isAttrName = true;
- return isAttrName;
-
- }
-
- private boolean isAttrType(StringParser sp) {
- // System.out.println("isAttrType - sp:" + sp.fData);
- // System.out.println("isAttrType - currentOffset:" +
- // sp.getCurrentOffset());
- boolean isAttrType = false;
- if (sp.skippedString(cdata_string)) {
- isAttrType = true;
- }
- else if (sp.skippedString(id_string)) {
- if (!sp.skippedString(ref_string)) {
- isAttrType = true; // ID
- }
- else if (!sp.lookingAtChar('S', true)) {
- isAttrType = true; // IDREFS
- }
- else {
- isAttrType = true; // IDREF
- }
- }
- else if (sp.skippedString(entit_string)) {
- if (sp.lookingAtChar('Y', true)) {
- isAttrType = true; // ENTITY
- }
- else if (sp.skippedString(ies_string)) {
- isAttrType = true; // ENTITITES
- }
- }
- else if (sp.skippedString(nmtoken_string)) {
- if (sp.lookingAtChar('S', true)) {
- isAttrType = true; // NMTOKENS
- }
- else {
- isAttrType = true; // NMTOKEN
- }
- }
- else if (sp.skippedString(notation_string)) {
- if (!sp.lookingAtChar('(', true)) {
- // System.out.println(" missing ( in notation ");
- }
- Vector enumList = scanEnumeration(sp, true);
- if (enumList == null || enumList.size() == 0)
- isAttrType = false;
- else
- isAttrType = true;
- }
- else if (sp.lookingAtChar('(', true)) {
- // "ENUMERATION";
- Vector enumList = scanEnumeration(sp, false);
- if (enumList == null || enumList.size() == 0)
- isAttrType = false;
- else
- isAttrType = true;
- }
-
- return isAttrType;
-
- }
-
- /*
- * return 0 - not default type 1 - #REQUIRED or #IMPLIED 2 - #FIXED
- */
-
- private int isAttrDefaultType(StringParser sp) {
- // System.out.println("isAttrDefaultType - sp:" + sp.fData);
- int result = 0;
- if (sp.skippedString(required_string)) {
- result = 1;
- }
- else if (sp.skippedString(implied_string)) {
- result = 1;
- }
- else if (sp.skippedString(fixed_string)) {
- result = 2;
- }
- return result;
- }
-
- //
- // [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
- // [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'
- //
- // Called after scanning '('
- //
- private Vector scanEnumeration(StringParser sp, boolean isNotationType) {
- // System.out.println(" scanEnum ...");
- Vector enumList = null;
- int len;
-
- if (sp.lookingAtSpace(true))
- sp.skipPastSpaces();
-
- int prevNodeOffset = sp.getCurrentOffset();
- int nodeOffset;
-
- String nodeName;
-
- while (true) {
-
- if (isNotationType)
- sp.skipPastNameAndPEReference(')');
- else
- sp.skipPastNmtokenAndPEReference(')');
-
- nodeOffset = sp.getCurrentOffset();
-
- if (nodeOffset == -1) {
- return enumList;
- }
-
- len = nodeOffset - prevNodeOffset;
- nodeName = sp.getString(prevNodeOffset, len);
-
- if (enumList == null)
- enumList = new Vector();
-
- enumList.addElement(nodeName);
-
- if (sp.lookingAtSpace(true))
- sp.skipPastSpaces();
-
- if (!sp.lookingAtChar('|', true)) {
- if (!sp.lookingAtChar(')', true)) {
- System.out.println("scanning enum values - error missing ')'"); //$NON-NLS-1$
- break;
- }
- break;
- }
-
- if (sp.lookingAtSpace(true))
- sp.skipPastSpaces();
-
- prevNodeOffset = sp.getCurrentOffset();
- }
- return enumList;
- }
-
- //
- // [10] AttValue ::= '"' ([^<&"] | Reference)* '"'
- // | "'" ([^<&'] | Reference)* "'"
- //
- /**
- * Scan the default value in an attribute declaration
- *
- * @param elementType
- * handle to the element that owns the attribute
- * @param attrName
- * handle in the string pool for the attribute name
- * @return handle in the string pool for the default attribute value
- * @exception java.lang.Exception
- */
- public String scanDefaultAttValue(StringParser sp) {
- String value = null;
- // System.out.println("scan default ATT Value... sp:" + sp.fData);
-
- sp.skipPastSpaces();
-
- boolean single;
- if (!(single = sp.lookingAtChar('\'', true)) && !sp.lookingAtChar('\"', true)) {
- return value;
- }
-
- char qchar = single ? '\'' : '\"';
- int sOffset = sp.getCurrentOffset();
- //BUG 203494 - Skip to the last occurrence of the qchar that way
- // all characters between are obtained
- sp.skipToLastOfChar(qchar, true);
- int len = sp.getCurrentOffset() - sOffset - 1;
- if (len == 0)
- value = ""; //$NON-NLS-1$
- else
- value = sp.getString(sOffset, len);
-
- return value;
- }
-
- //
- // [70] EntityDecl ::= GEDecl | PEDecl
- // [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'
- // [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
- // [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
- // [74] PEDef ::= EntityValue | ExternalID
- // [75] ExternalID ::= 'SYSTEM' S SystemLiteral
- // | 'PUBLIC' S PubidLiteral S SystemLiteral
- // [76] NDataDecl ::= S 'NDATA' S Name
- // [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
- // | "'" ([^%&'] | PEReference | Reference)* "'"
- //
- // Called after scanning 'ENTITY'
- //
- public EntityDecl scanEntityDecl() {
- prevNodeOffset = 1;
- nodeOffset = 1;
- int len;
- boolean isPEDecl = false;
- EntityDecl entityDecl = null;
-
- String name = null;
- String ndata = null;
-
- if (contentString.lookingAtSpace(true)) {
- contentString.skipPastSpaces();
- if (!contentString.lookingAtChar('%', true)) {
- isPEDecl = false; // <!ENTITY x "x">
- }
- else if (contentString.lookingAtSpace(true)) {
- isPEDecl = true; // <!ENTITY % x "x">
- }
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipPastName(' ');
- nodeOffset = contentString.getCurrentOffset();
- len = nodeOffset - prevNodeOffset;
- if (len > 0) {
- name = contentString.getString(prevNodeOffset, len);
- prevNodeOffset = nodeOffset;
- }
- }
-
- if (name == null)
- return null;
-
- contentString.skipPastSpaces();
- prevNodeOffset = contentString.getCurrentOffset();
-
- boolean single;
- if ((single = contentString.lookingAtChar('\'', true)) || contentString.lookingAtChar('\"', true)) {
- String value = scanEntityValue(single);
- entityDecl = new EntityDecl(name, ownerDTD, value, isPEDecl);
- }
- else {
- // external entity
- ExternalID xID = scanExternalID();
- if (xID != null) {
- if (!isPEDecl) // general entity
- {
- boolean unparsed = false;
- contentString.skipPastSpaces();
- unparsed = contentString.skippedString(ndata_string);
- if (unparsed) {
- contentString.skipPastSpaces();
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipPastName(' ');
- nodeOffset = contentString.getCurrentOffset();
- len = nodeOffset - prevNodeOffset;
- ndata = contentString.getString(prevNodeOffset, len);
- }
- }
- entityDecl = new EntityDecl(name, ownerDTD, xID, isPEDecl, ndata);
- }
- }
- return entityDecl;
- }
-
-
- //
- // [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S?
- // '>'
- // [75] ExternalID ::= 'SYSTEM' S SystemLiteral
- // | 'PUBLIC' S PubidLiteral S SystemLiteral
- // [83] PublicID ::= 'PUBLIC' S PubidLiteral
- //
- // Called after scanning 'NOTATION'
- //
- public NotationDecl scanNotationDecl() {
- prevNodeOffset = 1;
- nodeOffset = 1;
- int len;
- NotationDecl notationDecl = null;
-
- String name = null;
-
- if (contentString.lookingAtSpace(true)) {
- contentString.skipPastSpaces();
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipPastName(' ');
- nodeOffset = contentString.getCurrentOffset();
- len = nodeOffset - prevNodeOffset;
- if (len > 0) {
- name = contentString.getString(prevNodeOffset, len);
- prevNodeOffset = nodeOffset;
- }
- }
-
- if (name == null)
- return null;
-
- contentString.skipPastSpaces();
- prevNodeOffset = contentString.getCurrentOffset();
-
- notationDecl = new NotationDecl(name, ownerDTD);
-
- ExternalID xID = scanExternalID();
- if (xID != null) {
- if (xID.getSystemLiteral() != null) {
- notationDecl.setSystemId(xID.getSystemLiteral());
- }
- if (xID.getPubIdLiteral() != null) {
- notationDecl.setPublicId(xID.getPubIdLiteral());
- }
- }
-
- return notationDecl;
- }
-
-
- private String scanEntityValue(boolean single) {
- char qchar = single ? '\'' : '\"';
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipToChar(qchar, false);
- int len = contentString.getCurrentOffset() - prevNodeOffset;
- String value = contentString.getString(prevNodeOffset, len);
- return value;
- }
-
- //
- // [75] ExternalID ::= 'SYSTEM' S SystemLiteral
- // | 'PUBLIC' S PubidLiteral S SystemLiteral
- private ExternalID scanExternalID() {
- ExternalID xID = null;
- char qchar = '\"';
- if (contentString.skippedString(system_string)) {
- if (!contentString.lookingAtSpace(true)) {
- return null;
- }
- contentString.skipPastSpaces();
-
- if (contentString.lookingAtChar('\'', true))
- qchar = '\'';
- else if (contentString.lookingAtChar('\"', true))
- qchar = '\"';
-
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipToChar(qchar, true);
- int len = contentString.getCurrentOffset() - prevNodeOffset - 1;
- String systemId = contentString.getString(prevNodeOffset, len);
- // System.out.println("systemid..." + systemId);
- xID = new ExternalID(systemId);
- }
- else if (contentString.skippedString(public_string)) {
- if (!contentString.lookingAtSpace(true)) {
- return null;
- }
-
- contentString.skipPastSpaces();
- if (contentString.lookingAtChar('\'', true))
- qchar = '\'';
- else if (contentString.lookingAtChar('\"', true))
- qchar = '\"';
-
- // publicLiteral
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipToChar(qchar, true);
- int len = contentString.getCurrentOffset() - prevNodeOffset - 1;
- String publicId = contentString.getString(prevNodeOffset, len);
-
- // systemLiteral
- contentString.skipPastSpaces();
- if (contentString.lookingAtChar('\'', true))
- qchar = '\'';
- else if (contentString.lookingAtChar('\"', true))
- qchar = '\"';
- prevNodeOffset = contentString.getCurrentOffset();
- contentString.skipToChar(qchar, true);
- len = contentString.getCurrentOffset() - prevNodeOffset - 1;
-
- if (len > 0) {
- String systemId = contentString.getString(prevNodeOffset, len);
- xID = new ExternalID(publicId, systemId);
- }
- else {
- xID = new ExternalID(publicId, null);
- }
- }
- return xID;
- }
-
- //
- // [83] PublicID ::= 'PUBLIC' S PubidLiteral
- //
-
- // dmw 11/15 private method never read locally
- // TODO: change to private if used, otherwise should be removed
- String scanPublicID() {
- String pID = null;
- if (contentString.skippedString(public_string)) {
- if (!contentString.lookingAtSpace(true)) {
- return pID;
- }
- contentString.skipPastSpaces();
- prevNodeOffset = contentString.getCurrentOffset();
-
- contentString.skipToChar(' ', true);
- int len = contentString.getCurrentOffset() - prevNodeOffset;
- pID = contentString.getString(prevNodeOffset, len);
- }
-
- return pID;
- }
-
- //
- // Main
- //
-
- /** Main program entry point. */
- public static void main(String argv[]) {
-
- // is there anything to do?
- if (argv.length == 0) {
- System.exit(1);
- }
-
- // DTDScanner sc = new DTDScanner(argv[0]);
- DTDScanner sc = new DTDScanner("hello.dtd", " gif SYSTEM \"GIF File\" "); //$NON-NLS-1$ //$NON-NLS-2$
-
- NotationDecl n = sc.scanNotationDecl();
- System.out.println("Noation Name: " + n.getNodeName()); //$NON-NLS-1$
- System.out.println("SystemId: " + n.getSystemId()); //$NON-NLS-1$
-
-
- // Attributes
- // Vector lists = sc.scanAttlistDecl();
- // sc.printAttList(lists);
-
- // System.out.println("CM: " + sc.scanContentModel());
-
- } // main(String[])
-
- /**
- * Gets the errorString
- *
- * @return Returns a String
- */
- public String getErrorString() {
- return errorString;
- }
-
- /**
- * Sets the errorString
- *
- * @param errorString
- * The errorString to set
- */
- public void setErrorString(String errorString) {
- this.errorString = errorString;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DeclNode.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DeclNode.java
deleted file mode 100644
index bb2306ae8e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DeclNode.java
+++ /dev/null
@@ -1,103 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public class DeclNode {
- static public final int INVALID = -1;
- static public final int ELEMENT = 1;
- static public final int ATTLIST = 2;
- static public final int ENTITY = 3;
- static public final int INTERNAL_ENTITY = 4;
- static public final int EXTERNAL_ENTITY = 5;
- static public final int INTERNAL_GENERAL_ENTITY = 6;
- static public final int INTERNAL_PARAMETER_ENTITY = 7;
- static public final int EXTERNAL_GENERAL_ENTITY = 8;
- static public final int EXTERNAL_PARAMETER_ENTITY = 9;
- static public final int PARAMETER_ENTITY_REFERENCE = 10;
- static public final int NOTATION = 11;
- static public final int COMMENT = 12;
-
- static public final int START_DTD = 21;
- static public final int END_DTD = 22;
- static public final int START_ENTITY_DTD = 23;
- static public final int END_ENTITY_DTD = 24;
- static public final int ERROR = 25;
-
- public int type = INVALID;
- private String declName = null;
- private String contentString = null;
- private String errorMessage = null;
- private String comment = null;
-
- //
- // Constants
- //
-
- /** Default constructor. */
- public DeclNode(int type) {
- this(null, type, null);
- }
-
- public DeclNode(String name, int type, String contentString) {
- this.declName = name;
- this.type = type;
- this.contentString = contentString;
- }
-
- public String getDeclName() {
- return declName;
- }
-
- public void setDeclName(String name) {
- declName = name;
- }
-
- public int getType() {
- return type;
- }
-
- public void setType(int type) {
- this.type = type;
- }
-
- public String getErrorMessage() {
- return errorMessage;
- }
-
- public void setErrorMessage(String message) {
- errorMessage = message;
- }
-
- public String getContentString() {
- return contentString;
- }
-
- public void setContentString(String content) {
- this.contentString = content;
- }
-
- public String getComment() {
- return comment;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- public String toString()
-
- {
- return "Node Name: " + declName + " Type: " + type + " ContentString: " + contentString; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ElementDecl.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ElementDecl.java
deleted file mode 100644
index 1e5c77a66d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ElementDecl.java
+++ /dev/null
@@ -1,33 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public class ElementDecl extends BaseNode {
- CMNode contentModelNode = null;
-
- public ElementDecl(String name, String ownerDTD) {
- this(name, ownerDTD, null, null);
- }
-
- public ElementDecl(String name, String ownerDTD, String comment, ErrorMessage errorMessage) {
- super(name, ownerDTD, comment, errorMessage);
- }
-
- public CMNode getContentModelNode() {
- return contentModelNode;
- }
-
- public void setContentModelNode(CMNode cmnode) {
- contentModelNode = cmnode;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityDecl.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityDecl.java
deleted file mode 100644
index 668877daed..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityDecl.java
+++ /dev/null
@@ -1,242 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public class EntityDecl extends BaseNode {
- boolean isParameter = false;
- String expandedValue = null; // Always <var>null</var> for external
- // Entities
- String value = null; // Always <var>null</var> for external Entities
- ExternalID externalID = null; // Always <var>null</var> for internal
- // Entities
- String ndata = null; // Always <var>null</var> for internal Entities
-
- boolean parsed = false;
- DTDParser dtd = null; // Always null, except when it has been parsed.
-
- boolean entityReferenced = false;
-
- /**
- * Constructor for internal Entities.
- *
- * @param name
- * Name of this Entity.
- * @param value
- * The XML-encoded value that was directly assigned to the
- * Entity.
- * @param isParameter
- * =true if a parameter Entity; otherwise =false.
- */
- public EntityDecl(String name, String ownerDTD, String value, boolean isParameter) {
- super(name, ownerDTD, null, null);
- this.value = value;
- this.isParameter = isParameter;
- }
-
- /**
- * Constructor for external Entities.
- *
- * @param name
- * Name of the Entity.
- * @param externalID
- * The reference(s) to the external entity to retrieve.
- * @param isParameter
- * =true if a parameter Entity; otherwise =false.
- * @param ndata
- * The notation associated with the binary Entity, or <var>null</var>
- * if the Entity is a text Entity.
- * @see sax.ExternalID
- */
- public EntityDecl(String name, String ownerDTD, ExternalID externalID, boolean isParameter, String ndata) {
- super(name, ownerDTD, null, null);
- this.externalID = externalID;
- this.isParameter = isParameter;
- this.ndata = ndata;
- }
-
- /**
- * Returns whether this Entity is a parameter Entity.
- *
- * @return =true if an internal parameter Entity; otherwise =false.
- */
- public boolean isParameter() {
- return this.isParameter;
- }
-
- /**
- * Returns the value of this Entity.
- *
- * @return The XML-encoded value that was directly assigned to the
- * internal Entity; otherwise, <var>null</var>.
- */
- public String getValue() {
- return this.value;
- }
-
- public boolean isEntityReferenced() {
- return entityReferenced;
- }
-
- public void setEntityReferenced(boolean reference) {
- entityReferenced = reference;
- }
-
-
- /**
- * Returns the system identifier of the Notation. A system identifier is a
- * URI, which may be used to retrieve an external entity's content.
- * <p>
- * This method is defined by DOM.
- *
- * @return The system identifier, or <var>null</var> if the identifier is
- * not defined.
- * @see org.eclipcse.wst.dtd.parser.ExternalID#getSystemLiteral
- */
- public String getSystemId() {
- if (externalID == null)
- return null;
- else
- return this.externalID.getSystemLiteral();
- }
-
- /**
- * Sets the system identifier of the Notation. A system identifier is a
- * URI, which may be used to retrieve an external entity's content.
- * <p>
- * This method is defined by DOM.
- *
- * @param systemIdentifier
- * The system identifier.
- * @see org.eclipcse.wst.dtd.parser.ExternalID
- */
- public void setSystemId(String systemIdentifier) {
- // System.out.println("setSYstemId - externalId: " + externalID);
- this.externalID = new ExternalID(this.externalID.getPubIdLiteral(), systemIdentifier);
- }
-
- /**
- * Returns the public identifier of the Notation. This value is only valid
- * if the identifier is defined as <var>public</var> (as opposed to
- * <var>system</var>). Public identifiers may be used to try to generate
- * an alternative URI in order to retrieve the an external entities
- * content. If retrieval fails using the public identifier, an attempt
- * must be made to retrieve content using the system identifier.
- * <p>
- * This method is defined by DOM.
- *
- * @return The public identifier, or <var>null</var> if the identifier is
- * not defined.
- * @see org.eclipcse.wst.dtd.parser.ExternalID
- */
- public String getPublicId() {
- if (externalID == null)
- return null;
- else
- return this.externalID.getPubIdLiteral();
- }
-
- /**
- * Sets the public identifier of the Notation. This value is only valid if
- * the identifier is defined as <var>public</var> (as opposed to
- * <var>system</var>). Public identifiers may be used to try to generate
- * an alternative URI in order to retrieve the an external entities
- * content. If retrieval fails using the public identifier, an attempt
- * must be made to retrieve content using the system identifier.
- * <p>
- * This method is defined by DOM.
- *
- * @param publicIdentifier
- * The public identifier.
- * @see #getPublicId
- * @see org.eclipcse.wst.dtd.parser.ExternalID
- */
- public void setPublicId(String publicIdentifier) {
- this.externalID = new ExternalID(publicIdentifier, this.externalID.getSystemLiteral());
- }
-
- /**
- * Returns the external ID of this Entity.
- *
- * @return The reference(s) to the external entity to retrieve; otherwise,
- * <var>null</var>.
- * @see org.eclipcse.wst.dtd.parser.ExternalID
- */
- public ExternalID getExternalID() {
- return this.externalID;
- }
-
- /**
- * Returns whether this entity value is external.
- *
- * @return =true if entity is external; otherwise, =false.
- * @see org.eclipcse.wst.dtd.parser.ExternalID
- */
- public boolean isExternal() {
- return this.externalID != null;
- }
-
- /**
- * Returns the notation associated with this Entity.
- *
- * @return The notation associated with the external binary Entity,
- * otherwise, <var>null</var>.
- */
- public String getNotation() {
- return this.ndata;
- }
-
- public void setNotation(String ndata) {
- this.ndata = ndata;
- }
-
- /**
- * Returns the notation associated with this Entity.
- * <p>
- * This method is defined by DOM.
- *
- * @return The notation associated with the external binary Entity,
- * otherwise, <var>null</var>.
- */
- public String getNotationName() {
- return this.ndata;
- }
-
- /**
- * <p>
- * This method is defined by DOM.
- *
- * public void setNotationName(String arg) { this.ndata = arg; }
- */
-
- /**
- * Returns whether there is a notation associated with this entity value.
- *
- * @return =true if the external binary entity contains a notation;
- * otherwise, =false.
- */
- public boolean isNotation() {
- return this.ndata != null;
- }
-
- public void setValue(String s) {
- this.value = s;
- }
-
- public void setParsed(boolean p) {
- this.parsed = p;
- }
-
- public boolean getParsed() {
- return this.parsed;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityPool.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityPool.java
deleted file mode 100644
index 76bd1fef21..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityPool.java
+++ /dev/null
@@ -1,72 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-public class EntityPool {
- private Hashtable m_entity = new Hashtable();
- private Hashtable m_para = new Hashtable(); // parameter references
-
- public EntityPool() {
- }
-
- public boolean add(EntityDecl entity) {
- String name = entity.getNodeName();
- if (entity.isParameter()) {
- if (m_para.containsKey(name))
- return false;
- m_para.put(name, entity);
- }
- else {
- if (m_entity.containsKey(name))
- return false;
- m_entity.put(name, entity);
- }
- return true;
- }
-
- public EntityDecl refer(String name) {
- return (EntityDecl) m_entity.get(name);
- }
-
- public EntityDecl referPara(String name) {
- return (EntityDecl) m_para.get(name);
- }
-
- /**
- * Return an <CODE>Enumeration</CODE> of <CODE>EntityDecl</CODE>.
- *
- * @see org.eclipcse.wst.dtd.parser.EntityDecl
- */
- public Enumeration elements() {
- return m_entity.elements();
- }
-
- /**
- * Return an <CODE>Enumeration</CODE> of <CODE>EntityDecl</CODE> for
- * parameter entities.
- *
- * @see org.eclipcse.wst.dtd.parser.EntityDecl
- */
- public Enumeration parameterEntityElements() {
- return m_para.elements();
- }
-
- /**
- * For DTD#getEntities();
- */
- Hashtable getEntityHash() {
- return this.m_entity;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ErrorMessage.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ErrorMessage.java
deleted file mode 100644
index 60123400ca..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ErrorMessage.java
+++ /dev/null
@@ -1,114 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-
-
-public class ErrorMessage {
- private int errorLine, errorColumn, severity;
- private String errorString;
-
-
- public ErrorMessage() {
- }
-
- public void setErrorMessage(String error) {
- errorString = error;
- }
-
- public void setSeverity(int severity) {
- this.severity = severity;
- }
-
- public void setSeverity(String severity) {
- if (severity == "warning") { //$NON-NLS-1$
- this.severity = 0;
- }
- else if (severity == "error") { //$NON-NLS-1$
- this.severity = 1;
- }
- else if (severity == "fatal") { //$NON-NLS-1$
- this.severity = 2;
- }
- }
-
- public void setErrorLine(int line) {
- errorLine = line;
- }
-
- public void setErrorColumn(int column) {
- errorColumn = column;
- }
-
- public String getErrorMessage() {
- return errorString;
- }
-
- public int getSeverity() {
- return severity;
- }
-
- public int getErrorLine() {
- return errorLine;
- }
-
- public int getErrorColumn() {
- return errorColumn;
- }
-
- private int startOffset = -1;
-
- public void setErrorStartOffset(int start) {
- startOffset = start;
- }
-
- public int getErrorStartOffset() {
- return startOffset;
- }
-
- private int endOffset = -1;
-
- public void setErrorEndOffset(int end) {
- endOffset = end;
- }
-
- public int getErrorEndOffset() {
- return endOffset;
- }
-
-
- Object object;
-
- /**
- * Get the value of the closest object to the error.
- *
- * @return value of object.
- */
- public Object getObject() {
- return object;
- }
-
- /**
- * Set the value of closest object to the error.
- *
- * @param v
- * Value to assign to object.
- */
- public void setObject(Object v) {
- this.object = v;
- }
-
-
- public void addNewErrorMessageLine(String newLine) {
- errorString += "\n" + newLine; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ExternalID.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ExternalID.java
deleted file mode 100644
index 1eb009d3a4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ExternalID.java
+++ /dev/null
@@ -1,154 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-public class ExternalID {
- private static final int T_SYSTEM = 0;
- private static final int T_PUBLIC = 1;
-
- int type = T_PUBLIC;
- String publicID = null;
- String systemID = null;
-
- /**
- * Constructor for system IDs.
- *
- * @param systemID
- * URI, which may be used to retrieve an external entity's
- * content.
- */
- public ExternalID(String systemID) {
- this.type = T_SYSTEM;
- this.publicID = null;
- this.systemID = systemID;
- }
-
- /**
- * Constructor for public and system IDs.
- *
- * @param publicID
- * Identifier to be used to try to generate an alternative URI
- * in order to retrieve the external entity's content, or
- * <var>null</var> if a system identitier is to be
- * constructed.
- * @param systemID
- * URI, which may be used to retrieve an external entity's
- * content.
- */
- public ExternalID(String publicID, String systemID) {
- this.type = T_PUBLIC;
- this.publicID = publicID;
- this.systemID = systemID;
- if (null == this.publicID)
- this.type = T_SYSTEM;
- }
-
- /**
- * Returns if this external ID is a system ID (or public ID).
- *
- * @return System ID=true, Public ID=false.
- * @see #isPublic
- */
- public boolean isSystem() {
- return this.type == T_SYSTEM;
- }
-
- /**
- * Returns if this external ID is a public ID (or system ID).
- *
- * @return Public ID=true, System ID=false.
- * @see #isSystem
- */
- public boolean isPublic() {
- return this.type == T_PUBLIC;
- }
-
- /**
- * Returns the system identifier of this external ID. A system identifier
- * is a URI, which may be used to retrieve an external entity's content.
- *
- * @return The system identifier, or <var>null</var> if the identifier is
- * not defined.
- * @see #getPubidLiteral
- */
- public String getSystemLiteral() {
- return this.systemID;
- }
-
- /**
- * Returns the public identifier of this external ID. This value is only
- * valid if the identifier is defined as <var>public</var> (as opposed to
- * <var>system</var>). Public identifiers may be used to try to generate
- * an alternative URI in order to retrieve an external entity's content.
- * If retrieval fails using the public identifier, an attempt must be made
- * to retrieve content using the system identifier.
- *
- * @return The public identifier, or <var>null</var> if the identifier is
- * not defined.
- * @see #getSystemLiteral
- */
- public String getPubIdLiteral() {
- return this.publicID;
- }
-
- /**
- * Returns this external ID in the format it was declared: <CODE>SYSTEM
- * &quot;<VAR>systemID</VAR>&quot;</CODE> or <CODE>PUBLIC &quot;<VAR>publicID</VAR>&quot;
- * &quot;<VAR>systemID</VAR>&quot;</CODE>.
- *
- * @return XML string representing the content of the external ID (never
- * <var>null</var>).
- */
- public String toString() {
- String ret;
- if (isSystem()) {
- ret = "SYSTEM \"" + getSystemLiteral() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (null != getSystemLiteral()) {
- ret = "PUBLIC \"" + getPubIdLiteral() + "\" \"" + getSystemLiteral() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- else {
- ret = "PUBLIC \"" + getPubIdLiteral() + "\""; // for NOTATION //$NON-NLS-1$ //$NON-NLS-2$
- }
- return ret;
- }
-
- /**
- *
- */
- public boolean equals(Object obj) {
- if (obj == null)
- return false;
- if (!(obj instanceof ExternalID))
- return false;
- ExternalID eid = (ExternalID) obj;
- if (!((eid.publicID == null && this.publicID == null) || eid.publicID != null && eid.publicID.equals(this.publicID)))
- return false;
- if (!((eid.systemID == null && this.systemID == null) || eid.systemID != null && eid.systemID.equals(this.systemID)))
- return false;
- return true;
- }
-
-
- /**
- *
- */
- public int hashCode() {
- int retval = 0;
- if (publicID != null)
- retval = publicID.hashCode();
- if (systemID != null)
- retval += systemID.hashCode();
- return retval;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/NotationDecl.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/NotationDecl.java
deleted file mode 100644
index d915801b48..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/NotationDecl.java
+++ /dev/null
@@ -1,77 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-/**
- * Notations are how the Document Type Description (DTD) records hints about
- * the format of an XML "unparsed entity" -- in other words, non-XML data
- * bound to this document type, which some applications may wish to consult
- * when manipulating the document. A Notation represents a name-value pair,
- * with its nodeName being set to the declared name of the notation.
- */
-public class NotationDecl extends BaseNode {
- /** Public identifier. */
- protected String publicId = null;
-
- /** System identifier. */
- protected String systemId = null;
-
- //
- // Constructors
- //
-
- /** Factory constructor. */
- public NotationDecl(String name, String ownerDTD) {
- super(name, ownerDTD);
- }
-
- //
- // Notation methods
- //
-
- /**
- * The Public Identifier for this Notation. If no public identifier was
- * specified, this will be null.
- */
- public String getPublicId() {
- return publicId;
- } // getPublicId():String
-
- /**
- * The System Identifier for this Notation. If no system identifier was
- * specified, this will be null.
- */
- public String getSystemId() {
- return systemId;
- } // getSystemId():String
-
- //
- // Public methods
- //
-
- /**
- * NON-DOM: The Public Identifier for this Notation. If no public
- * identifier was specified, this will be null.
- */
- public void setPublicId(String id) {
- publicId = id;
- } // setPublicId(String)
-
- /**
- * NON-DOM: The System Identifier for this Notation. If no system
- * identifier was specified, this will be null.
- */
- public void setSystemId(String id) {
- systemId = id;
- } // setSystemId(String)
-
-} // class NotationImpl
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/StringParser.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/StringParser.java
deleted file mode 100644
index 799b74beb8..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/StringParser.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.wst.dtd.core.internal.saxparser;
-
-/**
- * Reader for processing/parsing xml string
- *
- * @version
- */
-public class StringParser {
- String fData = null;
- int fEndOffset;
- int fMostRecentChar;
- int fCurrentOffset;
- boolean fCalledCharPropInit = false;
-
- public StringParser(String data) {
- fData = data;
- fCurrentOffset = 0;
- fEndOffset = fData.length();
- fMostRecentChar = fEndOffset == 0 ? -1 : fData.charAt(0);
- }
-
- public String getString(int offset, int length) {
- if (length == 0)
- return ""; //$NON-NLS-1$
- return fData.substring(offset, offset + length);
- }
-
- public String getData() {
- return fData;
- }
-
- public String getRemainingString() {
- return fData.substring(getCurrentOffset());
- }
-
- public int getCurrentOffset() {
- return fCurrentOffset;
- }
-
- //
- //
- public int loadNextChar() {
- if (++fCurrentOffset >= fEndOffset) {
- fMostRecentChar = -1;
- }
- else {
- fMostRecentChar = fData.charAt(fCurrentOffset);
- }
- return fMostRecentChar;
- }
-
- public int loadPreviousChar() {
- if (--fCurrentOffset < 0)
- fMostRecentChar = -1;
- else
- fMostRecentChar = fData.charAt(fCurrentOffset);
- return fMostRecentChar;
- }
-
- //
- //
- public boolean lookingAtChar(char chr, boolean skipPastChar) {
- int ch = fMostRecentChar;
- if (ch != chr) {
- return false;
- }
- if (skipPastChar) {
- if (++fCurrentOffset >= fEndOffset) {
- fMostRecentChar = -1;
- }
- else {
- fMostRecentChar = fData.charAt(fCurrentOffset);
- }
- }
- return true;
- }
-
- //
- //
- //
- public boolean lookingAtValidChar(boolean skipPastChar) {
- int ch = fMostRecentChar;
- if (ch < 0xD800) {
- if (ch < 0x20 && ch != 0x09 && ch != 0x0A && ch != 0x0D) {
- return false;
- }
- if (skipPastChar) {
- if (++fCurrentOffset >= fEndOffset) {
- fMostRecentChar = -1;
- }
- else {
- fMostRecentChar = fData.charAt(fCurrentOffset);
- }
- }
- return true;
- }
- if (ch > 0xFFFD) {
- return false;
- }
- if (ch < 0xDC00) {
- if (fCurrentOffset + 1 >= fEndOffset) {
- return false;
- }
- ch = fData.charAt(fCurrentOffset + 1);
- if (ch < 0xDC00 || ch >= 0xE000) {
- return false;
- }
- else if (!skipPastChar) {
- return true;
- }
- else {
- fCurrentOffset++;
- }
- }
- else if (ch < 0xE000) {
- return false;
- }
- if (skipPastChar) {
- if (++fCurrentOffset >= fEndOffset) {
- fMostRecentChar = -1;
- }
- else {
- fMostRecentChar = fData.charAt(fCurrentOffset);
- }
- }
- return true;
- }
-
- //
- //
- //
- public boolean lookingAtSpace(boolean skipPastChar) {
- int ch = fMostRecentChar;
- if (ch > 0x20)
- return false;
- if (ch == 0x20 || ch == 0x0A || ch == 0x0D || ch == 0x09) {
- if (skipPastChar) {
- loadNextChar();
- }
- return true;
- }
- return false;
- }
-
- //
- //
- //
- public void skipToChar(char chr, boolean skipPastChar) {
- //
- // REVISIT - this will skip invalid characters without reporting them.
- //
- int ch = fMostRecentChar;
- while (true) {
- if (ch == chr) {
- if (skipPastChar) {
- loadNextChar();
- }
- return;
- }
- if (ch == -1) {
- return;
- }
- ch = loadNextChar();
- }
- }
-
- /**
- * skips to the last occurrence of the specified character.
- * if <code>skipPastChar</code> is true, the parser is
- * incremented past the last occurrence of the character.
- * This method starts at the end of the character data, and
- * moves backwards to find the last occurrence of the character
- */
- public void skipToLastOfChar(char chr, boolean skipPastChar) {
- int ch = -1;
-
- // Move the cursor to the end offset to scan backwards.
- fCurrentOffset = fEndOffset;
-
- do {
- ch = loadPreviousChar();
-
- if(ch == -1)
- return;
-
- if (ch == chr) {
- if(skipPastChar)
- loadNextChar();
- return;
- }
-
- } while(true);
- }
-
- //
- //
- //
- public void skipPastSpaces() {
- int ch = fMostRecentChar;
- if (ch == -1) {
- // changeReaders().skipPastSpaces();
- return;
- }
- while (true) {
- if (ch > 0x20 || (ch != 0x20 && ch != 0x0A && ch != 0x09 && ch != 0x0D)) {
- fMostRecentChar = ch;
- return;
- }
- if (++fCurrentOffset >= fEndOffset) {
- return;
- }
- ch = fData.charAt(fCurrentOffset);
- }
- }
-
- //
- //
- //
-
- public void skipPastNameAndPEReference(char fastcheck) {
- int ch = fMostRecentChar;
-
- if (ch != '%') {
- if (ch < 0x80) {
- if (ch == -1 || XMLCharacterProperties.fgAsciiInitialNameChar[ch] == 0)
- return;
- }
- else {
- if (!fCalledCharPropInit) {
- XMLCharacterProperties.initCharFlags();
- fCalledCharPropInit = true;
- }
- if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_InitialNameCharFlag) == 0)
- return;
- }
- }
- while (true) {
- ch = loadNextChar();
- if (fastcheck == ch)
- return;
- if (ch == '%' || ch == ';') {
- continue;
- }
-
- if (ch < 0x80) {
- if (ch == -1 || XMLCharacterProperties.fgAsciiNameChar[ch] == 0)
- return;
- }
- else {
- if (!fCalledCharPropInit) {
- XMLCharacterProperties.initCharFlags();
- fCalledCharPropInit = true;
- }
- if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_NameCharFlag) == 0)
- return;
- }
- }
- }
-
- public void skipPastName(char fastcheck) {
- int ch = fMostRecentChar;
- // System.out.println("skippastName ch: " +ch);
-
- if (ch < 0x80) {
- if (ch == -1 || XMLCharacterProperties.fgAsciiInitialNameChar[ch] == 0)
- return;
- }
- else {
- if (!fCalledCharPropInit) {
- XMLCharacterProperties.initCharFlags();
- fCalledCharPropInit = true;
- }
- if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_InitialNameCharFlag) == 0)
- return;
- }
-
- while (true) {
- ch = loadNextChar();
- if (fastcheck == ch)
- return;
- if (ch < 0x80) {
- if (ch == -1 || XMLCharacterProperties.fgAsciiNameChar[ch] == 0)
- return;
- }
- else {
- if (!fCalledCharPropInit) {
- XMLCharacterProperties.initCharFlags();
- fCalledCharPropInit = true;
- }
- if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_NameCharFlag) == 0)
- return;
- }
- }
- }
-
- //
- //
- //
-
- public void skipPastNmtoken(char fastcheck) {
- int ch = fMostRecentChar;
- while (true) {
- if (fastcheck == ch)
- return;
- if (ch < 0x80) {
- if (ch == -1 || XMLCharacterProperties.fgAsciiNameChar[ch] == 0)
- return;
- }
- else {
- if (!fCalledCharPropInit) {
- XMLCharacterProperties.initCharFlags();
- fCalledCharPropInit = true;
- }
- if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_NameCharFlag) == 0)
- return;
- }
- ch = loadNextChar();
- }
- }
-
- public void skipPastNmtokenAndPEReference(char fastcheck) {
- int ch = fMostRecentChar;
- while (true) {
- if (fastcheck == ch)
- return;
- if (ch == '%' || ch == ';') {
- ch = loadNextChar();
- continue;
- }
- if (ch < 0x80) {
- if (ch == -1 || XMLCharacterProperties.fgAsciiNameChar[ch] == 0)
- return;
- }
- else {
- if (!fCalledCharPropInit) {
- XMLCharacterProperties.initCharFlags();
- fCalledCharPropInit = true;
- }
- if ((XMLCharacterProperties.fgCharFlags[ch] & XMLCharacterProperties.E_NameCharFlag) == 0)
- return;
- }
- ch = loadNextChar();
- }
- }
-
- //
- //
- //
- public boolean skippedString(char[] s) {
- int ch = fMostRecentChar;
- if (ch != s[0]) {
- return false;
- }
- if (fCurrentOffset + s.length > fEndOffset)
- return false;
- for (int i = 1; i < s.length; i++) {
- if (fData.charAt(fCurrentOffset + i) != s[i])
- return false;
- }
- fCurrentOffset += (s.length - 1);
- loadNextChar();
- return true;
- }
-
- //
- //
- //
- public int scanInvalidChar() throws Exception {
- int ch = fMostRecentChar;
- loadNextChar();
- return ch;
- }
-
- //
- //
- //
- /*
- * public int scanCharRef(boolean hex) throws Exception { int ch =
- * fMostRecentChar; if (ch == -1) // return
- * changeReaders().scanCharRef(hex); return ch; int num = 0; if (hex) { if
- * (ch > 'f' || XMLCharacterProperties.fgAsciiXDigitChar[ch] == 0) return
- * XMLEntityHandler.CHARREF_RESULT_INVALID_CHAR; num = ch - (ch < 'A' ?
- * '0' : (ch < 'a' ? 'A' : 'a') - 10); } else { if (ch < '0' || ch > '9')
- * return XMLEntityHandler.CHARREF_RESULT_INVALID_CHAR; num = ch - '0'; }
- * boolean toobig = false; while (true) { ch = loadNextChar(); if (ch ==
- * -1) return XMLEntityHandler.CHARREF_RESULT_SEMICOLON_REQUIRED; if (hex) {
- * if (ch > 'f' || XMLCharacterProperties.fgAsciiXDigitChar[ch] == 0)
- * break; } else { if (ch < '0' || ch > '9') break; } if (hex) { int dig =
- * ch - (ch < 'A' ? '0' : (ch < 'a' ? 'A' : 'a') - 10); num = (num << 4) +
- * dig; } else { int dig = ch - '0'; num = (num * 10) + dig; } if (num >
- * 0x10FFFF) { toobig = true; num = 0; } } if (ch != ';') return
- * XMLEntityHandler.CHARREF_RESULT_SEMICOLON_REQUIRED; loadNextChar(); if
- * (toobig) return XMLEntityHandler.CHARREF_RESULT_OUT_OF_RANGE; return
- * num; }
- */
- //
- //
- //
- /*
- * public int scanStringLiteral() throws Exception { boolean single; if
- * (!(single = lookingAtChar('\'', true)) && !lookingAtChar('\"', true)) {
- * return XMLEntityHandler.STRINGLIT_RESULT_QUOTE_REQUIRED; } int offset =
- * fCurrentOffset; char qchar = single ? '\'' : '\"'; while
- * (!lookingAtChar(qchar, false)) { if (!lookingAtValidChar(true)) {
- * return XMLEntityHandler.STRINGLIT_RESULT_INVALID_CHAR; } } // int
- * stringIndex = addString(offset, fCurrentOffset - offset); int
- * stringIndex = addString(offset, fCurrentOffset - offset);
- * lookingAtChar(qchar, true); // move past qchar return stringIndex; }
- */
-
- //
- //
- public boolean scanAttValue(char qchar) {
- boolean result = true;
- while (true) {
- if (lookingAtChar(qchar, false)) {
- break;
- }
- if (lookingAtChar(' ', true)) {
- continue;
- }
- if (!lookingAtValidChar(true)) {
- result = false;
- }
- }
- lookingAtChar(qchar, true);
- return result;
- }
-
- //
- // [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
- // | "'" ([^%&'] | PEReference | Reference)* "'"
- //
- // The values in the following table are defined as:
- //
- // 0 - not special
- // 1 - quote character
- // 2 - reference
- // 3 - peref
- // 4 - invalid
- //
- public static final byte fgAsciiEntityValueChar[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 4, 4, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 1, 0, 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, // '\"',
- // '%',
- // '&',
- // '\''
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
- /*
- * public int scanEntityValue(int qchar, boolean createString) throws
- * Exception { int offset = fCurrentOffset; int ch = fMostRecentChar;
- * while (true) { if (ch == -1) { changeReaders(); // do not call next
- * reader, our caller may need to change the parameters return
- * XMLEntityHandler.ENTITYVALUE_RESULT_END_OF_INPUT; } if (ch < 0x80) {
- * switch (fgAsciiEntityValueChar[ch]) { case 1: // quote char if (ch ==
- * qchar) { if (!createString) return
- * XMLEntityHandler.ENTITYVALUE_RESULT_FINISHED; int length =
- * fCurrentOffset - offset; int result = length == 0 ?
- * StringPool.EMPTY_STRING : addString(offset, length); loadNextChar();
- * return result; } // the other quote character is not special // fall
- * through case 0: // non-special char if (++fCurrentOffset >= fEndOffset) {
- * if (oweTrailingSpace) { oweTrailingSpace = false; ch = fMostRecentChar = ' '; }
- * else { ch = fMostRecentChar = -1; } } else { ch = fMostRecentChar =
- * fData.charAt(fCurrentOffset); } continue; case 2: // reference return
- * XMLEntityHandler.ENTITYVALUE_RESULT_REFERENCE; case 3: // peref return
- * XMLEntityHandler.ENTITYVALUE_RESULT_PEREF; case 4: // invalid return
- * XMLEntityHandler.ENTITYVALUE_RESULT_INVALID_CHAR; } } else if (ch <
- * 0xD800) { ch = loadNextChar(); } else if (ch >= 0xE000 && (ch <= 0xFFFD ||
- * (ch >= 0x10000 && ch <= 0x10FFFF))) { // // REVISIT - needs more code
- * to check surrogates. // ch = loadNextChar(); } else { return
- * XMLEntityHandler.ENTITYVALUE_RESULT_INVALID_CHAR; } } }
- */
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/TString.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/TString.java
deleted file mode 100644
index 4b12e8981d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/TString.java
+++ /dev/null
@@ -1,350 +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.wst.dtd.core.internal.saxparser;
-
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * This class provides static methods for some of the very used IString
- * operations
- */
-
-public class TString {
- private static final String ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; //$NON-NLS-1$
- private static final String ALPHANUMERIC = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //$NON-NLS-1$
- private static final String NUMERIC = "0123456789"; //$NON-NLS-1$
-
- // change all occurrences of oldPat to newPat
- public static String change(String in, String oldPat, String newPat) {
- if (oldPat.length() == 0)
- return in;
- if (oldPat.length() == 1 && newPat.length() == 1)
- return in.replace(oldPat.charAt(0), newPat.charAt(0));
-
- int lastIndex = 0;
- int newIndex = 0;
- StringBuffer newString = new StringBuffer();
- for (;;) {
- newIndex = in.indexOf(oldPat, lastIndex);
- if (newIndex != -1) {
- newString.append(in.substring(lastIndex, newIndex) + newPat);
- lastIndex = newIndex + oldPat.length();
- }
- else {
- newString.append(in.substring(lastIndex));
- break;
- }
- }
- return newString.toString();
- }
-
- // change the occurrences of oldPat to newPat starting at startPosition
- // for number of numChanges
- // Note: the 1st char in the string has position of 0
-
- public static String change(String in, String oldPat, String newPat, int startPos, int numChanges) {
- if (oldPat.length() == 0)
- return in;
- if (oldPat.length() == 1 && newPat.length() == 1)
- return in.replace(oldPat.charAt(0), newPat.charAt(0));
-
- int inLen = in.length();
-
- if (startPos >= inLen)
- return in;
-
- int lastIndex = startPos;
- int newIndex = 0;
- int countChanges = 0;
-
-
- StringBuffer newString = new StringBuffer();
-
- for (;;) {
- newIndex = in.indexOf(oldPat, lastIndex);
- if (newIndex != -1) {
- newString.append(in.substring(lastIndex, newIndex) + newPat);
- lastIndex = newIndex + oldPat.length();
- countChanges++;
- }
- else {
- newString.append(in.substring(lastIndex));
- break;
- }
-
- if (countChanges == numChanges) {
- newString.append(in.substring(lastIndex));
- break;
- }
- }
-
- return newString.toString();
- }
-
- public static String word(String in, int i) {
- StringTokenizer st = new StringTokenizer(in);
- if (i <= 0 || i > st.countTokens())
- return ""; //$NON-NLS-1$
- else {
- String ret = new String();
- while (st.hasMoreTokens()) {
- ret = st.nextToken();
- if (--i == 0)
- return ret;
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- public static String words(String in, int i) {
- StringTokenizer st = new StringTokenizer(in);
- if (i <= 0 || i > st.countTokens())
- return ""; //$NON-NLS-1$
- else {
- while (st.hasMoreTokens()) {
- if (--i == 0)
- break;
- st.nextToken();
- }
- if (st.hasMoreTokens())
- return st.nextToken(""); //$NON-NLS-1$
- else
- return ""; //$NON-NLS-1$
- }
- }
-
- public static String appendSpaces(String in, int len) {
- if (len < 1)
- return in;
-
- StringBuffer sb = new StringBuffer(in);
- for (int i = 0; i < len; i++) {
- sb.append(" "); //$NON-NLS-1$
- }
- return sb.toString();
- }
-
- public static int numWords(String in) {
- StringTokenizer st = new StringTokenizer(in);
- return st.countTokens();
- }
-
- // return the first index within srcString that is not in the validString
- // example:
- // srcString = "abcdefg"
- // validString = "bcfg"
- // return = 0 (i.e. char a is not in "bcfg") - 1st index = 0
-
- public static int indexOfAnyBut(String srcString, String validString) {
- int result = -1;
- int srcLen = srcString.length();
-
- // walk backward to find if a char within srcString is in validString
- for (int i = 0; i < srcLen; i++) {
- // not found, stop it
- if (validString.indexOf(srcString.charAt(i)) == -1) {
- result = i;
- break;
- }
-
- }
-
- return result;
- }
-
- // return the last index within srcString that is not in the validString
- // example:
- // srcString = "abcdefg"
- // validString = "bcfg"
- // return = 4 (i.e. char e is not in "bcfg") - 1st index = 0
-
- public static int lastIndexOfAnyBut(String srcString, String validString) {
- int result = -1;
- int srcLen = srcString.length();
-
- // walk backward to find if a char within srcString is in validString
- for (int i = srcLen - 1; i >= 0; i--) {
- // not found, stop it
- if (validString.indexOf(srcString.charAt(i)) == -1) {
- result = i;
- break;
- }
-
- }
-
- return result;
- }
-
- // return number of occurrences of searchChar within srcString
- // example:
- // srcString = "::f::f::g"
- // seachrChar = ':'
- // return = 6
-
- public static int occurrenceOf(String srcString, char searchChar) {
- int result = 0;
- // walk backward to find if a char within srcString is in validString
- if (srcString.length() > 0) {
-
- for (int i = 0; i < srcString.length(); i++) {
- // found, increment the count
- if (searchChar == srcString.charAt(i))
- result++;
- }
- }
-
- return result;
- }
-
- // strip the leading pString in the srcString
- // example:
- // srcString = "::f::f::g"
- // pString "::"
- // return = "f::f::g"
-
- public static String stripLeading(String srcString, String pString) {
- String result;
-
- if (srcString.startsWith(pString)) // leading patString found
- result = srcString.substring(pString.length(), srcString.length());
- else
- // not found
- result = srcString;
-
- return result;
- }
-
- // strip the trailing pString in the srcString
- // example:
- // srcString = "f::f::g::"
- // pString "::"
- // return = "f::f::g"
-
- public static String stripTrailing(String srcString, String pString) {
- String result;
-
- if (srcString.endsWith(pString)) // leading patString found
- result = srcString.substring(0, srcString.lastIndexOf(pString));
- else
- // not found
- result = srcString;
-
- return result;
- }
-
- /**
- * strip the trailing blanks in the src
- */
- public static String stripTrailingBlanks(String src) {
-
- if (src != null) {
- while (src.length() > 0) {
- if (src.endsWith(" ")) //$NON-NLS-1$
- src = src.substring(0, src.length() - 1);
- else
- break;
- }
- }
-
- return src;
- }
-
-
-
- // return a string that contains number of copies of srcString
- // example:
- // srcString = "abc"
- // numberOfCopies = 2
- // return string = "abcabc"
-
- public static String copy(String srcString, int numberOfCopies) {
- StringBuffer result = new StringBuffer();
-
- if (numberOfCopies > 0) {
- for (int i = 1; i <= numberOfCopies; i++)
- result.append(srcString);
- }
- else
- result = new StringBuffer(srcString);
-
- return result.toString();
- }
-
- //
- // return true if all chars in srcString are in {a...z} or {A...Z}
-
- public static boolean isAlphabetic(String srcString) {
- return (lastIndexOfAnyBut(srcString, ALPHABET) == -1);
- }
-
- //
- // return true if all chars in srcString are in {a...z,} or {A...Z}
- // {0...9}
-
- public static boolean isAlphanumeric(String srcString) {
- return (lastIndexOfAnyBut(srcString, ALPHANUMERIC) == -1);
- }
-
-
- //
- // return true if all chars are in '0' - '9'
-
- public static boolean isDigits(String srcString) {
- return (lastIndexOfAnyBut(srcString, NUMERIC) == -1);
- }
-
-
- public static boolean isEmptyOrNull(String string) {
- return string == null || string.length() == 0;
- }
-
-
- //
- // return the string after the matching token is removed
- public static String match(String in, String token) throws Exception {
- if (in == null)
- return null;
-
- in = in.trim();
- if (in.startsWith(token))
- return in.substring(token.length(), in.length());
- else
- throw new Exception("Expected: " + token + " but got:" + word(in, 1)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static long getLong(String str) {
- try {
- return Long.parseLong(str);
- }
- catch (Exception m) {
- return 0;
- }
- }
-
- // return true if the " " appears within srcString
- // example:
- // srcString = "a m"
- // return = true
-
- public static boolean containsDoubleBlanks(String srcString) {
- String bb = " "; //$NON-NLS-1$
- char b = bb.charAt(0);
-
- if (srcString.length() > 0) {
- for (int i = 0; i < (srcString.length() - 1); i++) {
- if ((b == srcString.charAt(i)) & (b == srcString.charAt(i + 1)))
- return true;
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/XMLCharacterProperties.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/XMLCharacterProperties.java
deleted file mode 100644
index 1c38034081..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/XMLCharacterProperties.java
+++ /dev/null
@@ -1,448 +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
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.saxparser;
-
-/**
- * A class representing properties of characters according to various W3C
- * recommendations
- *
- * XMLCharacterProperties provides convenience methods for commonly used
- * character tests.
- *
- * For performance reasons, the tables used by the convenience methods are
- * also public, and are directly accessed by performance critical routines.
- *
- */
-
-public final class XMLCharacterProperties {
- /*
- * [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+
- *
- * Note: This is the same as the ascii portion of the NameChar definition.
- */
- /**
- * Check to see if a string is a valid version string according to [26] in
- * the XML 1.0 Recommendation
- *
- * @param version
- * string to check
- * @return true if version is a valid version string
- */
- public static boolean validVersionNum(String version) {
- if (version.length() == 0)
- return false;
- for (int i = 0; i < version.length(); i++) {
- char ch = version.charAt(i);
- if (ch > 'z' || fgAsciiNameChar[ch] == 0)
- return false;
- }
- return true;
- }
-
- /*
- * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
- */
- /**
- * Check to see if a string is a valid encoding name according to [81] in
- * the XML 1.0 Recommendation
- *
- * @param encoding
- * string to check
- * @return true if encoding is a valid encoding name
- */
- public static boolean validEncName(String encoding) {
- if (encoding.length() == 0)
- return false;
- char ch = encoding.charAt(0);
- if (ch > 'z' || fgAsciiAlphaChar[ch] == 0)
- return false;
- for (int i = 1; i < encoding.length(); i++) {
- ch = encoding.charAt(i);
- if (ch > 'z' || fgAsciiEncNameChar[ch] == 0)
- return false;
- }
- return true;
- }
-
- /*
- * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] |
- * [-'()+,./:=?;!*#@$_%]
- */
- /**
- * Check to see if a string is a valid public identifier according to [13]
- * in the XML 1.0 Recommendation
- *
- * @param publicId
- * string to check
- * @return true if publicId is a valid public identifier
- */
- public static int validPublicId(String publicId) {
- if (publicId.length() == 0)
- return -1;
- for (int i = 0; i < publicId.length(); i++) {
- char ch = publicId.charAt(i);
- if (ch > 'z' || fgAsciiPubidChar[ch] == 0)
- return i;
- }
- return -1;
- }
-
- /*
- * [5] Name ::= (Letter | '_' | ':') (NameChar)*
- */
- /**
- * Check to see if a string is a valid Name according to [5] in the XML
- * 1.0 Recommendation
- *
- * @param name
- * string to check
- * @return true if name is a valid Name
- */
- public static boolean validName(String name) {
- XMLCharacterProperties.initCharFlags();
- if (name.length() == 0)
- return false;
- char ch = name.charAt(0);
- if (ch > 'z') {
- if ((fgCharFlags[ch] & E_InitialNameCharFlag) == 0)
- return false;
- }
- else if (fgAsciiInitialNameChar[ch] == 0)
- return false;
- for (int i = 1; i < name.length(); i++) {
- ch = name.charAt(i);
- if (ch > 'z') {
- if ((fgCharFlags[ch] & E_NameCharFlag) == 0)
- return false;
- }
- else if (fgAsciiNameChar[ch] == 0)
- return false;
- }
- return true;
- }
-
- /*
- * from the namespace rec [5] NCName ::= (Letter | '_' | ':')
- * (NameNCChar)*
- */
- /**
- * Check to see if a string is a valid NCName according to [5] from the
- * XML Namespaces 1.0 Recommendation
- *
- * @param name
- * string to check
- * @return true if name is a valid NCName
- */
- public static boolean validNCName(String name) {
- XMLCharacterProperties.initCharFlags();
- if (name.length() == 0)
- return false;
- char ch = name.charAt(0);
- if (ch > 'z') {
- if ((fgCharFlags[ch] & E_InitialNameCharFlag) == 0)
- return false;
- }
- else if (fgAsciiInitialNCNameChar[ch] == 0)
- return false;
- for (int i = 1; i < name.length(); i++) {
- ch = name.charAt(i);
- if (ch > 'z') {
- if ((fgCharFlags[ch] & E_NameCharFlag) == 0)
- return false;
- }
- else if (fgAsciiNCNameChar[ch] == 0)
- return false;
- }
- return true;
- }
-
-
- /*
- * [7] Nmtoken ::= (NameChar)+
- */
- /**
- * Check to see if a string is a valid Nmtoken according to [7] in the XML
- * 1.0 Recommendation
- *
- * @param nmtoken
- * string to checj
- * @return true if nmtoken is a valid Nmtoken
- */
- public static boolean validNmtoken(String nmtoken) {
- XMLCharacterProperties.initCharFlags();
- if (nmtoken.length() == 0)
- return false;
- for (int i = 0; i < nmtoken.length(); i++) {
- char ch = nmtoken.charAt(i);
- if (ch > 'z') {
- if ((fgCharFlags[ch] & E_NameCharFlag) == 0)
- return false;
- }
- else if (fgAsciiNameChar[ch] == 0) {
- return false;
- }
- }
- return true;
- }
-
- /*
- * Here are tables used to build character properties.
- */
- public static final byte fgAsciiXDigitChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // '0'
- // -
- // '9'
- 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 'A' - 'F'
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 'a'
- // -
- // 'f'
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- public static final byte fgAsciiAlphaChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A'
- // -
- // 'O'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, // 'P' - 'Z'
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z'
- };
- public static final byte fgAsciiEncNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, // '-'
- // is
- // 0x2D
- // and
- // '.'
- // is
- // 0x2E
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // '0' - '9'
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z'
- // and '_' is
- // 0x5F
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z'
- };
- public static final byte fgAsciiPubidChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // ' ',
- // '!',
- // '#',
- // '$',
- // '%',
- // '\'', '(', ')', '*', '+', ',', '-', '.', '/'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, // '0' - '9',
- // ':', ';',
- // '=', '?'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // '@', 'A' -
- // 'O'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z'
- // and '_' is
- // 0x5F
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z'
- };
- public static final byte fgAsciiInitialNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, // ':'
- // is
- // 0x3A
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z'
- // and '_' is
- // 0x5F
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z'
- };
- public static final byte fgAsciiNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, // '-'
- // is
- // 0x2D
- // and
- // '.'
- // is
- // 0x2E
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, // '0' - '9'
- // and ':' is
- // 0x3A
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z'
- // and '_' is
- // 0x5F
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z'
- };
- public static final byte fgAsciiInitialNCNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ':'
- // is
- // 0x3A
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z'
- // and '_' is
- // 0x5F
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z'
- };
- public static final byte fgAsciiNCNameChar[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, // '-'
- // is
- // 0x2D
- // and
- // '.'
- // is
- // 0x2E
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // '0' - '9'
- // and ':' is
- // 0x3A
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'A' - 'O'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, // 'P' - 'Z'
- // and '_' is
- // 0x5F
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 'a' - 'o'
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 // 'p' - 'z'
- };
- public static final byte fgAsciiCharData[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 4, // tab
- // is
- // 0x09
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, // '&'
- // is
- // 0x26
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, // '<' is 0x3C
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, // ']'
- // is
- // 0x5D
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- public static final byte fgAsciiWSCharData[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 5, 4, 4, // tab
- // is
- // 0x09,
- // LF
- // is
- // 0x0A,
- // CR
- // is
- // 0x0D
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ' '
- // is
- // 0x20,
- // '&'
- // is
- // 0x26
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, // '<' is 0x3C
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, // ']'
- // is
- // 0x5D
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- public static final byte E_CharDataFlag = 1 << 0;
- public static final byte E_InitialNameCharFlag = 1 << 1;
- public static final byte E_NameCharFlag = 1 << 2;
- public static byte[] fgCharFlags = null;
-
- public static synchronized void initCharFlags() {
- if (fgCharFlags == null) {
- fgCharFlags = new byte[0x10000];
- setFlagForRange(fgCharDataRanges, E_CharDataFlag);
- setFlagForRange(fgInitialNameCharRanges, (byte) (E_InitialNameCharFlag | E_NameCharFlag));
- setFlagForRange(fgNameCharRanges, E_NameCharFlag);
- }
- }
-
- private static void setFlagForRange(char[] ranges, byte flag) {
- int i;
- int ch;
- for (i = 0; (ch = ranges[i]) != 0; i += 2) {
- int endch = ranges[i + 1];
- while (ch <= endch)
- fgCharFlags[ch++] |= flag;
- }
- for (i++; (ch = ranges[i]) != 0; i++)
- fgCharFlags[ch] |= flag;
- }
-
- /*
- * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] // any Unicode character,
- * excluding the | [#xE000-#xFFFD] | [#x10000-#x10FFFF] // surrogate
- * blocks, FFFE, and FFFF. [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
- *
- * We will use Char - ( [^<&] | ']' | #xA | #xD ) and handle the special
- * cases inline.
- */
- private static final char fgCharDataRanges[] = {0x0020, 0x0025, // '&' is
- // 0x0026
- 0x0027, 0x003B, // '<' is 0x003C
- 0x003D, 0x005C, // ']' is 0x005D
- 0x005E, 0xD7FF, 0xE000, 0xFFFD, 0x0000, 0x0009, // tab
- 0x0000};
- /*
- * [5] Name ::= (Letter | '_' | ':') (NameChar)* [4] NameChar ::= Letter |
- * Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [84] Letter
- * ::= BaseChar | Ideographic [85] BaseChar ::= <see standard> [86]
- * Ideographic ::= <see standard> [87] CombiningChar ::= <see standard>
- * [88] Digit ::= <see standard> [89] Extender ::= <see standard>
- */
- private static final char fgInitialNameCharRanges[] = {
- //
- // Ranges:
- //
- // BaseChar ranges
- //
- 0x0041, 0x005A, 0x0061, 0x007A, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x0131, 0x0134, 0x013E, 0x0141, 0x0148, 0x014A, 0x017E, 0x0180, 0x01C3, 0x01CD, 0x01F0, 0x01F4, 0x01F5, 0x01FA, 0x0217, 0x0250, 0x02A8, 0x02BB, 0x02C1, 0x0388, 0x038A, 0x038E, 0x03A1, 0x03A3, 0x03CE, 0x03D0, 0x03D6, 0x03E2, 0x03F3, 0x0401, 0x040C, 0x040E, 0x044F, 0x0451, 0x045C, 0x045E, 0x0481, 0x0490, 0x04C4, 0x04C7, 0x04C8, 0x04CB, 0x04CC, 0x04D0, 0x04EB, 0x04EE, 0x04F5, 0x04F8, 0x04F9, 0x0531, 0x0556, 0x0561, 0x0586, 0x05D0, 0x05EA, 0x05F0, 0x05F2, 0x0621, 0x063A, 0x0641, 0x064A, 0x0671, 0x06B7, 0x06BA, 0x06BE, 0x06C0, 0x06CE, 0x06D0, 0x06D3, 0x06E5, 0x06E6, 0x0905, 0x0939, 0x0958, 0x0961, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B6, 0x09B9, 0x09DC, 0x09DD, 0x09DF, 0x09E1, 0x09F0, 0x09F1, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A59, 0x0A5C, 0x0A72, 0x0A74, 0x0A85, 0x0A8B, 0x0A8F, 0x0A91,
- 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B36, 0x0B39, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB5, 0x0BB7, 0x0BB9, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C33, 0x0C35, 0x0C39, 0x0C60, 0x0C61, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CE0, 0x0CE1, 0x0D05, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D28, 0x0D2A, 0x0D39, 0x0D60, 0x0D61, 0x0E01, 0x0E2E, 0x0E32, 0x0E33, 0x0E40, 0x0E45, 0x0E81, 0x0E82, 0x0E87, 0x0E88, 0x0E94, 0x0E97, 0x0E99, 0x0E9F, 0x0EA1, 0x0EA3, 0x0EAA, 0x0EAB, 0x0EAD, 0x0EAE, 0x0EB2, 0x0EB3, 0x0EC0, 0x0EC4, 0x0F40, 0x0F47, 0x0F49, 0x0F69, 0x10A0, 0x10C5, 0x10D0, 0x10F6, 0x1102, 0x1103, 0x1105, 0x1107, 0x110B, 0x110C, 0x110E, 0x1112, 0x1154, 0x1155, 0x115F, 0x1161, 0x116D, 0x116E,
- 0x1172, 0x1173, 0x11AE, 0x11AF, 0x11B7, 0x11B8, 0x11BC, 0x11C2, 0x1E00, 0x1E9B, 0x1EA0, 0x1EF9, 0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x212A, 0x212B, 0x2180, 0x2182, 0x3041, 0x3094, 0x30A1, 0x30FA, 0x3105, 0x312C, 0xAC00, 0xD7A3,
- //
- // Ideographic ranges
- //
- 0x3021, 0x3029, 0x4E00, 0x9FA5,
- //
- // Ranges end marker
- //
- 0x0000,
- //
- // Single char values
- //
- 0x003A, // ':'
- 0x005F, // '_'
- //
- // BaseChar singles
- //
- 0x0386, 0x038C, 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0559, 0x06D5, 0x093D, 0x09B2, 0x0A5E, 0x0A8D, 0x0ABD, 0x0AE0, 0x0B3D, 0x0B9C, 0x0CDE, 0x0E30, 0x0E84, 0x0E8A, 0x0E8D, 0x0EA5, 0x0EA7, 0x0EB0, 0x0EBD, 0x1100, 0x1109, 0x113C, 0x113E, 0x1140, 0x114C, 0x114E, 0x1150, 0x1159, 0x1163, 0x1165, 0x1167, 0x1169, 0x1175, 0x119E, 0x11A8, 0x11AB, 0x11BA, 0x11EB, 0x11F0, 0x11F9, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2126, 0x212E,
- //
- // Ideographic singles
- //
- 0x3007,
- //
- // Singles end marker
- //
- 0x0000};
- private static final char fgNameCharRanges[] = {
- //
- // Ranges:
- //
- 0x002D, 0x002E, // '-' and '.'
- //
- // CombiningChar ranges
- //
- 0x0300, 0x0345, 0x0360, 0x0361, 0x0483, 0x0486, 0x0591, 0x05A1, 0x05A3, 0x05B9, 0x05BB, 0x05BD, 0x05C1, 0x05C2, 0x064B, 0x0652, 0x06D6, 0x06DC, 0x06DD, 0x06DF, 0x06E0, 0x06E4, 0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0901, 0x0903, 0x093E, 0x094C, 0x0951, 0x0954, 0x0962, 0x0963, 0x0981, 0x0983, 0x09C0, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CD, 0x09E2, 0x09E3, 0x0A40, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A70, 0x0A71, 0x0A81, 0x0A83, 0x0ABE, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0B01, 0x0B03, 0x0B3E, 0x0B43, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B56, 0x0B57, 0x0B82, 0x0B83, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0C01, 0x0C03, 0x0C3E, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C82, 0x0C83, 0x0CBE, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0D02, 0x0D03, 0x0D3E, 0x0D43, 0x0D46, 0x0D48, 0x0D4A, 0x0D4D, 0x0E34, 0x0E3A, 0x0E47, 0x0E4E, 0x0EB4, 0x0EB9, 0x0EBB, 0x0EBC, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, 0x0F71, 0x0F84, 0x0F86, 0x0F8B,
- 0x0F90, 0x0F95, 0x0F99, 0x0FAD, 0x0FB1, 0x0FB7, 0x20D0, 0x20DC, 0x302A, 0x302F,
- //
- // Digit ranges
- //
- 0x0030, 0x0039, 0x0660, 0x0669, 0x06F0, 0x06F9, 0x0966, 0x096F, 0x09E6, 0x09EF, 0x0A66, 0x0A6F, 0x0AE6, 0x0AEF, 0x0B66, 0x0B6F, 0x0BE7, 0x0BEF, 0x0C66, 0x0C6F, 0x0CE6, 0x0CEF, 0x0D66, 0x0D6F, 0x0E50, 0x0E59, 0x0ED0, 0x0ED9, 0x0F20, 0x0F29,
- //
- // Extender ranges
- //
- 0x3031, 0x3035, 0x309D, 0x309E, 0x30FC, 0x30FE,
- //
- // Ranges end marker
- //
- 0x0000,
- //
- // Single char values
- //
- // CombiningChar singles
- //
- 0x05BF, 0x05C4, 0x0670, 0x093C, 0x094D, 0x09BC, 0x09BE, 0x09BF, 0x09D7, 0x0A02, 0x0A3C, 0x0A3E, 0x0A3F, 0x0ABC, 0x0B3C, 0x0BD7, 0x0D57, 0x0E31, 0x0EB1, 0x0F35, 0x0F37, 0x0F39, 0x0F3E, 0x0F3F, 0x0F97, 0x0FB9, 0x20E1, 0x3099, 0x309A,
- //
- // Extender singles
- //
- 0x00B7, 0x02D0, 0x02D1, 0x0387, 0x0640, 0x0E46, 0x0EC6, 0x3005,
- //
- // Singles end marker
- //
- 0x0000};
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationMessages.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationMessages.java
deleted file mode 100644
index 3b9f2b65ec..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationMessages.java
+++ /dev/null
@@ -1,37 +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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.validation;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by DTD Validation
- *
- * @plannedfor 1.0
- */
-public class DTDValidationMessages extends NLS {
- public static String _ERROR_REF_ELEMENT_UNDEFINED;
-
- public static String _UI_DIALOG_DTD_INVALID_TEXT;
- public static String _UI_DIALOG_DTD_INVALID_TITLE;
- public static String _UI_DIALOG_DTD_VALID_TEXT;
- public static String _UI_DIALOG_DTD_VALID_TITLE;
- private static final String BUNDLE_NAME = "org.eclipse.wst.dtd.core.internal.validation.DTDValidationResources";//$NON-NLS-1$
- public static String Missing_required_files_1;
- public static String Missing_required_files_2;
- public static String Missing_required_files_3;
- public static String Missing_required_files_4;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, DTDValidationMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationResources.properties b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationResources.properties
deleted file mode 100644
index 42a2d6f5c9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationResources.properties
+++ /dev/null
@@ -1,27 +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
-###############################################################################
-
-!
-! Validate DTD
-!
-_UI_DIALOG_DTD_INVALID_TITLE = Validation Failed
-_UI_DIALOG_DTD_VALID_TITLE = Validation Succeeded
-_UI_DIALOG_DTD_VALID_TEXT = The DTD file is valid.
-_UI_DIALOG_DTD_INVALID_TEXT = The DTD file is not valid. See the Problems view for error messages.
-
-!
-! Referenced Element Validation
-!
-_ERROR_REF_ELEMENT_UNDEFINED = The element {0} has not been declared.
-Missing_required_files_1=Required files xercesImpl.jar and xmlParserAPIs.jar cannot be found.\n\n
-Missing_required_files_2=Download Xerces 2.6.2 and place xercesImpl.jar and xmlParserAPIs.jar in a folder entitled jars in the org.eclipse.wst.xml.validation plugin.\n\n
-Missing_required_files_3=For more information see www.eclipse.org/webtools/wst/components/xml/xercesInfo.xml.
-Missing_required_files_4=Missing Xerces
diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidator.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidator.java
deleted file mode 100644
index c2ab0c1fe4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidator.java
+++ /dev/null
@@ -1,449 +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.wst.dtd.core.internal.validation;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
-import com.ibm.icu.util.StringTokenizer;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.xml.core.internal.validation.core.LazyURLInputStream;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.DeclHandler;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * DTD validation.
- */
-public class DTDValidator {
- /**
- * An entity resolver that wraps a URI resolver.
- */
- class DTDEntityResolver implements EntityResolver {
- private String fBaseLocation = null;
- private URIResolver fURIResolver = null;
-
- /**
- * Constructor.
- *
- * @param idresolver
- * The idresolver this entity resolver wraps.
- * @param baselocation
- * The base location to resolve with.
- */
- public DTDEntityResolver(URIResolver uriresolver, String baselocation) {
- this.fURIResolver = uriresolver;
-
- // TODO cs: we never seem to set a URIResolver
- // I create one here up front just incase
- //
- if (fURIResolver == null)
- {
- fURIResolver = URIResolverPlugin.createResolver();
- }
- this.fBaseLocation = baselocation;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String,
- * java.lang.String)
- */
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- String location = null;
-
-
- if (fBaseLocation.equals(systemId)) {
- location = systemId;
- }
- else {
- location = fURIResolver.resolve(fBaseLocation, publicId, systemId);
- }
- InputSource is = null;
- if (location != null && !location.equals("")) //$NON-NLS-1$
- {
- // CS : while working on bug 113537 I noticed we're not using the LazyURLInputStream
- // so fixed this to avoid leaking file handles
- //
- String physical = fURIResolver.resolvePhysicalLocation(fBaseLocation, publicId, location);
- is = new InputSource(location);
- is.setByteStream(new LazyURLInputStream(physical));
- }
- return is;
- }
- }
-
- /**
- * An error handler for DTD validation.
- *
- * @author Lawrence Mandel, IBM
- */
- class DTDErrorHandler implements ErrorHandler {
-
- private final int ERROR = 0;
- private final ValidationInfo fValidationInfo;
-
- private final int WARNING = 1;
-
- /**
- * Constructor.
- *
- * @param valinfo
- * The validation info object to use to register validation
- * messages.
- */
- public DTDErrorHandler(ValidationInfo valinfo) {
- this.fValidationInfo = valinfo;
- }
-
- /**
- * Add a validation message with the given severity.
- *
- * @param exception
- * The exception that contains the information about the
- * message.
- * @param severity
- * The severity of the validation message.
- */
- protected void addValidationMessage(SAXParseException exception, int severity) {
- if (exception.getSystemId() != null) {
- if (severity == WARNING) {
- fValidationInfo.addWarning(exception.getLocalizedMessage(), exception.getLineNumber(), exception.getColumnNumber(), exception.getSystemId());
- }
- else {
- fValidationInfo.addError(exception.getLocalizedMessage(), exception.getLineNumber(), exception.getColumnNumber(), exception.getSystemId());
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
- */
- public void error(SAXParseException exception) throws SAXException {
- addValidationMessage(exception, ERROR);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
- */
- public void fatalError(SAXParseException exception) throws SAXException {
- addValidationMessage(exception, ERROR);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
- */
- public void warning(SAXParseException exception) throws SAXException {
- addValidationMessage(exception, WARNING);
- }
- }
-
- class MultiHandler extends DefaultHandler implements org.xml.sax.DTDHandler, ContentHandler, LexicalHandler, DeclHandler {
- private static final String ELEMENT_MODIFIERS = "*+?"; //$NON-NLS-1$
-
- private static final String MODEL_DELIMITERS = ",()| "; //$NON-NLS-1$
-
- private List fElemDecls = new ArrayList();
-
- private Hashtable fElemRefs = new Hashtable();
-
- private List fIgnoreElemModel = new ArrayList();
-
- private List fIgnoreElemRefs = new ArrayList();
-
- private Locator fLocator = null;
-
- public MultiHandler() {
- fIgnoreElemRefs.add("#PCDATA"); //$NON-NLS-1$
- fIgnoreElemModel.add("ANY"); //$NON-NLS-1$
- fIgnoreElemModel.add("EMPTY"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.DeclHandler#attributeDecl(java.lang.String,
- * java.lang.String, java.lang.String, java.lang.String,
- * java.lang.String)
- */
- public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException {
- // No method impl.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
- */
- public void comment(char[] arg0, int arg1, int arg2) throws SAXException {
- // No method impl.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.DeclHandler#elementDecl(java.lang.String,
- * java.lang.String)
- */
- public void elementDecl(String name, String model) throws SAXException {
- // Add this element to the list of declared elements.
- fElemDecls.add(name);
-
- // Return if the element model should be ignored. The model should
- // be
- // ignored in such cases as when it is equal to EMPTY or ANY.
- if (fIgnoreElemModel.contains(model)) {
- return;
- }
- // Add each referenced element to the list of referenced elements
- int line = fLocator.getLineNumber();
- int column = fLocator.getColumnNumber();
- String uri = fLocator.getSystemId();
-
- StringTokenizer strtok = new StringTokenizer(model, MODEL_DELIMITERS);
- while (strtok.hasMoreTokens()) {
- String token = strtok.nextToken();
- int tokenlength = token.length();
- if (ELEMENT_MODIFIERS.indexOf(token.charAt(tokenlength - 1)) != -1) {
- token = token.substring(0, tokenlength - 1);
- // If the token is now empty (it was only ?,* or +) then
- // continue.
- if (token.length() == 0) {
- continue;
- }
- }
- if (fIgnoreElemRefs.contains(token)) {
- continue;
- }
- ElementRefLocation elemLoc = (ElementRefLocation) fElemRefs.get(token);
- ElementRefLocation tokenLoc = new ElementRefLocation(line, column, uri, elemLoc);
- fElemRefs.put(token, tokenLoc);
- }
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#endCDATA()
- */
- public void endCDATA() throws SAXException {
- // No method impl.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#endDTD()
- */
- public void endDTD() throws SAXException {
- // No method impl.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String)
- */
- public void endEntity(String arg0) throws SAXException {
- // No method impl.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(java.lang.String,
- * java.lang.String, java.lang.String)
- */
- public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException {
- // No method impl.
- }
-
- /**
- * Get the list of element declarations.
- *
- * @return The list of element declarations.
- */
- public List getElementDeclarations() {
- return fElemDecls;
- }
-
- /**
- * Get the element references hashtable.
- *
- * @return The element references hashtable.
- */
- public Hashtable getElementReferences() {
- return fElemRefs;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(java.lang.String,
- * java.lang.String)
- */
- public void internalEntityDecl(String name, String value) throws SAXException {
- // No method impl.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator)
- */
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.fLocator = locator;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#startCDATA()
- */
- public void startCDATA() throws SAXException {
- // No method impl.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#startDTD(java.lang.String,
- * java.lang.String, java.lang.String)
- */
- public void startDTD(String name, String publicId, String systemId) throws SAXException {
- // No method impl.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String)
- */
- public void startEntity(String name) throws SAXException {
- // No method impl.
- }
- }
-
-
-
- private URIResolver fResolver = null;
-
- public DTDValidator() {
- super();
- }
-
- /**
- * Set the URI resolver to use with XSD validation.
- *
- * @param uriresolver
- * The URI resolver to use.
- */
- public void setURIResolver(URIResolver uriresolver) {
- this.fResolver = uriresolver;
- }
-
- /**
- * Validate the DTD file located at the URI.
- *
- * @param uri
- * The URI of the file to validate.
- * @return A validation report for the validation.
- */
- public ValidationReport validate(String uri) {
- ValidationInfo valinfo = new ValidationInfo(uri);
- try {
- SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
- XMLReader reader = parser.getXMLReader();
- MultiHandler dtdHandler = new MultiHandler();
- reader.setProperty("http://xml.org/sax/properties/declaration-handler", dtdHandler); //$NON-NLS-1$
- reader.setProperty("http://xml.org/sax/properties/lexical-handler", dtdHandler); //$NON-NLS-1$
- reader.setContentHandler(dtdHandler);
- reader.setDTDHandler(dtdHandler);
- reader.setErrorHandler(new DTDErrorHandler(valinfo));
- reader.setEntityResolver(new DTDEntityResolver(fResolver, uri));
- String document = "<!DOCTYPE root SYSTEM \"" + uri + "\"><root/>"; //$NON-NLS-1$ //$NON-NLS-2$
-
- reader.parse(new InputSource(new StringReader(document)));
-
- List elemDecls = dtdHandler.getElementDeclarations();
- Hashtable elemRefs = dtdHandler.getElementReferences();
- validateElementReferences(elemDecls, elemRefs, valinfo);
- }
- catch (ParserConfigurationException e) {
-
- }
- catch (IOException e) {
-
- }
- catch (SAXException e) {
-
- }
- return valinfo;
- }
-
- /**
- * Validate the element references in the DTD. An element reference is
- * <!ELEMENT elem (elementReference)>
- *
- * @param elemDecls
- * A list of valid element declarations.
- * @param elemRefs
- * A hashtable containing element references as keys and
- * locations in the document as values.
- * @param valinfo
- * The validation info object to store validation information.
- */
- private void validateElementReferences(List elemDecls, Hashtable elemRefs, ValidationInfo valinfo) {
- Enumeration keys = elemRefs.keys();
- while (keys.hasMoreElements()) {
- String elemRef = (String) keys.nextElement();
- // If the element hasn't been declared create an error.
- if (!elemDecls.contains(elemRef)) {
- ElementRefLocation elemLoc = (ElementRefLocation) elemRefs.get(elemRef);
- do {
- valinfo.addError(NLS.bind(DTDValidationMessages._ERROR_REF_ELEMENT_UNDEFINED, "'" + elemRef + "'"), elemLoc.getLine(), elemLoc.getColumn(), elemLoc.getURI()); //$NON-NLS-1$ //$NON-NLS-2$
- elemLoc = elemLoc.getNext();
- }
- while (elemLoc != null);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/ElementRefLocation.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/ElementRefLocation.java
deleted file mode 100644
index b1ff07ae2c..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/ElementRefLocation.java
+++ /dev/null
@@ -1,86 +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
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.validation;
-
-/**
- * An element references location holds the location of an element reference.
- * An element reference is declared in a DTD element declaration such as
- * <!ELEMENT myelem (elementref)> An element reference may be part of a linked
- * list and can contain a reference to the next element reference in the list.
- *
- * @author Lawrence Mandel, IBM
- */
-class ElementRefLocation {
- private int column = -1;
-
- private int line = -1;
-
- private ElementRefLocation next = null;
-
- private String uri;
-
- /**
- * Constructor.
- *
- * @param line
- * The line location of the element reference.
- * @param column
- * The column location of the element reference.
- * @param uri
- * The URI of the file containing the element reference.
- * @param next
- * The next element reference in the list.
- */
- public ElementRefLocation(int line, int column, String uri, ElementRefLocation next) {
- this.line = line;
- this.column = column;
- this.uri = uri;
- this.next = next;
- }
-
- /**
- * Get the column location of the element reference.
- *
- * @return The column location of the element reference.
- */
- public int getColumn() {
- return column;
- }
-
- /**
- * Get the line location of the element reference.
- *
- * @return The line location of the element reference.
- */
- public int getLine() {
- return line;
- }
-
- /**
- * Get the next element reference in the linked list.
- *
- * @return The next element reference in the linked list.
- */
- public ElementRefLocation getNext() {
- return next;
- }
-
- /**
- * Get the URI of the file that contains the element reference.
- *
- * @return The URI of the file that contains the element reference.
- */
- public String getURI() {
- return uri;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/DTDValidator.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/DTDValidator.java
deleted file mode 100644
index 9c44a6491a..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/DTDValidator.java
+++ /dev/null
@@ -1,50 +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.wst.dtd.core.internal.validation.eclipse;
-
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-
-/**
- * An DTD validator specific to Eclipse. This validator will wrap the internal
- * DTD validator to provide automatic URI resolution support.
- * Using this class is equivalent to using the internal DTD validator and registering
- * the URI resolver from the URI resolution framework.
- */
-public class DTDValidator extends
- org.eclipse.wst.dtd.core.internal.validation.DTDValidator
-{
- private static DTDValidator _instance = null;
-
- /**
- * Constructor. Registers URI resolution framework with the DTD validator.
- */
- protected DTDValidator()
- {
- super();
- setURIResolver(URIResolverPlugin.createResolver());
- }
-
- /**
- * Get the one and only instance of the Eclipse specific DTD validator.
- *
- * @return
- * The one and only instance of the Eclipse specific DTD validator.
- */
- public static DTDValidator getInstance()
- {
- if (_instance == null)
- {
- _instance = new DTDValidator();
- }
- return _instance;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/Validator.java b/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/Validator.java
deleted file mode 100644
index cb3940df9c..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/Validator.java
+++ /dev/null
@@ -1,38 +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.wst.dtd.core.internal.validation.eclipse;
-
-import java.io.InputStream;
-
-import org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator;
-import org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-
-/**
- * DTD validator that is contributed to the validation framework.
- */
-public class Validator extends AbstractNestedValidator
-{
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator#validate(java.lang.String, java.io.InputStream, org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext)
- */
- public ValidationReport validate(String uri, InputStream inputstream, NestedValidatorContext context)
- {
- DTDValidator validator = DTDValidator.getInstance();
-
- ValidationReport valreport = null;
- valreport = validator.validate(uri);
-
- return valreport;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java
deleted file mode 100644
index b3c24492be..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java
+++ /dev/null
@@ -1,376 +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.wst.dtd.core.internal;
-
-import java.util.Hashtable;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-// base class for an Element's contentmodel
-public class Attribute extends DTDNode {
-
- public static final String CDATA = DTDCoreMessages._UI_CHARACTER_DATA_DESC; //$NON-NLS-1$
- public static final String ENTITIES = DTDCoreMessages._UI_ENTITY_NAMES_DESC; //$NON-NLS-1$
- public static final String ENTITY = DTDCoreMessages._UI_ENTITY_NAME_DESC; //$NON-NLS-1$
- public static final String ENUMERATED_NAME = DTDCoreMessages._UI_ENUM_NAME_TOKENS_DESC; //$NON-NLS-1$
- public static final String ENUMERATED_NOTATION = DTDCoreMessages._UI_ENUM_NOTATION_DESC; //$NON-NLS-1$
- public static final String FIXED = "#FIXED"; //$NON-NLS-1$
- public static final String ID = DTDCoreMessages._UI_IDENTIFIER_DESC; //$NON-NLS-1$
- public static final String IDREF = DTDCoreMessages._UI_ID_REFERENCE_DESC; //$NON-NLS-1$
- public static final String IDREFS = DTDCoreMessages._UI_ID_REFERENCES_DESC; //$NON-NLS-1$
-
- public static final String IMPLIED = "#IMPLIED"; //$NON-NLS-1$
- public static final String NMTOKEN = DTDCoreMessages._UI_NAME_TOKEN_DESC; //$NON-NLS-1$
- public static final String NMTOKENS = DTDCoreMessages._UI_NAME_TOKENS_DESC; //$NON-NLS-1$
- public static final String REQUIRED = "#REQUIRED"; //$NON-NLS-1$
-
- protected static Hashtable typeHash = new Hashtable();
-
- public static final String[] types = {CDATA, ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS, ENUMERATED_NAME, ENUMERATED_NOTATION};
-
- {
- typeHash.put(DTDRegionTypes.CDATA_KEYWORD, CDATA);
- typeHash.put(DTDRegionTypes.ID_KEYWORD, ID);
- typeHash.put(DTDRegionTypes.IDREF_KEYWORD, IDREF);
- typeHash.put(DTDRegionTypes.IDREFS_KEYWORD, IDREFS);
- typeHash.put(DTDRegionTypes.ENTITY_KEYWORD, ENTITY);
- typeHash.put(DTDRegionTypes.ENTITIES_KEYWORD, ENTITIES);
- typeHash.put(DTDRegionTypes.NMTOKEN_KEYWORD, NMTOKEN);
- typeHash.put(DTDRegionTypes.NMTOKENS_KEYWORD, NMTOKENS);
- typeHash.put(DTDRegionTypes.NOTATION_KEYWORD, ENUMERATED_NOTATION);
- // this one's a special case since there is no keyword for
- // enumerated name tokens
- typeHash.put("()", ENUMERATED_NAME); //$NON-NLS-1$
-
- // now put the reverse in place. This gives us a 2 way lookup
- // for when we want to retrieve the value and when we want to set it
- typeHash.put(CDATA, "CDATA"); //$NON-NLS-1$
- typeHash.put(ID, "ID"); //$NON-NLS-1$
- typeHash.put(IDREF, "IDREF"); //$NON-NLS-1$
- typeHash.put(IDREFS, "IDREFS"); //$NON-NLS-1$
- typeHash.put(ENTITY, "ENTITY"); //$NON-NLS-1$
- typeHash.put(ENTITIES, "ENTITIES"); //$NON-NLS-1$
- typeHash.put(NMTOKEN, "NMTOKEN"); //$NON-NLS-1$
- typeHash.put(NMTOKENS, "NMTOKENS"); //$NON-NLS-1$
- typeHash.put(ENUMERATED_NAME, ""); //$NON-NLS-1$
- typeHash.put(ENUMERATED_NOTATION, "NOTATION"); //$NON-NLS-1$
- }
-
- private AttributeEnumList enumList = null;
-
- // public static final String IMPLIED = "IMPLIED";
-
- public Attribute(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public String getDefaultKind() {
- ITextRegion defaultKindRegion = getDefaultKindRegion();
- if (defaultKindRegion != null) {
- return getStructuredDTDDocumentRegion().getText(defaultKindRegion);
- }
-
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getDefaultKindRegion() {
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.IMPLIED_KEYWORD || region.getType() == DTDRegionTypes.REQUIRED_KEYWORD || region.getType() == DTDRegionTypes.FIXED_KEYWORD) {
- return region;
- }
- }
- return null;
- }
-
- public String getDefaultValue() {
- ITextRegion defaultValue = getNextQuotedLiteral(iterator());
- if (defaultValue != null) {
- return getValueFromQuotedRegion(defaultValue);
- }
- return ""; //$NON-NLS-1$
- }
-
- public AttributeEnumList getEnumList() {
- return enumList;
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ATTRIBUTEICON);
- }
-
- public ITextRegion getNameRegion() {
- return getNextRegion(iterator(), DTDRegionTypes.ATTRIBUTE_NAME);
- }
-
- public ITextRegion getNextQuotedLiteral(RegionIterator iter) {
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType().equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || region.getType().equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) {
- return region;
- }
- }
- return null;
- }
-
- protected int getOffsetAfterType() {
- ITextRegion typeRegion = getTypeRegion();
-
- String type = getType();
- boolean isEnumeration = type.equals(ENUMERATED_NAME) || type.equals(ENUMERATED_NOTATION);
- if (isEnumeration) {
- // now check if maybe this is an enumeration
- if (getEnumList() != null) {
- return getEnumList().getEndOffset();
- }
- }
- if (typeRegion != null) {
- return getStructuredDTDDocumentRegion().getEndOffset(typeRegion);
- }
- else {
- ITextRegion nameRegion = getNameRegion();
- return getStructuredDTDDocumentRegion().getEndOffset(nameRegion);
- // // create one
- // typeRegion =
- // findOrCreateTypeRegion((String)typeHash.get(CDATA));
- }
- }
-
- public String getType() {
- ITextRegion region = getTypeRegion();
- if (region != null) {
- String type = (String) typeHash.get(region.getType());
- if (type == null) {
- // just return the text of the type region since this may be
- // an entity representing the type;
- return getStructuredDTDDocumentRegion().getText(region);
- }
- return type;
- }
- else if (getEnumList() != null) {
- // enumerated name tokens don't have a type keyword. just
- // the existence of the left paren is enough
- return (String) typeHash.get("()"); //$NON-NLS-1$
- }
-
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getTypeRegion() {
- RegionIterator iter = iterator();
-
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.CDATA_KEYWORD || region.getType() == DTDRegionTypes.ID_KEYWORD || region.getType() == DTDRegionTypes.IDREF_KEYWORD || region.getType() == DTDRegionTypes.IDREFS_KEYWORD || region.getType() == DTDRegionTypes.ENTITY_KEYWORD || region.getType() == DTDRegionTypes.ENTITIES_KEYWORD || region.getType() == DTDRegionTypes.NMTOKEN_KEYWORD || region.getType() == DTDRegionTypes.NMTOKENS_KEYWORD || region.getType() == DTDRegionTypes.NOTATION_KEYWORD || region.getType() == DTDRegionTypes.PARM_ENTITY_TYPE) {
- return region;
- }
- }
- return null;
- }
-
- public String getValueFromQuotedRegion(ITextRegion region) {
- String type = region.getType();
- if (type.equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || type.equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) {
- String text = getStructuredDTDDocumentRegion().getText(region);
- return text.substring(1, text.length() - 1);
- }
- return ""; //$NON-NLS-1$
- }
-
- public void resolveRegions() {
- removeChildNodes();
- RegionIterator iter = iterator();
-
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
- if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
- enumList = new AttributeEnumList(getDTDFile(), getStructuredDTDDocumentRegion());
- }
- if (enumList != null) {
- enumList.addRegion(currentRegion);
- if (currentRegion.getType() == DTDRegionTypes.RIGHT_PAREN) {
- return;
- }
- }
- }
-
- }
-
- public void setDefaultKind(Object requestor, String kind) {
-
- ITextRegion defaultKindRegion = getDefaultKindRegion();
- String oldDefaultKind = defaultKindRegion == null ? "" : getStructuredDTDDocumentRegion().getText(defaultKindRegion); //$NON-NLS-1$
- if (!kind.equals(oldDefaultKind)) {
- String newText = kind;
- int startOffset = 0;
- int length = 0;
- if (defaultKindRegion != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultKindRegion);
- length = getStructuredDTDDocumentRegion().getEndOffset(defaultKindRegion) - startOffset;
- }
- else {
- startOffset = getOffsetAfterType();
- newText = " " + newText; //$NON-NLS-1$
- }
-
- ITextRegion defaultValue = getNextQuotedLiteral(iterator());
-
- if (kind.equals(Attribute.FIXED) || kind.equals("")) { //$NON-NLS-1$
- if (defaultValue == null) {
- // we are changing to fixed and wehave no quoted region.
- // put in an empty value
- newText += " \"\""; //$NON-NLS-1$
- }
- }
- else {
- if (defaultValue != null) {
- length = getStructuredDTDDocumentRegion().getEndOffset(defaultValue) - startOffset;
- }
- }
- replaceText(requestor, startOffset, length, newText);
- // do something if there is no "kind" region
- }
- }
-
- public void setDefaultKind(String kind) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_DEFAULT_KIND); //$NON-NLS-1$
- setDefaultKind(this, kind);
- endRecording(this);
- }
-
- public void setDefaultValue(Object requestor, String value, boolean fixed) {
- ITextRegion defaultValue = getNextQuotedLiteral(iterator());
- String quoteChar = value.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- int startOffset = 0;
- int endOffset = 0;
- String newText = ""; //$NON-NLS-1$
-
- String oldValue = getDefaultValue();
- boolean oldKindIsFixed = getDefaultKind().equals(Attribute.FIXED);
- if (oldValue.equals(value) && fixed == oldKindIsFixed) {
- // nothing to do
- return;
- }
-
- if (defaultValue != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultValue);
- endOffset = getStructuredDTDDocumentRegion().getEndOffset(defaultValue);
- }
-
- ITextRegion defaultKindRegion = getDefaultKindRegion();
- if (defaultKindRegion != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(defaultKindRegion);
- endOffset = endOffset == 0 ? getStructuredDTDDocumentRegion().getEndOffset(defaultKindRegion) : endOffset;
- }
- else {
- if (startOffset == 0) {
- endOffset = startOffset = getOffsetAfterType();
- newText += " "; //$NON-NLS-1$
- }
- ITextRegion typeRegion = getTypeRegion();
- if (typeRegion == null && getEnumList() == null) {
- // tack on a default type
- // newText += "CDATA ";
- }
- }
- if (fixed) {
- newText += "#FIXED "; //$NON-NLS-1$
- }
- else {
- if (getDefaultKind().equals("") && value.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- // if not fixed and value is "" then reset the default kind to
- // implied
- newText += "#IMPLIED"; //$NON-NLS-1$
- }
- }
-
- if (!getType().equals("") && !value.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- newText += quoteChar + value + quoteChar;
- }
- replaceText(requestor, startOffset, endOffset - startOffset, newText);
- }
-
- public void setDefaultValue(String value, boolean fixed) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_DEFAULT_VAL); //$NON-NLS-1$
- setDefaultValue(this, value, fixed);
- endRecording(this);
- }
-
- public void setType(Object requestor, String type) {
- String oldType = getType();
- if (!type.equals(oldType)) {
- boolean wasEnumeration = oldType.equals(ENUMERATED_NAME) || oldType.equals(ENUMERATED_NOTATION);
- boolean isEnumeration = type.equals(ENUMERATED_NAME) || type.equals(ENUMERATED_NOTATION);
- String newText = ""; //$NON-NLS-1$
- int startOffset = 0;
- int endOffset = 0;
-
- if (wasEnumeration && !isEnumeration) {
- // get rid of the old enumlist
- AttributeEnumList enumList = getEnumList();
- if (enumList != null) {
- startOffset = enumList.getStartOffset();
- endOffset = enumList.getEndOffset();
- }
- }
-
- ITextRegion region = getTypeRegion();
- if (region != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(region);
- if (endOffset == 0) {
- endOffset = getStructuredDTDDocumentRegion().getEndOffset(region);
- }
- }
- else if (startOffset == 0) {
- ITextRegion nameRegion = getNameRegion();
- newText += " "; //$NON-NLS-1$
- endOffset = startOffset = getStructuredDTDDocumentRegion().getEndOffset(nameRegion);
- }
-
- String newTypeWord = (String) typeHash.get(type);
- if (newTypeWord == null) {
- // then this must be a parm entity being used in the type
- // use the type text directly
- newTypeWord = type;
- }
-
- newText += newTypeWord;
-
- if (isEnumeration && !wasEnumeration) {
- // put in a new numlist
- boolean isSpaceNeeded = !type.equals(ENUMERATED_NAME);
- newText += isSpaceNeeded ? " " : ""; //$NON-NLS-1$ //$NON-NLS-2$
- newText += "()"; //$NON-NLS-1$
- }
- replaceText(requestor, startOffset, endOffset - startOffset, newText);
- if (newTypeWord.equals("") && !type.equals(ENUMERATED_NAME)) { //$NON-NLS-1$
- // the set the defaultkind to ""
- // setDefaultKind(requestor, "");
- setDefaultValue(requestor, "", false); //$NON-NLS-1$
- }
-
- }
- }
-
- public void setType(String type) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_TYPE); //$NON-NLS-1$
- setType(this, type);
- endRecording(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java
deleted file mode 100644
index 242057c215..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java
+++ /dev/null
@@ -1,72 +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.wst.dtd.core.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-public class AttributeEnumList extends DTDNode {
-
- private ArrayList list = new ArrayList();
-
- public AttributeEnumList(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public Image getImage() {
- // never exposed in tree
- return null;
- }
-
- // return the items that are in this enumerated list
- public List getItems() {
- list.clear();
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion name = getNextRegion(iter, DTDRegionTypes.NAME);
- if (name != null) {
- list.add(getStructuredDTDDocumentRegion().getText(name));
- }
- }
- return list;
- }
-
- public void setItems(Object requestor, String[] items) {
- if (items != null) {
- String text = "("; //$NON-NLS-1$
- for (int i = 0; i < items.length; i++) {
- if (i > 0) {
- text += " | " + items[i]; //$NON-NLS-1$
- }
- else {
- text += items[i];
- }
- }
- text += ")"; //$NON-NLS-1$
- replaceText(requestor, getStartOffset(), getNodeLength(), text);
- }
- }
-
- public void setItems(String[] items) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_ENUM_ITEMS); //$NON-NLS-1$
- setItems(this, items);
- endRecording(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java
deleted file mode 100644
index 1d22456bb4..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java
+++ /dev/null
@@ -1,118 +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.wst.dtd.core.internal;
-
-import java.util.ArrayList;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-public class AttributeList extends NamedTopLevelNode {
- public AttributeList(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.ATTLIST_TAG);
- }
-
- public void addAttribute(String name) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ATTR_LIST_ADD); //$NON-NLS-1$
-
- DTDNode lastAttribute = (DTDNode) getLastChild();
- if (lastAttribute != null) {
- replaceText(this, lastAttribute.getEndOffset(), 0, "\n\t" + name + " CDATA #IMPLIED"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- ITextRegion nameRegion = getNameRegion();
- if (nameRegion != null) {
- replaceText(this, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, "\n\t" + name + " CDATA #IMPLIED"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
-
- endRecording(this);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ATTRIBUTELISTICON);
- }
-
- public void insertIntoModel(Object requestor, Attribute reference, Attribute node, boolean isAfter) {
- int offset = 0;
- String newText = ""; //$NON-NLS-1$
- String nodeText = node.getFullNodeText();
- if (!isAfter) {
- offset = reference.getStartOffset();
- }
- else {
- // try and get next child
- Attribute attr = (Attribute) reference.getNextSibling();
- if (attr != null) {
- offset = attr.getStartOffset();
- }
- else {
- // just use the end offset
- offset = reference.getWhitespaceEndOffset();
- }
- }
- newText += nodeText;// + (isLastChild ? "\n" : "\n\t");
- if (!node.hasTrailingWhitespace()) {
- newText += "\n\t"; //$NON-NLS-1$
- }
- replaceText(requestor, offset, 0, newText);
- }
-
- public void resolveRegions() {
- removeChildNodes();
- RegionIterator iter = iterator();
-
- if (getNameRegion() != null) {
- // we skip past the name token is our name
- skipPastName(iter);
- }
-
- ArrayList children = new ArrayList();
- Attribute attribute = null;
- boolean trailingWhitespace = false;
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
- if (currentRegion.getType().equals(DTDRegionTypes.ATTRIBUTE_NAME)) {
- attribute = new Attribute(getDTDFile(), getStructuredDTDDocumentRegion());
- children.add(attribute);
- appendChild(attribute);
- trailingWhitespace = false;
- }
- if (attribute != null && currentRegion.getType() != DTDRegionTypes.END_TAG) {
- if (!trailingWhitespace) {
- attribute.addRegion(currentRegion);
- }
- else {
- if (currentRegion.getType() == DTDRegionTypes.WHITESPACE) {
- attribute.addWhitespaceRegion(currentRegion);
- }
- }
-
- // the following prevents extra whitespace from being picked
- // up by the attribute
- if (currentRegion.getType() == DTDRegionTypes.REQUIRED_KEYWORD || currentRegion.getType() == DTDRegionTypes.IMPLIED_KEYWORD || currentRegion.getType() == DTDRegionTypes.SINGLEQUOTED_LITERAL || currentRegion.getType() == DTDRegionTypes.DOUBLEQUOTED_LITERAL) {
- trailingWhitespace = true;
- }
- }
- }
- int numKids = children.size();
- for (int i = 0; i < numKids; i++) {
- ((Attribute) children.get(i)).resolveRegions();
- } // end of for ()
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java
deleted file mode 100644
index f99aa3ed5b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java
+++ /dev/null
@@ -1,165 +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.wst.dtd.core.internal;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-/*
- * CMBasicNode combines all the different content types into one. The idea
- * behind this is to allow arbitrary name changes to not require a tree
- * update.
- */
-public class CMBasicNode extends CMRepeatableNode {
-
- // static final int EMPTY = 0;
- // static final int ANY = 1;
- // static final int PCDATA = 2;
-
- public CMBasicNode(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public Image getImage() {
- final String name = getName();
- ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA);
- if (pcdata != null) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.PCDATAICON);
- }
-
- if (isRootElementContent()) {
- if (name.equals(EMPTY)) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.EMPTYICON);
- }
- else if (name.equals(ANY)) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ANYICON);
- }
- }
-
- // Otherwise this is just an element reference node. Just return
- // what CMRepeatableNode would give us
- return super.getImage();
- }
-
- public ITextRegion getNameRegion() {
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.NAME || region.getType() == DTDRegionTypes.CONTENT_PCDATA) {
- return region;
- }
- }
- return null;
- }
-
- // returns the occurrencetoken, or the token where the occurrence token
- // should appear after
- public ITextRegion getOccurrenceRegion() {
- RegionIterator iter = iterator();
- skipPastName(iter);
- if (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.OCCUR_TYPE) {
- return region;
- }
- }
- return getNameRegion();
- }
-
- public String getType() {
- ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA);
- if (pcdata != null) {
- return PCDATA;
- }
-
- if (isRootElementContent()) {
- final String name = getName();
- if (isRootElementContent()) {
- if (name.equals(EMPTY)) {
- return EMPTY;
- }
- else if (name.equals(ANY)) {
- return ANY;
- }
- else {
- // otherwise just return it's name as the type
- return name;
- }
-
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- public boolean isEmptyAnyOrPCData() {
- if (isPCData()) {
- return true;
- }
-
-
- final String name = getName();
- if (isRootElementContent()) {
- if (name.equals(EMPTY) || name.equals(ANY)) {
- return true;
- }
- }
- return false;
- }
-
- public boolean isPCData() {
- ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA);
- if (pcdata != null) {
- return true;
- }
- return false;
- }
-
- // public Node insertRegion(Region token)
- // {
- // if (!tokenStream.containsToken(token) && token.getType() ==
- // Token.OCCUR_TYPE)
- // {
- // // then add it so that our range contains it
- // insertIntoTokenStream(token);
- // }
- // return this;
- // }
-
- public boolean isReference() {
- return !isEmptyAnyOrPCData();
- }
-
- public void setName(Object requestor, String name) {
- // beginRecording(requestor, "Name Change");
-
- super.setName(requestor, name);
- if (!isReference()) {
- // if it is no longer a reference node, remove the occurrence
- // token
- setOccurrence(requestor, CMRepeatableNode.ONCE);
- }
-
- // endRecording(requestor);
- }
-
- /*
- * public static String getName(int type) { switch (type) { case EMPTY:
- * return emptyString; case ANY: return anyString; case PCDATA: return
- * pcdataString; default: break; } // end of switch () return ""; }
- */
-
-}// CMBasicNode
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java
deleted file mode 100644
index 06d53856e0..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java
+++ /dev/null
@@ -1,430 +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.wst.dtd.core.internal;
-
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.dtd.core.internal.util.DTDUniqueNameHelper;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-public class CMGroupNode extends CMRepeatableNode {
-
- public static final char CHOICE = '|';
- public static final char SEQUENCE = ',';
-
- protected char connector = SEQUENCE;
-
- // protected ArrayList children = new ArrayList();
-
- public CMGroupNode(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public void addChild() {
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_GRP_NODE_ADD_CHILD); //$NON-NLS-1$
- DTDNode lastNode = (DTDNode) getLastChild();
- String elementName = DTDUniqueNameHelper.getUniqueName(getChildrenList(), "ChildNode"); //$NON-NLS-1$
- if (lastNode != null) {
- replaceText(this, lastNode.getEndOffset(), 0, String.valueOf(getConnector()) + elementName); //$NON-NLS-1$
- }
- else {
- replaceText(this, getStartOffset() + 1, 0, elementName); //$NON-NLS-1$
- }
-
- endRecording(this);
- }
-
- public void addGroup() {
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_GRP_NODE_ADD_GRP); //$NON-NLS-1$
- DTDNode lastNode = (DTDNode) getLastChild();
- if (lastNode != null) {
- replaceText(this, lastNode.getEndOffset(), 0, String.valueOf(getConnector()) + " ()"); //$NON-NLS-1$
- }
- else {
- replaceText(this, getStartOffset() + 1, 0, "()"); //$NON-NLS-1$
- }
-
- endRecording(this);
- }
-
- public void delete(Object requestor, DTDNode child) {
- Object[] children = getChildren();
-
- if (children.length == 1 && getFirstChild() == child) {
- replaceText(requestor, child.getStartOffset(), child.getNodeLength(), null);
- return;
- }
-
- for (int i = 0; i < children.length - 1; i++) {
- DTDNode childA = (DTDNode) children[i];
- DTDNode childB = (DTDNode) children[i + 1];
-
- boolean childADeleted = childA == child;
- boolean childBDeleted = childB == child;
- if (childADeleted || childBDeleted) {
- // we found the child
- int startOffset = childADeleted ? childA.getStartOffset() : childA.getEndOffset();
- int endOffset = childADeleted ? childB.getStartOffset() : childB.getEndOffset();
- replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$
- removeChild(child);
- break;
- }
- }
- }
-
- /**
- * Get the value of connector.
- *
- * @return value of connector.
- */
- public char getConnector() {
- Object[] children = getChildren();
- for (int i = 0; i < children.length - 1; i++) {
- DTDNode childA = (DTDNode) children[i];
- DTDNode childB = (DTDNode) children[i + 1];
-
- // create a stream between the two siblings and walk it
- // note that this stream includes the last region of the first
- // sibling and the first region of the next sibling.
- // both these should be ignored
- RegionIterator iter = new RegionIterator(getStructuredDTDDocumentRegion(), childA.getEndOffset(), childB.getStartOffset());
- // stream.setFirstRegion(childA.getLastRegion());
- // stream.setLastRegion(childB.getFirstRegion());
- // Iterator iter = stream.iterator();
- // skip the first region which is the last region of childA
- // do we need this now ?
- // iter.next();
- ITextRegion currentRegion = null;
- while (iter.hasNext() && currentRegion != childB.getStartRegion()) {
- currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.CONNECTOR) {
- connector = getStructuredDTDDocumentRegion().getText(currentRegion).charAt(0);
- return connector;
- }
- }
- }
- return connector;
- }
-
- public Image getImage() {
- DTDCorePlugin resourcePlugin = DTDCorePlugin.getInstance();
- switch (getConnector()) {
- case SEQUENCE :
- return resourcePlugin.getImage(DTDResource.ONESEQUENCEICON);
- /*
- * switch (getOccurrence()) { case ONCE : return
- * resourcePlugin.getImage(DTDResource.ONESEQUENCEICON); case
- * OPTIONAL : return
- * resourcePlugin.getImage(DTDResource.OPTIONALSEQUENCEICON); case
- * ONE_OR_MORE : return
- * resourcePlugin.getImage(DTDResource.ONEORMORESEQUENCEICON);
- * case ZERO_OR_MORE : return
- * resourcePlugin.getImage(DTDResource.ZEROORMORESEQUENCEICON); }
- */
- case CHOICE :
- return resourcePlugin.getImage(DTDResource.ONECHOICEICON);
- /*
- * switch (getOccurrence()) { case ONCE : return
- * resourcePlugin.getImage(DTDResource.ONECHOICEICON); case OPTIONAL :
- * return resourcePlugin.getImage(DTDResource.OPTIONALCHOICEICON);
- * case ONE_OR_MORE : return
- * resourcePlugin.getImage(DTDResource.ONEORMORECHOICEICON); case
- * ZERO_OR_MORE : return
- * resourcePlugin.getImage(DTDResource.ZEROORMORECHOICEICON); }
- */
- }
- return null;
- }
-
- public String getName() {
- return ""; //$NON-NLS-1$
- }
-
- // returns the occurrenceregion, or the last region where the occurrence
- // region should appear after
- public ITextRegion getOccurrenceRegion() {
- int nesting = 0;
-
- // we skip past the first left paren we see since that is the
- // beginning of our own node
- RegionIterator iter = iterator();
- // we assume the first region is the '('
- iter.next();
- ITextRegion currentRegion = null;
- while (iter.hasNext() && nesting >= 0) {
- currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.LEFT_PAREN) {
- nesting++;
- }
- if (currentRegion.getType() == DTDRegionTypes.RIGHT_PAREN) {
- nesting--;
- }
- }
- if (nesting < 0) {
- // This means we have passed over the right paren that marks the
- // end of our grouping.
- // Look for an occurrence region
- while (iter.hasNext()) {
- currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.OCCUR_TYPE) {
- return currentRegion;
- }
- }
- }
- // if we're here, this means that there is no occur region. return the
- // last region
- return iter.previous();
- }
-
- public String getType() {
- if (isRootElementContent()) {
- if (getFirstChild() != null) {
- CMNode node = (CMNode) getFirstChild();
- if (node.getType().equals(PCDATA)) {
- return MIXED;
- }
- else {
- return CHILDREN;
- }
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- public void insertChildNode(Object requestor, String nodeText, int position) {
- Object[] children = getChildren();
-
- int startOffset = 0;
- String newText = ""; //$NON-NLS-1$
- if (position < children.length) {
- DTDNode reference = (DTDNode) children[position];
- startOffset = reference.getStartOffset();
- newText = nodeText + " " + String.valueOf(getConnector()) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (position == children.length) {
- // add to end
- DTDNode reference = (DTDNode) children[position - 1];
- startOffset = reference.getEndOffset();
- newText = " " + String.valueOf(getConnector()) + " " + nodeText; //$NON-NLS-1$ //$NON-NLS-2$
- }
- replaceText(requestor, startOffset, 0, newText);
- }
-
- public void insertChildNode(String nodeText, int position) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_GRP_NODE_INSERT_ELEMENT); //$NON-NLS-1$
- insertChildNode(this, nodeText, position);
- endRecording(this);
- }
-
- public void insertIntoModel(Object requestor, CMNode reference, CMNode node, boolean isAfter) {
- String nodeText = node.getNodeText();
- List children = getChildrenList();
-
- int index = children.indexOf(reference);
- if (index == -1) {
- // no reference node, add it to the end??
- index = children.size();
- }
- else {
- // got an index. if we want to add after, increase by 1
- index = isAfter ? index + 1 : index;
- }
- insertChildNode(requestor, nodeText, index);
- }
-
- public void resolveRegions() {
- int nesting = 0;
- // children.clear();
- removeChildNodes();
- DTDNode currentGroupNode = null;
- CMBasicNode currentReferenceNode = null;
- RegionIterator iter = iterator();
- // we assume the first region is the '('
- iter.next();
- while (iter.hasNext() && nesting >= 0) {
- ITextRegion currentRegion = iter.next();
- if (nesting == 0) {
- if (currentRegion.getType().equals(DTDRegionTypes.CONTENT_PCDATA)) {
- currentGroupNode = currentReferenceNode = null;
- DTDNode pcData = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
- pcData.addRegion(currentRegion);
- appendChild(pcData);
- // children.add(pcData);
- }
- else if (currentRegion.getType().equals(DTDRegionTypes.NAME)) {
- // we have hit a new reference node. Make sure we reset
- // the groupnode var so it doesn't collect more regions
- currentGroupNode = null;
- currentReferenceNode = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
- currentReferenceNode.addRegion(currentRegion);
- appendChild(currentReferenceNode);
- // children.add(currentReferenceNode);
- }
- else if (currentRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) {
- // we could potentially flag an error here if we hit an
- // occurrence type and currentRefNode and currentGroupNode
- // are null
- if (currentReferenceNode != null) {
- // currentReferenceNode.setOccurrence(currentRegion.getText().toCharArray()[0]);
- currentReferenceNode.addRegion(currentRegion);
- currentReferenceNode = null;
- }
- }
- else if (currentRegion.getType().equals(DTDRegionTypes.CONNECTOR)) {
- // note that if connector is already set and it is
- // different from the current connector region, then we
- // have an error!
- // setConnector(currentRegion.getText().toCharArray()[0]);
- }
- else if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
- if (currentGroupNode == null) {
- // we have hit a new group. Make sure we reset the
- // referencenode var so it doesn't collect any more
- // regions
- currentReferenceNode = null;
- currentGroupNode = new CMGroupNode(getDTDFile(), getStructuredDTDDocumentRegion());
- appendChild(currentGroupNode);
- // children.add(currentGroupNode);
- }
- }
- }
-
- if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
- nesting++;
- }
- if (currentRegion.getType().equals(DTDRegionTypes.RIGHT_PAREN)) {
- nesting--;
- if (nesting == 0 && currentGroupNode != null) {
- currentGroupNode.addRegion(currentRegion);
- // peek at next region to see if it is an occur region. if
- // so, add it to the groupnode
- if (iter.hasNext()) {
- ITextRegion nextRegion = iter.next();
- if (nextRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) {
- currentGroupNode.addRegion(nextRegion);
- }
- else {
- // Otherwise, push it back as the next item to be
- // retrieved by a future next() call
- iter.previous();
- }
- }
- currentGroupNode = null;
- }
- }
- if (currentGroupNode != null) {
- currentGroupNode.addRegion(currentRegion);
- }
- }
-
- if (nesting < 0) {
- // This means we have passed over the right paren that marks the
- // end of our grouping.
- // Look for an occurrence region
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
- if (currentRegion.getType().equals(DTDRegionTypes.OCCUR_TYPE)) {
- // setOccurrence(currentRegion.getText().toCharArray()[0]);
- }
- } // end of while ()
- }
-
- // for (org.w3c.dom.Node child = getFirstChild(); child != null; child
- // = child.getNextSibling())
- // {
- // System.out.println("child found = " + child);
- // }
-
- Object[] children = getChildren();
- // System.out.println("children legnth = " + children.length);
-
- for (int i = 0; i < children.length; i++) {
- DTDNode currentNode = (DTDNode) children[i];
- currentNode.resolveRegions();
- } // end of while ()
-
- }
-
- /**
- * Set the value of connector.
- *
- * @param v
- * Value to assign to connector.
- */
- public void setConnector(char v) {
- if (connector != v) {
- connector = v;
- // walk through our kids and see if there is a connector between
- // each sibling. if not, create one and set the connector. if
- // there is
- // then just change the text of the connector
- Object[] children = getChildren();
- if (children.length <= 1) {
- // there won't be any connector existing between the children
- // just notify a change in the node and return;
- getDTDFile().notifyNodeChanged(this);
- return;
- }
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_GRP_NODE_CONNECTOR); //$NON-NLS-1$
- for (int i = 0; i < children.length - 1; i++) {
- DTDNode childA = (DTDNode) children[i];
- DTDNode childB = (DTDNode) children[i + 1];
-
- // create a stream between the two siblings and walk it
- // note that this stream includes the last region of the first
- // sibling and the first region of the next sibling.
- // both these should be ignored
- RegionIterator iter = new RegionIterator(getStructuredDTDDocumentRegion(), childA.getEndOffset(), childB.getStartOffset());
- // skip the first region which is the last region of childA
-
- // do we still need this
- // iter.next();
- ITextRegion currentRegion = null;
- boolean foundConnector = false;
- while (iter.hasNext() && currentRegion != childB.getStartRegion()) {
- currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.CONNECTOR) {
- foundConnector = true;
- // Region oldRegion = currentRegion.createCopy();
- // found a connector! on to the next sibling pair
- // currentRegion.updateText(String.valueOf(v));
- replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(currentRegion), 1, String.valueOf(connector));
- // changeStructuredDocument(oldRegion, currentRegion);
- break;
- }
- }
-
- if (!foundConnector) {
- // if we're here, that means we need to insert a new
- // connector region after childA
- replaceText(this, childA.getEndOffset(), 0, String.valueOf(connector));
- // DTDRegion connectorRegion = new
- // DTDRegion(DTDRegionTypes.CONNECTOR,
- // childA.getEndOffset(), 1);
- // insertIntoStructuredDocument(connectorRegion);
- }
- }
- endRecording(this);
- }
- }
-
- // public Object[] getChildren()
- // {
- // return children.toArray();
- // }
-}// CMGroupNode
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMNode.java
deleted file mode 100644
index 4c63747f72..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMNode.java
+++ /dev/null
@@ -1,135 +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.wst.dtd.core.internal;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-// base class for an Element's contentmodel
-public abstract class CMNode extends DTDNode {
- public static final String ANY = DTDCoreMessages._UI_LABEL_CM_NODE_ANY; //$NON-NLS-1$
- public static final String CHILDREN = DTDCoreMessages._UI_LABEL_CM_NODE_CHILD_CONTENT; //$NON-NLS-1$
-
- public static final String EMPTY = DTDCoreMessages._UI_LABEL_CM_NODE_EMPTY; //$NON-NLS-1$
- public static final String MIXED = DTDCoreMessages._UI_LABEL_CM_NODE_MIX_CONTENT; //$NON-NLS-1$
- public static final String PCDATA = DTDCoreMessages._UI_LABEL_CM_NODE_PCDATA; //$NON-NLS-1$
-
-
- boolean rootElementContent;
-
- public CMNode(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- // this is only valid to ask if the content is a root element content
- abstract public String getType();
-
- /**
- * Get the value of rootElementContent. This tells us whether this element
- * content's parent is a direct decendent of the containing element
- *
- * @return value of rootElementContent.
- */
- public boolean isRootElementContent() {
- return rootElementContent;
- }
-
- // if this is a root element, change the content to children
- // ie . (child1)
- public void setChildrenContent(String newChild) {
- if (isRootElementContent()) {
- if (!newChild.equals("")) { //$NON-NLS-1$
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_NODE_SET_CHILD_CONTENT); //$NON-NLS-1$
- replaceText(this, getStartOffset(), getNodeLength(), "(" + newChild + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- endRecording(this);
- return;
- }
-
- if (!getType().equals(CHILDREN)) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_NODE_SET_CHILD_CONTENT); //$NON-NLS-1$
- if (this instanceof CMBasicNode) {
- replaceText(this, getStartOffset(), getNodeLength(), "(newChild)"); //$NON-NLS-1$
- }
- else {
- // now must convert from mixed content to this one. must
- // preserve the remaining children
- CMGroupNode group = (CMGroupNode) this;
- CMNode firstChild = (CMNode) group.getFirstChild();
- if (firstChild.getType().equals(PCDATA)) {
- group.delete(firstChild);
- }
- }
-
- endRecording(this);
- }
- }
- }
-
- public void setContent(String content) {
- if (isRootElementContent()) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_NODE_SET + " " + content + " " + DTDCoreMessages._UI_LABEL_CM_NODE_CONTENT); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- replaceText(this, getStartOffset(), getNodeLength(), content);
- endRecording(this);
- }
- }
-
- // if this is a root element, change the content to mixed
- // ie . (#PCDATA, child1)
- public void setMixedContent() {
- if (isRootElementContent()) {
- if (!getType().equals(MIXED)) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_NODE_SET_MIX_CONTENT); //$NON-NLS-1$
- if (this instanceof CMBasicNode) {
- replaceText(this, getStartOffset(), getNodeLength(), "(#PCDATA | newChild)*"); //$NON-NLS-1$
- }
- else {
- // now must convert from children content to this one.
- // must
- // preserve the children
- CMGroupNode group = (CMGroupNode) this;
- group.setConnector(CMGroupNode.CHOICE);
- group.setOccurrence(CMRepeatableNode.ZERO_OR_MORE);
- CMNode firstChild = (CMNode) group.getFirstChild();
- if (!firstChild.getType().equals(PCDATA)) {
- group.insertChildNode("#PCDATA", 0); //$NON-NLS-1$
- }
- }
- endRecording(this);
- }
- }
- }
-
- /**
- * Set the value of rootElementContent.
- *
- * @param v
- * Value to assign to rootElementContent.
- */
- public void setRootElementContent(boolean v) {
- this.rootElementContent = v;
- }
-
- // public void delete()
- // {
- // if (isRootElementContent())
- // {
- // // then the superclasses delete will be fine
- // super.delete();
- // return;
- // }
-
- // CMGroupNode parent = (CMGroupNode) getParentNode();
- // parent.removeChildNode(this);
- // }
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java
deleted file mode 100644
index 14a8bfe7f5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java
+++ /dev/null
@@ -1,81 +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.wst.dtd.core.internal;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-public abstract class CMRepeatableNode extends CMNode {
-
- public static final char ONCE = '1';
- public static final char ONE_OR_MORE = '+';
- public static final char OPTIONAL = '?';
- public static final char ZERO_OR_MORE = '*';
-
-
- public CMRepeatableNode(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public Image getImage() {
- DTDCorePlugin resourcePlugin = DTDCorePlugin.getInstance();
- return resourcePlugin.getImage(DTDResource.ELEMENTREFICON);
- }
-
- public char getOccurrence() {
- ITextRegion occurRegion = getOccurrenceRegion();
- if (occurRegion != null && occurRegion.getType() == DTDRegionTypes.OCCUR_TYPE) {
- return getStructuredDTDDocumentRegion().getText(occurRegion).charAt(0);
- }
- return CMRepeatableNode.ONCE;
- }
-
- // returns the occurrenceregion, or the last region where the occurrence
- // region should appear after
- abstract public ITextRegion getOccurrenceRegion();
-
- public void setOccurrence(char occurrence) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_CM_REP_NODE_CHG_OCCUR); //$NON-NLS-1$
- setOccurrence(this, occurrence);
- endRecording(this);
- }
-
- public void setOccurrence(Object requestor, char occurrence) {
- if (getOccurrence() != occurrence) {
- ITextRegion region = getOccurrenceRegion();
- if (region != null) {
- if (region.getType().equals(DTDRegionTypes.OCCUR_TYPE)) {
- if (occurrence == CMRepeatableNode.ONCE) {
- // we need to remove the occur region from the flat
- // model;
- getDTDFile().getStructuredDocument().replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(region), 1, ""); //$NON-NLS-1$
- }
- else {
- // Region oldOccur = region.createCopy();
- getDTDFile().getStructuredDocument().replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(region), 1, String.valueOf(occurrence));
- // changeStructuredDocument(oldOccur, region);
- }
- }
- else if (occurrence != CMRepeatableNode.ONCE) {
- // System.out.println(getString());
- // we need to create an occurrenceRegion
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(region), 0, String.valueOf(occurrence));
- }
- }
- }
- }
-
-}// CMRepeatableNode
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java
deleted file mode 100644
index d4e8253287..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java
+++ /dev/null
@@ -1,75 +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.wst.dtd.core.internal;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-public class Comment extends NamedTopLevelNode {
-
- public class StartEndPair {
- public int startOffset, endOffset;
- }
-
- public Comment(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.COMMENT_START);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.COMMENTICON);
- }
-
- public String getName() {
- String text = getText();
- if (text.length() <= 30) {
- return text;
- }
- else {
- return text.substring(0, 29) + "..."; //$NON-NLS-1$
- }
- }
-
- private void getStartAndEndOffsetForText(StartEndPair pair) {
- RegionIterator iter = iterator();
- ITextRegion commentStartTag = getStartTag(iter);
- ITextRegion endCommentTag = getNextRegion(iter, DTDRegionTypes.COMMENT_END);
- pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset();
- if (commentStartTag != null) {
- pair.startOffset = getStructuredDTDDocumentRegion().getEndOffset(commentStartTag);
- }
- if (endCommentTag != null) {
- pair.endOffset = getStructuredDTDDocumentRegion().getStartOffset(endCommentTag);
- }
- }
-
- public String getText() {
- String text = getStructuredDTDDocumentRegion().getText();
- int flatNodeStart = getStructuredDTDDocumentRegion().getStartOffset();
- StartEndPair pair = new StartEndPair();
- getStartAndEndOffsetForText(pair);
- return text.substring(pair.startOffset - flatNodeStart, pair.endOffset - flatNodeStart);
- }
-
- public void setText(String newText) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_COMMENT_CHG); //$NON-NLS-1$
- StartEndPair pair = new StartEndPair();
- getStartAndEndOffsetForText(pair);
- replaceText(this, pair.startOffset, pair.endOffset - pair.startOffset, newText);
- endRecording(this);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCoreMessages.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCoreMessages.java
deleted file mode 100644
index 0e12f8e060..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCoreMessages.java
+++ /dev/null
@@ -1,95 +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 - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.dtd.core.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by DTD Core
- *
- * @plannedfor 1.0
- */
-public class DTDCoreMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.wst.dtd.core.internal.DTDCorePluginResources";//$NON-NLS-1$
-
- public static String _UI_NONE_DESC;
- public static String _UI_CHARACTER_DATA_DESC;
- public static String _UI_IDENTIFIER_DESC;
- public static String _UI_ID_REFERENCE_DESC;
- public static String _UI_ID_REFERENCES_DESC;
- public static String _UI_ENTITY_NAME_DESC;
- public static String _UI_ENTITY_NAMES_DESC;
- public static String _UI_NAME_TOKEN_DESC;
- public static String _UI_NAME_TOKENS_DESC;
- public static String _UI_ENUM_NAME_TOKENS_DESC;
- public static String _UI_ENUM_NOTATION_DESC;
- public static String _UI_LABEL_ATTR_DEFAULT_VAL;
- public static String _UI_LABEL_ATTR_DEFAULT_KIND;
- public static String _UI_LABEL_ATTR_TYPE;
- public static String _UI_LABEL_ATTR_ENUM_ITEMS;
- public static String _UI_LABEL_ATTR_LIST_ADD;
- public static String _UI_LABEL_CM_GRP_NODE_CONNECTOR;
- public static String _UI_LABEL_CM_GRP_NODE_INSERT_ELEMENT;
- public static String _UI_LABEL_CM_GRP_NODE_ADD_GRP;
- public static String _UI_LABEL_CM_GRP_NODE_ADD_CHILD;
- public static String _UI_LABEL_CM_NODE_MIX_CONTENT;
- public static String _UI_LABEL_CM_NODE_CHILD_CONTENT;
- public static String _UI_LABEL_CM_NODE_SET_MIX_CONTENT;
- public static String _UI_LABEL_CM_NODE_SET_CHILD_CONTENT;
- public static String _UI_LABEL_CM_NODE_SET;
- public static String _UI_LABEL_CM_NODE_CONTENT;
- public static String _UI_LABEL_CM_NODE_PCDATA;
- public static String _UI_LABEL_CM_NODE_ANY;
- public static String _UI_LABEL_CM_NODE_EMPTY;
- public static String _UI_LABEL_CM_REP_NODE_CHG_OCCUR;
- public static String _UI_LABEL_COMMENT_CHG;
- public static String _UI_LABEL_DTD_FILE_ADD_ELEMENT;
- public static String _UI_LABEL_DTD_FILE_ADD_ENTITY;
- public static String _UI_LABEL_DTD_FILE_ADD_COMMENT;
- public static String _UI_LABEL_DTD_FILE_ADD_PARM_ENTITY_REF;
- public static String _UI_LABEL_DTD_FILE_ADD_NOTATION;
- public static String _UI_LABEL_DTD_FILE_ADD_ATTR_LIST;
- public static String _UI_LABEL_DTD_FILE_DELETE;
- public static String _UI_LABEL_DTD_NODE_NAME_CHG;
- public static String _UI_LABEL_DTD_NODE_DELETE;
- public static String _UI_LABEL_ELEMENT_ADD_ATTR;
- public static String _UI_LABEL_ELEMENT_ADD_GRP;
- public static String _UI_LABEL_ELEMENT_ADD_CHILD;
- public static String _UI_LABEL_ENTITY_SET_PARM_ENTITY;
- public static String _UI_LABEL_ENTITY_SET_GENERAL_ENTITY;
- public static String _UI_LABEL_ENTITY_SET_EXT_ENTITY;
- public static String _UI_LABEL_ENTITY_SET_INT_ENTITY;
- public static String _UI_LABEL_ENTITY_VALUE_CHG;
- public static String _UI_LABEL_ENTITY_NDATA_CHANGE;
- public static String _UI_LABEL_EXT_NODE_PUBLIC_ID_CHG;
- public static String _UI_LABEL_EXT_NODE_SYSTEM_ID_CHG;
- public static String _UI_LABEL_NODE_LIST_ELEMENTS;
- public static String _UI_LABEL_NODE_LIST_ENTITIES;
- public static String _UI_LABEL_NODE_LIST_NOTATIONS;
- public static String _UI_LABEL_NODE_LIST_COMMENTS;
- public static String _UI_LABEL_NODE_LIST_OTHER;
- public static String _UI_LABEL_NODE_LIST_ATTRIBUTES;
- public static String _UI_LABEL_PARM_ENTITY_REF_CHG_ENTITY_REF;
- public static String _UI_LABEL_PARM_ENTITY_REF_COMMENT_CHG;
- public static String _UI_LABEL_TOP_LEVEL_NODE_DELETE;
- public static String _ERROR_INCL_FILE_LOAD_FAILURE;
- public static String _ERROR_UNDECLARED_ELEMENT_1;
- public static String _UI_ERRORPART_UNDECLARED_ELEMENT_2;
- public static String _ERROR_DUP_ID_ATTRIBUTE_1;
- public static String _UI_ERRORPART_DUP_ID_ATTRIBUTE_2;
- public static String _ERROR_INVALID_DEFAULT_ATTR_VALUE_1;
- public static String _UI_ERRORPART_INVALID_DEFAULT_ATTR_VALUE_2;
- public static String _EXC_OPERATION_NOT_SUPPORTED;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, DTDCoreMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java
deleted file mode 100644
index ff5562042e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java
+++ /dev/null
@@ -1,57 +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.wst.dtd.core.internal;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class DTDCorePlugin extends AbstractUIPlugin {
- private static DTDCorePlugin instance;
-
- public static Image getDTDImage(String iconName) {
- return getInstance().getImage(iconName);
- }
-
- public static ImageDescriptor getDTDImageDescriptor(String iconName) {
- String thisID = getInstance().getBundle().getSymbolicName();
- return AbstractUIPlugin.imageDescriptorFromPlugin(thisID, iconName);
- }
-
- public synchronized static DTDCorePlugin getInstance() {
- return instance;
- }
-
- public static DTDCorePlugin getPlugin() {
- return instance;
- }
-
- public DTDCorePlugin() {
- super();
- instance = this;
- }
-
- public Image getImage(String iconName) {
- ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get(iconName);
-
- if (image == null) {
- String thisID = getInstance().getBundle().getSymbolicName();
- imageRegistry.put(iconName, imageDescriptorFromPlugin(thisID, iconName));
- image = imageRegistry.get(iconName);
- }
-
- return image;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePluginResources.properties b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePluginResources.properties
deleted file mode 100644
index a7ac3db0ef..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePluginResources.properties
+++ /dev/null
@@ -1,127 +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
-###############################################################################
-! Strings for DTDBasicTypeImpl type descriptions
-_UI_NONE_DESC=None
-
-!! NOTE TO TRANSLATOR: Do not translate following text in parentheses on following 10 lines i.e.(CDATA)
-_UI_CHARACTER_DATA_DESC=Character Data (CDATA)
-_UI_IDENTIFIER_DESC=Identifier (ID)
-_UI_ID_REFERENCE_DESC=ID Reference (IDREF)
-_UI_ID_REFERENCES_DESC=ID References (IDREFS)
-_UI_ENTITY_NAME_DESC=Entity Name (ENTITY)
-_UI_ENTITY_NAMES_DESC=Entity Names (ENTITIES)
-_UI_NAME_TOKEN_DESC=Name Token (NMTOKEN)
-_UI_NAME_TOKENS_DESC=Name Tokens (NMTOKENS)
-_UI_ENUM_NAME_TOKENS_DESC=Enumerated Name Tokens
-_UI_ENUM_NOTATION_DESC=Enumerated NOTATION
-
-! Strings from sed/model
-
-! Attribute.java
-_UI_LABEL_ATTR_DEFAULT_VAL=Attribute Default Change Value
-_UI_LABEL_ATTR_DEFAULT_KIND=Change Attribute Default Value
-_UI_LABEL_ATTR_TYPE=Change Attribute Type
-
-! AttributeEnumList
-_UI_LABEL_ATTR_ENUM_ITEMS=Change Attribute Enumeration Value
-
-! AttributeList
-_UI_LABEL_ATTR_LIST_ADD=Add Attribute
-
-! CMGroupNode
-_UI_LABEL_CM_GRP_NODE_CONNECTOR=Change Connector
-_UI_LABEL_CM_GRP_NODE_INSERT_ELEMENT=Insert Element
-_UI_LABEL_CM_GRP_NODE_ADD_GRP=Add Group
-_UI_LABEL_CM_GRP_NODE_ADD_CHILD=Add Child Element
-
-! CMNode
-_UI_LABEL_CM_NODE_MIX_CONTENT=Mixed Content
-_UI_LABEL_CM_NODE_CHILD_CONTENT=Children Content
-_UI_LABEL_CM_NODE_SET_MIX_CONTENT=Set Mixed Content
-_UI_LABEL_CM_NODE_SET_CHILD_CONTENT=Set Children Content
-
-!! NOTE TO TRANSLATOR - USAGE: "Set <variable content> Content"
-_UI_LABEL_CM_NODE_SET=Set
-_UI_LABEL_CM_NODE_CONTENT=Content
-
-!! NOTE TO TRANSLATOR - DO NOT TRANSLATE FOLLOWING 3 LINES
-_UI_LABEL_CM_NODE_PCDATA=(#PCDATA)
-_UI_LABEL_CM_NODE_ANY=ANY
-_UI_LABEL_CM_NODE_EMPTY=EMPTY
-
-! CMRepeatableNode
-_UI_LABEL_CM_REP_NODE_CHG_OCCUR=Change Occurrence
-
-! Comment
-_UI_LABEL_COMMENT_CHG=Comment Change
-
-! DTDFile
-_UI_LABEL_DTD_FILE_ADD_ELEMENT=Add Element
-_UI_LABEL_DTD_FILE_ADD_ENTITY=Add Entity
-_UI_LABEL_DTD_FILE_ADD_COMMENT=Add Comment
-_UI_LABEL_DTD_FILE_ADD_PARM_ENTITY_REF=Add Parameter Entity Reference
-_UI_LABEL_DTD_FILE_ADD_NOTATION=Add Notation
-_UI_LABEL_DTD_FILE_ADD_ATTR_LIST=Add Attribute List
-_UI_LABEL_DTD_FILE_DELETE=Delete
-
-! DTDNode
-_UI_LABEL_DTD_NODE_NAME_CHG=Name Change
-_UI_LABEL_DTD_NODE_DELETE=Delete
-
-! Element
-_UI_LABEL_ELEMENT_ADD_ATTR=Add Attribute
-_UI_LABEL_ELEMENT_ADD_GRP=Add Group
-_UI_LABEL_ELEMENT_ADD_CHILD=Add Child Element
-
-! Entity
-_UI_LABEL_ENTITY_SET_PARM_ENTITY=Set Parameter Entity
-_UI_LABEL_ENTITY_SET_GENERAL_ENTITY=Set General Entity
-_UI_LABEL_ENTITY_SET_EXT_ENTITY=Set External Entity
-_UI_LABEL_ENTITY_SET_INT_ENTITY=Set Internal Entity
-_UI_LABEL_ENTITY_VALUE_CHG=Entity Value Change
-
-!! NOTE TO TRANSLATOR - USAGE: "NDATA Change"
-_UI_LABEL_ENTITY_NDATA_CHANGE=Change
-
-! ExternalNode
-_UI_LABEL_EXT_NODE_PUBLIC_ID_CHG=Public ID Change
-_UI_LABEL_EXT_NODE_SYSTEM_ID_CHG=System ID Change
-
-! NodeList
-_UI_LABEL_NODE_LIST_ELEMENTS=Elements
-_UI_LABEL_NODE_LIST_ENTITIES=Entities
-_UI_LABEL_NODE_LIST_NOTATIONS=Notations
-_UI_LABEL_NODE_LIST_COMMENTS=Comments
-_UI_LABEL_NODE_LIST_OTHER=Other
-_UI_LABEL_NODE_LIST_ATTRIBUTES=Attributes
-
-! ParameterEntityReference
-_UI_LABEL_PARM_ENTITY_REF_CHG_ENTITY_REF=Change Entity Reference
-_UI_LABEL_PARM_ENTITY_REF_COMMENT_CHG=Comment Change
-
-! TopLevelNode
-_UI_LABEL_TOP_LEVEL_NODE_DELETE=Delete
-
-_ERROR_INCL_FILE_LOAD_FAILURE = Failed to load included file
-
-! usage: _ERROR_UNDECLARED_ELEMENT_1 + <elementName> + _PARTERROR_UNDECLARED_ELEMENT_2
-_ERROR_UNDECLARED_ELEMENT_1 = Reference to undeclared element '
-_UI_ERRORPART_UNDECLARED_ELEMENT_2 =' in content model.
-
-! usage: _ERROR_DUP_ID_ATTRIBUTE_1 + <attributeName> + _PARTERROR_DUP_ID_ATTRIBUTE_2
-_ERROR_DUP_ID_ATTRIBUTE_1 = Duplicate ID attribute '
-_UI_ERRORPART_DUP_ID_ATTRIBUTE_2 = '. Only one ID attribute can be specified per ELEMENT type.
-
-! usage:_ERROR_INVALID_DEFAULT_ATTR_VALUE_1 + <typeString> + _PARTERROR_INVALID_DEFAULT_ATTR_VALUE_2 + <attributeName>
-_ERROR_INVALID_DEFAULT_ATTR_VALUE_1 = Invalid default
-_UI_ERRORPART_INVALID_DEFAULT_ATTR_VALUE_2 = value for attribute '
-
-_EXC_OPERATION_NOT_SUPPORTED = Operation not supported
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java
deleted file mode 100644
index 5bcf031c12..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java
+++ /dev/null
@@ -1,682 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.event.IDTDFileListener;
-import org.eclipse.wst.dtd.core.internal.event.NodesEvent;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.util.DTDExternalReferenceRemover;
-import org.eclipse.wst.dtd.core.internal.util.DTDModelUpdater;
-import org.eclipse.wst.dtd.core.internal.util.DTDNotationReferenceRemover;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.events.NewDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.RegionsReplacedEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentRegionsReplacedEvent;
-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.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-
-public class DTDFile implements IndexedRegion {
- private NodeList attlistList = new NodeList(this, DTDRegionTypes.ATTLIST_TAG);
- private NodeList commentList = new NodeList(this, DTDRegionTypes.COMMENT_START);
-
- boolean creatingNewModel = false;
- private DTDModelImpl fDTDModel;
-
- private NodeList elementList = new NodeList(this, DTDRegionTypes.ELEMENT_TAG);
- private NodeList entityList = new NodeList(this, DTDRegionTypes.ENTITY_TAG);
-
- private List folderList = null;
-
- private boolean isMovingNode = false;
-
- private List modelListeners = new ArrayList();
-
- private List nodeList = new ArrayList();
- private NodeList notationList = new NodeList(this, DTDRegionTypes.NOTATION_TAG);
- private NodeList unrecognizedList = new NodeList(this, DTDRegionTypes.UNKNOWN_CONTENT);
-
- public DTDFile(DTDModelImpl dtdModel) {
- this.fDTDModel = dtdModel;
- }
-
- public void addDTDFileListener(IDTDFileListener listener) {
- modelListeners.add(listener);
- }
-
- protected void addNode(DTDNode node) {
- addNode(nodeList.size(), node);
- }
-
- protected void addNode(int index, DTDNode node) {
- nodeList.add(index, node);
- /*
- * if (index < nodeList.size()) { insertBefore(node, (DTDNode)
- * nodeList.get(index)); } else { appendChild(node); }
- */
- }
-
- public DTDNode buildNode(IStructuredDocumentRegion flatNode) {
- // ITextRegionList regions = flatNode.getRegions();
- DTDNode node = null;
- if (isElement(flatNode)) {
- // then this is an element
- node = new Element(this, flatNode);
- }
- else if (isEntity(flatNode)) {
- node = new Entity(this, flatNode);
- }
- else if (isNotation(flatNode)) {
- node = new Notation(this, flatNode);
- }
- else if (isAttributeList(flatNode)) {
- node = new AttributeList(this, flatNode);
- }
- else if (isComment(flatNode)) {
- node = new Comment(this, flatNode);
- }
- else if (isParameterEntityReference(flatNode)) {
- node = new ParameterEntityReference(this, flatNode);
- }
- else if (!flatNode.getText().trim().equals("")) { //$NON-NLS-1$
- node = new Unrecognized(this, flatNode);
- }
- if (node != null) {
- insertNode(node);
- node.resolveRegions();
- }
- return node;
- }
-
- public void buildNodes(IStructuredDocumentRegionList list) {
- NodesEvent addedDTDNodes = new NodesEvent();
-
- TopLevelNode previousNode = null;
- for (int i = 0; i < list.getLength(); i++) {
- IStructuredDocumentRegion flatNode = list.item(i);
- TopLevelNode node = (TopLevelNode) buildNode(flatNode);
- // if we don't create a node, then we assume that the flat
- // node was whitespace. Tack it on to a previous toplevel
- // node
- if (node != null) {
- previousNode = node;
- addedDTDNodes.add(node);
- }
- else {
- if (previousNode != null) {
- previousNode.addWhitespaceStructuredDocumentRegion(flatNode);
- }
- }
- }
-
- if (addedDTDNodes.getNodes().size() > 0)// &&
- // creatingNewModel == false)
- {
- // now tell people about the additions
- notifyNodesAdded(addedDTDNodes);
- }
- }
-
- // Implements IndexedRegion
-
- public boolean contains(int testPosition) {
- return getStartOffset() <= testPosition && testPosition <= getEndOffset();
- }
-
- public void createAttributeList(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_ATTR_LIST); //$NON-NLS-1$
- String newStream = "<!ATTLIST " + name + ">\n"; //$NON-NLS-1$ //$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createComment(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_COMMENT); //$NON-NLS-1$
- String newStream = "<!-- " + name + " -->\n"; //$NON-NLS-1$ //$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createElement(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_ELEMENT); //$NON-NLS-1$
- String newStream = "<!ELEMENT " + name + " EMPTY>\n"; //$NON-NLS-1$ //$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createEntity(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_ENTITY); //$NON-NLS-1$
- String newStream = "<!ENTITY " + name + " \"\">\n"; //$NON-NLS-1$//$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createNotation(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_NOTATION); //$NON-NLS-1$
- String newStream = "<!NOTATION " + name + " SYSTEM \"\">\n"; //$NON-NLS-1$ //$NON-NLS-2$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void createParameterEntityReference(DTDNode node, String name, boolean isAfter) {
- getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_ADD_PARM_ENTITY_REF); //$NON-NLS-1$
- String newStream = name + "\n"; //$NON-NLS-1$
- int offset = getInsertOffset(node, isAfter);
- getStructuredDocument().replaceText(this, offset, 0, newStream);
- getDTDModel().endRecording(this);
- }
-
- public void deleteNode(DTDNode node) {
- getDTDModel().beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_FILE_DELETE); //$NON-NLS-1$
- deleteNode(this, node);
- getDTDModel().endRecording(this);
- }
-
- public void deleteNode(Object requestor, DTDNode node) {
- DTDNode parent = (DTDNode) node.getParentNode();
- if (parent != null) {
- parent.delete(requestor, node);
- }
- else {
- if (!isMovingNode) {
- DTDModelUpdater updater = new DTDModelUpdater();
- updater.objectAboutToBeDeleted(requestor, node);
- if (node instanceof ParameterEntityReference) {
- Entity referencedEntity = ((ParameterEntityReference) node).getEntityObject();
- if (referencedEntity != null) {
- // remove references to all elements and parm entities
- // contained in our current model
- DTDExternalReferenceRemover remover = new DTDExternalReferenceRemover();
- remover.externalReferenceAboutToChange(requestor, referencedEntity);
- }
- }
- else if (node instanceof Notation) {
- Notation notation = ((Notation) node);
- DTDNotationReferenceRemover remover = new DTDNotationReferenceRemover();
- remover.notationAboutToBeDeleted(requestor, notation);
- }
- }
-
- // no parent? then delete up until the start of the next node
- // if it is a top level node
- int startOffset = node.getStartOffset();
- int endOffset = node.getWhitespaceEndOffset();
- if (node instanceof TopLevelNode) {
- endOffset = getInsertOffset(node, true);
- }
- getStructuredDocument().replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$
- }
- }
-
- public NodeList getComments() {
- return commentList;
- }
-
- public DTDModelImpl getDTDModel() {
- return fDTDModel;
- }
-
- public NodeList getElementsAndParameterEntityReferences() {
- return elementList;
- }
-
- public int getEndOffset() {
- int result = -1;
- IStructuredDocumentRegion region = getStructuredDocument().getLastStructuredDocumentRegion();
- if (region != null) {
- result = region.getEndOffset();
- }
- return result;
- }
-
- public int getLength() {
- int result = -1;
- int start = getStartOffset();
- if (start >= 0) {
- int end = getEndOffset();
- if (end >= 0) {
- result = end - start;
- if (result < -1) {
- result = -1;
- }
- }
- }
- return result;
- }
-
- public NodeList getEntities() {
- return entityList;
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.DTDFILEICON);
- }
-
-
-
- public int getInsertOffset(DTDNode node, boolean isAfter) {
- int offset = 0;
- if (node != null) {
- if (isAfter) {
- // then get the next node and use it's start offset
- int index = getNodes().indexOf(getNode(node.getStructuredDTDDocumentRegion()));
-
- DTDNode afterNode = null;
- if (index + 1 < getNodes().size()) {
- afterNode = (DTDNode) getNodes().get(index + 1);
- }
- if (afterNode != null) {
- offset = afterNode.getStructuredDTDDocumentRegion().getStartOffset();
- }
- else {
- // add to end
- if (getStructuredDocument().getLastStructuredDocumentRegion() != null) {
- offset = getStructuredDocument().getLastStructuredDocumentRegion().getEndOffset();
- }
- }
- }
- else {
- offset = node.getStructuredDTDDocumentRegion().getStartOffset();
- }
- }
- else {
- // add to end
- if (getStructuredDocument().getLastStructuredDocumentRegion() != null) {
- offset = getStructuredDocument().getLastStructuredDocumentRegion().getEndOffset();
- }
- }
- return offset;
- }
-
- public String getName() {
- org.eclipse.core.runtime.Path path = new org.eclipse.core.runtime.Path(getDTDModel().getId().toString());
- return path.lastSegment();
- }
-
- public DTDNode getNode(IStructuredDocumentRegion flatNode) {
- for (int i = 0; i < nodeList.size(); i++) {
- DTDNode node = (DTDNode) nodeList.get(i);
- if (node.getStructuredDTDDocumentRegion() == flatNode) {
- return node;
- }
- }
- return null;
- }
-
- public IndexedRegion getNodeAt(int offset) {
- DTDNode node = getTopLevelNodeAt(offset);
- if (node != null) {
- return node.getDeepestNode(offset);
- }
- return null;
- }
-
- public IndexedRegion getNodeAt(int startOffset, int endOffset) {
- DTDNode node = getTopLevelNodeAt(startOffset);
- if (node != null) {
- return node.getDeepestNode(startOffset, endOffset);
- }
- return null;
- }
-
- public List getNodeLists() {
- if (folderList == null) {
- folderList = new ArrayList();
- folderList.add(notationList);
- folderList.add(entityList);
- folderList.add(elementList);
- folderList.add(attlistList);
- folderList.add(commentList);
- folderList.add(unrecognizedList);
- }
- return folderList;
- }
-
- public List getNodes() {
- return nodeList;
- }
-
- public NodeList getNotations() {
- return notationList;
- }
-
- public int getStartOffset() {
- int result = -1;
- IStructuredDocumentRegion region = getStructuredDocument().getFirstStructuredDocumentRegion();
- if (region != null) {
- result = region.getStartOffset();
- }
- return result;
- }
-
- public IStructuredDocument getStructuredDocument() {
- return fDTDModel.getStructuredDocument();
- }
-
- public DTDNode getTopLevelNodeAt(int offset) {
- for (int i = 0; i < nodeList.size(); i++) {
- DTDNode node = (DTDNode) nodeList.get(i);
- if (node.contains(offset)) {
- return node;
- }
- }
- return null;
- }
-
- public NodeList getUnrecognized() {
- return unrecognizedList;
- }
-
- public void insertIntoModel(Object requestor, DTDNode reference, DTDNode node, boolean isAfter) {
- String nodeText = ""; //$NON-NLS-1$
- if (node instanceof TopLevelNode) {
- nodeText = ((TopLevelNode) node).getFullText();
- }
- else {
- nodeText = node.getNodeText();
- }
- int offset = getInsertOffset(reference, isAfter);
- getStructuredDocument().replaceText(requestor, offset, 0, nodeText);
- }
-
-
- public void insertNode(DTDNode node) {
- int startOffset = node.getStartOffset();
- int insertIndex = -1;
- // System.out.println("startoffset = " + startOffset);
- for (int i = 0; i < getNodes().size(); i++) {
- DTDNode currentNode = (DTDNode) getNodes().get(i);
- // System.out.println("currentNode endOffset = "
- // +currentNode.getEndOffset());
-
- if (currentNode.getEndOffset() > startOffset) {
- // System.out.println("endoffset " +
- // currentNode.getEndOffset() + " > " + startOffset);
- insertIndex = i;
- break;
- }
- }
- if (insertIndex == -1) {
- insertIndex = getNodes().size();
- }
-
-
- // System.out.println("insert index = " + insertIndex);
-
- addNode(insertIndex, node);
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isAttributeList(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 3) {
- ITextRegion second = flatNode.getRegions().get(1);
- ITextRegion third = flatNode.getRegions().get(2);
- if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ATTLIST_TAG)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isComment(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 2) {
- ITextRegion region = flatNode.getRegions().get(1);
- if (region.getType().equals(DTDRegionTypes.COMMENT_START)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isElement(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 3) {
- ITextRegion second = flatNode.getRegions().get(1);
- ITextRegion third = flatNode.getRegions().get(2);
- if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ELEMENT_TAG)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isEntity(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 3) {
- ITextRegion second = flatNode.getRegions().get(1);
- ITextRegion third = flatNode.getRegions().get(2);
- if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.ENTITY_TAG)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isNotation(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() >= 3) {
- ITextRegion second = flatNode.getRegions().get(1);
- ITextRegion third = flatNode.getRegions().get(2);
- if (second.getType().equals(DTDRegionTypes.EXCLAMATION) && third.getType().equals(DTDRegionTypes.NOTATION_TAG)) {
- return true;
- }
- }
- return false;
- }
-
- // it is assumed that flatnode contains at least 3 regions
- public boolean isParameterEntityReference(IStructuredDocumentRegion flatNode) {
- if (flatNode.getRegions().size() == 1) {
- ITextRegion region = flatNode.getRegions().get(0);
- if (region.getType().equals(DTDRegionTypes.ENTITY_PARM)) {
- return true;
- }
- }
- return false;
- }
-
- boolean isSameTopLevelType(DTDNode affectedNode) {
- IStructuredDocumentRegion flatNode = affectedNode.getStructuredDTDDocumentRegion();
- // return true if the flatnode still matches what the affectedNode
- // is representing
- if (affectedNode instanceof Element && isElement(flatNode)) {
- return true;
- }
- if (affectedNode instanceof Entity && isEntity(flatNode)) {
- return true;
- }
- if (affectedNode instanceof Comment && isComment(flatNode)) {
- return true;
- }
- if (affectedNode instanceof AttributeList && isAttributeList(flatNode)) {
- return true;
- }
- if (affectedNode instanceof Notation && isNotation(flatNode)) {
- return true;
- }
- if (affectedNode instanceof Unrecognized && isUnrecognized(flatNode)) {
- return true;
- }
- return false;
- }
-
- public boolean isUnrecognized(IStructuredDocumentRegion flatNode) {
- return !isElement(flatNode) && !isEntity(flatNode) && !isNotation(flatNode) && !isParameterEntityReference(flatNode) && !isAttributeList(flatNode) && !isComment(flatNode);
- }
-
- public void moveNode(Object requestor, DTDNode referenceNode, DTDNode nodeToMove, boolean isAfter) {
- isMovingNode = true;
-
- deleteNode(requestor, nodeToMove);
- insertIntoModel(requestor, referenceNode, nodeToMove, isAfter);
- isMovingNode = false;
- }
-
- public void newModel(NewDocumentEvent event) {
- creatingNewModel = true;
- nodeList.clear();
- NodesEvent removeEvent = new NodesEvent();
- removeEvent.getNodes().addAll(nodeList);
- notifyNodesRemoved(removeEvent);
- /* removeChildNodes(); */
-
- if (event.getStructuredDocument() != null && event.getStructuredDocument().getRegionList() != null) {
- buildNodes(event.getStructuredDocument().getRegionList());
- }
- creatingNewModel = false;
- }
-
- public void nodesReplaced(StructuredDocumentRegionsReplacedEvent event) {
- IStructuredDocumentRegionList oldNodes = event.getOldStructuredDocumentRegions();
- NodesEvent removedDTDNodes = new NodesEvent();
- for (int i = 0; i < oldNodes.getLength(); i++) {
- IStructuredDocumentRegion flatNode = oldNodes.item(i);
-
- for (Iterator iter = getNodes().iterator(); iter.hasNext();) {
- DTDNode node = (DTDNode) iter.next();
- if (node.getStructuredDTDDocumentRegion() == flatNode) {
- removedDTDNodes.add(node);
- }
- }
- }
-
- buildNodes(event.getNewStructuredDocumentRegions());
-
- if (removedDTDNodes.getNodes().size() > 0) {
- notifyNodesRemoved(removedDTDNodes);
- removeNodes(removedDTDNodes.getNodes());
- }
- }
-
- public void notifyNodeChanged(DTDNode node) {
- Iterator iter = modelListeners.iterator();
- while (iter.hasNext()) {
- IDTDFileListener listener = (IDTDFileListener) iter.next();
- listener.nodeChanged(node);
- }
- }
-
- public void notifyNodesAdded(NodesEvent addedNodes) {
- Iterator iter = modelListeners.iterator();
- while (iter.hasNext()) {
- IDTDFileListener listener = (IDTDFileListener) iter.next();
- listener.nodesAdded(addedNodes);
- }
- }
-
- protected void notifyNodesRemoved(NodesEvent event) {
- Iterator iter = modelListeners.iterator();
- while (iter.hasNext()) {
- IDTDFileListener listener = (IDTDFileListener) iter.next();
- listener.nodesRemoved(event);
- }
- }
-
- public void rebuildNodes(List nodes) {
- // remove the old nodes
- removeNodes(nodes);
-
- // now rebuild them
- NodesEvent addedDTDNodes = new NodesEvent();
- Iterator dtdNodes = nodes.iterator();
- while (dtdNodes.hasNext()) {
- DTDNode dtdNode = (DTDNode) dtdNodes.next();
- // System.out.println("rebuilding " +
- // dtdNode.getStructuredDocumentRegion().getText());
-
- DTDNode node = buildNode(dtdNode.getStructuredDTDDocumentRegion());
- if (node != null) {
- addedDTDNodes.add(node);
- }
- }
- if (addedDTDNodes.getNodes().size() > 0) {
- // now tell people about the additions
- notifyNodesAdded(addedDTDNodes);
- }
- }
-
- public void regionChanged(RegionChangedEvent event) {
- ITextRegion changedRegion = event.getRegion();
- IStructuredDocumentRegion flatNode = event.getStructuredDocumentRegion();
- DTDNode affectedNode = (DTDNode) getNodeAt(flatNode.getStartOffset(changedRegion), flatNode.getEndOffset(changedRegion));
- if (affectedNode != null) {
- // no need to resolve regions as it is just a change
- // affectedNode.resolveRegions();
- notifyNodeChanged(affectedNode);
- }
- }
-
- public void regionsReplaced(RegionsReplacedEvent event) {
- List nodesToRebuild = new ArrayList();
- IStructuredDocumentRegion flatNode = event.getStructuredDocumentRegion();
- DTDNode affectedNode = getNode(flatNode);
-
- if (!isSameTopLevelType(affectedNode)) {
- // Bug 111100 - Fire off a node removal event
- // to remove the node from the tree viewer
- NodesEvent removedDTDNodes = new NodesEvent();
- removedDTDNodes.add(affectedNode);
- notifyNodesRemoved(removedDTDNodes);
- nodesToRebuild.add(affectedNode);
- rebuildNodes(nodesToRebuild);
- }
- else {
- affectedNode.resolveRegions();
- notifyNodeChanged(affectedNode);
- // now try and determine which ones were added
- NodesEvent addedDTDNodes = new NodesEvent();
- ITextRegionList newRegions = event.getNewRegions();
- int size = newRegions.size();
- for (int i = 0; i < size; i++) {
- ITextRegion region = newRegions.get(i);
- DTDNode deepestNode = affectedNode.getDeepestNode(flatNode.getStartOffset(region), flatNode.getEndOffset(region));
- // Bug 111100 - We do not need to fire a node added event
- // for the affectedNode because that is already handled by
- // the node changed event above
- if (deepestNode != affectedNode && !addedDTDNodes.getNodes().contains(deepestNode)) {
- addedDTDNodes.add(deepestNode);
- }
- }
- if (addedDTDNodes.getNodes().size() > 0) {
- notifyNodesAdded(addedDTDNodes);
- }
- }
- }
-
- public void removeDTDFileListener(IDTDFileListener listener) {
- modelListeners.remove(listener);
- }
-
- protected void removeNodes(List nodes) {
- getNodes().removeAll(nodes);
- /*
- * for (int i = 0; i < nodes.size(); i++) {
- * removeChild((DTDNode)nodes.get(i)); } // end of for ()
- */
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java
deleted file mode 100644
index bea5c7a711..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java
+++ /dev/null
@@ -1,330 +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.wst.dtd.core.internal;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
-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.text.TextRegionListImpl;
-import org.eclipse.wst.xml.core.internal.document.NodeContainer;
-import org.w3c.dom.Node;
-
-
-public abstract class DTDNode extends NodeContainer implements IndexedRegion {
-
- // these are characteroffsets
- protected DTDFile dtdFile;
-
- // flat node that contains this node
- protected IStructuredDocumentRegion flatNode;
-
- protected TextRegionListImpl regions = new TextRegionListImpl();
-
- protected TextRegionListImpl whitespace = new TextRegionListImpl();
-
- public DTDNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode) {
- this.dtdFile = dtdFile;
- this.flatNode = flatNode;
- }
-
- public void addRegion(ITextRegion region) {
- /*
- * if (startRegion == null) { startRegion = region; } endRegion =
- * region;
- */
- regions.add(region);
- }
-
- public void addWhitespaceRegion(ITextRegion region) {
- whitespace.add(region);
- }
-
- public void beginRecording(Object requestor, String label) {
- getDTDFile().getDTDModel().beginRecording(requestor, label);
- }
-
- public Node cloneNode(boolean deepest) {
- return null;
- }
-
- public boolean contains(int testPosition) {
- return containsRange(testPosition, testPosition);
- }
-
- public boolean containsRange(int start, int end) {
- return getStartOffset() <= start && end <= getEndOffset();
- }
-
- public void delete(DTDNode child) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_NODE_DELETE); //$NON-NLS-1$
- delete(this, child);
- endRecording(this);
- }
-
- public void delete(Object requestor, DTDNode child) {
- replaceText(requestor, child.getStartOffset(), child.getFullNodeLength(), ""); //$NON-NLS-1$
- }
-
- public void endRecording(Object requestor) {
- getDTDFile().getDTDModel().endRecording(requestor);
- }
-
- public Object[] getChildren() {
- return getChildrenList().toArray();
- }
-
- public List getChildrenList() {
- Node child = getFirstChild();
- if (child != null) {
- List children = new ArrayList();
- for (; child != null; child = child.getNextSibling()) {
- children.add(child);
- }
- return children;
- }
- else {
- return Collections.EMPTY_LIST;
- }
- }
-
- public DTDNode getDeepestNode(int offset) {
- if (contains(offset)) {
- // now see if a child contains this offset
- Object[] children = getChildren();
- for (int i = 0; i < children.length; i++) {
- DTDNode child = (DTDNode) children[i];
- DTDNode deepest = child.getDeepestNode(offset);
- if (deepest != null) {
- return deepest;
- }
- } // end of for ()
- return this;
- }
- return null;
- }
-
- public DTDNode getDeepestNode(int start, int end) {
- if (containsRange(start, end)) {
- // now see if a child contains this offset
- Object[] children = getChildren();
- for (int i = 0; i < children.length; i++) {
- DTDNode child = (DTDNode) children[i];
- DTDNode deepest = child.getDeepestNode(start, end);
- if (deepest != null) {
- return deepest;
- }
- } // end of for ()
- return this;
- }
- return null;
- }
-
- public DTDFile getDTDFile() {
- return dtdFile;
- }
-
- public int getEndOffset() {
- return getStructuredDTDDocumentRegion().getEndOffset(getEndRegion());
- }
-
- public ITextRegion getEndRegion() {
- return regions.get(regions.size() - 1);// endRegion;
- }
-
- /**
- */
- public FactoryRegistry getFactoryRegistry() {
- DTDModelImpl model = dtdFile.getDTDModel();
- if (model != null) {
- FactoryRegistry reg = model.getFactoryRegistry();
- if (reg != null)
- return reg;
- }
- return null;
- }
-
- public int getFullNodeLength() {
- return getWhitespaceEndOffset() - getStartOffset();
- }
-
- public String getFullNodeText() {
- String text = getNodeText();
- if (whitespace.size() > 0) {
- RegionIterator iter = new RegionIterator(whitespace);
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- text += getStructuredDTDDocumentRegion().getText(region);
- }
- }
- return text;
- }
-
- abstract public Image getImage();
-
- public String getName() {
- ITextRegion region = getNameRegion();
- if (region != null) {
- return getStructuredDTDDocumentRegion().getText(region);
- }
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getNameRegion() {
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType() == DTDRegionTypes.NAME) {
- return region;
- }
- }
- return null;
- }
-
- // return the first token containing the specified token type
- public ITextRegion getNextRegion(RegionIterator iter, String type) {
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType().equals(type)) {
- return region;
- }
- }
- return null;
- }
-
- public int getNodeLength() {
- return getEndOffset() - getStartOffset();
- }
-
- public String getNodeName() {
- return getName();
- }
-
- public String getNodeText() {
- StringBuffer sb = new StringBuffer();
-
- RegionIterator iter = iterator();
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- sb.append(getStructuredDTDDocumentRegion().getText(region));
- }
- return sb.toString();
- }
-
- public short getNodeType() {
- return -1;
- }
-
- public int getStartOffset() {
- return getStructuredDTDDocumentRegion().getStartOffset(getStartRegion());
- }
-
- // private Region startRegion,endRegion;
- public ITextRegion getStartRegion() {
- return regions.get(0);
- // return startRegion;
- }
-
- /**
- * Get the value of flatNode.
- *
- * @return value of flatNode.
- *
- * ISSUE:named changed not to be confused with default access protected
- * super class method, but should re-think if this is correct technique.
- * Perhaps getFirstRegion?
- */
- public IStructuredDocumentRegion getStructuredDTDDocumentRegion() {
- return flatNode;
- }
-
- // return end offset including whitespace
- // or just the end offset if there is no whitespace
- public int getWhitespaceEndOffset() {
- if (whitespace.size() > 0) {
- ITextRegion region = whitespace.get(whitespace.size() - 1);
- return getStructuredDTDDocumentRegion().getEndOffset(region);
- }
-
- return getEndOffset();
- }
-
- public boolean hasTrailingWhitespace() {
- return whitespace.size() > 0;
- }
-
- public RegionIterator iterator() {
- // System.out.println("create region iter " + this.getClass() + " with
- // start , end = " + getStartOffset() + ", " +getEndOffset());
- return new RegionIterator(regions);
- }
-
- public void replaceText(Object requestor, int start, int length, String newText) {
- getDTDFile().getStructuredDocument().replaceText(requestor, start, length, newText);
- }
-
- public void resolveRegions() {
- }
-
- public void setName(Object requestor, String name) {
- if (!getName().equals(name)) {
- ITextRegion nameRegion = getNameRegion();
- if (nameRegion != null) {
- // nameToken.updateText(name);
- getDTDFile().getDTDModel().getReferenceUpdater().nameAboutToChange(requestor, this, name);
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(nameRegion), nameRegion.getLength(), name);
- }
- }
- }
-
- public void setName(String name) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_DTD_NODE_NAME_CHG); //$NON-NLS-1$
- setName(this, name);
- endRecording(this);
- }
-
- /**
- * Set the value of flatNode.
- *
- * @param v
- * Value to assign to flatNode. ISSUE:named changed not to be
- * confused with default access protected super class method,
- * but should re-think if this is correct technique
- */
- void setStructuredDTDDocumentRegion(IStructuredDocumentRegion v) {
- this.flatNode = v;
- }
-
- // skips past next name token in the iterator
- protected void skipPastName(RegionIterator iter) {
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
- if (currentRegion.getType() == DTDRegionTypes.NAME) {
- break;
- }
- }
- }
-
- public boolean supports(java.lang.String feature, java.lang.String version) {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDResource.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDResource.java
deleted file mode 100644
index 9c6db9ba53..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDResource.java
+++ /dev/null
@@ -1,56 +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.wst.dtd.core.internal;
-
-
-public interface DTDResource {
- // Enumeration Constants
- public static final String ANYICON = "icons/full/obj16/any.gif"; //$NON-NLS-1$
- public static final String ATTRIBUTEICON = "icons/full/obj16/attribute.gif"; //$NON-NLS-1$
- public static final String ATTRIBUTELISTICON = "icons/full/obj16/attribute_list.gif"; //$NON-NLS-1$
- public static final String COMMENTICON = "icons/full/obj16/comment.gif"; //$NON-NLS-1$
-
- public static final String DTDFILEICON = "icons/full/obj16/DTDFile.gif"; //$NON-NLS-1$
- public static final String ELEMENTICON = "icons/full/obj16/element.gif"; //$NON-NLS-1$
- public static final String ELEMENTREFICON = "icons/full/obj16/element_ref.gif"; //$NON-NLS-1$
- public static final String EMPTYICON = "icons/full/obj16/emptycontent.gif"; //$NON-NLS-1$
- public static final String ENTITYICON = "icons/full/obj16/entity.gif"; //$NON-NLS-1$
- public static final String ENTITYREFERENCEICON = "icons/full/obj16/entity_reference.gif"; //$NON-NLS-1$
- public static final String FLDR_ATTLIST = "icons/full/obj16/folder_attlist_obj.gif"; //$NON-NLS-1$
- public static final String FLDR_COMM = "icons/full/obj16/folder_comments_obj.gif"; //$NON-NLS-1$
-
- public static final String FLDR_EL = "icons/full/obj16/fldr_el.gif"; //$NON-NLS-1$
- public static final String FLDR_ENT = "icons/full/obj16/fldr_ent.gif"; //$NON-NLS-1$
- public static final String FLDR_NOT = "icons/full/obj16/fldr_not.gif"; //$NON-NLS-1$
- public static final String FLDR_UNREC = "icons/full/obj16/fldr_unrec.gif"; //$NON-NLS-1$
-
- public static final String NEWHTMLFORM = "icons/full/obj16/genhtmform_wiz.gif"; //$NON-NLS-1$
- public static final String NOTATIONICON = "icons/full/obj16/notation.gif"; //$NON-NLS-1$
-
- public static final String ONECHOICEICON = "icons/full/obj16/onechoice.gif"; //$NON-NLS-1$
-
- public static final String ONEICON = "icons/full/obj16/one.gif"; //$NON-NLS-1$
- public static final String ONEORMORECHOICEICON = "icons/full/obj16/oneormorechoice.gif"; //$NON-NLS-1$
- public static final String ONEORMOREICON = "icons/full/obj16/oneormore.gif"; //$NON-NLS-1$
- public static final String ONEORMORESEQUENCEICON = "icons/full/obj16/oneormoresequence.gif"; //$NON-NLS-1$
-
- public static final String ONESEQUENCEICON = "icons/full/obj16/onesequence.gif"; //$NON-NLS-1$
- public static final String OPTIONALCHOICEICON = "icons/full/obj16/optionalchoice.gif"; //$NON-NLS-1$
- public static final String OPTIONALICON = "icons/full/obj16/optional.gif"; //$NON-NLS-1$
- public static final String OPTIONALSEQUENCEICON = "icons/full/obj16/optionalsequence.gif"; //$NON-NLS-1$
- public static final String PCDATAICON = "icons/full/obj16/txtext.gif"; //$NON-NLS-1$
- public static final String UNRECOGNIZEDICON = "icons/full/obj16/unrecognized_content.gif"; //$NON-NLS-1$
- public static final String ZEROORMORECHOICEICON = "icons/full/obj16/zeroormorechoice.gif"; //$NON-NLS-1$
- public static final String ZEROORMOREICON = "icons/full/obj16/zeroormore.gif"; //$NON-NLS-1$
- public static final String ZEROORMORESEQUENCEICON = "icons/full/obj16/zeroormoresequence.gif"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java
deleted file mode 100644
index 3c10322468..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java
+++ /dev/null
@@ -1,205 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.w3c.dom.Node;
-
-
-public class Element extends NamedTopLevelNode {
-
- List attListList = new ArrayList();
-
- List attributes = new ArrayList();
-
- protected CMNode fContentModel;
-
- public Element(DTDFile dtdFile, IStructuredDocumentRegion flatNode) {
- super(dtdFile, flatNode, DTDRegionTypes.ELEMENT_TAG);
- }
-
- public void addAttribute(String name) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ELEMENT_ADD_ATTR); //$NON-NLS-1$
- List attLists = getAttributeLists();
- if (attLists.size() == 0) {
- getDTDFile().createAttributeList(this, getName(), true);
- attLists = getAttributeLists();
- }
- if (attLists.size() > 0) {
- AttributeList attList = (AttributeList) attLists.get(attLists.size() - 1);
- attList.addAttribute(name);
- }
- endRecording(this);
- }
-
- public void addChild() {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ELEMENT_ADD_CHILD); //$NON-NLS-1$
- addContent(this, " EMPTY"); //$NON-NLS-1$
- endRecording(this);
- }
-
- protected void addContent(Object requestor, String content) {
- ITextRegion whitespace = getWhitespaceAfterName();
- int startOffset = 0;
- int length = 0;
- if (whitespace != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(whitespace);
- length = whitespace.getLength() >= 2 ? 1 : 0;
- }
- else {
- ITextRegion nameRegion = getNameRegion();
- if (nameRegion != null) {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(nameRegion);
- }
- else {
- ITextRegion elementTag = getNextRegion(iterator(), DTDRegionTypes.ELEMENT_TAG);
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(elementTag);
- }
- }
- replaceText(requestor, startOffset, length, content);
- }
-
- public void addGroup() {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ELEMENT_ADD_GRP); //$NON-NLS-1$
- addContent(this, " ()"); //$NON-NLS-1$
- endRecording(this);
- }
-
- public Node cloneNode(boolean deep) {
- return new Element(dtdFile, flatNode);
- }
-
- public List getAttributeLists() {
- attListList.clear();
- String elementName = getName();
- Iterator iter = dtdFile.getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof AttributeList && node.getName().equals(elementName)) {
- attListList.add(node);
- }
- }
- return attListList;
- }
-
-
-
- public CMNode getContentModel() {
- // Object[] children = getChildren()
- return (CMNode) getFirstChild();// contentModel;
- }
-
- public List getElementAttributes() {
- attributes.clear();
- Iterator attLists = getAttributeLists().iterator();
- while (attLists.hasNext()) {
- AttributeList attList = (AttributeList) attLists.next();
-
- Object[] children = attList.getChildren();
- for (int i = 0; i < children.length; i++) {
- attributes.add(children[i]);
- }
- }
- return attributes;
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ELEMENTICON);
- }
-
- public short getNodeType() {
- return Node.ELEMENT_NODE;
- }
-
- public void replaceContentModel(Object requestor, CMNode node) {
- replaceContentModel(requestor, node.getNodeText());
- }
-
- public void replaceContentModel(Object requestor, String nodeText) {
- int offset = 0;
- int length = 0;
- CMNode contentModel = getContentModel();
- if (contentModel != null) {
- offset = contentModel.getStartOffset();
- length = contentModel.getWhitespaceEndOffset() - offset;
- replaceText(requestor, offset, length, nodeText);
- }
- else {
- addContent(requestor, nodeText);
- }
- }
-
- public void resolveRegions() {
- // System.out.println("element node stream = " +
- // tokenStream.getString());
- fContentModel = null;
- removeChildNodes();
- RegionIterator iter = iterator();
-
- if (getNameRegion() != null) {
- // we skip past the name token is our name
- skipPastName(iter);
- }
-
- while (iter.hasNext()) {
- ITextRegion currentRegion = iter.next();
-
- if (fContentModel == null) {
- if (currentRegion.getType().equals(DTDRegionTypes.NAME)) {
- fContentModel = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
- }
- else if (currentRegion.getType().equals(DTDRegionTypes.CONTENT_PCDATA)) {
- fContentModel = new CMBasicNode(getDTDFile(), getStructuredDTDDocumentRegion());
- }
- else if (currentRegion.getType().equals(DTDRegionTypes.LEFT_PAREN)) {
- fContentModel = new CMGroupNode(getDTDFile(), getStructuredDTDDocumentRegion());
- }
- }
-
- if (fContentModel != null) {
- if (!currentRegion.getType().equals(DTDRegionTypes.END_TAG)) {
- // content model gets all regions except for the '>'
- fContentModel.addRegion(currentRegion);
- }
- else {
- // if it is equal to the end tag, then don't add anymore
- // regions
- // for the content model
- break;
- }
-
- }
-
- }
- if (fContentModel != null) {
- appendChild(fContentModel);
- // this is the root element content so set it true
- fContentModel.setRootElementContent(true);
- // now tell the content model to resolve it's regions
- fContentModel.resolveRegions();
-
- }
- }
-
- public void setContentModel(CMNode contentModel) {
- this.fContentModel = contentModel;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java
deleted file mode 100644
index 45f7c3e7dc..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java
+++ /dev/null
@@ -1,333 +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.wst.dtd.core.internal;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-// external node contains code to help set and get public ids
-public class Entity extends ExternalNode {
-
- private static String setExternalEntity = DTDCoreMessages._UI_LABEL_ENTITY_SET_EXT_ENTITY; //$NON-NLS-1$
- private static String setGeneralEntity = DTDCoreMessages._UI_LABEL_ENTITY_SET_GENERAL_ENTITY; //$NON-NLS-1$
- private static String setInternalEntity = DTDCoreMessages._UI_LABEL_ENTITY_SET_INT_ENTITY; //$NON-NLS-1$
-
- private static String setParameterEntity = DTDCoreMessages._UI_LABEL_ENTITY_SET_PARM_ENTITY; //$NON-NLS-1$
-
- public Entity(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.ENTITY_TAG);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ENTITYICON);
- }
-
-
- /**
- * Get the value of notationName.
- *
- * @return value of notationName.
- */
- public String getNotationName() {
- ITextRegion ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE);
- if (ndataRegion != null) {
- return getStructuredDTDDocumentRegion().getText(ndataRegion);
- }
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getPercentRegion() {
- return getNextRegion(iterator(), DTDRegionTypes.PERCENT);
- }
-
- /**
- * Get the value of value.
- *
- * @return value of value.
- */
- public String getValue() {
- if (!isExternalEntity()) {
- ITextRegion valueRegion = getNextQuotedLiteral(iterator());
- if (valueRegion != null) {
- return getValueFromQuotedRegion(valueRegion);
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Get the value of externalEntity.
- *
- * @return value of externalEntity.
- */
- public boolean isExternalEntity() {
- return getPublicKeywordRegion(iterator()) != null || getSystemKeywordRegion(iterator()) != null;
- }
-
- /**
- * Get the value of isParameterEntity.
- *
- * @return value of isParameterEntity.
- */
- public boolean isParameterEntity() {
- return getPercentRegion() != null;
- }
-
- private void removeNData(Object requestor) {
- ITextRegion ndataRegion = null;
-
- // see if we have an NDATA keyword
- ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_KEYWORD);
- int startOffset = 0, endOffset = 0;
- if (ndataRegion != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(ndataRegion);
- endOffset = getStructuredDTDDocumentRegion().getEndOffset(ndataRegion);
- }
- ITextRegion value = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE);
- if (value != null) {
- if (startOffset == 0) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(value);
- }
- endOffset = getStructuredDTDDocumentRegion().getEndOffset(value);
- }
- replaceText(requestor, startOffset, endOffset - startOffset, ""); //$NON-NLS-1$
- }
-
- /**
- * Set the value of externalEntity.
- *
- * @param v
- * Value to assign to externalEntity.
- */
- public void setExternalEntity(boolean isExternalEntity) {
- if (isExternalEntity() != isExternalEntity) {
- // externalEntity = v;
- beginRecording(this, isExternalEntity ? setExternalEntity : setInternalEntity);
- if (isExternalEntity) {
- // we need to get rid of the value literal
- ITextRegion quote = getNextRegion(iterator(), DTDRegionTypes.SINGLEQUOTED_LITERAL);
- if (quote == null) {
- quote = getNextRegion(iterator(), DTDRegionTypes.DOUBLEQUOTED_LITERAL);
- }
- if (quote != null) {
- replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(quote), quote.getLength(), ""); //$NON-NLS-1$
- }
- setSystemID(""); //$NON-NLS-1$
- }
- else {
- // we need to get rid of text between end of name region and
- // the last double quoted literal
- RegionIterator iter = iterator();
- ITextRegion keyword = getSystemKeywordRegion(iter);
- int startOffset = 0;
- int length = 0;
- if (keyword == null) {
- // reset the iterator
- iter = iterator();
- keyword = getPublicKeywordRegion(iter);
- }
- if (keyword != null) {
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(keyword);
- // start with a length just equal to the keyword for now
- length = keyword.getLength();
- }
- else {
- // reset the iterator since we didn't find the keyword
- iter = iterator();
- // just go from after the name
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(getNameRegion());
- }
-
- // now that we have the start, look for the end
- ITextRegion lastRegion = null;
-
- if (lastRegion == null) {
- // then look for last quoted literal
- while (iter.hasNext()) {
- ITextRegion literal = getNextQuotedLiteral(iter);
- if (literal != null) {
- lastRegion = literal;
- }
- }
- }
-
- if (lastRegion != null) {
- length = getStructuredDTDDocumentRegion().getEndOffset(lastRegion) - startOffset;
- }
- replaceText(this, startOffset, length, "\"\""); //$NON-NLS-1$
- removeNData(this);
- }
- endRecording(this);
- }
- }
-
- public void setNotationName(Object requestor, String newNotation) {
- if (!getNotationName().equals(newNotation)) {
- if (!newNotation.equals("")) { //$NON-NLS-1$
- //
- ITextRegion ndataRegion = getNextRegion(iterator(), DTDRegionTypes.NDATA_VALUE);
- if (ndataRegion != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(ndataRegion), ndataRegion.getLength(), newNotation);
- }
- else {
- // time to create one
- int startOffset = 0;
- String string = ""; //$NON-NLS-1$
- RegionIterator iter = iterator();
- ITextRegion ndataKeyword = getNextRegion(iter, DTDRegionTypes.NDATA_KEYWORD);
- if (ndataKeyword == null) {
- // we'll need to create one after the last quoted
- // literal
- // Reset iterator
- string += " NDATA "; //$NON-NLS-1$
- iter = iterator();
- ITextRegion lastQuotedLiteral = null;
- while (iter.hasNext()) {
- ITextRegion literal = getNextQuotedLiteral(iter);
- if (literal != null) {
- lastQuotedLiteral = literal;
- }
- }
- if (lastQuotedLiteral != null) {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(lastQuotedLiteral);
- }
- else {
- // created after the system or public keyword
- ITextRegion keyword = getPublicKeywordRegion(iterator());
- if (keyword == null) {
- keyword = getSystemKeywordRegion(iterator());
- }
- // we shouldn't be null here since we check if we
- // were external already
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(keyword);
- }
-
- }
- else {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(ndataKeyword);
- }
- replaceText(requestor, startOffset, 0, string + newNotation);
- }
- }
- else {
- // need to remove the ndata stuff
- removeNData(requestor);
- }
- }
- }
-
- /**
- * Set the value of notationName.
- *
- * @param newNotation
- * Value to assign to notationName.
- */
- public void setNotationName(String newNotation) {
- beginRecording(this, "NDATA " + DTDCoreMessages._UI_LABEL_ENTITY_NDATA_CHANGE); //$NON-NLS-1$ //$NON-NLS-2$
- setNotationName(this, newNotation);
- endRecording(this);
- }
-
- /**
- * Set the value of isParameterEntity.
- *
- * @param v
- * Value to assign to isParameterEntity.
- */
- public void setParameterEntity(boolean v) {
- if (isParameterEntity() != v) {
- beginRecording(this, v ? setParameterEntity : setGeneralEntity);
- if (v) {
- RegionIterator iter = iterator();
- ITextRegion startTag = getNextRegion(iter, DTDRegionTypes.ENTITY_TAG);
- int startOffset = 0, length = 0;
-
- if (iter.hasNext()) {
- ITextRegion region = iter.next();
- startOffset = getStructuredDTDDocumentRegion().getStartOffset(region);
- if (region.getType() == DTDRegionTypes.WHITESPACE && region.getLength() > 1) {
- length = 1;
- }
- }
- else {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(startTag);
- }
- replaceText(this, startOffset, length, " %"); //$NON-NLS-1$
- // now get rid of any NData since it is only allowed if the
- // entity is a general entity and not a parameter entity
- removeNData(this);
- }
- else {
- // get rid of percent region
- ITextRegion percentRegion = getPercentRegion();
- replaceText(this, getStructuredDTDDocumentRegion().getStartOffset(percentRegion), percentRegion.getLength(), ""); //$NON-NLS-1$
- }
-
- endRecording(this);
- }
- }
-
- /**
- * Set the value of value.
- *
- * @param v
- * Value to assign to value.
- */
- public void setValue(Object requestor, String v) {
- if (!isExternalEntity()) {
- if (!getValue().equals(v)) {
- // then it makes sense to change the value
- ITextRegion valueRegion = getNextQuotedLiteral(iterator());
- String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (valueRegion != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(valueRegion), valueRegion.getLength(), quoteChar + v + quoteChar);
- }
- else {
- int startOffset = 0;
- RegionIterator iter = iterator();
- ITextRegion region = getNextRegion(iter, DTDRegionTypes.NAME);
- if (region == null) {
- // create it after the percent if there is one
- region = getPercentRegion();
- }
- if (region == null) {
- // if still null, then create it after the element tag
- region = getStartTag(iterator());
- }
-
- if (region != null) {
- startOffset = getStructuredDTDDocumentRegion().getEndOffset(region);
- replaceText(requestor, startOffset, 0, quoteChar + v + quoteChar);
- }
- }
- }
- }
- }
-
- /**
- * Set the value of value.
- *
- * @param v
- * Value to assign to value.
- */
- public void setValue(String v) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_ENTITY_VALUE_CHG); //$NON-NLS-1$
- setValue(this, v);
- endRecording(this);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ExternalNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ExternalNode.java
deleted file mode 100644
index 4e3cea7b42..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ExternalNode.java
+++ /dev/null
@@ -1,250 +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.wst.dtd.core.internal;
-
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-// base class for nodes that can contain external content
-public abstract class ExternalNode extends NamedTopLevelNode {
-
- String publicID;
-
- String systemID;
-
- public ExternalNode(DTDFile file, IStructuredDocumentRegion flatNode, String tagType) {
- super(file, flatNode, tagType);
- }
-
- public ITextRegion getNextQuotedLiteral(RegionIterator iter) {
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType().equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || region.getType().equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) {
- return region;
- }
- }
- return null;
- }
-
- /**
- * Get the value of publicID.
- *
- * @return value of publicID.
- */
- public String getPublicID() {
- ITextRegion publicValue = getPublicValueRegion();
- if (publicValue != null) {
- return getValueFromQuotedRegion(publicValue);
- }
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getPublicKeywordRegion(RegionIterator iter) {
- return getNextRegion(iter, DTDRegionTypes.PUBLIC_KEYWORD);
- }
-
- public ITextRegion getPublicValueRegion() {
- RegionIterator iter = iterator();
-
- ITextRegion publicKeyword = getPublicKeywordRegion(iter);
-
- if (publicKeyword != null && iter.hasNext()) {
- ITextRegion quotedLiteral = getNextQuotedLiteral(iter);
- if (quotedLiteral != null) {
- return quotedLiteral;
- }
- }
- return null;
- }
-
- /**
- * Get the value of systemID.
- *
- * @return value of systemID.
- */
- public String getSystemID() {
- ITextRegion systemValue = getSystemValueRegion();
- if (systemValue != null) {
- return getValueFromQuotedRegion(systemValue);
- }
- return ""; //$NON-NLS-1$
- }
-
- public ITextRegion getSystemKeywordRegion(RegionIterator iter) {
- return getNextRegion(iter, DTDRegionTypes.SYSTEM_KEYWORD);
- }
-
- public ITextRegion getSystemValueRegion() {
- RegionIterator iter = iterator();
-
- ITextRegion systemKeyword = getSystemKeywordRegion(iter);
- if (systemKeyword != null && iter.hasNext()) {
- ITextRegion quotedLiteral = getNextQuotedLiteral(iter);
- if (quotedLiteral != null) {
- return quotedLiteral;
- }
- }
- else {
- // try and see if there is a second quoted literal after a public
- // keyword
- iter = iterator();
- ITextRegion publicKeyword = getPublicKeywordRegion(iter);
-
- if (publicKeyword != null && iter.hasNext()) {
- ITextRegion quotedLiteral = getNextQuotedLiteral(iter);
- if (quotedLiteral != null && iter.hasNext()) {
- // now get the second quoted literal
- quotedLiteral = getNextQuotedLiteral(iter);
- if (quotedLiteral != null) {
- // got it!
- return quotedLiteral;
- }
- }
- }
- }
- return null;
- }
-
- public String getValueFromQuotedRegion(ITextRegion region) {
- String type = region.getType();
- if (type.equals(DTDRegionTypes.SINGLEQUOTED_LITERAL) || type.equals(DTDRegionTypes.DOUBLEQUOTED_LITERAL)) {
- String text = getStructuredDTDDocumentRegion().getText(region);
- return text.substring(1, text.length() - 1);
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Set the value of publicID.
- *
- * @param v
- * Value to assign to publicID.
- */
- public void setPublicID(Object requestor, String v) {
- if (!v.equals(publicID)) {
- publicID = v;
- ITextRegion publicValue = getPublicValueRegion();
- ITextRegion publicKeyword = getPublicKeywordRegion(iterator());
- ITextRegion systemKeyword = getSystemKeywordRegion(iterator());
- ITextRegion systemValue = getSystemValueRegion();
-
- if (v.equals("")) { //$NON-NLS-1$
- if (publicKeyword != null) {
- // time to get rid of the public keyword and value
- // and replace it with the system one
- int startOffset = getStructuredDTDDocumentRegion().getStartOffset(publicKeyword);
- String newString = "SYSTEM"; //$NON-NLS-1$
- if (systemValue == null) {
- newString += " \"\""; //$NON-NLS-1$
- }
- replaceText(requestor, startOffset, getStructuredDTDDocumentRegion().getEndOffset(publicValue) - startOffset, newString);
- }
- }
- else {
- // here were setting a non empty value
- String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (publicValue != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(publicValue), publicValue.getLength(), quoteChar + publicID + quoteChar);
- }
- else {
- // time to create stuff
- if (publicKeyword != null) {
- // then just put our new value after the keyword
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(publicKeyword), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$
- }
- else {
- // we need the public keyword as well
- if (systemKeyword != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(systemKeyword), systemKeyword.getLength(), "PUBLIC " + quoteChar + v + quoteChar); //$NON-NLS-1$
- }
- else {
- ITextRegion nameRegion = getNameRegion();
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, " PUBLIC " + quoteChar + v + quoteChar); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
-
-
- /**
- * Set the value of publicID.
- *
- * @param v
- * Value to assign to publicID.
- */
- public void setPublicID(String v) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_EXT_NODE_PUBLIC_ID_CHG); //$NON-NLS-1$
- setPublicID(this, v);
- endRecording(this);
- }
-
- /**
- * Set the value of systemID.
- *
- * @param v
- * Value to assign to systemID.
- */
- public void setSystemID(Object requestor, String v) {
- if (!v.equals(systemID) || (getPublicKeywordRegion(iterator()) == null && getSystemKeywordRegion(iterator()) == null)) {
- systemID = v;
- String quoteChar = v.indexOf("\"") == -1 ? "\"" : "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ITextRegion systemValue = getSystemValueRegion();
- if (systemValue != null) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(systemValue), systemValue.getLength(), quoteChar + systemID + quoteChar);
- }
- else {
- ITextRegion systemKeyword = getSystemKeywordRegion(iterator());
-
- // time to create stuff
- if (systemKeyword != null) {
- // then just put our new value after the keyword
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(systemKeyword), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$
- }
- else {
- // see if we have a public keyword
- ITextRegion publicKeyword = getPublicKeywordRegion(iterator());
- if (publicKeyword == null) {
- ITextRegion nameRegion = getNameRegion();
-
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(nameRegion), 0, " SYSTEM " + quoteChar + v + quoteChar); //$NON-NLS-1$
- }
- else {
- // put it after the public value region
- ITextRegion publicValueRegion = getPublicValueRegion();
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(publicValueRegion), 0, " " + quoteChar + v + quoteChar); //$NON-NLS-1$
- }
-
- }
- }
-
- }
- }
-
-
- /**
- * Set the value of systemID.
- *
- * @param v
- * Value to assign to systemID.
- */
- public void setSystemID(String v) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_EXT_NODE_SYSTEM_ID_CHG); //$NON-NLS-1$
- setSystemID(this, v);
- endRecording(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java
deleted file mode 100644
index 158f48523e..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java
+++ /dev/null
@@ -1,143 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.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.wst.dtd.core"; //$NON-NLS-1$
-
- public static final int ERROR = IStatus.ERROR; // 4
- public static final int ERROR_DEBUG = 200 + ERROR;
- public static final int INFO = IStatus.INFO; // 1
- public static final int INFO_DEBUG = 200 + INFO;
-
- public static final int OK = IStatus.OK; // 0
-
- public static final int OK_DEBUG = 200 + OK;
-
- private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$
- public static final int WARNING = IStatus.WARNING; // 2
- public static final int WARNING_DEBUG = 200 + WARNING;
-
- /**
- * 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;
- }
- 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 (!isDebugging())
- return;
-
- 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)) {
- 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;
- }
- }
- }
- }
-
- /**
- * @return true if the platform is debugging
- */
- public static boolean isDebugging() {
- return Platform.inDebugMode();
- }
-
- 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 trace(String category, String message) {
- _trace(category, message, null);
- }
-
- 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);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NamedTopLevelNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NamedTopLevelNode.java
deleted file mode 100644
index 9f7f51f9f6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NamedTopLevelNode.java
+++ /dev/null
@@ -1,135 +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.wst.dtd.core.internal;
-
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-// interface for nodes that can exist at the top level in a dtdfile
-// eg. entity, notation, element, comment, attlist, or unrecognized stuff (ie
-// <junk dkfjdl>
-public abstract class NamedTopLevelNode extends TopLevelNode {
-
- private String tagStartType;
-
- public NamedTopLevelNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode, String type) {
- super(dtdFile, flatNode);
- tagStartType = type;
- }
-
- public ITextRegion getNameRegion() {
- // name region is located after the whitespace (which is after
- // the elementtag
- RegionIterator iter = iterator();
- getNextRegion(iter, tagStartType);
-
- if (!iter.hasNext()) {
- return null;
- }
-
- ITextRegion region = iter.next();
- if (!region.getType().equals(DTDRegionTypes.WHITESPACE)) {
- return null;
- }
-
- if (!iter.hasNext()) {
- return null;
- }
-
- region = iter.next();
- if (region.getType().equals(DTDRegionTypes.NAME)) {
- return region;
- }
-
- // we normally stop here, but for entities, we have to see if we are
- // at a '%'. if so, we skip that and find the name after the
- // whitespace again
- if (tagStartType == DTDRegionTypes.ENTITY_TAG && region.getType().equals(DTDRegionTypes.PERCENT) && iter.hasNext()) {
- region = iter.next();
-
- if (!region.getType().equals(DTDRegionTypes.WHITESPACE)) {
- return null;
- }
-
- if (!iter.hasNext()) {
- return null;
- }
-
- region = iter.next();
- if (region.getType().equals(DTDRegionTypes.NAME)) {
- return region;
- }
- }
-
- return null;
- }
-
- public ITextRegion getStartTag(RegionIterator iter) {
- return getNextRegion(iter, tagStartType);
- }
-
- public ITextRegion getWhitespaceAfterName() {
- ITextRegion nameRegion = getNameRegion();
- RegionIterator iter = iterator();
- // skip past the element tag region
- getNextRegion(iter, tagStartType);
- boolean foundName = false;
- while (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (!foundName && nameRegion != null && region == nameRegion) {
- foundName = true;
- }
-
- if (region.getType().equals(DTDRegionTypes.WHITESPACE)) {
- // there is no name region or we have already passed it
- if (nameRegion == null || foundName) {
- return region;
- }
- }
- }
- return null;
- }
-
- public void setName(Object requestor, String name) {
- ITextRegion nameRegion = getNameRegion();
- if (nameRegion != null) {
- super.setName(requestor, name);
- }
- else {
- RegionIterator iter = iterator();
- ITextRegion elementTagRegion = getNextRegion(iter, tagStartType);
- int replaceLength = 0;
- if (iter.hasNext()) {
- ITextRegion region = iter.next();
- if (region.getType().equals(DTDRegionTypes.WHITESPACE)) {
- if (region.getLength() >= 2) {
- // there are 2 spaces between 'ELEMENT' and the
- // content
- // Change replace length to 1 so that the new name and
- // the content are separated by a single space
- replaceLength = 1;
- }
- }
- }
-
- // beginRecording(requestor, "Name Change");
- String newText = " " + name; //$NON-NLS-1$
- replaceText(requestor, getStructuredDTDDocumentRegion().getEndOffset(elementTagRegion), replaceLength, newText);
- // endRecording(requestor);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java
deleted file mode 100644
index df45a2a082..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.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.wst.dtd.core.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-
-
-public class NodeList {
- protected DTDFile dtdFile;
-
- ArrayList listNodes = new ArrayList();
-
- protected String listType;
-
- public NodeList(DTDFile dtdFile, String tokenType) {
- listType = tokenType;
- this.dtdFile = dtdFile;
- }
-
- public Image getImage() {
- if (listType == DTDRegionTypes.ELEMENT_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_EL);
- }
- else if (listType == DTDRegionTypes.ENTITY_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_ENT);
- }
- else if (listType == DTDRegionTypes.NOTATION_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_NOT);
- }
- else if (listType == DTDRegionTypes.COMMENT_START) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_COMM);
- }
- else if (listType == DTDRegionTypes.ATTLIST_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_ATTLIST);
- }
- else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_UNREC);
- }
- else
- return null;
- }
-
- public String getListType() {
- return listType;
- }
-
- public String getName() {
- if (listType == DTDRegionTypes.ELEMENT_TAG) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_ELEMENTS; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.ENTITY_TAG) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_ENTITIES; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.NOTATION_TAG) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_NOTATIONS; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.COMMENT_START) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_COMMENTS; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.ATTLIST_TAG) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_ATTRIBUTES; //$NON-NLS-1$
- }
- else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) {
- return DTDCoreMessages._UI_LABEL_NODE_LIST_OTHER; //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
-
- public ArrayList getNodes() {
- listNodes.clear();
- Iterator iter = dtdFile.getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (listType == DTDRegionTypes.ELEMENT_TAG && (node instanceof Element || node instanceof ParameterEntityReference)) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.ATTLIST_TAG && node instanceof AttributeList) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.ENTITY_TAG && node instanceof Entity) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.NOTATION_TAG && node instanceof Notation) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.COMMENT_START && node instanceof Comment) {
- listNodes.add(node);
- }
- else if (listType == DTDRegionTypes.UNKNOWN_CONTENT && node instanceof Unrecognized) {
- listNodes.add(node);
- }
- }
- return listNodes;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java
deleted file mode 100644
index 96abd7427f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java
+++ /dev/null
@@ -1,29 +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.wst.dtd.core.internal;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-
-public class Notation extends ExternalNode {
-
- public Notation(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.NOTATION_TAG);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.NOTATIONICON);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java
deleted file mode 100644
index 490053adde..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java
+++ /dev/null
@@ -1,112 +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.wst.dtd.core.internal;
-
-import java.util.List;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-public class ParameterEntityReference extends NamedTopLevelNode {
-
-
-
- public class StartEndPair {
- public int startOffset, endOffset;
- }
-
- private Entity cachedEntity = null;
-
- public ParameterEntityReference(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode, DTDRegionTypes.COMMENT_START);
- }
-
- public Entity getEntityObject() {
- if (cachedEntity != null && !cachedEntity.getName().equals(getReferencedEntity())) {
- // if we have a cached entity, but the name doesnt match,
- // null it now, so we perform a lookup
- cachedEntity = null;
- }
-
- if (cachedEntity == null) {
- List nodes = getDTDFile().getNodes();
- for (int i = 0; i < nodes.size(); i++) {
- DTDNode node = (DTDNode) nodes.get(i);
- if (node instanceof Entity) {
- Entity entity = (Entity) node;
- if (entity.isParameterEntity() && entity.getName().equals(getReferencedEntity())) {
- cachedEntity = entity;
- }
- }
- }
- }
- return cachedEntity;
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ENTITYREFERENCEICON);
- }
-
- public String getName() {
- return getStructuredDTDDocumentRegion().getText();
- }
-
- public String getReferencedEntity() {
- String text = getName();
- return getName().substring(1, text.length() - 1);
- }
-
- private void getStartAndEndOffsetForText(StartEndPair pair) {
- RegionIterator iter = iterator();
- ITextRegion commentStartTag = getStartTag(iter);
- ITextRegion endCommentTag = getNextRegion(iter, DTDRegionTypes.COMMENT_END);
- pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset();
- if (commentStartTag != null) {
- pair.startOffset = getStructuredDTDDocumentRegion().getEndOffset(commentStartTag);
- }
- if (endCommentTag != null) {
- pair.endOffset = getStructuredDTDDocumentRegion().getEndOffset(endCommentTag);
- }
- }
-
- public String getText() {
- String text = getStructuredDTDDocumentRegion().getText();
- int flatNodeStart = getStructuredDTDDocumentRegion().getStartOffset();
- StartEndPair pair = new StartEndPair();
- getStartAndEndOffsetForText(pair);
- return text.substring(pair.startOffset - flatNodeStart, pair.endOffset - flatNodeStart);
- }
-
- public void setReferencedEntity(Object requestor, String name) {
- replaceText(requestor, getStructuredDTDDocumentRegion().getStartOffset(), getStructuredDTDDocumentRegion().getLength(), "%" + name + ";"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void setReferencedEntity(String name) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_PARM_ENTITY_REF_CHG_ENTITY_REF); //$NON-NLS-1$
- setReferencedEntity(this, name);
- endRecording(this);
- }
-
- public void setText(String newText) {
- beginRecording(this, DTDCoreMessages._UI_LABEL_PARM_ENTITY_REF_COMMENT_CHG); //$NON-NLS-1$
- StartEndPair pair = new StartEndPair();
- getStartAndEndOffsetForText(pair);
- replaceText(this, pair.startOffset, pair.endOffset - pair.startOffset, newText);
- endRecording(this);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/TopLevelNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/TopLevelNode.java
deleted file mode 100644
index 88c27c6f02..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/TopLevelNode.java
+++ /dev/null
@@ -1,84 +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.wst.dtd.core.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-// interface for nodes that can exist at the top level in a dtdfile
-// eg. entity, notation, element, comment, attlist, or unrecognized stuff (ie
-// <junk dkfjdl>
-public abstract class TopLevelNode extends DTDNode {
-
- private ArrayList flatNodes = new ArrayList();
-
- public TopLevelNode(DTDFile dtdFile, IStructuredDocumentRegion flatNode) {
- super(dtdFile, flatNode);
- flatNodes.add(flatNode);
- }
-
- public void addWhitespaceStructuredDocumentRegion(IStructuredDocumentRegion node) {
- flatNodes.add(node);
- }
-
- // specialize this so we delete the objects flat node range
- // AND any whitespace
- public void delete() {
- beginRecording(getDTDFile(), DTDCoreMessages._UI_LABEL_TOP_LEVEL_NODE_DELETE); //$NON-NLS-1$
- IStructuredDocumentRegion first = (IStructuredDocumentRegion) flatNodes.get(0);
- IStructuredDocumentRegion last = (IStructuredDocumentRegion) flatNodes.get(flatNodes.size() - 1);
- int startOffset = first.getStartOffset();
- int endOffset = last.getEndOffset();
-
- replaceText(getDTDFile(), startOffset, endOffset - startOffset, ""); //$NON-NLS-1$
- endRecording(getDTDFile());
- }
-
- public ITextRegion getEndRegion() {
- int size = flatNode.getRegions().size();
- if (size > 0) {
- return flatNode.getRegions().get(size - 1);
- }
- return null;
- }
-
- // includes what gettext gives us plus any whitespace
- // trailing it
- public String getFullText() {
- StringBuffer sb = new StringBuffer();
- Iterator iter = flatNodes.iterator();
- while (iter.hasNext()) {
- IStructuredDocumentRegion fNode = (IStructuredDocumentRegion) iter.next();
- sb.append(fNode.getText());
- }
- return sb.toString();
- }
-
- public ITextRegion getStartRegion() {
- if (flatNode.getRegions().size() > 0) {
- return flatNode.getRegions().get(0);
- }
- return null;
- }
-
- public RegionIterator iterator() {
- // System.out.println("create region iter " + this.getClass() + " with
- // start , end = " + getStartOffset() + ", " +getEndOffset());
- return new RegionIterator(flatNode, getStartOffset(), getEndOffset());
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java
deleted file mode 100644
index fe348a65bd..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java
+++ /dev/null
@@ -1,39 +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.wst.dtd.core.internal;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-
-public class Unrecognized extends TopLevelNode {
-
- public Unrecognized(DTDFile file, IStructuredDocumentRegion flatNode) {
- super(file, flatNode);
- }
-
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.UNRECOGNIZEDICON);
- }
-
- public String getName() {
- String text = getStructuredDTDDocumentRegion().getText();
- if (text.length() <= 30) {
- return text;
- }
- else {
- return text.substring(0, 29) + "..."; //$NON-NLS-1$
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/content/ContentDescriberForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/content/ContentDescriberForDTD.java
deleted file mode 100644
index 44f110d19b..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/content/ContentDescriberForDTD.java
+++ /dev/null
@@ -1,206 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.content;
-
-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.wst.sse.core.internal.encoding.EncodingMemento;
-import org.eclipse.wst.sse.core.internal.encoding.IContentDescriptionExtended;
-import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLResourceEncodingDetector;
-
-
-
-public final class ContentDescriberForDTD implements ITextContentDescriber {
- final private static QualifiedName[] SUPPORTED_OPTIONS = {IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK, IContentDescriptionExtended.DETECTED_CHARSET, IContentDescriptionExtended.UNSUPPORTED_CHARSET, IContentDescriptionExtended.APPROPRIATE_DEFAULT};
- public int describe(InputStream contents, IContentDescription description) throws IOException {
- int result = IContentDescriber.INDETERMINATE;
-
- if (description == null) {
- result = computeValidity(contents);
- }
- else {
- calculateSupportedOptions(contents, description);
- result = computeValidity(contents);
- }
- return result;
- }
-
- public int describe(Reader contents, IContentDescription description) throws IOException {
- int result = IContentDescriber.INDETERMINATE;
-
- if (description == null) {
- result = computeValidity(contents);
- }
- else {
- calculateSupportedOptions(contents, description);
- result = computeValidity(contents);
- }
- return result;
- }
-
- public QualifiedName[] getSupportedOptions() {
-
- return SUPPORTED_OPTIONS;
- }
-
- private void calculateSupportedOptions(InputStream contents, IContentDescription description) throws IOException {
- if (isRelevent(description)) {
- IResourceCharsetDetector detector = getDetector();
- detector.set(contents);
- handleCalculations(description, detector);
- }
- }
-
- /**
- * @param contents
- * @param description
- * @throws IOException
- */
- private void calculateSupportedOptions(Reader contents, IContentDescription description) throws IOException {
- if (isRelevent(description)) {
- IResourceCharsetDetector detector = getDetector();
- detector.set(contents);
- handleCalculations(description, detector);
- }
- }
-
- private int computeValidity(InputStream inputStream) {
- // currently no specific check for validilty
- // based on contents.
- return IContentDescriber.INDETERMINATE;
- }
-
- private int computeValidity(Reader reader) {
- // currently no specific check for validilty
- // based on contents.
- return IContentDescriber.INDETERMINATE;
- }
-
- // same rules as for XML
- private IResourceCharsetDetector getDetector() {
- return new XMLResourceEncodingDetector();
- }
-
- /**
- * @param description
- * @param detector
- * @throws IOException
- */
- private void handleCalculations(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 = ((XMLResourceEncodingDetector) 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 default.the
- Object defaultCharset = getDetector().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);
- }
- }
- }
-
- }
-
- private void handleDetectedSpecialCase(IContentDescription description, Object detectedCharset, Object javaCharset) {
- // since equal, we don't need to add, but if our detected version is
- // different than
- // javaCharset, then we should add it. This will happen, for example,
- // if there's
- // differences in case, or differences due to override properties
- if (detectedCharset != null) {
- // if (!detectedCharset.equals(javaCharset)) {
- // description.setProperty(IContentDescriptionExtended.DETECTED_CHARSET,
- // detectedCharset);
- // }
-
- // 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
- * @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;
- return result;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java
deleted file mode 100644
index 727329abfd..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java
+++ /dev/null
@@ -1,273 +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.wst.dtd.core.internal.document;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.core.internal.NodeList;
-import org.eclipse.wst.dtd.core.internal.event.IDTDFileListener;
-import org.eclipse.wst.dtd.core.internal.event.NodesEvent;
-import org.eclipse.wst.dtd.core.internal.provisional.document.DTDModel;
-import org.eclipse.wst.dtd.core.internal.util.DTDReferenceUpdater;
-import org.eclipse.wst.dtd.core.internal.util.LabelValuePair;
-import org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.events.IStructuredDocumentListener;
-import org.eclipse.wst.sse.core.internal.provisional.events.NewDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.NoChangeEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.RegionChangedEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.RegionsReplacedEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentRegionsReplacedEvent;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-
-public final class DTDModelImpl extends AbstractStructuredModel implements IStructuredDocumentListener, DTDModel {
-
- public static boolean deleteFile(String fileName) {
- boolean result = false;
-
- // create the temp File object
- File file = new File(fileName);
- if (file.exists())
- result = file.delete();
- return result;
- }
-
- private DTDFile document;
-
- // private List errorMessages = new ArrayList();
-
- // entity reference names found in the conditional IGNORE sections
- private Vector ignoredEntityRefs;
-
- private boolean refreshRequired = false;
-
- protected DTDReferenceUpdater refUpdater = new DTDReferenceUpdater();
-
- public DTDModelImpl() {
- super();
- document = new DTDFile(this);
- document.addDTDFileListener(new IDTDFileListener() {
-
- public void nodeChanged(DTDNode node) {
- if (node instanceof Entity) {
- Entity entity = (Entity) node;
- if (entity.isParameterEntity() && entity.isExternalEntity()) {
- // just say they have changed for now
- setReferencedModelsChanged();
- }
- }
- }
-
- public void nodesAdded(NodesEvent event) {
- checkIfExternalReferencesChanged(event);
- }
-
- public void nodesRemoved(NodesEvent event) {
- checkIfExternalReferencesChanged(event);
- }
- });
- }
-
- public void beginRecording(Object requester, String label) {
- super.beginRecording(requester, label);
- // clear reference updater cache
- getReferenceUpdater().clearCache();
- }
-
- void checkIfExternalReferencesChanged(NodesEvent event) {
- Iterator iter = event.getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof Entity) {
- Entity entity = (Entity) node;
- if (entity.isParameterEntity() && entity.isExternalEntity()) {
- // just say they have changed for now
- setReferencedModelsChanged();
- }
- }
- }
- }
-
- //
- // The following function helps determine the list of things that
- // can be used in a parameter entity reference content
- // Optional parameter is to allow the currently used DTDEntity to
- // be included in the combobox.
- //
- public LabelValuePair[] createParmEntityContentItems(Entity entity) {
- NodeList entities = getDTDFile().getEntities();
-
- Vector items = new Vector();
-
- if (entity != null) {
- String name = "%" + entity.getName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- items.addElement(new LabelValuePair(name, name));
- }
-
- for (Iterator i = entities.getNodes().iterator(); i.hasNext();) {
- Entity entityAt = (Entity) i.next();
- if (entityAt.isParameterEntity() && entityAt.isExternalEntity()) {
- String name = "%" + entityAt.getName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- items.addElement(new LabelValuePair(name, name));
- }
- }
- LabelValuePair[] comboArray = new LabelValuePair[items.size()];
- items.copyInto(comboArray);
- return comboArray;
- }
-
- public void endRecording(Object requester) {
- super.endRecording(requester);
- // clear reference updater cache
- getReferenceUpdater().clearCache();
- }
-
-
- public DTDFile getDTDFile() {
- return document;
- }
-
- // Returns entity reference names that are in
- // the conditional IGNORE sections.
- public Vector getIgnoredEntityRefs() {
- if (ignoredEntityRefs == null)
- ignoredEntityRefs = new Vector();
- return ignoredEntityRefs;
- }
-
- public IndexedRegion getIndexedRegion(int offset) {
- if (this.document == null)
- return null;
- // System.out.println("getNode at " + offset + " returning = " +
- // this.document.getNodeAt(offset));
-
- return this.document.getNodeAt(offset);
- }
-
- public DTDReferenceUpdater getReferenceUpdater() {
- return refUpdater;
- }
-
- public boolean isReferencedModelsChanged() {
- return refreshRequired;
- }
-
- public boolean isRefreshRequired() {
- return refreshRequired;
- }
-
- public void newModel(NewDocumentEvent flatModelEvent) {
- document.newModel(flatModelEvent);
- // System.out.println("\nnewmodel");
- outputStructuredDocument(flatModelEvent);
- }
-
- public void noChange(NoChangeEvent flatModelEvent) {
- // System.out.println("\nnochange");
- outputStructuredDocument(flatModelEvent);
-
- }
-
- public void nodesReplaced(StructuredDocumentRegionsReplacedEvent flatModelEvent) {
- // System.out.println("\nnodesreplaced");
- document.nodesReplaced(flatModelEvent);
- outputStructuredDocument(flatModelEvent);
-
- }
-
- public void outputStructuredDocument(StructuredDocumentEvent flatModelEvent) {
- // System.out.println("structuredDocument source = '" +
- // flatModelEvent.getStructuredDocument().getText() + "'");
- // System.out.println("new String = '" +
- // flatModelEvent.getOriginalChanges() +"'");
- // System.out.println("deleted String = '" +
- // flatModelEvent.getDeletedText() +"'");
- // Enumeration e =
- // flatModelEvent.getStructuredDocument().getNodes().elements();
- // int i = 0;
- // for (; e.hasMoreElements(); i++)
- // {
- // BasicStructuredDocumentRegion node =
- // (BasicStructuredDocumentRegion) e.nextElement();
- // outputStructuredDocumentRegion(node);
- // System.out.println(" " + i +". " + node.hashCode() + " '"
- // +node.getText() + "'");
- // }
- }
-
- public void outputStructuredDocumentRegion(IStructuredDocumentRegion flatNode) {
- // int size = flatNode.getNumberOfRegions();
- // for (int i = 0; i < size; i++)
- // {
- // Region region = (Region) flatNode.getRegions().get(i);
- // System.out.println(i + ". " + region.getType());
-
- // } // end of for ()
-
- }
-
- public void regionChanged(RegionChangedEvent flatModelEvent) {
- // System.out.println("\nregion changed");
- document.regionChanged(flatModelEvent);
- // System.out.println("= " +
- // flatModelEvent.getStructuredDocumentRegion().getText());
- // System.out.println("region changed " +
- // flatModelEvent.getRegion().hashCode() + " = " +
- // flatModelEvent.getRegion());
-
- outputStructuredDocument(flatModelEvent);
- }
-
- public void regionsReplaced(RegionsReplacedEvent flatModelEvent) {
- // System.out.println("\nregion replaced");
- document.regionsReplaced(flatModelEvent);
- outputStructuredDocument(flatModelEvent);
- }
-
- public void setReferencedModelsChanged() {
- refreshRequired = true;
- }
-
- public void setRefreshRequired(boolean value) {
- refreshRequired = value;
- }
-
-
- /**
- * @param newStructuredDocument
- * org.eclipse.wst.sse.core.text.IStructuredDocument
- */
- public void setStructuredDocument(IStructuredDocument newStructuredDocument) {
- IStructuredDocument oldStructuredDocument = super.getStructuredDocument();
- if (newStructuredDocument == oldStructuredDocument)
- return; // noting to do
-
- if (oldStructuredDocument != null)
- oldStructuredDocument.removeDocumentChangingListener(this);
- super.setStructuredDocument(newStructuredDocument);
- if (newStructuredDocument != null) {
- if (newStructuredDocument.getLength() > 0) {
- newModel(new NewDocumentEvent(newStructuredDocument, this));
- }
- newStructuredDocument.addDocumentChangingListener(this);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/AbstractResourceEncodingDetector.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/AbstractResourceEncodingDetector.java
deleted file mode 100644
index fc34977838..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/AbstractResourceEncodingDetector.java
+++ /dev/null
@@ -1,261 +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.wst.dtd.core.internal.encoding;
-
-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 org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.sse.core.internal.encoding.CodedIO;
-import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
-import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector;
-
-
-public abstract class AbstractResourceEncodingDetector implements IResourceCharsetDetector {
-
- protected EncodingMemento fEncodingMemento;
-
- protected boolean fHeaderParsed;
-
- protected Reader fReader;
-
- /**
- *
- */
- public AbstractResourceEncodingDetector() {
- super();
- }
-
- /**
- * 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());
- }
-
- /**
- * convience method all subclasses can use (but not override)
- *
- * @param detectedCharsetName
- * @param reason
- */
- final protected void createEncodingMemento(String detectedCharsetName, String reason) {
- createEncodingMemento(detectedCharsetName);
- }
-
- /**
- * convience method all subclasses can use (but not override)
- */
- final protected void ensureInputSet() {
- if (fReader == null) {
- throw new IllegalStateException("input must be set before use"); //$NON-NLS-1$
- }
- }
-
- /**
- * 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;
- }
-
- 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;
- }
-
- /**
- * This is to return a default encoding -- as specified by an industry
- * content type spec -- when not present in the stream, for example, XML
- * specifies UTF-8, JSP specifies ISO-8859-1. This method should return
- * null if there is no such "spec default".
- */
- abstract public String getSpecDefaultEncoding();
-
- 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;
- }
-
- 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);
- }
- }
-
- /**
- * Every subclass must provide a way to parse the input. This method has
- * several critical responsibilities:
- * <li>set the fEncodingMemento field appropriately, according to the
- * results of the parse of fReader.</li>
- * <li>set fHarderParsed to true, to avoid wasted re-parsing.</li>
- */
- abstract protected void parseInput() throws IOException;
-
- /**
- *
- */
- private void resetAll() {
- fReader = null;
- fHeaderParsed = false;
- fEncodingMemento = null;
- }
-
- /**
- *
- */
- 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);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/ByteReader.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/ByteReader.java
deleted file mode 100644
index 55c9bdf7a5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/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.wst.dtd.core.internal.encoding;
-
-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.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentCharsetDetector.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentCharsetDetector.java
deleted file mode 100644
index 552b5a36b1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentCharsetDetector.java
+++ /dev/null
@@ -1,61 +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
- *
- *******************************************************************************/
-/*
- * Created on 28-Aug-03
- *
- * 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.wst.dtd.core.internal.encoding;
-
-import java.io.IOException;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.sse.core.internal.document.DocumentReader;
-import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLResourceEncodingDetector;
-import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentCharsetDetector;
-
-
-/**
- * @author kboo
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public final class DTDDocumentCharsetDetector extends AbstractResourceEncodingDetector implements IDocumentCharsetDetector {
-
- public String getSpecDefaultEncoding() {
- // by default, UTF-8 as per XML spec
- final String enc = "UTF-8"; //$NON-NLS-1$
- return enc;
- }
-
- /**
- *
- */
-
- protected void parseInput() throws IOException {
- IDocumentCharsetDetector documentEncodingDetector = new XMLDocumentCharsetDetector();
- documentEncodingDetector.set(fReader);
- fEncodingMemento = ((XMLResourceEncodingDetector)documentEncodingDetector).getEncodingMemento();
-
- }
-
- public void set(IDocument document) {
- set(new DocumentReader(document, 0));
-
-
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentLoader.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentLoader.java
deleted file mode 100644
index 668f08b847..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentLoader.java
+++ /dev/null
@@ -1,74 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.encoding;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionParser;
-import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.core.internal.text.DTDStructuredDocumentReParser;
-import org.eclipse.wst.dtd.core.internal.text.StructuredTextPartitionerForDTD;
-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.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.encoding.ContentTypeEncodingPreferences;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-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;
-
-
-public final class DTDDocumentLoader extends AbstractDocumentLoader {
-
- public DTDDocumentLoader() {
- super();
- }
-
- public IDocumentPartitioner getDefaultDocumentPartitioner() {
- return new StructuredTextPartitionerForDTD();
- }
-
- public IDocumentCharsetDetector getDocumentEncodingDetector() {
- if (fDocumentEncodingDetector == null) {
- fDocumentEncodingDetector = new DTDDocumentCharsetDetector();
- }
- return fDocumentEncodingDetector;
- }
-
- public RegionParser getParser() {
- return new DTDRegionParser();
- }
-
- protected String getPreferredNewLineDelimiter(IFile file) {
- String delimiter = ContentTypeEncodingPreferences.getPreferredNewLineDelimiter(ContentTypeIdForDTD.ContentTypeID_DTD);
- if (delimiter == null)
- delimiter = super.getPreferredNewLineDelimiter(file);
- return delimiter;
- }
-
- protected String getSpecDefaultEncoding() {
- String enc = "UTF-8"; //$NON-NLS-1$
- return enc;
- }
-
- protected IEncodedDocument newEncodedDocument() {
- IStructuredDocument document = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- DTDStructuredDocumentReParser reParser = new DTDStructuredDocumentReParser();
- reParser.setStructuredDocument(document);
- if (document instanceof BasicStructuredDocument) {
- ((BasicStructuredDocument) document).setReParser(reParser);
- }
- return document;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/NullMemento.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/NullMemento.java
deleted file mode 100644
index 80603772b6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/NullMemento.java
+++ /dev/null
@@ -1,36 +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.wst.dtd.core.internal.encoding;
-
-import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
-import org.eclipse.wst.sse.core.internal.encoding.NonContentBasedEncodingRules;
-
-
-
-/**
- * This class can be used in place of an EncodingMemento (its super class),
- * when there is not in fact ANY encoding information. For example, when a
- * structuredDocument is created directly from a String
- */
-public class NullMemento extends EncodingMemento {
- /**
- *
- */
- public NullMemento() {
- super();
- String defaultCharset = NonContentBasedEncodingRules.useDefaultNameRules(null);
- setJavaCharsetName(defaultCharset);
- setAppropriateDefault(defaultCharset);
- setDetectedCharsetName(null);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/IDTDFileListener.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/IDTDFileListener.java
deleted file mode 100644
index 2490968d23..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/IDTDFileListener.java
+++ /dev/null
@@ -1,24 +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.wst.dtd.core.internal.event;
-
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-
-public interface IDTDFileListener {
-
- public void nodeChanged(DTDNode node);
-
- public void nodesAdded(NodesEvent event);
-
- public void nodesRemoved(NodesEvent event);
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/NodesEvent.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/NodesEvent.java
deleted file mode 100644
index 23972c0f2f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/NodesEvent.java
+++ /dev/null
@@ -1,32 +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.wst.dtd.core.internal.event;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-
-
-public final class NodesEvent {
- private ArrayList changedNodes = new ArrayList();
-
- public void add(DTDNode changedNode) {
- changedNodes.add(changedNode);
- }
-
- public List getNodes() {
- return changedNodes;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/DTDModelLoader.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/DTDModelLoader.java
deleted file mode 100644
index 5b51acb744..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/DTDModelLoader.java
+++ /dev/null
@@ -1,47 +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.wst.dtd.core.internal.modelhandler;
-
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.encoding.DTDDocumentLoader;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.model.AbstractModelLoader;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-
-
-public final class DTDModelLoader extends AbstractModelLoader {
- public DTDModelLoader() {
- super();
- }
-
- public IDocumentLoader getDocumentLoader() {
- if (documentLoaderInstance == null) {
- documentLoaderInstance = new DTDDocumentLoader();
- }
- return documentLoaderInstance;
- }
-
- public IModelLoader newInstance() {
- return new DTDModelLoader();
- }
-
- public IStructuredModel newModel() {
- IStructuredModel model = new DTDModelImpl();
- // now done in create
- // model.setStructuredDocument(createNewStructuredDocument());
- // model.setFactoryRegistry(defaultFactoryRegistry());
- return model;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/ModelHandlerForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/ModelHandlerForDTD.java
deleted file mode 100644
index e90e10c996..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/ModelHandlerForDTD.java
+++ /dev/null
@@ -1,46 +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.wst.dtd.core.internal.modelhandler;
-
-import org.eclipse.wst.dtd.core.internal.encoding.DTDDocumentCharsetDetector;
-import org.eclipse.wst.dtd.core.internal.encoding.DTDDocumentLoader;
-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 final class ModelHandlerForDTD extends AbstractModelHandler implements IModelHandler {
- private static String AssociatedContentTypeId = "org.eclipse.wst.dtd.core.dtdsource"; //$NON-NLS-1$
- private static String ModelHandlerID = "org.eclipse.wst.dtd.core.internal.modelhandler"; //$NON-NLS-1$
-
- public ModelHandlerForDTD() {
- super();
- setId(ModelHandlerID);
- setAssociatedContentTypeId(AssociatedContentTypeId);
- }
-
- public IDocumentLoader getDocumentLoader() {
- return new DTDDocumentLoader();
- }
-
- public IDocumentCharsetDetector getEncodingDetector() {
- return new DTDDocumentCharsetDetector();
- }
-
- public IModelLoader getModelLoader() {
- return new DTDModelLoader();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionFactory.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionFactory.java
deleted file mode 100644
index 3c9cb8a697..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionFactory.java
+++ /dev/null
@@ -1,28 +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.wst.dtd.core.internal.parser;
-
-import org.eclipse.wst.sse.core.internal.parser.ContextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-public class DTDRegionFactory {
- public static ITextRegion createRegion(String tokenKind, int start, int length) {
- ITextRegion region = null;
- if (tokenKind != null) {
- // ISSUE: DTD regions don't distinguish text from white space
- region = new ContextRegion(tokenKind, start, length, length);
- }
- return region;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionParser.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionParser.java
deleted file mode 100644
index 9be6f189f3..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionParser.java
+++ /dev/null
@@ -1,271 +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.wst.dtd.core.internal.parser;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Vector;
-
-import org.eclipse.wst.dtd.core.internal.text.DTDStructuredDocumentRegionFactory;
-import org.eclipse.wst.dtd.core.internal.tokenizer.DTDTokenizer;
-import org.eclipse.wst.dtd.core.internal.tokenizer.Token;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-
-public class DTDRegionParser implements RegionParser {
- private Vector cachedRegions = null;
- private DTDTokenizer tokenizer = null;
- private IStructuredDocumentRegion cachedNode = null; // top of node
- // chain
-
- public RegionParser newInstance() {
- return new DTDRegionParser();
- }
-
- private IStructuredDocumentRegion addNewNodes(IStructuredDocumentRegion lastNode, Vector regions) {
- IStructuredDocumentRegion leadingSpaceNode = null;
- IStructuredDocumentRegion contentNode = null;
- IStructuredDocumentRegion trailingSpaceNode = null;
- LinkedList nodeSeeds = new LinkedList();
- int nRegions = regions.size();
- int leadingSpaceEnd = -1;
- int trailingSpaceBegin = nRegions;
-
- // find leading space
- nodeSeeds.clear();
- for (int i = 0; i < nRegions; i++) {
- ITextRegion region = (ITextRegion) regions.get(i);
- String type = region.getType();
- if (isBlankRegion(type)) {
- leadingSpaceEnd = i;
- nodeSeeds.addLast(region);
- }
- else {
- break;
- }
- }
- if (!nodeSeeds.isEmpty()) {
- leadingSpaceNode = createNode(nodeSeeds);
- if (lastNode != null) {
- lastNode.setNext(leadingSpaceNode);
- leadingSpaceNode.setPrevious(lastNode);
- }
- lastNode = leadingSpaceNode;
- }
-
- // find trailing space
- if (leadingSpaceEnd < nRegions - 1) {
- nodeSeeds.clear();
- for (int i = nRegions - 1; 0 <= i; i--) {
- ITextRegion region = (ITextRegion) regions.get(i);
- String type = ((ITextRegion) regions.get(i)).getType();
- if (isBlankRegion(type)) {
- trailingSpaceBegin = i;
- nodeSeeds.addFirst(region);
- }
- else {
- break;
- }
- }
- if (!nodeSeeds.isEmpty()) {
- trailingSpaceNode = createNode(nodeSeeds);
- }
-
- nodeSeeds.clear();
- for (int i = leadingSpaceEnd + 1; i < trailingSpaceBegin; i++) {
- nodeSeeds.addLast(regions.get(i));
- }
- if (!nodeSeeds.isEmpty()) {
- contentNode = createNode(nodeSeeds);
- if (lastNode != null) {
- lastNode.setNext(contentNode);
- contentNode.setPrevious(lastNode);
- }
- lastNode = contentNode;
- }
- if (trailingSpaceNode != null) {
- lastNode.setNext(trailingSpaceNode);
- trailingSpaceNode.setPrevious(lastNode);
- lastNode = trailingSpaceNode;
- }
- }
-
- return lastNode;
- }
-
- private IStructuredDocumentRegion createNode(LinkedList regions) {
- if (regions.size() == 0) {
- return null;
- }
-
- IStructuredDocumentRegion node = DTDStructuredDocumentRegionFactory.createStructuredDocumentRegion(DTDStructuredDocumentRegionFactory.DTD_GENERIC);
- int start = ((ITextRegion) regions.getFirst()).getStart();
- int length = ((ITextRegion) regions.getLast()).getEnd() - start;
- node.setStart(start);
- node.setLength(length);
- for (ListIterator i = regions.listIterator(0); i.hasNext();) {
- ITextRegion region = (ITextRegion) i.next();
- node.addRegion(region);
- region.adjustStart(-start);
- }
- node.setEnded(true);
-
- return node;
- }
-
- private IStructuredDocumentRegion createNodeChain(List regions) {
- IStructuredDocumentRegion headNode = null;
- IStructuredDocumentRegion lastNode = null;
- Vector nodeSeeds = new Vector();
-
- for (Iterator e = regions.iterator(); e.hasNext();) {
- ITextRegion region = (ITextRegion) e.next();
- String type = region.getType();
- // If the following regions appear,
- // a previous node is closed in front of it.
- if (!nodeSeeds.isEmpty() && isBeginningRegion(type)) {
- lastNode = addNewNodes(lastNode, nodeSeeds);
- nodeSeeds.clear();
- }
- nodeSeeds.addElement(region);
-
- // The following regions close the current node.
- if (!nodeSeeds.isEmpty() && isEndingRegion(type)) {
- lastNode = addNewNodes(lastNode, nodeSeeds);
- nodeSeeds.clear();
- }
-
- if (headNode == null && lastNode != null) {
- headNode = findFirstNode(lastNode);
- }
- }
-
- // close current node forcibly.
- if (!nodeSeeds.isEmpty()) {
- lastNode = addNewNodes(lastNode, nodeSeeds);
- if (headNode == null && lastNode != null) {
- headNode = findFirstNode(lastNode);
- }
- }
- return headNode;
- }
-
- private IStructuredDocumentRegion findFirstNode(IStructuredDocumentRegion node) {
- IStructuredDocumentRegion firstNode = node;
- IStructuredDocumentRegion prevNode = null;
- while ((prevNode = firstNode.getPrevious()) != null) {
- firstNode = prevNode;
- }
- return firstNode;
- }
-
- public IStructuredDocumentRegion getDocumentRegions() {
- if (cachedNode != null) {
- return cachedNode;
- }
-
- List regions = getRegions();
- IStructuredDocumentRegion headNode = createNodeChain(regions);
- cachedNode = headNode;
-
- return headNode;
- }
-
- public List getRegions() {
- if (cachedRegions != null) {
- return cachedRegions;
- }
-
- Vector regions = new Vector();
- Token currentToken = null;
- do {
- try {
- currentToken = (Token) tokenizer.yylex();
- if (currentToken != null) {
- ITextRegion region = DTDRegionFactory.createRegion(currentToken.getType(), currentToken.getStartOffset(), currentToken.getLength());
- regions.add(region);
- }
- }
- catch (java.io.FileNotFoundException e) {
- System.out.println("File not found"); //$NON-NLS-1$
- }
- catch (java.io.IOException e) {
- System.out.println("Error opening file"); //$NON-NLS-1$
- }
- }
- while (currentToken != null);
-
- cachedRegions = regions;
- return regions;
- }
-
- public void reset(Reader reader) {
- if (tokenizer == null) {
- try {
- tokenizer = new DTDTokenizer(reader);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- System.out.println("Usage : java DTDTokenizer <inputfile>"); //$NON-NLS-1$
- }
- }
- else {
- try {
- tokenizer.yyreset(reader);
- }
- catch (java.io.IOException e) {
- System.out.println("Error opening file"); //$NON-NLS-1$
- }
- }
-
- cachedNode = null;
- cachedRegions = null;
- }
-
- /**
- * An additional offset for use with any position-dependant parsing rules
- */
- public void reset(Reader reader, int offset) {
- reset(reader);
- }
-
- public void reset(String input) {
- reset(new StringReader(input));
- }
-
- public void reset(String input, int offset) {
- reset(input);
- }
-
- // never used
- DTDTokenizer getTokenizer() {
- return tokenizer;
- }
-
- private boolean isBeginningRegion(String type) {
- return (type == DTDRegionTypes.START_TAG) || (type == DTDRegionTypes.ENTITY_PARM);
- }
-
- private boolean isBlankRegion(String type) {
- return (type == DTDRegionTypes.WHITESPACE);
- }
-
- private boolean isEndingRegion(String type) {
- return (type == DTDRegionTypes.END_TAG) || (type == DTDRegionTypes.ENTITY_PARM) || (type == DTDRegionTypes.COMMENT_END);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionTypes.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionTypes.java
deleted file mode 100644
index 114b661d03..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionTypes.java
+++ /dev/null
@@ -1,76 +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.wst.dtd.core.internal.parser;
-
-public interface DTDRegionTypes {
- public static final String regionPrefix = "org.eclipse.wst.dtd.core.internal.util.parser.DTDRegionTypes."; //$NON-NLS-1$
-
- public static final String NAME = regionPrefix + "NAME"; //$NON-NLS-1$
- public static final String START_TAG = regionPrefix + "START_TAG"; //$NON-NLS-1$
- public static final String END_TAG = regionPrefix + "END_TAG"; //$NON-NLS-1$
- public static final String LEFT_PAREN = regionPrefix + "LEFT_PAREN"; //$NON-NLS-1$
- public static final String RIGHT_PAREN = regionPrefix + "RIGHT_PAREN"; //$NON-NLS-1$
- public static final String WHITESPACE = regionPrefix + "WHITESPACE"; //$NON-NLS-1$
- public static final String CONNECTOR = regionPrefix + "CONNECTOR"; //$NON-NLS-1$
-
- public static final String OCCUR_TYPE = regionPrefix + "OCCUR_TYPE"; //$NON-NLS-1$
- public static final String EXCLAMATION = regionPrefix + "EXCLAMATION"; //$NON-NLS-1$
- public static final String PERCENT = regionPrefix + "PERCENT"; //$NON-NLS-1$
- public static final String SEMICOLON = regionPrefix + "SEMICOLON"; //$NON-NLS-1$
- public static final String COMMENT_START = regionPrefix + "COMMENT"; //$NON-NLS-1$
- public static final String COMMENT_CONTENT = regionPrefix + "COMMENT_CONTENT"; //$NON-NLS-1$
- public static final String COMMENT_END = regionPrefix + "COMMENT_END"; //$NON-NLS-1$
-
- public static final String NOTATION_TAG = regionPrefix + "NOTATION_TAG"; //$NON-NLS-1$
- public static final String NOTATION_CONTENT = regionPrefix + "NOTATION_CONTENT"; //$NON-NLS-1$
-
- public static final String ENTITY_TAG = regionPrefix + "ENTITY_TAG"; //$NON-NLS-1$
- public static final String ENTITY_PARM = regionPrefix + "ENTITY_PARM"; //$NON-NLS-1$
- public static final String ENTITY_CONTENT = regionPrefix + "ENTITY_CONTENT"; //$NON-NLS-1$
- public static final String NDATA_VALUE = regionPrefix + "NDATA_VALUE"; //$NON-NLS-1$
-
- public static final String ELEMENT_TAG = regionPrefix + "ELEMENT_TAG"; //$NON-NLS-1$
- public static final String ELEMENT_CONTENT = regionPrefix + "ELEMENT_CONTENT"; //$NON-NLS-1$
- public static final String CONTENT_EMPTY = regionPrefix + "CONTENT_EMPTY"; //$NON-NLS-1$
- public static final String CONTENT_ANY = regionPrefix + "CONTENT_ANY"; //$NON-NLS-1$
- public static final String CONTENT_PCDATA = regionPrefix + "CONTENT_PCDATA"; //$NON-NLS-1$
-
- public static final String ATTLIST_TAG = regionPrefix + "ATTLIST_TAG"; //$NON-NLS-1$
-
- public static final String SYSTEM_KEYWORD = regionPrefix + "SYSTEM_KEYWORD"; //$NON-NLS-1$
- public static final String PUBLIC_KEYWORD = regionPrefix + "PUBLIC_KEYWORD"; //$NON-NLS-1$
- public static final String NDATA_KEYWORD = regionPrefix + "NDATA_KEYWORD"; //$NON-NLS-1$
- public static final String SINGLEQUOTED_LITERAL = regionPrefix + "SINGLEQUOTED_LITERAL"; //$NON-NLS-1$
- public static final String DOUBLEQUOTED_LITERAL = regionPrefix + "DOUBLEQUOTED_LITERAL"; //$NON-NLS-1$
- public static final String UNKNOWN_CONTENT = regionPrefix + "UNKNOWN_CONTENT"; //$NON-NLS-1$
-
- public static final String ATTRIBUTE_NAME = regionPrefix + "ATTRIBUTE_NAME"; //$NON-NLS-1$
-
- // attribute type keywords
- public static final String CDATA_KEYWORD = regionPrefix + "CDATA_KEYWORD"; //$NON-NLS-1$
- public static final String ID_KEYWORD = regionPrefix + "ID_KEYWORD"; //$NON-NLS-1$
- public static final String IDREF_KEYWORD = regionPrefix + "IDREF_KEYWORD"; //$NON-NLS-1$
- public static final String IDREFS_KEYWORD = regionPrefix + "IDREFS_KEYWORD"; //$NON-NLS-1$
- public static final String ENTITY_KEYWORD = regionPrefix + "ENTITY_KEYWORD"; //$NON-NLS-1$
- public static final String ENTITIES_KEYWORD = regionPrefix + "ENTITIES_KEYWORD"; //$NON-NLS-1$
- public static final String NMTOKEN_KEYWORD = regionPrefix + "NMTOKEN_KEYWORD"; //$NON-NLS-1$
- public static final String NMTOKENS_KEYWORD = regionPrefix + "NMTOKENS_KEYWORD"; //$NON-NLS-1$
- public static final String NOTATION_KEYWORD = regionPrefix + "NOTATION_KEYWORD"; //$NON-NLS-1$
- public static final String ENUM_CHOICE = regionPrefix + "ENUM_CHOICE"; //$NON-NLS-1$
- public static final String PARM_ENTITY_TYPE = regionPrefix + "PARM_ENTITY_TYPE"; //$NON-NLS-1$
-
- // attribute defaults keywords
- public static final String REQUIRED_KEYWORD = regionPrefix + "REQUIRED_KEYWORD"; //$NON-NLS-1$
- public static final String IMPLIED_KEYWORD = regionPrefix + "IMPLIED_KEYWORD"; //$NON-NLS-1$
- public static final String FIXED_KEYWORD = regionPrefix + "FIXED_KEYWORD"; //$NON-NLS-1$
-}// DTDRegionTypes
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java
deleted file mode 100644
index c3fb65ad01..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java
+++ /dev/null
@@ -1,35 +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.wst.dtd.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.wst.dtd.core.internal.DTDCorePlugin;
-
-/**
- * Sets default values for DTD Core preferences
- */
-public class DTDCorePreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IEclipsePreferences node = new DefaultScope().getNode(DTDCorePlugin.getInstance().getBundle().getSymbolicName());
-
- // this could be made smarter by actually looking up the content
- // type's valid extensions
- node.put(DTDCorePreferenceNames.DEFAULT_EXTENSION, "dtd"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java
deleted file mode 100644
index d348e0fb0d..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java
+++ /dev/null
@@ -1,32 +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.wst.dtd.core.internal.preferences;
-
-/**
- * Common preference keys used by DTD core
- *
- * @plannedfor 1.0
- */
-public class DTDCorePreferenceNames {
- private DTDCorePreferenceNames() {
- // empty private constructor so users cannot instantiate class
- }
-
- /**
- * The default extension to use when none is specified in the New File
- * Wizard.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/contenttype/ContentTypeIdForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/contenttype/ContentTypeIdForDTD.java
deleted file mode 100644
index 23758eb6e1..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/contenttype/ContentTypeIdForDTD.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.wst.dtd.core.internal.provisional.contenttype;
-
-/**
- * <p>
- * This class, with its one field, is a convenience to provide compile-time
- * safety when referring to the DTD contentType ID.
- * </p>
- *
- * <p>
- * This class is not meant to be instantiated or subclassed.
- * </p>
- */
-
-public final class ContentTypeIdForDTD {
- /**
- * The value of the ContentTypeID_DTD id field will match what is
- * specified in org.eclipse.wst.dtd.core/plugin.xml for the DTD content
- * type.
- *
- * This value is intentionally set through a default protected method so
- * that it will not be inlined.
- */
- public final static String ContentTypeID_DTD = getConstantString();
-
- private ContentTypeIdForDTD() {
- super();
- }
-
- /**
- * @return the DTD Content Type Identifier ID as a String
- */
- static String getConstantString() {
- return "org.eclipse.wst.dtd.core.dtdsource"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/document/DTDModel.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/document/DTDModel.java
deleted file mode 100644
index f5c701f214..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/document/DTDModel.java
+++ /dev/null
@@ -1,27 +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.wst.dtd.core.internal.provisional.document;
-
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-/**
- * <p>
- * An interface implemented by the SSE-based DTD model.
- * </p>
- *
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- */
-public interface DTDModel extends IStructuredModel{
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/text/IDTDPartitionTypes.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/text/IDTDPartitionTypes.java
deleted file mode 100644
index ac35f739d2..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/text/IDTDPartitionTypes.java
+++ /dev/null
@@ -1,24 +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.wst.dtd.core.internal.provisional.text;
-
-/**
- * This interface is not intended to be implemented.
- * It defines the partition types DTD.
- * Clients should reference the partition type Strings defined here directly.
- *
- * @deprecated use org.eclipse.wst.dtd.core.text.IDTDPartitions
- */
-public interface IDTDPartitionTypes {
-
- String DTD_DEFAULT = "org.eclipse.wst.dtd.DEFAULT"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tasks/DTDFileTaskScanner.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tasks/DTDFileTaskScanner.java
deleted file mode 100644
index 837e27e321..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tasks/DTDFileTaskScanner.java
+++ /dev/null
@@ -1,28 +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.wst.dtd.core.internal.tasks;
-
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-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.tasks.StructuredFileTaskScanner;
-
-public class DTDFileTaskScanner extends StructuredFileTaskScanner {
- public DTDFileTaskScanner() {
- super();
- }
-
- protected boolean isCommentRegion(IStructuredDocumentRegion region, ITextRegion textRegion) {
- return textRegion.getType().equals(DTDRegionTypes.COMMENT_CONTENT);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java
deleted file mode 100644
index 87e1a188ba..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java
+++ /dev/null
@@ -1,41 +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.wst.dtd.core.internal.text;
-
-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.IStructuredTextReParser;
-import org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser;
-
-
-public class DTDStructuredDocumentReParser extends StructuredDocumentReParser {
-
- public StructuredDocumentEvent checkForCrossStructuredDocumentRegionBoundryCases() {
- IStructuredDocumentRegion startNode = fStructuredDocument.getRegionAtCharacterOffset(fStart);
- IStructuredDocumentRegion endNode = fStructuredDocument.getRegionAtCharacterOffset(fStart + fLengthToReplace - 1);
- return reparse(startNode.getStart(), endNode.getEnd());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser#newInstance()
- */
- public IStructuredTextReParser newInstance() {
- return new DTDStructuredDocumentReParser();
- }
-
- protected StructuredDocumentEvent reparse(IStructuredDocumentRegion dirtyStart, IStructuredDocumentRegion dirtyEnd) {
- return super.reparse(dirtyStart, dirtyEnd);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java
deleted file mode 100644
index e3d2c2e321..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java
+++ /dev/null
@@ -1,33 +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.wst.dtd.core.internal.text;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-
-
-public class DTDStructuredDocumentRegionFactory {
- public static final int DTD_GENERIC = 5;
-
- public static IStructuredDocumentRegion createStructuredDocumentRegion(int type) {
- IStructuredDocumentRegion instance = null;
- switch (type) {
- case DTD_GENERIC :
- instance = new BasicStructuredDocumentRegion();
- break;
- default :
- break;
- }
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java
deleted file mode 100644
index a191b2e966..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java
+++ /dev/null
@@ -1,84 +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.wst.dtd.core.internal.text;
-
-import java.util.NoSuchElementException;
-
-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;
-
-
-public class RegionIterator {
-
- private int currentIndex;
-
- // private IStructuredDocumentRegion flatNode;
- private ITextRegionList regions;
- // private int startOffset, endOffset;
- private ITextRegion startRegion, endRegion;
-
- public RegionIterator(IStructuredDocumentRegion node) {
- this(node, node.getStart(), node.getEnd());
- }
-
- public RegionIterator(IStructuredDocumentRegion node, int startOffset, int endOffset) {
- regions = node.getRegions();
- startRegion = node.getRegionAtCharacterOffset(startOffset);
- endRegion = node.getRegionAtCharacterOffset(endOffset - 1);
-
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (startRegion == region) {
- currentIndex = i;
- break;
- }
- }
- }
-
- public RegionIterator(ITextRegionList regions) {
- this.regions = regions;
- startRegion = regions.get(0);
- endRegion = regions.get(regions.size() - 1);
- currentIndex = 0;
- // this(node, node.getStart(), node.getEnd());
- }
-
- public boolean hasNext() {
- if (currentIndex < regions.size()) {
- return currentIndex <= regions.indexOf(endRegion);
- }
- return false;
- }
-
- public boolean hasPrevious() {
- if (currentIndex >= 0) {
- return currentIndex >= regions.indexOf(startRegion);
- }
- return false;
- }
-
- public ITextRegion next() {
- if (hasNext()) {
- return regions.get(currentIndex++);
- }
- throw new NoSuchElementException();
- }
-
- public ITextRegion previous() {
- if (hasPrevious()) {
- return regions.get(--currentIndex);
- }
- throw new NoSuchElementException();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java
deleted file mode 100644
index 6eda06d190..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java
+++ /dev/null
@@ -1,42 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.core.internal.text;
-
-import org.eclipse.wst.dtd.core.text.IDTDPartitions;
-import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.sse.core.text.IStructuredPartitions;
-
-public class StructuredTextPartitionerForDTD extends StructuredTextPartitioner {
-
- public StructuredTextPartitionerForDTD() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#getDefault()
- */
- public String getDefaultPartitionType() {
- return IDTDPartitions.DTD_DEFAULT;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#initLegalContentTypes()
- */
- protected void initLegalContentTypes() {
- fSupportedTypes = new String[]{IDTDPartitions.DTD_DEFAULT, IStructuredPartitions.UNKNOWN_PARTITION};
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/DTDTokenizer.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/DTDTokenizer.java
deleted file mode 100644
index 96bb49973f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/DTDTokenizer.java
+++ /dev/null
@@ -1,1090 +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
- *
- *******************************************************************************/
-/* The following code was generated by JFlex 1.3.5 on 3/14/05 9:37 PM */
-/*nlsXXX*/
-package org.eclipse.wst.dtd.core.internal.tokenizer;
-
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-
-/**
- * Generate with "dtdskeleton".
- *
- * It removes some unused fields and avoids some compiler warnings
- */
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.3.5
- * on 3/14/05 9:37 PM from the specification file
- * <tt>file:/D:/eclipse.wtp/workspace/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex</tt>
- */
-public class DTDTokenizer {
-
- /** This character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** initial size of the lookahead buffer */
- final private static int YY_BUFFERSIZE = 16384;
-
- /** lexical states */
- final public static int ATTRIBUTE_ENUMERATION = 13;
- final public static int NOTATION_NAME = 6;
- final public static int ELEMENT_CHILD = 1;
- final public static int ENTITY_CONTENT = 4;
- final public static int COMMENT_CONTENT = 8;
- final public static int ATTLIST_NAME = 9;
- final public static int EXTERNALID_CONTENT = 7;
- final public static int ELEMENT_CONTENT = 1;
- final public static int ELEMENT_MIXED = 1;
- final public static int ELEMENT_MIXED_OR_CHILD = 1;
- final public static int ATTRIBUTE_CONTENT = 11;
- final public static int ENTITY_NAME = 3;
- final public static int ATTRIBUTE_DEFAULT = 12;
- final public static int ELEMENT_NAME = 2;
- final public static int YYINITIAL = 0;
- final public static int NDATA_CONTENT = 5;
- final public static int ATTLIST_CONTENT = 10;
- final public static int NODE = 1;
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed =
- "\10\0\1\0\1\5\1\3\1\0\1\0\1\2\22\0\1\5\1\6"+
- "\1\1\1\37\1\0\1\23\1\0\1\46\1\42\1\43\1\4\1\7"+
- "\1\45\1\12\1\0\1\0\12\0\1\0\1\10\1\11\1\0\1\13"+
- "\1\4\1\0\1\25\1\31\1\32\1\33\1\14\1\35\2\0\1\21"+
- "\1\0\1\36\1\15\1\16\1\17\1\24\1\27\1\40\1\34\1\26"+
- "\1\20\1\30\2\0\1\41\1\22\1\0\1\0\1\0\2\0\1\0"+
- "\1\0\32\0\1\0\1\44\uff83\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, 39, 78, 117, 156, 195, 234, 273, 312, 351,
- 390, 429, 468, 507, 546, 585, 624, 39, 39, 39,
- 663, 702, 741, 780, 819, 39, 39, 858, 897, 39,
- 39, 936, 936, 975, 1014, 1053, 1092, 1131, 1170, 1209,
- 1248, 1287, 1326, 1365, 1404, 1443, 39, 1482, 1521, 1560,
- 1599, 1638, 39, 1677, 1716, 1755, 1794, 1833, 1872, 39,
- 39, 1911, 1950, 1989, 2028, 2067, 2106, 39, 39, 39,
- 2145, 2184, 2223, 2262, 2301, 2340, 2379, 897, 2418, 975,
- 2457, 2496, 2535, 2574, 975, 2613, 2652, 2691, 2730, 1560,
- 2769, 2808, 2847, 2886, 2925, 2964, 3003, 3042, 3081, 3120,
- 1950, 3159, 3198, 3237, 3276, 3315, 1950, 39, 3354, 3393,
- 3432, 39, 3471, 3510, 3549, 39, 3588, 3627, 39, 3666,
- 3705, 3744, 39, 39, 3783, 3822, 3861, 3900, 3939, 3978,
- 4017, 4056, 39, 4095, 4134, 4173, 39, 4212, 4251, 4290,
- 4329, 4368, 4407, 4446, 4485, 4524, 4563, 4602, 4641, 4680,
- 4719, 4758, 4797, 4836, 4875, 4914, 4953, 4992, 5031, 5070,
- 5109, 5148, 5187, 5226, 5265, 5304, 5343, 975, 5382, 5421,
- 5460, 5499, 5538, 5577, 1560, 5616, 5655, 5694, 5733, 5772,
- 5811, 5850, 546, 5889, 5928, 5967, 6006, 975, 975, 975,
- 6045, 1560, 6084, 6123, 1560, 6162, 6201, 6240, 1950, 546,
- 6279, 546, 819, 6318, 6357, 6396, 6435, 6474, 6513, 546,
- 6552, 1560, 1560, 1560, 1950, 6591, 39, 1950
- };
-
- /**
- * The packed transition table of the DFA (part 0)
- */
- final private static String yy_packed0 =
- "\2\17\2\20\1\17\1\20\1\21\1\17\1\22\1\23"+
- "\1\17\1\24\1\25\2\17\1\26\3\17\1\27\1\17"+
- "\1\30\21\17\47\0\2\31\2\20\1\32\1\20\1\0"+
- "\1\32\1\31\1\33\1\31\1\33\23\31\1\34\2\31"+
- "\1\35\1\36\2\37\1\31\2\40\2\20\1\0\1\20"+
- "\3\40\1\33\1\40\1\33\7\40\1\41\16\40\4\0"+
- "\1\40\1\42\1\43\2\20\1\42\1\20\3\42\1\33"+
- "\1\42\1\33\12\42\1\44\1\45\16\42\1\46\2\47"+
- "\2\20\1\47\1\20\3\47\1\33\1\47\1\33\33\47"+
- "\2\50\2\20\1\0\1\20\2\0\1\50\1\33\1\50"+
- "\1\33\26\50\4\0\1\50\1\42\1\43\2\20\1\42"+
- "\1\20\3\42\1\33\1\42\1\33\3\42\1\51\6\42"+
- "\1\52\1\53\16\42\1\46\2\54\2\55\1\54\1\55"+
- "\4\54\1\56\1\57\33\54\2\60\2\20\1\42\1\20"+
- "\2\42\1\60\1\33\1\60\1\33\26\60\4\42\1\60"+
- "\2\61\2\20\1\42\1\20\2\42\1\61\1\33\1\61"+
- "\1\33\26\61\4\42\1\61\1\62\1\63\1\64\1\65"+
- "\1\62\1\66\3\62\1\33\1\62\1\33\1\67\2\62"+
- "\1\70\1\62\1\71\10\62\1\72\4\62\1\73\2\62"+
- "\1\74\2\75\1\62\1\76\1\77\1\100\2\20\1\77"+
- "\1\20\3\77\1\33\1\77\1\33\23\77\1\101\6\77"+
- "\1\102\2\103\2\20\1\103\1\20\3\103\1\33\1\103"+
- "\1\33\26\103\1\104\1\105\1\106\2\103\2\17\2\0"+
- "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0"+
- "\23\17\2\0\2\20\1\0\1\20\53\0\1\107\34\0"+
- "\2\17\2\0\1\17\2\0\1\17\2\0\1\17\1\0"+
- "\1\17\1\110\1\17\1\111\3\17\1\0\25\17\2\0"+
- "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0"+
- "\1\112\22\17\2\113\2\0\1\113\2\0\1\113\2\0"+
- "\1\113\1\0\7\113\1\0\23\113\2\17\2\0\1\17"+
- "\2\0\1\17\2\0\1\17\1\0\4\17\1\114\2\17"+
- "\1\0\23\17\2\31\6\0\1\31\1\0\1\31\1\0"+
- "\26\31\4\0\3\31\6\0\1\31\1\0\1\31\1\0"+
- "\13\31\1\115\12\31\4\0\1\31\2\0\2\116\1\0"+
- "\1\116\31\0\1\117\7\0\2\40\4\0\3\40\1\0"+
- "\1\40\1\0\26\40\4\0\1\40\2\42\2\0\1\42"+
- "\1\0\3\42\1\0\1\42\1\0\33\42\1\43\1\120"+
- "\2\121\1\43\1\121\3\43\1\121\1\43\1\121\33\43"+
- "\2\42\2\0\1\42\1\0\3\42\1\0\1\42\1\0"+
- "\6\42\1\122\26\42\2\0\1\42\1\0\3\42\1\0"+
- "\1\42\1\0\14\42\1\123\16\42\2\46\2\124\1\46"+
- "\1\124\3\46\1\124\1\46\1\124\32\46\1\125\2\47"+
- "\2\0\1\47\1\0\3\47\1\0\1\47\1\0\33\47"+
- "\2\50\6\0\1\50\1\0\1\50\1\0\26\50\4\0"+
- "\1\50\2\42\2\0\1\42\1\0\3\42\1\0\1\42"+
- "\1\0\17\42\1\126\15\42\2\0\1\42\1\0\3\42"+
- "\1\0\1\42\1\0\6\42\1\127\26\42\2\0\1\42"+
- "\1\0\3\42\1\0\1\42\1\0\14\42\1\130\16\42"+
- "\12\54\2\0\35\54\2\55\1\54\1\55\4\54\2\0"+
- "\33\54\12\0\1\131\34\0\2\60\2\0\1\42\1\0"+
- "\2\42\1\60\1\0\1\60\1\0\26\60\4\42\1\60"+
- "\2\61\2\0\1\42\1\0\2\42\1\61\1\0\1\61"+
- "\1\0\26\61\4\42\1\61\2\62\2\0\1\62\1\0"+
- "\3\62\1\0\1\62\1\0\26\62\3\0\2\62\1\63"+
- "\1\132\2\133\1\63\1\133\3\63\1\133\1\63\1\133"+
- "\26\63\3\133\2\63\3\0\1\65\50\0\1\66\41\0"+
- "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+
- "\3\62\1\134\22\62\3\0\4\62\2\0\1\62\1\0"+
- "\3\62\1\0\1\62\1\0\2\62\1\135\5\62\1\136"+
- "\15\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+
- "\1\62\1\0\17\62\1\137\6\62\3\0\4\62\2\0"+
- "\1\62\1\0\3\62\1\0\1\62\1\0\17\62\1\140"+
- "\6\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+
- "\1\62\1\0\5\62\1\141\12\62\1\142\1\143\4\62"+
- "\3\0\2\62\2\76\2\144\1\76\1\144\3\76\1\144"+
- "\1\76\1\144\26\76\3\144\1\76\1\132\2\77\2\0"+
- "\1\77\1\0\3\77\1\0\1\77\1\0\33\77\1\100"+
- "\1\145\2\146\1\100\1\146\3\100\1\146\1\100\1\146"+
- "\33\100\2\77\2\0\1\77\1\0\3\77\1\0\1\77"+
- "\1\0\5\77\1\147\12\77\1\150\1\151\11\77\2\102"+
- "\2\152\1\102\1\152\3\102\1\152\1\102\1\152\32\102"+
- "\1\153\2\103\2\0\1\103\1\0\3\103\1\0\1\103"+
- "\1\0\26\103\3\0\2\103\12\0\1\154\34\0\2\17"+
- "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\1\155"+
- "\6\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0"+
- "\1\17\1\0\4\17\1\156\2\17\1\0\25\17\2\0"+
- "\1\17\2\0\1\17\2\0\1\17\1\0\4\17\1\157"+
- "\2\17\1\0\23\17\2\113\2\0\1\113\2\0\1\113"+
- "\1\160\1\0\1\113\1\0\7\113\1\0\23\113\2\17"+
- "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\4\17"+
- "\1\161\2\17\1\0\23\17\2\31\6\0\1\31\1\0"+
- "\1\31\1\0\16\31\1\162\7\31\4\0\1\31\27\0"+
- "\1\163\17\0\1\121\1\164\45\121\2\42\2\0\1\42"+
- "\1\0\3\42\1\0\1\42\1\0\12\42\1\165\22\42"+
- "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\15\42"+
- "\1\166\15\42\46\124\1\167\2\42\2\0\1\42\1\0"+
- "\3\42\1\0\1\42\1\0\11\42\1\170\23\42\2\0"+
- "\1\42\1\0\3\42\1\0\1\42\1\0\12\42\1\171"+
- "\22\42\2\0\1\42\1\0\3\42\1\0\1\42\1\0"+
- "\15\42\1\172\15\42\13\0\1\173\33\0\1\133\1\174"+
- "\45\133\2\62\2\0\1\62\1\0\3\62\1\0\1\62"+
- "\1\0\4\62\1\175\21\62\3\0\4\62\2\0\1\62"+
- "\1\0\3\62\1\0\1\62\1\0\4\62\1\176\21\62"+
- "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+
- "\1\0\4\62\1\177\21\62\3\0\4\62\2\0\1\62"+
- "\1\0\3\62\1\0\1\62\1\0\20\62\1\200\5\62"+
- "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+
- "\1\0\11\62\1\201\14\62\3\0\4\62\2\0\1\62"+
- "\1\0\3\62\1\0\1\62\1\0\2\62\1\202\23\62"+
- "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+
- "\1\0\1\203\25\62\3\0\4\62\2\0\1\62\1\0"+
- "\3\62\1\0\1\62\1\0\5\62\1\204\20\62\3\0"+
- "\2\62\46\144\1\174\1\146\1\205\45\146\2\77\2\0"+
- "\1\77\1\0\3\77\1\0\1\77\1\0\2\77\1\206"+
- "\32\77\2\0\1\77\1\0\3\77\1\0\1\77\1\0"+
- "\1\207\34\77\2\0\1\77\1\0\3\77\1\0\1\77"+
- "\1\0\5\77\1\210\25\77\46\152\1\211\2\17\2\0"+
- "\1\17\2\0\1\17\2\0\1\17\1\0\2\17\1\212"+
- "\4\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0"+
- "\1\17\1\0\5\17\1\213\1\17\1\0\25\17\2\0"+
- "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0"+
- "\1\17\1\214\23\17\2\0\1\17\2\0\1\17\2\0"+
- "\1\17\1\0\1\17\1\215\5\17\1\0\23\17\2\31"+
- "\6\0\1\31\1\0\1\31\1\0\17\31\1\216\6\31"+
- "\4\0\1\31\32\0\1\217\14\0\2\42\2\0\1\42"+
- "\1\0\3\42\1\0\1\42\1\0\4\42\1\220\30\42"+
- "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\1\42"+
- "\1\221\33\42\2\0\1\42\1\0\3\42\1\0\1\42"+
- "\1\0\4\42\1\222\30\42\2\0\1\42\1\0\3\42"+
- "\1\0\1\42\1\0\4\42\1\223\30\42\2\0\1\42"+
- "\1\0\3\42\1\0\1\42\1\0\1\42\1\224\31\42"+
- "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+
- "\5\62\1\225\20\62\3\0\4\62\2\0\1\62\1\0"+
- "\3\62\1\0\1\62\1\0\10\62\1\226\15\62\3\0"+
- "\4\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+
- "\11\62\1\227\14\62\3\0\4\62\2\0\1\62\1\0"+
- "\3\62\1\0\1\62\1\0\1\230\25\62\3\0\4\62"+
- "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\4\62"+
- "\1\231\21\62\3\0\4\62\2\0\1\62\1\0\3\62"+
- "\1\0\1\62\1\0\13\62\1\232\12\62\3\0\4\62"+
- "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\24\62"+
- "\1\233\1\62\3\0\4\62\2\0\1\62\1\0\3\62"+
- "\1\0\1\62\1\0\25\62\1\234\3\0\2\62\2\77"+
- "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\13\77"+
- "\1\235\21\77\2\0\1\77\1\0\3\77\1\0\1\77"+
- "\1\0\24\77\1\236\10\77\2\0\1\77\1\0\3\77"+
- "\1\0\1\77\1\0\25\77\1\237\5\77\2\17\2\0"+
- "\1\17\2\0\1\17\2\0\1\17\1\0\1\240\6\17"+
- "\1\0\25\17\2\0\1\17\2\0\1\17\2\0\1\17"+
- "\1\0\4\17\1\241\2\17\1\0\25\17\2\0\1\17"+
- "\2\0\1\17\2\0\1\17\1\0\4\17\1\242\2\17"+
- "\1\0\25\17\2\0\1\17\2\0\1\17\2\0\1\17"+
- "\1\0\5\17\1\243\1\17\1\0\23\17\2\31\6\0"+
- "\1\31\1\0\1\31\1\0\11\31\1\244\14\31\4\0"+
- "\1\31\33\0\1\245\13\0\2\42\2\0\1\42\1\0"+
- "\3\42\1\0\1\42\1\0\1\246\34\42\2\0\1\42"+
- "\1\0\3\42\1\0\1\42\1\0\5\42\1\247\27\42"+
- "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\11\42"+
- "\1\250\23\42\2\0\1\42\1\0\3\42\1\0\1\42"+
- "\1\0\1\251\34\42\2\0\1\42\1\0\3\42\1\0"+
- "\1\42\1\0\5\42\1\252\25\42\2\62\2\0\1\62"+
- "\1\0\3\62\1\0\1\62\1\0\4\62\1\253\21\62"+
- "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+
- "\1\0\22\62\1\254\3\62\3\0\4\62\2\0\1\62"+
- "\1\0\3\62\1\0\1\62\1\0\4\62\1\255\21\62"+
- "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+
- "\1\0\21\62\1\256\4\62\3\0\4\62\2\0\1\62"+
- "\1\0\3\62\1\0\1\62\1\0\11\62\1\257\14\62"+
- "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+
- "\1\0\1\62\1\260\24\62\3\0\4\62\2\0\1\62"+
- "\1\0\3\62\1\0\1\62\1\0\14\62\1\261\11\62"+
- "\3\0\4\62\2\0\1\62\1\0\3\62\1\0\1\62"+
- "\1\0\1\262\25\62\3\0\2\62\2\77\2\0\1\77"+
- "\1\0\3\77\1\0\1\77\1\0\1\77\1\263\33\77"+
- "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\14\77"+
- "\1\264\20\77\2\0\1\77\1\0\3\77\1\0\1\77"+
- "\1\0\1\265\32\77\2\17\2\0\1\17\2\0\1\17"+
- "\2\0\1\17\1\0\3\17\1\266\3\17\1\0\25\17"+
- "\2\0\1\17\2\0\1\17\2\0\1\17\1\0\6\17"+
- "\1\267\1\0\25\17\2\0\1\17\2\0\1\17\2\0"+
- "\1\17\1\0\5\17\1\270\1\17\1\0\25\17\2\0"+
- "\1\17\2\0\1\17\2\0\1\17\1\0\7\17\1\0"+
- "\2\17\1\271\20\17\2\31\6\0\1\31\1\0\1\31"+
- "\1\0\4\31\1\272\21\31\4\0\1\31\25\0\1\273"+
- "\21\0\2\42\2\0\1\42\1\0\3\42\1\0\1\42"+
- "\1\0\2\42\1\274\32\42\2\0\1\42\1\0\3\42"+
- "\1\0\1\42\1\0\16\42\1\274\16\42\2\0\1\42"+
- "\1\0\3\42\1\0\1\42\1\0\2\42\1\275\32\42"+
- "\2\0\1\42\1\0\3\42\1\0\1\42\1\0\16\42"+
- "\1\276\14\42\2\62\2\0\1\62\1\0\3\62\1\0"+
- "\1\62\1\0\5\62\1\277\1\300\17\62\3\0\4\62"+
- "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\1\301"+
- "\25\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+
- "\1\62\1\0\5\62\1\302\20\62\3\0\4\62\2\0"+
- "\1\62\1\0\3\62\1\0\1\62\1\0\12\62\1\303"+
- "\13\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+
- "\1\62\1\0\5\62\1\234\20\62\3\0\4\62\2\0"+
- "\1\62\1\0\3\62\1\0\1\62\1\0\5\62\1\304"+
- "\20\62\3\0\4\62\2\0\1\62\1\0\3\62\1\0"+
- "\1\62\1\0\17\62\1\132\6\62\3\0\2\62\2\77"+
- "\2\0\1\77\1\0\3\77\1\0\1\77\1\0\5\77"+
- "\1\305\27\77\2\0\1\77\1\0\3\77\1\0\1\77"+
- "\1\0\5\77\1\306\27\77\2\0\1\77\1\0\3\77"+
- "\1\0\1\77\1\0\17\77\1\307\13\77\2\17\2\0"+
- "\1\17\2\0\1\17\2\0\1\17\1\0\4\17\1\310"+
- "\2\17\1\0\25\17\2\0\1\17\2\0\1\17\2\0"+
- "\1\17\1\0\7\17\1\0\1\311\24\17\2\0\1\17"+
- "\2\0\1\17\2\0\1\17\1\0\4\17\1\312\2\17"+
- "\1\0\23\17\2\31\6\0\1\31\1\0\1\31\1\0"+
- "\11\31\1\313\14\31\4\0\1\31\20\0\1\314\26\0"+
- "\2\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+
- "\1\315\25\62\3\0\4\62\2\0\1\62\1\0\3\62"+
- "\1\0\1\62\1\0\3\62\1\316\22\62\3\0\4\62"+
- "\2\0\1\62\1\0\3\62\1\0\1\62\1\0\10\62"+
- "\1\317\15\62\3\0\4\62\2\0\1\62\1\0\3\62"+
- "\1\0\1\62\1\0\20\62\1\234\5\62\3\0\2\62"+
- "\2\77\2\0\1\77\1\0\3\77\1\0\1\77\1\0"+
- "\1\320\34\77\2\0\1\77\1\0\3\77\1\0\1\77"+
- "\1\0\20\77\1\321\12\77\2\17\2\0\1\17\2\0"+
- "\1\17\2\0\1\17\1\0\3\17\1\322\3\17\1\0"+
- "\23\17\25\0\1\323\21\0\2\62\2\0\1\62\1\0"+
- "\3\62\1\0\1\62\1\0\12\62\1\324\13\62\3\0"+
- "\4\62\2\0\1\62\1\0\3\62\1\0\1\62\1\0"+
- "\12\62\1\325\13\62\3\0\4\62\2\0\1\62\1\0"+
- "\3\62\1\0\1\62\1\0\3\62\1\326\22\62\3\0"+
- "\2\62\2\77\2\0\1\77\1\0\3\77\1\0\1\77"+
- "\1\0\17\77\1\327\15\77\2\0\1\77\1\0\3\77"+
- "\1\0\1\77\1\0\1\330\32\77\2\0\2\323\1\0"+
- "\1\323\35\0\1\331\3\0\2\77\2\0\1\77\1\0"+
- "\3\77\1\0\1\77\1\0\17\77\1\332\13\77";
-
- /**
- * The transition table of the DFA
- */
- final private static int yytrans [] = yy_unpack();
-
-
- /* error codes */
- final private static int YY_UNKNOWN_ERROR = 0;
- final 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",
- "Internal error: unknown state",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
- /**
- * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
- */
- private final static byte YY_ATTRIBUTE[] = {
- 0, 8, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 9, 9, 9, 1, 1, 1, 1, 1, 9, 9, 1, 1, 9, 9, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1,
- 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 9, 1, 1, 1,
- 1, 1, 1, 9, 9, 9, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1,
- 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1,
- 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 9, 1, 1, 1, 9,
- 1, 1, 0, 9, 1, 1, 9, 1, 1, 1, 9, 9, 1, 1, 1, 1,
- 1, 1, 1, 1, 9, 1, 1, 1, 9, 1, 1, 1, 1, 1, 0, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
- 1, 1, 0, 1, 1, 1, 1, 1, 9, 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[YY_BUFFERSIZE];
-
- /** 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
- */
- int yycolumn;
-
- /** yy_atEOF == true <=> the scanner is at the EOF */
- private boolean yy_atEOF;
-
- /* user code: */
- int node_count = 0;
- String currentString;
-
- private Token createToken(String type) {
- return new Token(type, yytext(), yyline, yychar + startOffset, yylength());
- }
-
- private int startOffset = 0;
- public void setStartOffset(int offset) {
- this.startOffset = offset;
- }
-
- public void setLine(int line) {
- this.yyline = line;
- }
-
-
- /**
- * 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 DTDTokenizer(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 DTDTokenizer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the split, compressed DFA transition table.
- *
- * @return the unpacked transition table
- */
- private static int [] yy_unpack() {
- int [] trans = new int[6630];
- int offset = 0;
- offset = yy_unpack(yy_packed0, offset, trans);
- return trans;
- }
-
- /**
- * Unpacks the compressed DFA transition table.
- *
- * @param packed the packed transition table
- * @return the index of the last entry
- */
- private static int yy_unpack(String packed, int offset, int [] trans) {
- 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 trans[j++] = value; while (--count > 0);
- }
- return j;
- }
-
- /**
- * 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 < 130) {
- 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 yy_refill() throws java.io.IOException {
-
- /* 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 < 0) {
- return true;
- }
- else {
- yy_endRead+= numRead;
- return false;
- }
- }
-
-
- /**
- * 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 */
-
- if (yy_reader != null)
- yy_reader.close();
- }
-
-
- /**
- * Closes the current stream, and resets the
- * scanner to read from a new input stream.
- *
- * 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>YY_INITIAL</tt>.
- *
- * @param reader the new input stream
- */
- final public void yyreset(java.io.Reader reader) throws java.io.IOException {
- yyclose();
- yy_reader = reader;
- yy_atEOF = false;
- yy_endRead = yy_startRead = 0;
- yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
- yyline = yychar = yycolumn = 0;
- yy_lexical_state = YYINITIAL;
- }
-
-
- /**
- * 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 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
- */
- final public char yycharat(int pos) {
- return yy_buffer[yy_startRead+pos];
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- final public int yylength() {
- return yy_markedPos-yy_startRead;
- }
-
-
- /**
- * 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 yy_ScanError(int errorCode) {
- String message;
- try {
- message = YY_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = YY_ERROR_MSG[YY_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()!
- */
- private void yypushback(int number) {
- if ( number > yylength() )
- yy_ScanError(YY_PUSHBACK_2BIG);
-
- yy_markedPos -= 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 Yytoken yylex() throws java.io.IOException {
- int yy_input;
- int yy_action;
-
- // cached fields:
- int yy_currentPos_l;
- int yy_markedPos_l;
- int yy_endRead_l = yy_endRead;
- char [] yy_buffer_l = yy_buffer;
- char [] yycmap_l = yycmap;
-
- int [] yytrans_l = yytrans;
- int [] yy_rowMap_l = yy_rowMap;
- byte [] yy_attr_l = YY_ATTRIBUTE;
-
- while (true) {
- yy_markedPos_l = yy_markedPos;
-
- yychar+= yy_markedPos_l-yy_startRead;
-
- yy_action = -1;
-
- yy_currentPos_l = yy_currentPos =
- yy_startRead = yy_markedPos_l;
-
- yy_state = yy_lexical_state;
-
-
- yy_forAction: {
- while (true) {
-
- if (yy_currentPos_l < yy_endRead_l)
- yy_input = yy_buffer_l[yy_currentPos_l++];
- else if (yy_atEOF) {
- yy_input = YYEOF;
- break yy_forAction;
- }
- else {
- // store back cached positions
- yy_currentPos = yy_currentPos_l;
- yy_markedPos = yy_markedPos_l;
- boolean eof = yy_refill();
- // get translated positions and possibly new buffer
- yy_currentPos_l = yy_currentPos;
- yy_markedPos_l = yy_markedPos;
- yy_buffer_l = yy_buffer;
- yy_endRead_l = yy_endRead;
- if (eof) {
- yy_input = YYEOF;
- break yy_forAction;
- }
- else {
- yy_input = yy_buffer_l[yy_currentPos_l++];
- }
- }
- int yy_next = yytrans_l[ yy_rowMap_l[yy_state] + yycmap_l[yy_input] ];
- if (yy_next == -1) break yy_forAction;
- yy_state = yy_next;
-
- int yy_attributes = yy_attr_l[yy_state];
- if ( (yy_attributes & 1) == 1 ) {
- yy_action = yy_state;
- yy_markedPos_l = yy_currentPos_l;
- if ( (yy_attributes & 8) == 8 ) break yy_forAction;
- }
-
- }
- }
-
- // store back cached position
- yy_markedPos = yy_markedPos_l;
-
- switch (yy_action) {
-
- case 26:
- { yypushback(yylength()); yybegin(YYINITIAL); }
- case 219: break;
- case 89:
- case 123:
- { yypushback(yylength()); yybegin(ATTRIBUTE_DEFAULT); }
- case 220: break;
- case 12:
- case 62:
- case 63:
- case 64:
- case 65:
- case 102:
- case 103:
- case 104:
- case 133:
- case 134:
- case 135:
- case 156:
- case 157:
- case 158:
- case 178:
- case 179:
- case 180:
- case 196:
- case 197:
- case 207:
- case 208:
- case 215:
- { yypushback(yylength()); yybegin(ATTLIST_CONTENT); }
- case 221: break;
- case 51:
- case 52:
- { yypushback(yylength()); yybegin(ATTLIST_CONTENT); }
- case 222: break;
- case 205:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKEN_KEYWORD); }
- case 223: break;
- case 194:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREFS_KEYWORD); }
- case 224: break;
- case 191:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITY_KEYWORD); }
- case 225: break;
- case 107:
- { yybegin(COMMENT_CONTENT); return createToken(DTDRegionTypes.COMMENT_START); }
- case 226: break;
- case 48:
- { yybegin(ATTRIBUTE_CONTENT); return createToken(DTDRegionTypes.ATTRIBUTE_NAME); }
- case 227: break;
- case 39:
- { yybegin(EXTERNALID_CONTENT); return createToken(DTDRegionTypes.NAME); }
- case 228: break;
- case 106:
- case 136:
- { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }
- case 229: break;
- case 100:
- case 132:
- { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }
- case 230: break;
- case 202:
- case 216:
- { return createToken(DTDRegionTypes.CONTENT_PCDATA); }
- case 231: break;
- case 189:
- { return createToken(DTDRegionTypes.PUBLIC_KEYWORD); }
- case 232: break;
- case 188:
- { return createToken(DTDRegionTypes.SYSTEM_KEYWORD); }
- case 233: break;
- case 14:
- case 20:
- case 21:
- case 23:
- case 71:
- case 72:
- case 73:
- case 75:
- case 108:
- case 109:
- case 110:
- case 112:
- case 137:
- case 138:
- case 139:
- case 140:
- case 159:
- case 160:
- case 161:
- case 162:
- case 181:
- case 183:
- case 184:
- case 200:
- { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- case 234: break;
- case 4:
- case 33:
- case 34:
- case 35:
- case 36:
- case 37:
- case 81:
- case 82:
- case 116:
- case 117:
- case 143:
- case 144:
- case 165:
- case 166:
- { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- case 235: break;
- case 7:
- case 40:
- case 41:
- case 42:
- case 85:
- case 86:
- case 87:
- case 119:
- case 120:
- case 121:
- case 145:
- case 146:
- case 147:
- case 168:
- case 169:
- { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- case 236: break;
- case 9:
- { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- case 237: break;
- case 10:
- { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- case 238: break;
- case 43:
- case 45:
- case 46:
- { return createToken(DTDRegionTypes.COMMENT_CONTENT); }
- case 239: break;
- case 60:
- { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- case 240: break;
- case 198:
- { return createToken(DTDRegionTypes.FIXED_KEYWORD); }
- case 241: break;
- case 214:
- { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.IMPLIED_KEYWORD); }
- case 242: break;
- case 212:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKENS_KEYWORD); }
- case 243: break;
- case 211:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITIES_KEYWORD); }
- case 244: break;
- case 209:
- { yybegin(NOTATION_NAME); return createToken(DTDRegionTypes.NOTATION_TAG); }
- case 245: break;
- case 201:
- { yybegin(ATTLIST_NAME); return createToken(DTDRegionTypes.ATTLIST_TAG); }
- case 246: break;
- case 199:
- { yybegin(ELEMENT_NAME); return createToken(DTDRegionTypes.ELEMENT_TAG); }
- case 247: break;
- case 182:
- { yybegin(ENTITY_NAME); return createToken(DTDRegionTypes.ENTITY_TAG); }
- case 248: break;
- case 167:
- { yybegin(NDATA_CONTENT); return createToken(DTDRegionTypes.NDATA_KEYWORD); }
- case 249: break;
- case 111:
- { return createToken(DTDRegionTypes.ENTITY_PARM); }
- case 250: break;
- case 94:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ID_KEYWORD); }
- case 251: break;
- case 25:
- { return createToken(DTDRegionTypes.OCCUR_TYPE); }
- case 252: break;
- case 16:
- { return createToken(DTDRegionTypes.EXCLAMATION); }
- case 253: break;
- case 15:
- { return createToken(DTDRegionTypes.WHITESPACE); }
- case 254: break;
- case 11:
- case 49:
- case 50:
- case 54:
- case 55:
- case 56:
- case 57:
- case 58:
- case 61:
- case 91:
- case 92:
- case 93:
- case 95:
- case 96:
- case 97:
- case 98:
- case 124:
- case 125:
- case 126:
- case 127:
- case 128:
- case 129:
- case 130:
- case 131:
- case 148:
- case 149:
- case 150:
- case 151:
- case 152:
- case 153:
- case 154:
- case 155:
- case 170:
- case 171:
- case 172:
- case 175:
- case 176:
- case 177:
- case 190:
- case 192:
- case 193:
- case 195:
- case 204:
- case 206:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.PARM_ENTITY_TYPE); }
- case 255: break;
- case 28:
- { return createToken(DTDRegionTypes.LEFT_PAREN); }
- case 256: break;
- case 29:
- { return createToken(DTDRegionTypes.RIGHT_PAREN); }
- case 257: break;
- case 44:
- { return createToken(DTDRegionTypes.WHITESPACE); }
- case 258: break;
- case 53:
- { return createToken(DTDRegionTypes.WHITESPACE); }
- case 259: break;
- case 59:
- { yypushback(yylength()); yybegin(ATTRIBUTE_ENUMERATION); }
- case 260: break;
- case 67:
- { return createToken(DTDRegionTypes.LEFT_PAREN); }
- case 261: break;
- case 68:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.RIGHT_PAREN); }
- case 262: break;
- case 69:
- { return createToken(DTDRegionTypes.ENUM_CHOICE); }
- case 263: break;
- case 31:
- { yybegin(ENTITY_CONTENT); return createToken(DTDRegionTypes.NAME); }
- case 264: break;
- case 47:
- { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.NAME); }
- case 265: break;
- case 187:
- { yypushback(yylength()); yybegin(EXTERNALID_CONTENT); }
- case 266: break;
- case 213:
- { yybegin(ATTRIBUTE_ENUMERATION); return createToken(DTDRegionTypes.NOTATION_KEYWORD); }
- case 267: break;
- case 174:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.CDATA_KEYWORD); }
- case 268: break;
- case 173:
- { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREF_KEYWORD); }
- case 269: break;
- case 217:
- { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.REQUIRED_KEYWORD); }
- case 270: break;
- case 122:
- { yybegin(YYINITIAL); return createToken(DTDRegionTypes.COMMENT_END); }
- case 271: break;
- case 84:
- case 118:
- { return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }
- case 272: break;
- case 79:
- case 115:
- { return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }
- case 273: break;
- case 24:
- case 27:
- case 76:
- case 113:
- case 141:
- case 163:
- case 185:
- { return createToken(DTDRegionTypes.NAME); }
- case 274: break;
- case 5:
- case 38:
- { yybegin(YYINITIAL); return createToken(DTDRegionTypes.NDATA_VALUE); }
- case 275: break;
- case 13:
- case 66:
- { return createToken(DTDRegionTypes.NAME); }
- case 276: break;
- case 18:
- { return createToken(DTDRegionTypes.START_TAG); }
- case 277: break;
- case 17:
- { return createToken(DTDRegionTypes.SEMICOLON); }
- case 278: break;
- case 30:
- { return createToken(DTDRegionTypes.CONNECTOR); }
- case 279: break;
- case 22:
- { return createToken(DTDRegionTypes.PERCENT); }
- case 280: break;
- case 19:
- { return createToken(DTDRegionTypes.END_TAG); }
- case 281: break;
- case 32:
- { return createToken(DTDRegionTypes.PERCENT); }
- case 282: break;
- default:
- if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
- yy_atEOF = true;
- return null;
- }
- else {
- yy_ScanError(YY_NO_MATCH);
- }
- }
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Token.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Token.java
deleted file mode 100644
index c1afe7e624..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Token.java
+++ /dev/null
@@ -1,61 +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.wst.dtd.core.internal.tokenizer;
-
-public class Token extends Yytoken {
- public static final int COMMENT_START = 9;
- public static final int CONNECTOR = 6;
- public static final int CONTENT_ANY = 43;
- public static final int CONTENT_EMPTY = 42;
- public static final int CONTENT_PCDATA = 44;
- public static final int ELEMENT_CONTENT = 41;
-
- public static final int ELEMENT_TAG = 40;
- public static final int END_TAG = 2;
- public static final int ENTITY_CONTENT = 32;
- public static final int ENTITY_PARM = 31;
-
- public static final int ENTITY_TAG = 30;
- public static final int EXCLAMATION = 8;
- public static final int LEFT_PAREN = 3;
- public static final int NAME = 0;
- public static final int NOTATION_CONTENT = 21;
-
-
- public static final int NOTATION_TAG = 20;
-
- // public static final int CONNECT_CHOICE = 5;
- // public static final int CONNECT_SEQUENCE = 6;
- // public static final int OCCUR_OPTIONAL = 7;
- // public static final int OCCUR_ONE_OR_MORE = 8;
- // public static final int OCCUR_ZERO_OR_MORE = 9;
- public static final int OCCUR_TYPE = 7;
- public static final int RIGHT_PAREN = 4;
- public static final int START_TAG = 1;
- public static final int WHITESPACE = 5;
-
-
- public Token(String type) {
- super(type);
- }
-
- public Token(String type, String text, int line, int charBegin, int length) {
- super(type, text, line, charBegin, length);
- }
-
- public Token createCopy() {
- Token copy = new Token(getType(), getText(), getStartLine(), getStartOffset(), getLength());
- return copy;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Yytoken.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Yytoken.java
deleted file mode 100644
index ab47990af6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Yytoken.java
+++ /dev/null
@@ -1,89 +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.wst.dtd.core.internal.tokenizer;
-
-class Yytoken {
- public int m_charBegin;
- public int m_length;
- public int m_line;
- public String m_text;
- public String m_type;
-
- Yytoken(String type) {
- m_type = type;
- }
-
- Yytoken(String type, String text, int line, int charBegin, int length) {
- m_type = type;
- m_text = new String(text);
- m_line = line;
- m_charBegin = charBegin;
- m_length = length;
- }
-
- public void delete(int start, int length) {
- int stringStart = start - m_charBegin;
- String oldString = m_text;
- m_text = oldString.substring(0, stringStart);
- m_text += oldString.substring(stringStart + length);
-
- m_length = m_text.length();
- System.out.println("new string = " + m_text); //$NON-NLS-1$
-
- }
-
- public boolean equals(Yytoken other) {
- return m_type == other.getType() && m_text.equals(other.getText()) && m_line == other.getStartLine() && m_charBegin == other.getStartOffset() && m_length == other.getLength();
- }
-
- public int getEndOffset() {
- return m_charBegin + m_length;
- }
-
- public int getLength() {
- return m_length;
- }
-
- public int getStartLine() {
- return m_line;
- }
-
- public int getStartOffset() {
- return m_charBegin;
- }
-
- public String getText() {
- return m_text;
- }
-
- public String getType() {
- return m_type;
- }
-
- public void setStartOffset(int startOffset) {
- m_charBegin = startOffset;
- }
-
- public String toString() {
- return "Text : " + m_text + "\ntype : " + m_type + "\nline : " + m_line + "\ncBeg. : " + m_charBegin + "\ncEnd. : " + getEndOffset() + "\ncLength. : " + m_length; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- }
-
- public void updateOffset(int delta) {
- m_charBegin += delta;
- }
-
- public void updateText(String newText) {
- m_text = newText;
- m_length = newText.length();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex
deleted file mode 100644
index e3a14aa15f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-
-package org.eclipse.wst.dtd.core.internal.tokenizer;
-
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-
-/**
- * Generate with "dtdskeleton".
- *
- * It removes some unused fields and avoids some compiler warnings
- */
-
-%%
-
-%{
- int node_count = 0;
- String currentString;
-
- private Token createToken(String type) {
- return new Token(type, yytext(), yyline, yychar + startOffset, yylength());
- }
-
- private int startOffset = 0;
- public void setStartOffset(int offset) {
- this.startOffset = offset;
- }
-
- public void setLine(int line) {
- this.yyline = line;
- }
-%}
-
-%class DTDTokenizer
-%public
-%unicode
-%char
-
-%state NODE
-%state ELEMENT_NAME
-%state ELEMENT_CONTENT
-%state ELEMENT_MIXED_OR_CHILD
-%state ELEMENT_MIXED
-%state ELEMENT_CHILD
-%state ENTITY_NAME
-%state ENTITY_CONTENT
-%state NDATA_CONTENT
-
-%state NOTATION_NAME
-%state EXTERNALID_CONTENT
-
-%state COMMENT_CONTENT
-%state ATTLIST_NAME
-%state ATTLIST_CONTENT
-%state ATTRIBUTE_CONTENT
-%state ATTRIBUTE_DEFAULT
-%state ATTRIBUTE_ENUMERATION
-
-
-ALPHA=[A-Za-z]
-DIGIT=[0-9]
-NONNEWLINE_WHITE_SPACE_CHAR=[\ \t\b\012]
-STRING_TEXT=(\\\"|[^\n\r\"]|\\{WHITE_SPACE_CHAR}+\\)*
-COMMENT_TEXT=([^*/\n]|[^*\n]"/"[^*\n]|[^/\n]"*"[^/\n]|"*"[^/\n]|"/"[^*\n])*
-Ident = {ALPHA}({ALPHA}|{DIGIT}|_)*
-InputCharacter = [^\r\n]
-
-LineTerminator = \r|\n|\r\n
-
-/* 3 - White Space */
-S = (\x20 | \x09 | \x0D | \x0A)+
-NonLineTerminatorWhitespace = (\x20 | \x09)+
-
-WhiteSpace = {LineTerminator} | [ \t\f]
-
-/* 84 */
-/*Letter = {BaseChar} | {Ideographic}
-
-/* 85 */
-BaseChar = [\u0041-\u005A] | [\u0061-\u007A] | [\u00C0-\u00D6] | [\u00D8-\u00F6] | [\u00F8-\u00FF] | [\u0100-\u0131] | [\u0134-\u013E] | [\u0141-\u0148] | [\u014A-\u017E] | [\u0180-\u01C3] | [\u01CD-\u01F0] | [\u01F4-\u01F5] | [\u01FA-\u0217] | [\u0250-\u02A8] | [\u02BB-\u02C1] | \u0386 | [\u0388-\u038A] | \u038C | [\u038E-\u03A1] | [\u03A3-\u03CE] | [\u03D0-\u03D6] | \u03DA | \u03DC | \u03DE | \u03E0 | [\u03E2-\u03F3] | [\u0401-\u040C] | [\u040E-\u044F] | [\u0451-\u045C] | [\u045E-\u0481] | [\u0490-\u04C4] | [\u04C7-\u04C8] | [\u04CB-\u04CC] | [\u04D0-\u04EB] | [\u04EE-\u04F5] | [\u04F8-\u04F9] | [\u0531-\u0556] | \u0559 | [\u0561-\u0586] | [\u05D0-\u05EA] | [\u05F0-\u05F2] | [\u0621-\u063A] | [\u0641-\u064A] | [\u0671-\u06B7] | [\u06BA-\u06BE] | [\u06C0-\u06CE] | [\u06D0-\u06D3] | \u06D5 | [\u06E5-\u06E6] | [\u0905-\u0939] | \u093D | [\u0958-\u0961] | [\u0985-\u098C] | [\u098F-\u0990] | [\u0993-\u09A8] | [\u09AA-\u09B0] | \u09B2 | [\u09B6-\u09B9] | [\u09DC-\u09DD] | [\u09DF-\u09E1] | [\u09F0-\u09F1] | [\u0A05-\u0A0A] | [\u0A0F-\u0A10] | [\u0A13-\u0A28] | [\u0A2A-\u0A30] | [\u0A32-\u0A33] | [\u0A35-\u0A36] | [\u0A38-\u0A39] | [\u0A59-\u0A5C] | \u0A5E | [\u0A72-\u0A74] | [\u0A85-\u0A8B] | \u0A8D | [\u0A8F-\u0A91] | [\u0A93-\u0AA8] | [\u0AAA-\u0AB0] | [\u0AB2-\u0AB3] | [\u0AB5-\u0AB9] | \u0ABD | \u0AE0 | [\u0B05-\u0B0C] | [\u0B0F-\u0B10] | [\u0B13-\u0B28] | [\u0B2A-\u0B30] | [\u0B32-\u0B33] | [\u0B36-\u0B39] | \u0B3D | [\u0B5C-\u0B5D] | [\u0B5F-\u0B61] | [\u0B85-\u0B8A] | [\u0B8E-\u0B90] | [\u0B92-\u0B95] | [\u0B99-\u0B9A] | \u0B9C | [\u0B9E-\u0B9F] | [\u0BA3-\u0BA4] | [\u0BA8-\u0BAA] | [\u0BAE-\u0BB5] | [\u0BB7-\u0BB9] | [\u0C05-\u0C0C] | [\u0C0E-\u0C10] | [\u0C12-\u0C28] | [\u0C2A-\u0C33] | [\u0C35-\u0C39] | [\u0C60-\u0C61] | [\u0C85-\u0C8C] | [\u0C8E-\u0C90] | [\u0C92-\u0CA8] | [\u0CAA-\u0CB3] | [\u0CB5-\u0CB9] | \u0CDE | [\u0CE0-\u0CE1] | [\u0D05-\u0D0C] | [\u0D0E-\u0D10] | [\u0D12-\u0D28] | [\u0D2A-\u0D39] | [\u0D60-\u0D61] | [\u0E01-\u0E2E] | \u0E30 | [\u0E32-\u0E33] | [\u0E40-\u0E45] | [\u0E81-\u0E82] | \u0E84 | [\u0E87-\u0E88] | \u0E8A | \u0E8D | [\u0E94-\u0E97] | [\u0E99-\u0E9F] | [\u0EA1-\u0EA3] | \u0EA5 | \u0EA7 | [\u0EAA-\u0EAB] | [\u0EAD-\u0EAE] | \u0EB0 | [\u0EB2-\u0EB3] | \u0EBD | [\u0EC0-\u0EC4] | [\u0F40-\u0F47] | [\u0F49-\u0F69] | [\u10A0-\u10C5] | [\u10D0-\u10F6] | \u1100 | [\u1102-\u1103] | [\u1105-\u1107] | \u1109 | [\u110B-\u110C] | [\u110E-\u1112] | \u113C | \u113E | \u1140 | \u114C | \u114E | \u1150 | [\u1154-\u1155] | \u1159 | [\u115F-\u1161] | \u1163 | \u1165 | \u1167 | \u1169 | [\u116D-\u116E] | [\u1172-\u1173] | \u1175 | \u119E | \u11A8 | \u11AB | [\u11AE-\u11AF] | [\u11B7-\u11B8] | \u11BA | [\u11BC-\u11C2] | \u11EB | \u11F0 | \u11F9 | [\u1E00-\u1E9B] | [\u1EA0-\u1EF9] | [\u1F00-\u1F15] | [\u1F18-\u1F1D] | [\u1F20-\u1F45] | [\u1F48-\u1F4D] | [\u1F50-\u1F57] | \u1F59 | \u1F5B | \u1F5D | [\u1F5F-\u1F7D] | [\u1F80-\u1FB4] | [\u1FB6-\u1FBC] | \u1FBE | [\u1FC2-\u1FC4] | [\u1FC6-\u1FCC] | [\u1FD0-\u1FD3] | [\u1FD6-\u1FDB] | [\u1FE0-\u1FEC] | [\u1FF2-\u1FF4] | [\u1FF6-\u1FFC] | \u2126 | [\u212A-\u212B] | \u212E | [\u2180-\u2182] | [\u3041-\u3094] | [\u30A1-\u30FA] | [\u3105-\u312C] | [\uAC00-\uD7A3]
-
-/* 86 */
-Ideographic = [\u4E00-\u9FA5] | \u3007 | [\u3021-\u3029]
-
-/* 4 */ /* is '.' to be escaped?? */
-NameChar = {Letter} | {Digit} | . | - | _ | : | {CombiningChar} | {Extender}
-
-/* 5 */
-Name = ({Letter} | _ | :) {NameChar}*
-
-/* 87 */
-CombiningChar = [\u0300-\u0345] | [\u0360-\u0361] | [\u0483-\u0486] | [\u0591-\u05A1] | [\u05A3-\u05B9] | [\u05BB-\u05BD] | \u05BF | [\u05C1-\u05C2] | \u05C4 | [\u064B-\u0652] | \u0670 | [\u06D6-\u06DC] | [\u06DD-\u06DF] | [\u06E0-\u06E4] | [\u06E7-\u06E8] | [\u06EA-\u06ED] | [\u0901-\u0903] | \u093C | [\u093E-\u094C] | \u094D | [\u0951-\u0954] | [\u0962-\u0963] | [\u0981-\u0983] | \u09BC | \u09BE | \u09BF | [\u09C0-\u09C4] | [\u09C7-\u09C8] | [\u09CB-\u09CD] | \u09D7 | [\u09E2-\u09E3] | \u0A02 | \u0A3C | \u0A3E | \u0A3F | [\u0A40-\u0A42] | [\u0A47-\u0A48] | [\u0A4B-\u0A4D] | [\u0A70-\u0A71] | [\u0A81-\u0A83] | \u0ABC | [\u0ABE-\u0AC5] | [\u0AC7-\u0AC9] | [\u0ACB-\u0ACD] | [\u0B01-\u0B03] | \u0B3C | [\u0B3E-\u0B43] | [\u0B47-\u0B48] | [\u0B4B-\u0B4D] | [\u0B56-\u0B57] | [\u0B82-\u0B83] | [\u0BBE-\u0BC2] | [\u0BC6-\u0BC8] | [\u0BCA-\u0BCD] | \u0BD7 | [\u0C01-\u0C03] | [\u0C3E-\u0C44] | [\u0C46-\u0C48] | [\u0C4A-\u0C4D] | [\u0C55-\u0C56] | [\u0C82-\u0C83] | [\u0CBE-\u0CC4] | [\u0CC6-\u0CC8] | [\u0CCA-\u0CCD] | [\u0CD5-\u0CD6] | [\u0D02-\u0D03] | [\u0D3E-\u0D43] | [\u0D46-\u0D48] | [\u0D4A-\u0D4D] | \u0D57 | \u0E31 | [\u0E34-\u0E3A] | [\u0E47-\u0E4E] | \u0EB1 | [\u0EB4-\u0EB9] | [\u0EBB-\u0EBC] | [\u0EC8-\u0ECD] | [\u0F18-\u0F19] | \u0F35 | \u0F37 | \u0F39 | \u0F3E | \u0F3F | [\u0F71-\u0F84] | [\u0F86-\u0F8B] | [\u0F90-\u0F95] | \u0F97 | [\u0F99-\u0FAD] | [\u0FB1-\u0FB7] | \u0FB9 | [\u20D0-\u20DC] | \u20E1 | [\u302A-\u302F] | \u3099 | \u309A
-
-/* 88 */
-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] | [\u0F20-\u0F29]
-
-/* 89 */
-Extender = \u00B7 | \u02D0 | \u02D1 | \u0387 | \u0640 | \u0E46 | \u0EC6 | \u3005 | [\u3031-\u3035] | [\u309D-\u309E] | [\u30FC-\u30FE]
-*/
-
-Letter = [a-zA-Z]
-NameChar = {Letter} | [0-9]
-//Name = ({Letter} | _ | :) {NameChar}*
-//Name = [^\x20\x09\x0D\x0A]+
-Name = [^\x20\x09\x0D\x0A\|,\!\?\+\*\(\)<>]+
-ElementRefName = [^\x20\x09\x0D\x0A\|,\?\+\*\(\)<>]+
-EntityName = [^\x20\x09\x0D\x0A\|,\?\*\(\)<>]+
-ParmEntityName = [^\x20\x09\x0D\x0A\!%;<>]+
-
-CommentStart = \!--
-CommentContent = [^->]+
-CommentEnd = -->
-ElementStart = ELEMENT
-ElementContent = [^<>]*
-
-EntityStart = ENTITY
-Entity_Parm = %{S}
-EntityContent = {S}[^<>]*
-
-NotationStart = NOTATION
-NotationContent = {S}[^<>]*
-AttList = ATTLIST
-ExternalParmEntityRef = %{ParmEntityName};
-EndTag = >
-StartTag = <
-System = SYSTEM
-Public = PUBLIC
-NData = NDATA
-
-// these are attribute type keywords
-// we reuse NOTATION from NotationStart
-// we reuse ENTITY from EntityStart
-CData = CDATA
-ID = ID
-IDRef = IDREF
-IDRefs = IDREFS
-Entities = ENTITIES
-NMToken = NMTOKEN
-NMTokens = NMTOKENS
-
-// these are attribute defaults keywords
-Required = #REQUIRED
-Implied = #IMPLIED
-Fixed = #FIXED
-
-
-Empty = EMPTY
-Any = ANY
-PcData = #PCDATA
-LeftParen = \(
-RightParen = \)
-
-Percent = %
-Semicolon = ;
-Plus = \+
-Choice = \|
-Sequence = ,
-Connector = {Choice}|{Sequence}
-OccurOptional = \?
-OccurOneOrMore = \+
-OccurZeroOrMore = \*
-OccurType = {OccurOptional}|{OccurOneOrMore}|{OccurZeroOrMore}
-Exclamation = \!
-SingleQuotedLiteral = '[^']*'
-DoubleQuotedLiteral = \"[^\"]*\"
-NonTagContent = [^\x20\x09\x0D\x0A<>]*
-NonEnumContent = [^\x20\x09\x0D\x0A<>\(\)\|]*
-
-%%
-
-<YYINITIAL> {
- {StartTag} { return createToken(DTDRegionTypes.START_TAG); }
- {EndTag} { return createToken(DTDRegionTypes.END_TAG); }
- {Exclamation} { return createToken(DTDRegionTypes.EXCLAMATION); }
- {Percent} { return createToken(DTDRegionTypes.PERCENT); }
- {Semicolon} { return createToken(DTDRegionTypes.SEMICOLON); }
-
- {ElementStart} { yybegin(ELEMENT_NAME); return createToken(DTDRegionTypes.ELEMENT_TAG); }
- {CommentStart} { yybegin(COMMENT_CONTENT); return createToken(DTDRegionTypes.COMMENT_START); }
- {EntityStart} { yybegin(ENTITY_NAME); return createToken(DTDRegionTypes.ENTITY_TAG); }
- {NotationStart} { yybegin(NOTATION_NAME); return createToken(DTDRegionTypes.NOTATION_TAG); }
- {AttList} { yybegin(ATTLIST_NAME); return createToken(DTDRegionTypes.ATTLIST_TAG); }
-
- {ExternalParmEntityRef} { return createToken(DTDRegionTypes.ENTITY_PARM); }
-// just a parmentityname by itself is no good. we use this
-// to capture garbage content at the top level
- {ParmEntityName} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
-
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
-}
-
-<ELEMENT_NAME> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {PcData}|\({S}*{PcData}{S}*\) { return createToken(DTDRegionTypes.CONTENT_PCDATA); }
- {Name} { return createToken(DTDRegionTypes.NAME); }
-
- {LeftParen} { return createToken(DTDRegionTypes.LEFT_PAREN); }
- {Connector} { return createToken(DTDRegionTypes.CONNECTOR); }
- {OccurType} { return createToken(DTDRegionTypes.OCCUR_TYPE); }
- {RightParen} { return createToken(DTDRegionTypes.RIGHT_PAREN); }
-
- {StartTag} { yypushback(yylength()); yybegin(YYINITIAL); }
- {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-// ******** <!ATTLIST...>
-<ATTLIST_NAME> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Name} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.NAME); }
- {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ATTLIST_CONTENT> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Name} { yybegin(ATTRIBUTE_CONTENT); return createToken(DTDRegionTypes.ATTRIBUTE_NAME); }
- {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ATTRIBUTE_CONTENT> {
- {LineTerminator} { yypushback(yylength()); yybegin(ATTLIST_CONTENT); }
- {NonLineTerminatorWhitespace}
- { return createToken(DTDRegionTypes.WHITESPACE); }
- {CData} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.CDATA_KEYWORD); }
-
- {ID} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ID_KEYWORD); }
- {IDRef} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREF_KEYWORD); }
- {IDRefs} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.IDREFS_KEYWORD); }
- {EntityStart} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITY_KEYWORD); }
- {Entities} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.ENTITIES_KEYWORD); }
- {NMToken} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKEN_KEYWORD); }
- {NMTokens} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.NMTOKENS_KEYWORD); }
- {NotationStart} { yybegin(ATTRIBUTE_ENUMERATION); return createToken(DTDRegionTypes.NOTATION_KEYWORD); }
-
- {Required} | {Implied} | {Fixed} | {SingleQuotedLiteral} | { DoubleQuotedLiteral}
- { yypushback(yylength()); yybegin(ATTRIBUTE_DEFAULT); }
-
- {LeftParen} { yypushback(yylength()); yybegin(ATTRIBUTE_ENUMERATION); }
- {NonEnumContent} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.PARM_ENTITY_TYPE); }
- {NonEnumContent}|{RightParen}|{Choice} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ATTRIBUTE_DEFAULT> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Required} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.REQUIRED_KEYWORD); }
- {Implied} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.IMPLIED_KEYWORD); }
- {Fixed} { return createToken(DTDRegionTypes.FIXED_KEYWORD); }
- {SingleQuotedLiteral} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }
- {DoubleQuotedLiteral} { yybegin(ATTLIST_CONTENT); return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }
- {NonTagContent} { yypushback(yylength()); yybegin(ATTLIST_CONTENT); } //return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ATTRIBUTE_ENUMERATION> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {LeftParen} { return createToken(DTDRegionTypes.LEFT_PAREN); }
- {Choice} { return createToken(DTDRegionTypes.ENUM_CHOICE); }
- {RightParen} { yybegin(ATTRIBUTE_DEFAULT); return createToken(DTDRegionTypes.RIGHT_PAREN); }
- {NonEnumContent} { return createToken(DTDRegionTypes.NAME); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-
-// ******** <!ENTITY...>
-<ENTITY_NAME> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Percent} { return createToken(DTDRegionTypes.PERCENT); }
- {EntityName} { yybegin(ENTITY_CONTENT); return createToken(DTDRegionTypes.NAME); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<ENTITY_CONTENT> {
-// {EntityContent} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.ENTITY_CONTENT); }
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {System} | {Public} { yypushback(yylength()); yybegin(EXTERNALID_CONTENT); }
- {SingleQuotedLiteral} { return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }
- {DoubleQuotedLiteral} { return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }
- {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-
-// ******** <!NOTATION...>
-<NOTATION_NAME> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {Name} { yybegin(EXTERNALID_CONTENT); return createToken(DTDRegionTypes.NAME); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<EXTERNALID_CONTENT> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {System} { return createToken(DTDRegionTypes.SYSTEM_KEYWORD); }
- {Public} { return createToken(DTDRegionTypes.PUBLIC_KEYWORD); }
- {SingleQuotedLiteral} { return createToken(DTDRegionTypes.SINGLEQUOTED_LITERAL); }
- {DoubleQuotedLiteral} { return createToken(DTDRegionTypes.DOUBLEQUOTED_LITERAL); }
- {NData} { yybegin(NDATA_CONTENT); return createToken(DTDRegionTypes.NDATA_KEYWORD); }
- {NonTagContent} { return createToken(DTDRegionTypes.UNKNOWN_CONTENT); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-<NDATA_CONTENT> {
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {NonTagContent} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.NDATA_VALUE); }
- {StartTag} | {EndTag} { yypushback(yylength()); yybegin(YYINITIAL); }
-}
-
-
-// ******** <!-- ...>
-<COMMENT_CONTENT> {
- {CommentEnd} { yybegin(YYINITIAL); return createToken(DTDRegionTypes.COMMENT_END); }
- {S} { return createToken(DTDRegionTypes.WHITESPACE); }
- {CommentContent} | "-" | ">" { return createToken(DTDRegionTypes.COMMENT_CONTENT); }
-}
-
-
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtdskeleton b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtdskeleton
deleted file mode 100644
index 3dbe086560..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtdskeleton
+++ /dev/null
@@ -1,317 +0,0 @@
-
- /** This character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** initial size of the lookahead buffer */
---- final private static int YY_BUFFERSIZE = ...;
-
- /** lexical states */
---- lexical states, charmap
-
- /* error codes */
- final private static int YY_UNKNOWN_ERROR = 0;
- final 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",
- "Internal error: unknown state",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
---- isFinal list
- /** 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[YY_BUFFERSIZE];
-
- /** 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
- */
- int yycolumn;
-
- /** yy_atEOF == true <=> the scanner is at the EOF */
- private boolean yy_atEOF;
-
---- user class code
-
- /**
- * 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.
- */
---- constructor declaration
-
-
- /**
- * 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 yy_refill() throws java.io.IOException {
-
- /* 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 < 0) {
- return true;
- }
- else {
- yy_endRead+= numRead;
- return false;
- }
- }
-
-
- /**
- * 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 */
-
- if (yy_reader != null)
- yy_reader.close();
- }
-
-
- /**
- * Closes the current stream, and resets the
- * scanner to read from a new input stream.
- *
- * 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>YY_INITIAL</tt>.
- *
- * @param reader the new input stream
- */
- final public void yyreset(java.io.Reader reader) throws java.io.IOException {
- yyclose();
- yy_reader = reader;
- yy_atEOF = false;
- yy_endRead = yy_startRead = 0;
- yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
- yyline = yychar = yycolumn = 0;
- yy_lexical_state = YYINITIAL;
- }
-
-
- /**
- * 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 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
- */
- final public char yycharat(int pos) {
- return yy_buffer[yy_startRead+pos];
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- final public int yylength() {
- return yy_markedPos-yy_startRead;
- }
-
-
- /**
- * 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
- */
---- yy_ScanError declaration
- String message;
- try {
- message = YY_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];
- }
-
---- throws clause
- }
-
-
- /**
- * 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()!
- */
---- yypushback decl (contains yy_ScanError exception)
- if ( number > yylength() )
- yy_ScanError(YY_PUSHBACK_2BIG);
-
- yy_markedPos -= number;
- }
-
-
---- yy_doEof
- /**
- * 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
- */
---- yylex declaration
- int yy_input;
- int yy_action;
-
- // cached fields:
- int yy_currentPos_l;
- int yy_markedPos_l;
- int yy_endRead_l = yy_endRead;
- char [] yy_buffer_l = yy_buffer;
- char [] yycmap_l = yycmap;
-
---- local declarations
-
- while (true) {
- yy_markedPos_l = yy_markedPos;
-
---- start admin (line, char, col count)
- yy_action = -1;
-
- yy_currentPos_l = yy_currentPos =
- yy_startRead = yy_markedPos_l;
-
---- start admin (lexstate etc)
-
- yy_forAction: {
- while (true) {
-
---- next input, line, col, char count, next transition, isFinal action
- yy_action = yy_state;
- yy_markedPos_l = yy_currentPos_l;
---- line count update
- }
-
- }
- }
-
- // store back cached position
- yy_markedPos = yy_markedPos_l;
---- char count update
-
- switch (yy_action) {
-
---- actions
- default:
- if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
- yy_atEOF = true;
---- eofvalue
- }
- else {
---- no match
- }
- }
- }
- }
-
---- main
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDBatchNodeDelete.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDBatchNodeDelete.java
deleted file mode 100644
index 1a514efdbf..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDBatchNodeDelete.java
+++ /dev/null
@@ -1,57 +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.wst.dtd.core.internal.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-
-
-public class DTDBatchNodeDelete {
- protected DTDFile dtdFile;
-
- protected List nodes = new ArrayList();
-
- public DTDBatchNodeDelete(DTDFile dtdFile) {
- this.dtdFile = dtdFile;
- }
-
- public void addNode(DTDNode node) {
- // first check if the node is contained by anyone
- for (int i = 0; i < nodes.size(); i++) {
- DTDNode currentNode = (DTDNode) nodes.get(i);
-
- if (currentNode.containsRange(node.getStartOffset(), node.getEndOffset())) {
- // then no need to add the node to the list to be deleted
- return;
- }
-
- if (node.getStartOffset() < currentNode.getStartOffset() && node.getEndOffset() <= currentNode.getStartOffset()) {
- nodes.add(i, node);
- return;
- }
- }
- // if we get here, then add it to the end
- nodes.add(node);
- }
-
- public void deleteNodes(Object requestor) {
- for (int i = nodes.size() - 1; i >= 0; i--) {
- DTDNode node = (DTDNode) nodes.get(i);
- dtdFile.deleteNode(requestor, node);
- }
- nodes.clear();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDExternalReferenceRemover.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDExternalReferenceRemover.java
deleted file mode 100644
index be853bbbb9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDExternalReferenceRemover.java
+++ /dev/null
@@ -1,134 +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.wst.dtd.core.internal.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.Entity;
-
-
-/*
- * This class is responsible for updating the model when items are deleted or
- * so that items referenced by it are cleaned up note that top level nodes are
- * queued up for deletion so that iteration over the list of nodes from the
- * dtdfile is not messed up. Note that when an external parmeter entity
- * changes, the client of the model (e.g. editor) must be a DTDFileListener
- * implementing the listener's interface to keep the model's referential
- * integrity (See DTDModelImpl for example).
- */
-
-public class DTDExternalReferenceRemover extends DTDVisitor {
-
- protected DTDBatchNodeDelete batchDelete;
- protected List externalElementsAndParmEntities = new ArrayList();
-
- protected boolean isParmEntity = false;
-
- protected boolean isUpdating = false;
- protected DTDNode nodeToDelete;
- protected String oldRefName = ""; //$NON-NLS-1$
- protected Object requestor;
-
- public DTDExternalReferenceRemover() {
-
- }
-
- public synchronized void externalReferenceAboutToChange(Object requestor, Entity entity) {
- if (isUpdating) {
- return;
- }
- if (!entity.isParameterEntity() || !entity.isExternalEntity()) {
- // if it is not an external parameter entity, ignore as well
- return;
- }
-
- isUpdating = true;
- this.requestor = requestor;
-
- DTDFile dtdFile = entity.getDTDFile();
- if (batchDelete == null) {
- batchDelete = new DTDBatchNodeDelete(dtdFile);
- }
-
- // See the comment at the head of this file regarding
- // external parameter entities.
- // externalElementsAndParmEntities =
- // dtdFile.getDTDModel().getExternalModels().getElementContentNames(entity.getPublicID(),
- // dtdFile.getDTDModel().resolveID(entity.getPublicID(),
- // entity.getSystemID()));
-
- visit(dtdFile);
-
- batchDelete.deleteNodes(requestor);
-
- isUpdating = false;
- }
-
- public boolean isMatchingName(String name) {
- return externalElementsAndParmEntities.contains(name);
- }
-
- public void visitAttribute(Attribute attr) {
- super.visitAttribute(attr);
- String attrName = attr.getName();
- String attrType = attr.getType();
-
- if (isParameterEntityRef(attrName)) {
- if (isMatchingName(attrName)) {
- attr.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- }
- if (isParameterEntityRef(attrType)) {
- if (isMatchingName(attrType)) {
- attr.setType(requestor, Attribute.CDATA);
- }
- }
- }
-
- public void visitAttributeList(AttributeList attList) {
- super.visitAttributeList(attList);
- String attListName = attList.getName();
- if (isParameterEntityRef(attListName)) {
- if (isMatchingName(attListName)) {
- attList.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- }
- }
-
- public void visitElement(Element element) {
- String elementName = element.getName();
- if (isParameterEntityRef(elementName)) {
- if (isMatchingName(elementName)) {
- element.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- }
- super.visitElement(element);
- }
-
- public void visitReference(CMBasicNode node) {
- super.visitReference(node);
- String refName = node.getName();
- if (isMatchingName(refName)) {
- batchDelete.addNode(node);
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDModelUpdater.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDModelUpdater.java
deleted file mode 100644
index 4b9cdfac7f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDModelUpdater.java
+++ /dev/null
@@ -1,135 +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.wst.dtd.core.internal.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.core.internal.ParameterEntityReference;
-
-
-// this class is responsible for updating the model when items
-// are deleted or a external parm entity changes so that
-// items referenced by it are cleaned up
-// note that top level nodes are queued up for deletion so that
-// iteration over the list of nodes from the dtdfile is not messed up
-public class DTDModelUpdater extends DTDVisitor {
-
- protected boolean isParmEntity = false;
-
- protected boolean isUpdating = false;
-
- protected List nodesToDelete = new ArrayList();
- protected DTDNode nodeToDelete;
- protected String oldRefName = ""; //$NON-NLS-1$
- protected Object requestor;
-
- public DTDModelUpdater() {
-
- }
-
- public synchronized void objectAboutToBeDeleted(Object requestor, DTDNode node) {
- if (isUpdating) {
- return;
- }
- if (!(node instanceof Entity || node instanceof Element)) {
- // just ignore if it is not one of these
- return;
- }
- if (node instanceof Entity && !((Entity) node).isParameterEntity()) {
- // if it is not a parameter entity, ignore as well
- return;
- }
-
-
- isUpdating = true;
- this.requestor = requestor;
- this.nodeToDelete = node;
- oldRefName = node.getName();
- isParmEntity = false;
- nodesToDelete.clear();
-
- if (node instanceof Entity) {
- isParmEntity = true;
- oldRefName = "%" + oldRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- DTDFile dtdFile = node.getDTDFile();
- visit(dtdFile);
-
- for (int i = 0; i < nodesToDelete.size(); i++) {
- dtdFile.deleteNode(requestor, (DTDNode) nodesToDelete.get(i));
- }
-
- isUpdating = false;
- }
-
- public void visitAttribute(Attribute attr) {
- super.visitAttribute(attr);
- if (isParmEntity) {
- if (attr.getName().equals(oldRefName)) {
- attr.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- if (attr.getType().equals(oldRefName)) {
- attr.setType(requestor, Attribute.CDATA);
- }
- }
- // check the attr name and the attr type to see if it
- // needs updating
- }
-
- public void visitAttributeList(AttributeList attList) {
- super.visitAttributeList(attList);
- if (attList.getName().equals(oldRefName)) {
- if (isParmEntity) {
- attList.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- else {
- // save up for later deletion
- nodesToDelete.add(attList);
- }
- }
- }
-
- public void visitElement(Element element) {
- if (isParmEntity) {
- if (element.getName().equals(oldRefName)) {
- element.setName(requestor, "TempName"); //$NON-NLS-1$
- }
- }
- super.visitElement(element);
- }
-
- public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) {
- super.visitExternalParameterEntityReference(parmEntityRef);
- if (isParmEntity && parmEntityRef.getName().equals(oldRefName)) {
- nodesToDelete.add(parmEntityRef);
- }
- }
-
- public void visitReference(CMBasicNode node) {
- super.visitReference(node);
-
- if (node.getName().equals(oldRefName)) {
- DTDNode parent = (DTDNode) node.getParentNode();
- parent.delete(requestor, node);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDNotationReferenceRemover.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDNotationReferenceRemover.java
deleted file mode 100644
index 10b9e4445f..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDNotationReferenceRemover.java
+++ /dev/null
@@ -1,93 +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.wst.dtd.core.internal.util;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.AttributeEnumList;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.core.internal.Notation;
-
-
-public class DTDNotationReferenceRemover {
- protected Notation notation;
- protected String notationName;
-
- protected Object requestor;
-
- public DTDNotationReferenceRemover() {
-
- }
-
- public void notationAboutToBeDeleted(Object requestor, Notation notation) {
- this.requestor = requestor;
- this.notation = notation;
- notationName = notation.getName();
-
- visit(notation.getDTDFile());
- }
-
- public void visit(DTDFile file) {
- List nodes = file.getNodes();
- for (int i = 0; i < nodes.size(); i++) {
- DTDNode currentNode = (DTDNode) nodes.get(i);
- if (currentNode instanceof Entity) {
- visitEntity((Entity) currentNode);
- }
- else if (currentNode instanceof AttributeList) {
- visitAttributeList((AttributeList) currentNode);
- }
- }
- }
-
- public void visitAttribute(Attribute attr) {
- if (attr.getType().equals(Attribute.ENUMERATED_NOTATION)) {
- AttributeEnumList enumList = attr.getEnumList();
- List notationNames = enumList.getItems();
- Iterator iter = notationNames.iterator();
- boolean updateRequired = false;
- while (iter.hasNext()) {
- String notation = (String) iter.next();
- if (notation.equals(notationName)) {
- updateRequired = true;
- iter.remove();
- }
- }
- if (updateRequired) {
- String[] newItems = new String[notationNames.size()];
- notationNames.toArray(newItems);
- enumList.setItems(requestor, newItems);
- }
- }
- }
-
- public void visitAttributeList(AttributeList attList) {
- Attribute attr = (Attribute) attList.getFirstChild();
- while (attr != null) {
- visitAttribute(attr);
- attr = (Attribute) attr.getNextSibling();
- }
- }
-
- public void visitEntity(Entity entity) {
- if (entity.getNotationName().equals(notationName)) {
- entity.setNotationName(requestor, ""); //$NON-NLS-1$
- }
- }
-
-}// DTDNotationRemover
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDReferenceUpdater.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDReferenceUpdater.java
deleted file mode 100644
index fa9297f1e2..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDReferenceUpdater.java
+++ /dev/null
@@ -1,196 +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.wst.dtd.core.internal.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.AttributeEnumList;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.core.internal.Notation;
-import org.eclipse.wst.dtd.core.internal.ParameterEntityReference;
-
-
-// this class is responsible for updating any dtd node in
-// response to a change in the node that they reference
-public class DTDReferenceUpdater extends DTDVisitor {
- protected boolean isNotation = false;
-
- protected boolean isParmEntity = false;
-
- protected boolean isUpdating = false;
- protected String newName = ""; //$NON-NLS-1$
- protected String oldRefName = "", newRefName = ""; //$NON-NLS-1$ //$NON-NLS-2$
- protected DTDNode referencedNode = null;
-
- // the references List is a cache of the DTDNodes that are changed
- // as a result of a call to nameAboutToChange(). The idea is that
- // if a subsequent call comes in that changes the name of the same
- // object for which this cache exists for, then we optimize the
- // path by just walking the cache
- private List references = new ArrayList();
- protected Object requestor;
-
- public DTDReferenceUpdater() {
-
- }
-
- public void clearCache() {
- referencedNode = null;
- references.clear();
- }
-
- public synchronized void nameAboutToChange(Object requestor, DTDNode referencedNode, String newName) {
- if (isUpdating) {
- return;
- }
- if (!(referencedNode instanceof Entity || referencedNode instanceof Element || referencedNode instanceof Notation)) {
- // just ignore if it is not one of these
- return;
- }
- if (referencedNode instanceof Entity && !((Entity) referencedNode).isParameterEntity()) {
- // if it is not a parameter entity, ignore as well
- return;
- }
-
- isUpdating = true;
- this.requestor = requestor;
- oldRefName = referencedNode.getName();
- this.newName = newRefName = newName;
- isParmEntity = false;
- isNotation = referencedNode instanceof Notation;
-
- if (referencedNode instanceof Entity) {
- isParmEntity = true;
- oldRefName = "%" + oldRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- newRefName = "%" + newRefName + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (this.referencedNode != null) {
- // check if the previous referenced node that was changed
- // is the same as the one that is coming in. if so, just
- // change the previous regions
- if (this.referencedNode == referencedNode) {
- quickUpdate();
- isUpdating = false;
- return;
- }
- }
-
- // clear the cache if we get here
- this.referencedNode = referencedNode;
- references.clear();
- DTDFile dtdFile = referencedNode.getDTDFile();
- visit(dtdFile);
- isUpdating = false;
- }
-
- protected void quickUpdate() {
- for (int i = 0; i < references.size(); i++) {
- DTDNode node = (DTDNode) references.get(i);
- if (node instanceof Element) {
- visitElement((Element) node);
- }
- else if (node instanceof AttributeList) {
- visitAttributeList((AttributeList) node);
- }
- else if (node instanceof Attribute) {
- visitAttribute((Attribute) node);
- }
- else if (node instanceof CMBasicNode) {
- visitReference((CMBasicNode) node);
- }
- else if (node instanceof ParameterEntityReference) {
- visitExternalParameterEntityReference((ParameterEntityReference) node);
- }
- }
- }
-
- public void visitAttribute(Attribute attr) {
- super.visitAttribute(attr);
- if (isParmEntity) {
- // check the attr name and the attr type to see if it
- // needs updating
- if (attr.getName().equals(oldRefName)) {
- attr.setName(requestor, newRefName);
- references.add(attr);
- }
- if (attr.getType().equals(oldRefName)) {
- attr.setType(requestor, newRefName);
- references.add(attr);
- }
- }
- else if (isNotation && attr.getType().equals(Attribute.ENUMERATED_NOTATION)) {
- AttributeEnumList enumList = attr.getEnumList();
- List items = enumList.getItems();
- boolean updateNeeded = false;
- for (int i = 0; i < items.size(); i++) {
- String notationName = (String) items.get(i);
- if (notationName.equals(oldRefName)) {
- updateNeeded = true;
- items.set(i, newName);
- }
- }
- if (updateNeeded) {
- String[] newItems = new String[items.size()];
-
- enumList.setItems((String[]) items.toArray(newItems));
- }
- }
-
- }
-
- public void visitAttributeList(AttributeList attList) {
- if (!isNotation && attList.getName().equals(oldRefName)) {
- attList.setName(requestor, newRefName);
- references.add(attList);
- }
- super.visitAttributeList(attList);
- }
-
- public void visitElement(Element element) {
- if (isParmEntity) {
- if (element.getName().equals(oldRefName)) {
- element.setName(requestor, newRefName);
- references.add(element);
- }
- }
- super.visitElement(element);
- }
-
- public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) {
- super.visitExternalParameterEntityReference(parmEntityRef);
- if (parmEntityRef.getName().equals(oldRefName)) {
- parmEntityRef.setReferencedEntity(requestor, newName);
- references.add(parmEntityRef);
- }
- }
-
- public void visitReference(CMBasicNode node) {
- super.visitReference(node);
- if (isParameterEntityRef(oldRefName) && !isParmEntity) {
- return;
- }
-
- if (node.getName().equals(oldRefName)) {
- node.setName(requestor, newRefName);
- references.add(node);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDUniqueNameHelper.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDUniqueNameHelper.java
deleted file mode 100644
index e94215daf5..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDUniqueNameHelper.java
+++ /dev/null
@@ -1,95 +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.wst.dtd.core.internal.util;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.core.internal.Notation;
-
-
-public class DTDUniqueNameHelper {
-
- static public String getName(Object obj) {
- if (obj instanceof Element) {
- return ((Element) obj).getName();
- }
- else if (obj instanceof Entity) {
- return ((Entity) obj).getName();
- }
- else if (obj instanceof Notation) {
- return ((Notation) obj).getName();
- }
- else if (obj instanceof Attribute) {
- return ((Attribute) obj).getName();
- }
- else if (obj instanceof CMBasicNode) // Model Group Content
- {
- return ((CMBasicNode) obj).getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- static public String getUniqueAttributeName(Element element) {
- List attrs = element.getElementAttributes();
- return getUniqueName(attrs, "NewAttribute"); //$NON-NLS-1$
- }
-
- static public String getUniqueElementName(DTDFile dtdFile) {
- List elements = dtdFile.getElementsAndParameterEntityReferences().getNodes();
- return getUniqueName(elements, "NewElement"); //$NON-NLS-1$
- }
-
- static public String getUniqueEntityName(DTDFile dtdFile) {
- List entities = dtdFile.getEntities().getNodes();
- return getUniqueName(entities, "NewEntity"); //$NON-NLS-1$
- }
-
- static public String getUniqueName(List objs, String token) {
- int counter = 1;
-
- boolean uniqueName = false;
- while (!uniqueName) {
- String newName = token + new Integer(counter++);
- uniqueName = true;
- Iterator iter = objs.iterator();
- while (iter.hasNext()) {
- Object obj = iter.next();
- String objName = getName(obj);
- if (objName.equals(newName)) {
- uniqueName = false;
- break;
- }
- }
- if (uniqueName) {
- return newName;
- }
- }
- // we shouldn't get here
- return "No Name found"; //$NON-NLS-1$
- }
-
- static public String getUniqueNotationName(DTDFile dtdFile) {
- List notations = dtdFile.getNotations().getNodes();
- return getUniqueName(notations, "NewNotation"); //$NON-NLS-1$
- }
-
- public DTDUniqueNameHelper() {
- }
-
-} // DTDUniqueNameHelper
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDVisitor.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDVisitor.java
deleted file mode 100644
index 8b7b7c34d6..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDVisitor.java
+++ /dev/null
@@ -1,108 +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.wst.dtd.core.internal.util;
-
-import java.util.List;
-
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-import org.eclipse.wst.dtd.core.internal.CMNode;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.ParameterEntityReference;
-
-
-public class DTDVisitor {
-
- public DTDVisitor() {
-
- }
-
- // utility method
- public boolean isParameterEntityRef(String reference) {
- if (reference.length() > 0) {
- return reference.charAt(0) == '%' && reference.charAt(reference.length() - 1) == ';';
- }
- return false;
- }
-
- public void visit(DTDFile file) {
- List nodes = file.getNodes();
- for (int i = 0; i < nodes.size(); i++) {
- DTDNode currentNode = (DTDNode) nodes.get(i);
- if (currentNode instanceof Element) {
- visitElement((Element) currentNode);
- }
- else if (currentNode instanceof AttributeList) {
- visitAttributeList((AttributeList) currentNode);
- }
- else if (currentNode instanceof ParameterEntityReference) {
- visitExternalParameterEntityReference((ParameterEntityReference) currentNode);
- }
- }
- }
-
- public void visitAttribute(Attribute attr) {
- }
-
- public void visitAttributeList(AttributeList attList) {
- // note that we don't visit attributes here because we
- // want the element to visit them with it's consolidated list
- // that it creates by gathering all attribute lists together
- }
-
- public void visitAttributes(List attributes) {
- int size = attributes.size();
- for (int i = 0; i < size; i++) {
- Attribute attr = (Attribute) attributes.get(i);
- visitAttribute(attr);
- }
- }
-
- public void visitContentNode(CMNode content) {
- if (content instanceof CMBasicNode) {
- CMBasicNode basicNode = (CMBasicNode) content;
- if (basicNode.isReference()) {
- visitReference(basicNode);
- }
- }
- else if (content instanceof CMGroupNode) {
- visitGroupNode((CMGroupNode) content);
- }
- }
-
- public void visitElement(Element element) {
- CMNode content = element.getContentModel();
- visitContentNode(content);
- visitAttributes(element.getElementAttributes());
- }
-
- public void visitExternalParameterEntityReference(ParameterEntityReference parmEntityRef) {
- }
-
- public void visitGroupNode(CMGroupNode group) {
- List children = group.getChildrenList();
- int size = children.size();
- for (int i = 0; i < size; i++) {
- visitContentNode((CMNode) children.get(i));
- }
- }
-
- public void visitReference(CMBasicNode node) {
- }
-
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java
deleted file mode 100644
index 35b8cf62b3..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java
+++ /dev/null
@@ -1,30 +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.wst.dtd.core.internal.util;
-
-import org.eclipse.jface.util.Assert;
-
-public class LabelValuePair {
-
- public String fLabel;
- public Object fValue;
-
- /**
- * Creates a new name/value item
- */
- public LabelValuePair(String label, Object value) {
- Assert.isTrue(label != null);
- fLabel = label;
- fValue = value;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/text/IDTDPartitions.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/text/IDTDPartitions.java
deleted file mode 100644
index 85b629ebe9..0000000000
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/text/IDTDPartitions.java
+++ /dev/null
@@ -1,24 +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.wst.dtd.core.text;
-
-/**
- * This interface is not intended to be implemented.
- * It defines the partition types DTD.
- * Clients should reference the partition type Strings defined here directly.
- *
- * @since 1.1
- */
-public interface IDTDPartitions {
-
- String DTD_DEFAULT = "org.eclipse.wst.dtd.DEFAULT"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/.classpath b/bundles/org.eclipse.wst.dtd.ui/.classpath
deleted file mode 100644
index 95e5f5e6c3..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.classpath
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-properties"/>
- <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/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.dtd.ui/.cvsignore b/bundles/org.eclipse.wst.dtd.ui/.cvsignore
deleted file mode 100644
index 4d45660218..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-bin
-runtime
-dtdui.jar
-*.zip
-build.xml
-temp.folder
-@dot
-javaCompiler...args
diff --git a/bundles/org.eclipse.wst.dtd.ui/.options b/bundles/org.eclipse.wst.dtd.ui/.options
deleted file mode 100644
index 35173eb372..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.dtd.ui/projectionperf=false
diff --git a/bundles/org.eclipse.wst.dtd.ui/.project b/bundles/org.eclipse.wst.dtd.ui/.project
deleted file mode 100644
index 16b209c4e8..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.project
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.dtd.ui</name>
- <comment></comment>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index afa5c91352..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.ui/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 7ec5750225..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 4792166435..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,79 +0,0 @@
-#Sat Mar 24 02:57:35 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.wst.dtd.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 301c7adde6..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.ui/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index c59368c5e1..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fc522bba76..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index d32f9730e5..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,40 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.dtd.ui; singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Bundle-Activator: org.eclipse.wst.dtd.ui.internal.DTDUIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.dtd.ui,
- org.eclipse.wst.dtd.ui.internal;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.dnd;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.editor;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.preferences;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.projection;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.properties.section;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.registry;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.style;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.templates;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.text;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.views.properties;x-internal:=true,
- org.eclipse.wst.dtd.ui.internal.wizard;x-internal:=true,
- org.eclipse.wst.dtd.ui.views.contentoutline
-Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.common.ui;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.wst.dtd.core;bundle-version="[1.1.200,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.400,1.1.0)",
- org.eclipse.wst.common.ui;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.ui.views.properties.tabbed;bundle-version="[3.4.0,4.0.0)",
- com.ibm.icu;bundle-version="[3.8.1,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.wst.dtd.ui/about.html b/bundles/org.eclipse.wst.dtd.ui/about.html
deleted file mode 100644
index 2199df3f05..0000000000
--- a/bundles/org.eclipse.wst.dtd.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.wst.dtd.ui/build.properties b/bundles/org.eclipse.wst.dtd.ui/build.properties
deleted file mode 100644
index 0579e83909..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/build.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 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
-# Jens Lukowski/Innoopract - initial renaming/restructuring
-# David Carver, STAR - add new dtd file templates, bug 162321
-#
-###############################################################################
-bin.includes = plugin.xml,\
- icons/,\
- plugin.properties,\
- templates/,\
- META-INF/,\
- .options,\
- .,\
- about.html
-bin.excludes = bin/**,\
- @dot/**,\
- temp.folder/**
-source.. = src/,\
- src-properties/
-src.includes = build.properties
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/DTDFile.gif b/bundles/org.eclipse.wst.dtd.ui/icons/DTDFile.gif
deleted file mode 100644
index 64ee536107..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/DTDFile.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/browsebutton.gif b/bundles/org.eclipse.wst.dtd.ui/icons/browsebutton.gif
deleted file mode 100644
index 13dae59bea..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/browsebutton.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Attribute.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Attribute.gif
deleted file mode 100644
index 00bb7b475d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Attribute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Element.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Element.gif
deleted file mode 100644
index 01f4889869..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_ElementToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_ElementToConModel.gif
deleted file mode 100644
index 1a8236b8d7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_ElementToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_GroupToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_GroupToConModel.gif
deleted file mode 100644
index 8168fb34f6..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_GroupToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Attribute.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Attribute.gif
deleted file mode 100644
index a7fb780c77..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Attribute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Element.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Element.gif
deleted file mode 100644
index 3755e5e42e..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_ElementToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_ElementToConModel.gif
deleted file mode 100644
index 1a58e11192..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_ElementToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_GroupToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_GroupToConModel.gif
deleted file mode 100644
index d525a21e73..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_GroupToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/newdtd_wiz.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/newdtd_wiz.gif
deleted file mode 100644
index 33f634f274..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/newdtd_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Attribute.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Attribute.gif
deleted file mode 100644
index 00bb7b475d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Attribute.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Element.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Element.gif
deleted file mode 100644
index 01f4889869..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_ElementToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_ElementToConModel.gif
deleted file mode 100644
index 1a8236b8d7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_ElementToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_GroupToConModel.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_GroupToConModel.gif
deleted file mode 100644
index 8168fb34f6..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_GroupToConModel.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/generate_xml.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/generate_xml.gif
deleted file mode 100644
index 0fd5dd8913..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/generate_xml.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/newdtd_wiz.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/newdtd_wiz.gif
deleted file mode 100644
index 10b1a77cda..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/newdtd_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Comment.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Comment.gif
deleted file mode 100644
index 39611d6c63..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Comment.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity.gif
deleted file mode 100644
index cb415064e0..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity_Reference.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity_Reference.gif
deleted file mode 100644
index 5efa9b905e..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity_Reference.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Notation.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Notation.gif
deleted file mode 100644
index 57ad089a69..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Notation.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/DTDFile.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/DTDFile.gif
deleted file mode 100644
index 211c437fa9..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/DTDFile.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/newdtd_wiz.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/newdtd_wiz.gif
deleted file mode 100644
index 2c115ff961..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/newdtd_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/organize_dtd_logically.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/organize_dtd_logically.gif
deleted file mode 100644
index 093c6bad04..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/organize_dtd_logically.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sort.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sort.gif
deleted file mode 100644
index 23c5d0b11c..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sort.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sourceEditor.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sourceEditor.gif
deleted file mode 100644
index 75ebdb8586..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sourceEditor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/validate.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/validate.gif
deleted file mode 100644
index 86196e996f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/validate.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/wizban/newdtdfile_wiz.png b/bundles/org.eclipse.wst.dtd.ui/icons/full/wizban/newdtdfile_wiz.png
deleted file mode 100644
index 636d79261f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/icons/full/wizban/newdtdfile_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/plugin.properties b/bundles/org.eclipse.wst.dtd.ui/plugin.properties
deleted file mode 100644
index 3f5b50c3cd..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/plugin.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 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
-# Jens Lukowski/Innoopract - initial renaming/restructuring
-#
-###############################################################################
-! Properties file for component: XMDTD - XML Tools DTD Editor
-! Packaged for translation in: xml.zip
-
-providerName=Eclipse.org
-pluginName=SSE DTD Source Editor
-
-DTD_Source_Page_Editor.name=DTD Editor
-_UI_LABEL_DTD_FILES=DTD Files
-DTD_Templates.name=Templates
-_UI_LABEL_DTD_STYLES=Styles
-DTD_Syntax_Coloring=Syntax Coloring
-_UI_WIZARD_NEW_DTD=DTD
-_UI_CREATE_NEW_DTD_FILE=Create a new DTD file
-##
-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
-##
-AddTask.label=Add &Task...
-AddTask.tooltip=Add Task...
-AddBookmark.label=Add Boo&kmark...
-AddBookmark.tooltip=Add Bookmark...
-SelectRuler.label=Select Ruler
-##
-_UI_MENU_VALIDATE_DTD = &Validate DTD File
-
-DTD_New_context_type_Extension_Element.name=New DTD
-_UI_LABEL_GENERAL=General
-_UI_LABEL_OTHER=Other
-_UI_LABEL_ATTRIBUTES=Attributes
-_UI_LABEL_DOCUMENTATION=Documentation
-##
-preferenceKeywords.files=editor dtd creating files suffix specified
-preferenceKeywords.templates=editor dtd templates snippet macros
-preferenceKeywords.styles=editor dtd style customize syntax highlighting type text content foreground background bold color
-
-Colors.dtdDefault=DTD Default
-Colors.dtdTag=DTD Tag
-Colors.dtdTagName=DTD Tag Name
-Colors.dtdComment=DTD Comment
-Colors.dtdKeyword=DTD Keyword
-Colors.dtdString=DTD String
-Colors.dtdData=DTD Data
-Colors.dtdSymbol=DTD Symbol
- \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/plugin.xml b/bundles/org.eclipse.wst.dtd.ui/plugin.xml
deleted file mode 100644
index 415c252dc6..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/plugin.xml
+++ /dev/null
@@ -1,475 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.ui.editors">
- <!-- class="org.eclipse.wst.sse.ui.StructuredTextEditor" -->
- <editor
- name="%DTD_Source_Page_Editor.name"
- icon="$nl$/icons/full/obj16/DTDFile.gif"
- contributorClass="org.eclipse.wst.dtd.ui.internal.editor.ActionContributorDTD"
- class="org.eclipse.wst.dtd.ui.internal.DTDEditor"
- symbolicFontName="org.eclipse.wst.sse.ui.textfont"
- id="org.eclipse.wst.dtd.core.dtdsource.source">
- <contentTypeBinding
- contentTypeId="org.eclipse.wst.dtd.core.dtdsource" />
- </editor>
- </extension>
-
- <extension point="org.eclipse.wst.sse.ui.editorConfiguration">
- <contentOutlineConfiguration
- class="org.eclipse.wst.dtd.ui.views.contentoutline.DTDContentOutlineConfiguration"
- target="org.eclipse.wst.dtd.core.dtdsource" />
- <sourceViewerConfiguration
- class="org.eclipse.wst.dtd.ui.StructuredTextViewerConfigurationDTD"
- target="org.eclipse.wst.dtd.core.dtdsource" />
- <provisionalConfiguration
- type="characterpairmatcher"
- class="org.eclipse.wst.dtd.ui.internal.text.DTDDocumentRegionEdgeMatcher"
- target="org.eclipse.wst.dtd.core.dtdsource" />
- <!-- comment out till able to improve dtd folding
- <provisionalConfiguration
- type="structuredtextfoldingprovider"
- class="org.eclipse.wst.dtd.ui.internal.projection.StructuredTextFoldingProviderDTD"
- target="org.eclipse.wst.dtd.core.dtdsource" />
- -->
- <provisionalDefinition
- type="preferencepages"
- value="org.eclipse.wst.dtd.ui.preferences.dtd, org.eclipse.wst.sse.ui.preferences.dtd.templates, org.eclipse.wst.sse.ui.preferences.dtd.styles"
- target="org.eclipse.wst.dtd.core.dtdsource" />
- <!-- provide syntax highlighting for DTD subset within XML -->
- <provisionalConfiguration
- type="linestyleprovider"
- class="org.eclipse.wst.dtd.ui.internal.style.LineStyleProviderForDTDSubSet"
- target="org.eclipse.wst.xml.dtd.internal_subset" />
- <provisionalDefinition
- type="spellingregions"
- value="org.eclipse.wst.dtd.core.internal.util.parser.DTDRegionTypes.COMMENT_CONTENT"
- target="org.eclipse.wst.dtd.core.dtdsource" />
- </extension>
-
- <extension point="org.eclipse.ui.editorActions">
- <editorContribution
- id="org.eclipse.wst.dtd.core.dtdsource.source.editorActions"
- targetID="org.eclipse.wst.dtd.core.dtdsource.source">
- <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.wst.dtd.core.dtdsource.source"
- id="org.eclipse.wst.dtd.core.dtdsource.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>
-
- <!-- use a specific annotation model with FileBuffers -->
- <extension
- point="org.eclipse.core.filebuffers.annotationModelCreation">
- <factory
- contentTypeId="org.eclipse.wst.dtd.core.dtdsource"
- class="org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModelFactory" />
- </extension>
-
- <!-- Register the UI adapter factory provider -->
- <extension
- point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
- <adapterFactoryDescription
- class="org.eclipse.wst.dtd.ui.internal.registry.AdapterFactoryProviderForDTD">
- <contentType id="org.eclipse.wst.dtd.core.dtdsource" />
- </adapterFactoryDescription>
- </extension>
-
- <!-- Editor actionsets -->
- <extension point="org.eclipse.ui.actionSetPartAssociations">
- <actionSetPartAssociation
- targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
- <part id="org.eclipse.wst.dtd.core.dtdsource.source" />
- </actionSetPartAssociation>
- <actionSetPartAssociation
- targetID="org.eclipse.ui.NavigateActionSet">
- <part id="org.eclipse.wst.dtd.core.dtdsource.source" />
- </actionSetPartAssociation>
- </extension>
-
- <extension point="org.eclipse.ui.preferencePages">
- <page
- name="%_UI_LABEL_DTD_FILES"
- category="org.eclipse.wst.xml.ui.preferences.xml"
- class="org.eclipse.wst.dtd.ui.internal.preferences.DTDFilesPreferencePage"
- id="org.eclipse.wst.dtd.ui.preferences.dtd">
- <keywordReference id="org.eclipse.wst.dtd.ui.files"/>
- </page>
- <page
- name="%DTD_Templates.name"
- category="org.eclipse.wst.dtd.ui.preferences.dtd"
- class="org.eclipse.wst.dtd.ui.internal.preferences.DTDTemplatePreferencePage"
- id="org.eclipse.wst.sse.ui.preferences.dtd.templates">
- <keywordReference id="org.eclipse.wst.dtd.ui.templates"/>
- </page>
- <page
- name="%DTD_Syntax_Coloring"
- category="org.eclipse.wst.dtd.ui.preferences.dtd"
- class="org.eclipse.wst.dtd.ui.internal.preferences.DTDSyntaxColoringPage"
- id="org.eclipse.wst.sse.ui.preferences.dtd.styles">
- <keywordReference id="org.eclipse.wst.dtd.ui.styles"/>
- </page>
- </extension>
-
- <!-- Keywords for preference and properties pages -->
- <extension point="org.eclipse.ui.keywords">
- <keyword
- label="%preferenceKeywords.files"
- id="org.eclipse.wst.dtd.ui.files"/>
- <keyword
- label="%preferenceKeywords.templates"
- id="org.eclipse.wst.dtd.ui.templates"/>
- <keyword
- label="%preferenceKeywords.styles"
- id="org.eclipse.wst.dtd.ui.styles"/>
- </extension>
-
- <!-- New DTD wizard -->
- <extension point="org.eclipse.ui.newWizards">
- <wizard
- id="org.eclipse.wst.dtd.ui.internal.wizard.NewDTDWizard"
- name="%_UI_WIZARD_NEW_DTD"
- class="org.eclipse.wst.dtd.ui.internal.wizard.NewDTDWizard"
- category="org.eclipse.wst.XMLCategory"
- icon="$nl$/icons/full/etool16/newdtd_wiz.gif">
- <description>%_UI_CREATE_NEW_DTD_FILE</description>
- <selection class="org.eclipse.core.resources.IResource" />
- </wizard>
- </extension>
-
- <!-- initialize DTD ui preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.wst.dtd.ui.internal.preferences.DTDUIPreferenceInitializer" />
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <viewerContribution
- targetID="org.eclipse.wst.dtd.core.dtdsource.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>
- <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">
- </action>
- </viewerContribution>
- </extension>
-
- <!-- Templates -->
- <extension point="org.eclipse.ui.editors.templates">
- <contextType
- name="%DTD_New_context_type_Extension_Element.name"
- class="org.eclipse.wst.dtd.ui.internal.templates.TemplateContextTypeDTD"
- id="dtd_new">
- </contextType>
- <include
- file="templates/dtddefault-templates.xml"
- translations="$nl$/templates/dtddefault-templates.properties">
- </include>
- </extension>
-
- <extension
- id="org.eclipse.wst.dtd.ui.propertyContributor"
- point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
- <propertyContributor
- contributorId="org.eclipse.wst.dtd.core.dtdsource.source"
- labelProvider="org.eclipse.wst.dtd.ui.internal.properties.section.DTDSectionLabelProvider"
- typeMapper="org.eclipse.wst.dtd.ui.internal.properties.section.DTDTypeMapper">
- <propertyCategory
- category="dtd.ui.general"/>
- <propertyCategory
- category="dtd.ui.other"/>
- <propertyCategory
- category="dtd.ui.attributes"/>
- <propertyCategory
- category="dtd.ui.documentation"/>
- </propertyContributor>
- </extension>
-
- <extension
- point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
- <propertyTabs
- contributorId="org.eclipse.wst.dtd.core.dtdsource.source">
- <propertyTab
- label="%_UI_LABEL_GENERAL"
- category="dtd.ui.general"
- id="org.eclipse.wst.dtd.ui.general"/>
- <propertyTab
- afterTab="org.eclipse.wst.dtd.ui.general"
- category="dtd.ui.attributes"
- id="org.eclipse.wst.dtd.ui.attributes"
- label="%_UI_LABEL_ATTRIBUTES"/>
- <propertyTab
- afterTab="org.eclipse.wst.dtd.ui.attributes"
- category="dtd.ui.other"
- id="org.eclipse.wst.dtd.ui.other"
- label="%_UI_LABEL_OTHER"/>
- <propertyTab
- afterTab="org.eclipse.wst.dtd.ui.attributes"
- category="dtd.ui.documentation"
- id="org.eclipse.wst.dtd.ui.documentation"
- label="%_UI_LABEL_DOCUMENTATION"/>
- </propertyTabs>
- </extension>
-
-<extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
- <propertySections contributorId="org.eclipse.wst.dtd.core.dtdsource.source">
- <propertySection
- class="org.eclipse.wst.dtd.ui.internal.properties.section.NameSection"
- enablesFor="1"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.NameSection"
- tab="org.eclipse.wst.dtd.ui.general">
- <input type="org.eclipse.wst.dtd.core.internal.Element"/>
- <input type="org.eclipse.wst.dtd.core.internal.Attribute"/>
- <input type="org.eclipse.wst.dtd.core.internal.AttributeList"/>
- <input type="org.eclipse.wst.dtd.core.internal.Notation"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.general"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.AttributeDefaultSection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.AttributeDefaultSection">
- <input type="org.eclipse.wst.dtd.core.internal.Attribute"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.general"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.CommentSection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.CommentSection">
- <input type="org.eclipse.wst.dtd.core.internal.Comment"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.general"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelGroupSection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelGroupSection">
- <input type="org.eclipse.wst.dtd.core.internal.CMGroupNode"/>
- </propertySection>
-
- <propertySection
- class="org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelNameSection"
- filter="org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelNameFilter"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelNameSection"
- enablesFor="1"
- tab="org.eclipse.wst.dtd.ui.general">
- <input type="org.eclipse.wst.dtd.core.internal.CMBasicNode"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.other"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelTypeSection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelTypeSection">
- <input type="org.eclipse.wst.dtd.core.internal.CMBasicNode"/>
- <input type="org.eclipse.wst.dtd.core.internal.CMGroupNode"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.documentation"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.DocumentSection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.DocumentSection">
- <input type="org.eclipse.wst.dtd.core.internal.Element"/>
- <input type="org.eclipse.wst.dtd.core.internal.Entity"/>
- <input type="org.eclipse.wst.dtd.core.internal.AttributeList"/>
- <input type="org.eclipse.wst.dtd.core.internal.Notation"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.general"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.EmptySection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.EmptySection">
- <input type="org.eclipse.wst.dtd.core.internal.ParameterEntityReference"/>
- <input type="org.eclipse.wst.sse.core.internal.provisional.IndexedRegion"/>
- </propertySection>
-
- <!--
- <propertySection tab="org.eclipse.wst.dtd.ui.other"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.EntityTypeSection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.EntityTypeSection">
- <input type="org.eclipse.wst.dtd.core.internal.Entity"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.attributes"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.EntityValueSection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.EntityValueSection">
- <input type="org.eclipse.wst.dtd.core.internal.Entity"/>
- </propertySection>
- -->
-
- <propertySection tab="org.eclipse.wst.dtd.ui.general"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.NewEntitySection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.NewEntitySection">
- <input type="org.eclipse.wst.dtd.core.internal.DTDFile"/>
- <input type="org.eclipse.wst.dtd.core.internal.Entity"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.general"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.NotationSection"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.NotationSection">
- <input type="org.eclipse.wst.dtd.core.internal.Notation"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.attributes"
- enablesFor="1"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.OccurrenceSection"
- filter="org.eclipse.wst.dtd.ui.internal.properties.section.OccurrenceFilter"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.OccurrenceSection">
- <input type="org.eclipse.wst.dtd.core.internal.CMBasicNode"/>
- <input type="org.eclipse.wst.dtd.core.internal.CMRepeatableNode"/>
- </propertySection>
-
- <propertySection tab="org.eclipse.wst.dtd.ui.attributes"
- class="org.eclipse.wst.dtd.ui.internal.properties.section.TypeSection"
- enablesFor="1"
- id="org.eclipse.wst.dtd.ui.internal.properties.section.TypeSection">
- <input type="org.eclipse.wst.dtd.core.internal.Attribute"/>
- </propertySection>
- </propertySections>
-</extension>
-
- <!-- Define theme -->
- <extension
- point="org.eclipse.ui.themes">
- <theme
- id="org.eclipse.ui.ide.systemDefault">
- <colorOverride
- id="dtdDefault"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="dtdTag"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="dtdTagName"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="dtdComment"
- value="COLOR_LIST_SELECTION">
- </colorOverride>
- <colorOverride
- id="dtdKeyword"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="dtdString"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="dtdData"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- <colorOverride
- id="dtdSymbol"
- value="COLOR_LIST_FOREGROUND">
- </colorOverride>
- </theme>
- <colorDefinition
- id="dtdDefault"
- isEditable="false"
- label="%Colors.dtdDefault"
- value="0, 0, 0">
- </colorDefinition>
- <colorDefinition
- id="dtdTag"
- isEditable="false"
- label="%Colors.dtdTag"
- value="63, 63, 191">
- </colorDefinition>
- <colorDefinition
- id="dtdTagName"
- isEditable="false"
- label="%Colors.dtdTagName"
- value="63, 63, 191">
- </colorDefinition>
- <colorDefinition
- id="dtdComment"
- isEditable="false"
- label="%Colors.dtdComment"
- value="127, 127, 127">
- </colorDefinition>
- <colorDefinition
- id="dtdKeyword"
- isEditable="false"
- label="%Colors.dtdKeyword"
- value="128, 0, 0">
- </colorDefinition>
- <colorDefinition
- id="dtdString"
- isEditable="false"
- label="%Colors.dtdString"
- value="63, 159, 95">
- </colorDefinition>
- <colorDefinition
- id="dtdData"
- isEditable="false"
- label="%Colors.dtdData"
- value="191, 95, 95">
- </colorDefinition>
- <colorDefinition
- id="dtdSymbol"
- isEditable="false"
- label="%Colors.dtdSymbol"
- value="128, 0, 0">
- </colorDefinition>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDEditor.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDEditor.java
deleted file mode 100644
index 9dad7fb04b..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDEditor.java
+++ /dev/null
@@ -1,102 +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.wst.dtd.ui.internal;
-
-import org.eclipse.jface.viewers.IPostSelectionProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-/**
- * A DTD Editor subclass StructuredTextEditor, required to supply a complete
- * replacement for the property sheet page. When a better solution is found,
- * this class will be removed.
- */
-public class DTDEditor extends StructuredTextEditor {
- class DTDPropertySheetPageContributor implements ITabbedPropertySheetPageContributor {
- DTDPropertySheetPageContributor() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor#getContributorId()
- */
- public String getContributorId() {
- return getEditorSite().getId();
- }
- }
-
- TabbedPropertySheetPage fPropertySheetPage;
-
- public DTDEditor() {
- super();
- }
-
- /*
- * @see IAdaptable#getAdapter(Class)
- */
- public Object getAdapter(Class required) {
- if (IPropertySheetPage.class.equals(required)) {
- if (fPropertySheetPage == null) {
- fPropertySheetPage = new DTDTabbedPropertySheetPage(new DTDPropertySheetPageContributor());
- /*
- * Add the property sheet page as a direct post selection
- * listener so standard cursor navigation triggers a selection
- * notification. The default tabbed property sheet does not
- * listen to post selection.
- */
- ((IPostSelectionProvider) getSelectionProvider()).addPostSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- if (fPropertySheetPage != null && !fPropertySheetPage.getControl().isDisposed()) {
- fPropertySheetPage.selectionChanged(DTDEditor.this, getSelectionProvider().getSelection());
- }
- }
- });
- }
- return fPropertySheetPage;
- }
- return super.getAdapter(required);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.StructuredTextEditor#init(org.eclipse.ui.IEditorSite,
- * org.eclipse.ui.IEditorInput)
- */
- public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
- super.init(site, editorInput);
-
- IWorkbenchWindow dw = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage page = dw.getActivePage();
- try {
- if (page != null) {
- page.showView(IPageLayout.ID_PROP_SHEET);
- }
- }
- catch (PartInitException e) {
- Logger.logException(e);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.java
deleted file mode 100644
index eb8f90c80e..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.java
+++ /dev/null
@@ -1,117 +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.wst.dtd.ui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.osgi.util.NLS;
-
-public class DTDPropertiesMessages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages"; //$NON-NLS-1$
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.OccurrenceSection.java
- public static String _UI_ONCE;
- public static String _UI_ONE_OR_MORE;
- public static String _UI_OPTIONAL;
- public static String _UI_ZERO_OR_MORE;
- public static String _UI_LABEL_OCCURRENCE;
- // org.eclipse.wst.dtd.ui.internal.properties.section.AttribueDefaultSection.java
- public static String _UI_DEFAULT;
- public static String _UI_LABEL_USAGE;
- public static String _UI_LABEL_DEFAULT_VALUE;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelGroupSection.java
- public static String _UI_SEQUENCE;
- public static String _UI_CHOICE;
- public static String _UI_LABEL_MODEL_GROUP;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelNameSection.java
- public static String _UI_LABEL_CONTENT_MODEL;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelTypeSection.java
- public static String _UI_LABEL_CONTENT_TYPE;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.NameSection.java
- public static String _UI_LABEL_NAME;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.TypeSection.java
- public static String _UI_LABEL_TYPE;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.EntityTypeSection.java
- public static String _UI_LABEL_ENTITY_TYPE;
- public static String _UI_LABEL_EXTERNAL_ENTITY;
- public static String _UI_LABEL_PARAMETER_ENTITY;
- public static String _UI_LABEL_GENERAL_ENTITY;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.EntityValueSection.java
- public static String _UI_LABEL_ENTITY_VALUE;
- public static String _UI_LABEL_PUBLIC_ID;
- public static String _UI_LABEL_SYSTEM_ID;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.DTDSectionLabelProvider
- public static String _UI_PROPERTIES_VIEW_TITLE_ELEMENT;
- public static String _UI_PROPERTIES_VIEW_TITLE_ELEMENT_REF;
- public static String _UI_PROPERTIES_VIEW_TITLE_CHOICE;
- public static String _UI_PROPERTIES_VIEW_TITLE_SEQUENCE;
- public static String _UI_PROPERTIES_VIEW_TITLE_ATTRIBUTE;
- public static String _UI_PROPERTIES_VIEW_TITLE_ATTLIST;
- public static String _UI_PROPERTIES_VIEW_TITLE_COMMENT;
- public static String _UI_PROPERTIES_VIEW_TITLE_ENTITY;
- public static String _UI_PROPERTIES_VIEW_TITLE_NOTATION;
-
- // org.eclipse.wst.dtd.ui.internal.properties.section.NewEntitySection
- public static String _UI_FILEDIALOG_SELECT_DTD;
- public static String _UI_FILEDIALOG_SELECT_DTD_DESC;
-
- // New property tabs
- public static String _UI_LABEL_GENERAL;
- public static String _UI_LABEL_OTHER;
- public static String _UI_LABEL_ATTRIBUTES;
- public static String _UI_LABEL_DOCUMENTATION;
- public static String DTDEditor_0;
- public static String DTDEditor_1;
- public static String DTDEditor_2;
- public static String DTDEditor_3;
- public static String DTDSectionLabelProvider_0;
- public static String DTDSectionLabelProvider_1;
- public static String DTDSectionLabelProvider_10;
- public static String DTDSectionLabelProvider_11;
- public static String DTDSectionLabelProvider_6;
- public static String DTDSectionLabelProvider_7;
- public static String DTDSectionLabelProvider_8;
- public static String DTDSectionLabelProvider_9;
-
- private static ResourceBundle fResourceBundle;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, DTDPropertiesMessages.class);
- }
-
- public static ResourceBundle getResourceBundle() {
- try {
- if (fResourceBundle == null)
- fResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
- }
- catch (MissingResourceException x) {
- fResourceBundle = null;
- }
- return fResourceBundle;
- }
-
- private DTDPropertiesMessages() {
- super();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.properties b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.properties
deleted file mode 100644
index dd19ba9c32..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.properties
+++ /dev/null
@@ -1,86 +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
-###############################################################################
-! Properties file for component: XML tools DTD Editor
-! Packaged for translation in: xml.zip
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.OccurrenceSection.java
-_UI_ONCE = Just once (1)
-_UI_ONE_OR_MORE = One or more (+)
-_UI_OPTIONAL = Optional (?)
-_UI_ZERO_OR_MORE = Zero or more (*)
-_UI_LABEL_OCCURRENCE = Occurrence
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.AttributeDefaultSection.java
-_UI_DEFAULT = Default
-_UI_LABEL_USAGE = Usage
-_UI_LABEL_DEFAULT_VALUE = Default Value
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelGroupSection.java
-_UI_SEQUENCE = Sequence (,)
-_UI_CHOICE = Choice (|)
-_UI_LABEL_MODEL_GROUP = Model Group
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelNameSection.java
-_UI_LABEL_CONTENT_MODEL = Content Model
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.ContentModelTypeSection.java
-_UI_LABEL_CONTENT_TYPE = Content Type
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.NameSection.java
-_UI_LABEL_NAME = Name
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.TypeSection.java
-_UI_LABEL_TYPE = Type
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.EntityTypeSection.java
-_UI_LABEL_ENTITY_TYPE = Entity Type
-_UI_LABEL_EXTERNAL_ENTITY = External
-_UI_LABEL_PARAMETER_ENTITY = Parameter
-_UI_LABEL_GENERAL_ENTITY = General
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.EntityValueSection.java
-_UI_LABEL_ENTITY_VALUE = Entity Value
-_UI_LABEL_PUBLIC_ID = Public ID
-_UI_LABEL_SYSTEM_ID = System ID
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.DTDSectionLabelProvider
-_UI_PROPERTIES_VIEW_TITLE_ELEMENT = element
-_UI_PROPERTIES_VIEW_TITLE_ELEMENT_REF = element reference
-_UI_PROPERTIES_VIEW_TITLE_CHOICE = choice
-_UI_PROPERTIES_VIEW_TITLE_SEQUENCE = sequence
-_UI_PROPERTIES_VIEW_TITLE_ATTRIBUTE = attribute
-_UI_PROPERTIES_VIEW_TITLE_ATTLIST = attribute list
-_UI_PROPERTIES_VIEW_TITLE_COMMENT = comment
-_UI_PROPERTIES_VIEW_TITLE_ENTITY = entity
-_UI_PROPERTIES_VIEW_TITLE_NOTATION = notation
-
-! org.eclipse.wst.dtd.ui.internal.properties.section.NewEntitySection
-_UI_FILEDIALOG_SELECT_DTD = Select DTD file
-_UI_FILEDIALOG_SELECT_DTD_DESC = Select a DTD file from the Workbench projects
-
-! New property tabs
-_UI_LABEL_GENERAL = General
-_UI_LABEL_OTHER = Other
-_UI_LABEL_ATTRIBUTES = Attributes
-_UI_LABEL_DOCUMENTATION = Documentation
-! end
-DTDEditor_0=general
-DTDEditor_1=other
-DTDEditor_2=attributes
-DTDEditor_3=documentation
-DTDSectionLabelProvider_0=choice
-DTDSectionLabelProvider_1=sequence
-DTDSectionLabelProvider_6=element
-DTDSectionLabelProvider_7=attribute
-DTDSectionLabelProvider_8=attribute list
-DTDSectionLabelProvider_9=comment
-DTDSectionLabelProvider_10=entity
-DTDSectionLabelProvider_11=notation
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDTabbedPropertySheetPage.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDTabbedPropertySheetPage.java
deleted file mode 100644
index 10ca85e64c..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDTabbedPropertySheetPage.java
+++ /dev/null
@@ -1,49 +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.wst.dtd.ui.internal;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-class DTDTabbedPropertySheetPage extends TabbedPropertySheetPage {
-
- private ISelection oldSelection = null;
-
- public DTDTabbedPropertySheetPage(ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor) {
- super(tabbedPropertySheetPageContributor);
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- IWorkbenchWindow workbenchWindow = getSite().getWorkbenchWindow();
- if (workbenchWindow != null) {
- IWorkbenchPage activePage = workbenchWindow.getActivePage();
- if (activePage != null) {
- IEditorPart activeEditor = activePage.getActiveEditor();
- if (activeEditor != null) {
- // make sure the correct editor is active
- if (activeEditor.getAdapter(IPropertySheetPage.class) == DTDTabbedPropertySheetPage.this) {
- if (oldSelection == null || !oldSelection.equals(selection)) {
- oldSelection = selection;
- super.selectionChanged(part, selection);
- }
- }
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/AbstractSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/AbstractSection.java
deleted file mode 100644
index 26747413e9..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/AbstractSection.java
+++ /dev/null
@@ -1,334 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.part.EditorActionBarContributor;
-import org.eclipse.ui.views.properties.tabbed.ISection;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
-import org.w3c.dom.Element;
-
-public class AbstractSection implements ISection, IPropertyChangeListener, Listener, SelectionListener {
- private TabbedPropertySheetWidgetFactory factory;
- protected IWorkbenchPart fWorkbenchPart;
- protected ISelection fSelection;
- protected Object fInput;
- protected int rightMarginSpace;
-
- public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
- createControls(parent, tabbedPropertySheetPage.getWidgetFactory());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory aFactory) {
- this.factory = aFactory;
- GC gc = new GC(parent);
- Point extent = gc.textExtent(" ... "); //$NON-NLS-1$
- rightMarginSpace = extent.x;
- gc.dispose();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#setInput(org.eclipse.ui.IWorkbenchPart,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void setInput(IWorkbenchPart part, ISelection sel) {
- Assert.isTrue(sel instanceof IStructuredSelection, "selection " + sel.getClass() + "is not structured"); //$NON-NLS-1$ //$NON-NLS-2$
- this.fWorkbenchPart = part;
- this.fSelection = sel;
- this.fInput = ((IStructuredSelection) fSelection).getFirstElement();
- /*
- * if (fInput instanceof XSDConcreteComponent) { xsdSchema =
- * ((XSDConcreteComponent)fInput).getSchema(); }
- */
-
- // refresh();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#aboutToBeShown()
- */
- public void aboutToBeShown() {
- refresh();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#aboutToBeHidden()
- */
- public void aboutToBeHidden() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#dispose()
- */
- public void dispose() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#getMinimumHeight()
- */
- public int getMinimumHeight() {
- return SWT.DEFAULT;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#shouldUseExtraSpace()
- */
- public boolean shouldUseExtraSpace() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#refresh()
- */
- public void refresh() {
- // TODO Auto-generated method stub
- }
-
- public Object getInput() {
- if (fInput instanceof Element) {
- // fInput = xsdSchema.getCorrespondingComponent((Element)fInput);
- }
- return fInput;
- }
-
- /**
- * Get the widget factory.
- *
- * @return the widget factory.
- */
- public TabbedPropertySheetWidgetFactory getWidgetFactory() {
- return factory;
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- refresh();
- }
-
- public void doWidgetDefaultSelected(SelectionEvent e) {
- }
-
- public void doWidgetSelected(SelectionEvent e) {
- }
-
- /**
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- if (isListenerEnabled() && getInput() != null && !isInDoHandle) {
- isInDoHandle = true;
- doWidgetDefaultSelected(e);
- isInDoHandle = false;
- }
-
- }
-
- /**
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- if (isListenerEnabled() && getInput() != null && !isInDoHandle) {
- isInDoHandle = true;
- doWidgetSelected(e);
- isInDoHandle = false;
- }
-
- }
-
- boolean listenerEnabled = true;
-
- /**
- * Get the value of listenerEnabled.
- *
- * @return value of listenerEnabled.
- */
- public boolean isListenerEnabled() {
- return listenerEnabled;
- }
-
- /**
- * Set the value of listenerEnabled.
- *
- * @param v
- * Value to assign to listenerEnabled.
- */
- public void setListenerEnabled(boolean v) {
- this.listenerEnabled = v;
- }
-
- public void handleEvent(Event event) {
- if (isListenerEnabled() && !isInDoHandle) {
- isInDoHandle = true;
- startDelayedEvent(event);
- isInDoHandle = false;
- } // end of if ()
- }
-
- public void doHandleEvent(Event event) {
-
- }
-
- protected DelayedEvent delayedTask;
-
- protected void startDelayedEvent(Event e) {
- if (delayedTask == null || delayedTask.getEvent() == null) {
- delayedTask = new DelayedEvent();
- delayedTask.setEvent(e);
- Display.getDefault().timerExec(500, delayedTask);
- }
- else {
- Event delayedEvent = delayedTask.getEvent();
-
- if (e.widget == delayedEvent.widget && e.type == delayedEvent.type) {
- // same event, just different data, delay new event
- delayedTask.setEvent(null);
- }
- delayedTask = new DelayedEvent();
- delayedTask.setEvent(e);
- Display.getDefault().timerExec(500, delayedTask);
- }
- }
-
- class DelayedEvent implements Runnable {
- protected Event event;
-
- /*
- * @see Runnable#run()
- */
- public void run() {
- if (event != null) {
- isInDoHandle = true;
- doHandleEvent(event);
- isInDoHandle = false;
- event = null;
- }
- }
-
- /**
- * Gets the event.
- *
- * @return Returns a Event
- */
- public Event getEvent() {
- return event;
- }
-
- /**
- * Sets the event.
- *
- * @param event
- * The event to set
- */
- public void setEvent(Event e) {
- this.event = e;
- }
-
- }
-
- boolean isInDoHandle;
-
- /**
- * Get the value of isInDoHandle.
- *
- * @return value of isInDoHandle.
- */
- public boolean isInDoHandle() {
- return isInDoHandle;
- }
-
- static protected IEditorPart getActiveEditor() {
- IWorkbench workbench = DTDUIPlugin.getDefault().getWorkbench();
- IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
- IEditorPart editorPart = workbenchWindow.getActivePage().getActiveEditor();
-
- return editorPart;
- }
-
- static protected IStatusLineManager getStatusLineManager(IEditorPart editorPart) {
- IStatusLineManager result = null;
- try {
- EditorActionBarContributor contributor = (EditorActionBarContributor) editorPart.getEditorSite().getActionBarContributor();
- result = contributor.getActionBars().getStatusLineManager();
- }
- catch (Exception e) {
- }
- return result;
- }
-
- DocumentImpl getDocument(Element element) {
- return (DocumentImpl) element.getOwnerDocument();
- }
-
- public void beginRecording(String description, Element element) {
- DocumentImpl doc = getDocument(element);
- doc.getModel().beginRecording(this, description);
- }
-
- public void endRecording(Element element) {
- DocumentImpl doc = getDocument(element);
-
- doc.getModel().endRecording(this);
- }
-
- protected boolean validateName(String name) {
- return true;
- }
-
- protected boolean validateLanguage(String lang) {
- return true;
- }
-
- protected boolean validatePrefix(String prefix) {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/AttributeDefaultSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/AttributeDefaultSection.java
deleted file mode 100644
index 224b1856f8..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/AttributeDefaultSection.java
+++ /dev/null
@@ -1,152 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class AttributeDefaultSection extends AbstractSection {
-
- private final String IMPLIED = Attribute.IMPLIED;
- private final String REQUIRED = Attribute.REQUIRED;
- private final String FIXED = Attribute.FIXED;
-
- private CCombo usageCombo;
- private String[] usageComboValues = {IMPLIED, REQUIRED, FIXED, DTDPropertiesMessages._UI_DEFAULT};
- private Text defaultValueText;
- private CLabel defaultValueLabel;
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- CLabel usageLabel = getWidgetFactory().createCLabel(composite, DTDPropertiesMessages._UI_LABEL_USAGE);
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = usageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- usageLabel.setLayoutData(data);
-
- usageCombo = getWidgetFactory().createCCombo(composite, SWT.FLAT);
- data = new FormData();
- data.left = new FormAttachment(usageLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(usageLabel, 0, SWT.CENTER);
- usageCombo.setLayoutData(data);
- usageCombo.addSelectionListener(this);
- usageCombo.setItems(usageComboValues);
-
- // Create label first then attach other control to it
- defaultValueLabel = getWidgetFactory().createCLabel(composite, DTDPropertiesMessages._UI_LABEL_DEFAULT_VALUE);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- p = defaultValueLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(usageLabel, +ITabbedPropertyConstants.VSPACE);
- defaultValueLabel.setLayoutData(data);
-
- defaultValueText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(defaultValueLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(defaultValueLabel, 0, SWT.CENTER);
- defaultValueText.setLayoutData(data);
- defaultValueText.addListener(SWT.Modify, this);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- Object input = getInput();
- if (input != null) {
- if (input instanceof Attribute) {
- String kind = ((Attribute) input).getDefaultKind();
- if ("".equals(kind)) //$NON-NLS-1$
- usageCombo.setText(DTDPropertiesMessages._UI_DEFAULT);
- else
- usageCombo.setText(kind);
-
- if ("".equals(kind) || FIXED.equals(kind)) { //$NON-NLS-1$
- defaultValueLabel.setVisible(true);
- defaultValueText.setVisible(true);
- defaultValueText.setEnabled(true);
- defaultValueText.setText(((Attribute) input).getDefaultValue());
- }
- else {
- defaultValueText.setText(""); //$NON-NLS-1$
- defaultValueLabel.setVisible(false);
- defaultValueText.setVisible(false);
- defaultValueText.setEnabled(false);
- }
- }
- }
- setListenerEnabled(true);
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (e.widget == usageCombo) {
- Object input = getInput();
- if (input instanceof Attribute) {
- String usage = usageCombo.getText();
- Attribute attribute = (Attribute) input;
- if (usage.equals(DTDPropertiesMessages._UI_DEFAULT))
- attribute.setDefaultKind(""); //$NON-NLS-1$
- else
- attribute.setDefaultKind(usage);
-
- if (DTDPropertiesMessages._UI_DEFAULT.equals(usage) || FIXED.equals(usage)) {
- defaultValueLabel.setVisible(true);
- defaultValueText.setVisible(true);
- defaultValueText.setEnabled(true);
- }
- else {
- defaultValueLabel.setVisible(false);
- defaultValueText.setVisible(false);
- defaultValueText.setEnabled(false);
- }
- }
- }
- }
-
- public void doHandleEvent(Event event) {
- Object input = getInput();
- if (input instanceof Attribute) {
- if (event.widget == defaultValueText) {
- String newValue = defaultValueText.getText();
- ((Attribute) input).setDefaultValue(newValue, usageCombo.getText().equals(FIXED));
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/CommentSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/CommentSection.java
deleted file mode 100644
index 1c9f2dff2a..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/CommentSection.java
+++ /dev/null
@@ -1,76 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.Comment;
-
-public class CommentSection extends AbstractSection {
- private Text commentText;
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
-
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
- commentText = getWidgetFactory().createText(composite, "", SWT.MULTI | SWT.NONE); //$NON-NLS-1$
- commentText.addListener(SWT.Modify, CommentSection.this);
-
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(0, 0);
- data.bottom = new FormAttachment(100, 0);
- commentText.setLayoutData(data);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- commentText.setEnabled(true);
- Object input = getInput();
- commentText.setText(""); //$NON-NLS-1$
- if (input != null) {
- if (input instanceof Comment)
- commentText.setText(((Comment) input).getText());
- }
- setListenerEnabled(true);
- }
-
-
- public void doHandleEvent(Event event) {
- Object input = getInput();
- if (input != null) {
- String newValue = commentText.getText();
- if (newValue.length() > 0 && input instanceof Comment) {
- Comment comment = (Comment) input;
- comment.setText(newValue);
- }
- }
-
- }
-
- public boolean shouldUseExtraSpace() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelGroupSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelGroupSection.java
deleted file mode 100644
index 575185a093..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelGroupSection.java
+++ /dev/null
@@ -1,95 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class ContentModelGroupSection extends AbstractSection {
- private final String SEQUENCE = DTDPropertiesMessages._UI_SEQUENCE;
- private final String CHOICE = DTDPropertiesMessages._UI_CHOICE;
- private final String MODEL_GROUP = DTDPropertiesMessages._UI_LABEL_MODEL_GROUP;
-
- private CCombo modelGroupCombo;
- private String[] modelGroupComboValues = {SEQUENCE, CHOICE};
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- CLabel cLabel = getWidgetFactory().createCLabel(composite, MODEL_GROUP);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = cLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- cLabel.setLayoutData(data);
-
- modelGroupCombo = getWidgetFactory().createCCombo(composite, SWT.FLAT);
- data = new FormData();
- data.left = new FormAttachment(cLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100);
- data.top = new FormAttachment(cLabel, 0, SWT.CENTER);
- modelGroupCombo.setLayoutData(data);
- modelGroupCombo.addSelectionListener(this);
- modelGroupCombo.setItems(modelGroupComboValues);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- Object input = getInput();
- if (input != null) {
- if (input instanceof CMGroupNode) {
- CMGroupNode node = (CMGroupNode) input;
- char modelType = node.getConnector();
- if (CMGroupNode.CHOICE == modelType)
- modelGroupCombo.setText(CHOICE);
- else if (CMGroupNode.SEQUENCE == modelType)
- modelGroupCombo.setText(SEQUENCE);
- }
- }
- setListenerEnabled(true);
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (e.widget == modelGroupCombo) {
- Object input = getInput();
- if (input instanceof CMGroupNode) {
- CMGroupNode node = (CMGroupNode) input;
- if (CHOICE.equals(modelGroupCombo.getText()))
- node.setConnector(CMGroupNode.CHOICE);
- else if (SEQUENCE.equals(modelGroupCombo.getText()))
- node.setConnector(CMGroupNode.SEQUENCE);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelNameFilter.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelNameFilter.java
deleted file mode 100644
index 7150bff71c..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelNameFilter.java
+++ /dev/null
@@ -1,21 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-
-public class ContentModelNameFilter implements IFilter {
- public boolean select(Object toTest) {
- return toTest instanceof CMBasicNode && !((CMBasicNode) toTest).isRootElementContent();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelNameSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelNameSection.java
deleted file mode 100644
index dfb1ecf3ef..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelNameSection.java
+++ /dev/null
@@ -1,110 +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.wst.dtd.ui.internal.properties.section;
-
-import java.util.Iterator;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.CMNode;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class ContentModelNameSection extends AbstractSection {
- private final String CONTENT_MODEL = DTDPropertiesMessages._UI_LABEL_CONTENT_MODEL;
-
- private CCombo typeCombo;
- private String[] typeComboValues = {CMNode.PCDATA};
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- CLabel cLabel = getWidgetFactory().createCLabel(composite, CONTENT_MODEL);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = cLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- cLabel.setLayoutData(data);
-
- typeCombo = getWidgetFactory().createCCombo(composite, SWT.FLAT | SWT.READ_ONLY);
- data = new FormData();
- data.left = new FormAttachment(cLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100);
- data.top = new FormAttachment(cLabel, 0, SWT.CENTER);
- typeCombo.setLayoutData(data);
- typeCombo.addSelectionListener(this);
- typeCombo.setItems(typeComboValues);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- Object input = getInput();
-
- if (input != null) {
- if (input instanceof CMBasicNode) {
- typeCombo.removeAll();
- typeCombo.add(CMNode.PCDATA);
- // NodeList list =
- // ((CMBasicNode)fInput).getDTDFile().getElementsAndParameterEntityReferences();
- Iterator iterator = ((CMBasicNode) input).getDTDFile().getNodes().iterator();
- boolean isForRootContent = ((CMBasicNode) input).isRootElementContent();
- while (iterator.hasNext()) {
- DTDNode node = (DTDNode) iterator.next();
- if (!isForRootContent && node instanceof Element)
- typeCombo.add(node.getName());
- if (node instanceof Entity && ((Entity) node).isParameterEntity())
- typeCombo.add("%" + node.getName() + ";"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- typeCombo.setText(((CMBasicNode) input).getName());
- }
- }
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (e.widget == typeCombo) {
- Object input = getInput();
- if (input instanceof CMBasicNode) {
- CMBasicNode node = (CMBasicNode) input;
- String selected = typeCombo.getText();
- // if (CMNode.PCDATA.equals(selected))
- node.setName(selected);
- }
- }
- }
-
- public boolean shouldUseExtraSpace() {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelTypeFilter.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelTypeFilter.java
deleted file mode 100644
index 3fdac83095..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelTypeFilter.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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-
-public class ContentModelTypeFilter implements IFilter {
- public boolean select(Object toTest) {
- if (toTest instanceof CMBasicNode && !((CMBasicNode) toTest).isRootElementContent())
- return true;
- if (toTest instanceof CMGroupNode && ((CMGroupNode) toTest).isRootElementContent())
- return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelTypeSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelTypeSection.java
deleted file mode 100644
index e64a895e02..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelTypeSection.java
+++ /dev/null
@@ -1,123 +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.wst.dtd.ui.internal.properties.section;
-
-import java.util.Iterator;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-import org.eclipse.wst.dtd.core.internal.CMNode;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class ContentModelTypeSection extends AbstractSection {
- private final String CONTENT_TYPE = DTDPropertiesMessages._UI_LABEL_CONTENT_TYPE;
-
- private CCombo typeCombo;
- private String[] typeComboValues = {CMNode.ANY, CMNode.EMPTY, CMNode.PCDATA, CMNode.CHILDREN, CMNode.MIXED};
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- CLabel cLabel = getWidgetFactory().createCLabel(composite, CONTENT_TYPE);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = cLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- cLabel.setLayoutData(data);
-
- typeCombo = getWidgetFactory().createCCombo(composite, SWT.FLAT);
- data = new FormData();
- data.left = new FormAttachment(cLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100);
- data.top = new FormAttachment(cLabel, 0, SWT.CENTER);
- typeCombo.setLayoutData(data);
- typeCombo.addSelectionListener(this);
- typeCombo.setItems(typeComboValues);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- Object input = getInput();
-
- if (input != null) {
- if (input instanceof CMNode) {
- typeCombo.removeAll();
- typeCombo.add(CMNode.ANY);
- typeCombo.add(CMNode.EMPTY);
- typeCombo.add(CMNode.PCDATA);
- typeCombo.add(CMNode.CHILDREN);
- typeCombo.add(CMNode.MIXED);
-
- Iterator iterator = ((CMNode) input).getDTDFile().getNodes().iterator();
- String nodeName = null;
- while (iterator.hasNext()) {
- DTDNode node = (DTDNode) iterator.next();
- nodeName = node.getName();
- if (node instanceof Element && typeCombo.indexOf(nodeName) == -1)
- typeCombo.add(nodeName);
- else if (node instanceof Entity && ((Entity) node).isParameterEntity() && typeCombo.indexOf(nodeName) == -1)
- typeCombo.add("%" + nodeName + ";"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (input instanceof CMGroupNode)
- typeCombo.setText(((CMGroupNode) input).getType());
- else if (input instanceof CMBasicNode)
- typeCombo.setText(((CMBasicNode) input).getType());
- }
- } // end if (fInput != null)
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (e.widget == typeCombo) {
- Object input = getInput();
- if (input instanceof CMGroupNode || input instanceof CMBasicNode) {
- CMNode node = (CMNode) input;
- String selected = typeCombo.getText();
- if (CMNode.MIXED.equals(selected))
- node.setMixedContent();
- else if (CMNode.CHILDREN.equals(selected))
- node.setChildrenContent(""); //$NON-NLS-1$
- else if (CMNode.EMPTY.equals(selected) || CMNode.ANY.equals(selected) || CMNode.PCDATA.equals(selected))
- node.setContent(selected);
- else
- node.setChildrenContent(selected);
- }
- }
- }
-
- public boolean shouldUseExtraSpace() {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSectionLabelProvider.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSectionLabelProvider.java
deleted file mode 100644
index 4bd37ac145..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSectionLabelProvider.java
+++ /dev/null
@@ -1,139 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-import org.eclipse.wst.dtd.core.internal.CMRepeatableNode;
-import org.eclipse.wst.dtd.core.internal.Comment;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.core.internal.Notation;
-import org.eclipse.wst.dtd.core.internal.ParameterEntityReference;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class DTDSectionLabelProvider extends LabelProvider {
-
- /**
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object object) {
- if (object == null || object.equals(StructuredSelection.EMPTY)) {
- return null;
- }
-
- Image result = null;
-
- Object selected = object;
- if (object instanceof IStructuredSelection) {
- selected = ((IStructuredSelection) object).getFirstElement();
- }
- if (selected instanceof DTDFile) {
- return null; // ((DTDFile) selected).getImage();
- }
- else if (selected instanceof DTDNode) {
- if (selected instanceof ParameterEntityReference)
- return null;
- return ((DTDNode) selected).getImage();
- }
- else if (selected instanceof org.w3c.dom.Element) {
- return null;
- }
- return result;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- public String getText(Object object) {
- if (object == null || object.equals(StructuredSelection.EMPTY)) {
- return null;
- }
-
- Object selected = object;
- if (object instanceof IStructuredSelection) {
- selected = ((IStructuredSelection) object).getFirstElement();
- }
-
- if (selected instanceof DTDFile) {
- return ((DTDFile) selected).getName();
- }
- else if (selected instanceof CMBasicNode) {
- if (((CMBasicNode) selected).isReference())
- return DTDPropertiesMessages._UI_PROPERTIES_VIEW_TITLE_ELEMENT_REF;
- else
- return ((CMBasicNode) selected).getName();
- }
- else if (selected instanceof CMRepeatableNode) {
- CMRepeatableNode node = (CMRepeatableNode) selected;
- String name = node.getName();
- if (node instanceof CMGroupNode) {
- if (((CMGroupNode) node).getConnector() == CMGroupNode.CHOICE)
- name = DTDPropertiesMessages.DTDSectionLabelProvider_0;
- else
- name = DTDPropertiesMessages.DTDSectionLabelProvider_1;
- }
- char occurrence = node.getOccurrence();
- switch (occurrence) {
- case CMRepeatableNode.ONCE :
- name += " [1..1]"; //$NON-NLS-1$
- break;
- case CMRepeatableNode.OPTIONAL :
- name += " [0..1]"; //$NON-NLS-1$
- break;
- case CMRepeatableNode.ONE_OR_MORE :
- name += " [1..*]"; //$NON-NLS-1$
- break;
- case CMRepeatableNode.ZERO_OR_MORE :
- name += " [0..*]"; //$NON-NLS-1$
- break;
- }
- return name;
- }
- else if (selected instanceof DTDNode) {
- if (selected instanceof Element)
- return DTDPropertiesMessages.DTDSectionLabelProvider_6;
- else if (selected instanceof Attribute)
- return DTDPropertiesMessages.DTDSectionLabelProvider_7;
- else if (selected instanceof AttributeList)
- return DTDPropertiesMessages.DTDSectionLabelProvider_8;
- else if (selected instanceof Comment)
- return DTDPropertiesMessages.DTDSectionLabelProvider_9;
- else if (selected instanceof Entity)
- return DTDPropertiesMessages.DTDSectionLabelProvider_10;
- else if (selected instanceof Notation)
- return DTDPropertiesMessages.DTDSectionLabelProvider_11;
- else if (selected instanceof ParameterEntityReference)
- // return "parameter entity reference";
- return null;
- else
- return ((DTDNode) selected).getName();
- }
- else if (selected instanceof org.w3c.dom.Element) {
- return ((org.w3c.dom.Element) selected).getLocalName();
- }
- else if (object instanceof ITextSelection) {
- return ""; //$NON-NLS-1$
- }
- else
- return object.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSelectIncludeFileWizard.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSelectIncludeFileWizard.java
deleted file mode 100644
index f315313be4..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSelectIncludeFileWizard.java
+++ /dev/null
@@ -1,79 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.common.ui.internal.viewers.SelectSingleFilePage;
-import org.eclipse.wst.dtd.core.internal.emf.DTDResource;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-/**
- * Extend the base wizard to select a file from the project or outside the
- * workbench and add error handling
- */
-class DTDSelectIncludeFileWizard extends Wizard implements INewWizard {
- DTDSelectSingleFilePage filePage;
-
- IFile resultFile;
-
- public DTDSelectIncludeFileWizard(String title, String desc, ViewerFilter filter, IStructuredSelection selection) {
- super();
- setWindowTitle(title);
- setDefaultPageImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(DTDUIPlugin.getDefault().getBundle().getSymbolicName(), DTDResource.NEWDTD));
-
- // Select File Page
- filePage = new DTDSelectSingleFilePage(PlatformUI.getWorkbench(), selection, true);
- filePage.setTitle(title);
- filePage.setDescription(desc);
- filePage.addFilter(filter);
- }
-
- public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
- }
-
- public void addPages() {
- addPage(filePage);
- }
-
- public boolean canFinish() {
- return filePage.isPageComplete();
- }
-
- public boolean performFinish() {
- resultFile = filePage.getFile();
- return true;
- }
-
- public IFile getResultFile() {
- return resultFile;
- }
-
- /**
- * Select DTD File
- */
- class DTDSelectSingleFilePage extends SelectSingleFilePage {
- public DTDSelectSingleFilePage(IWorkbench w, IStructuredSelection selection, boolean isFileMandatory) {
- super(w, selection, isFileMandatory);
- }
-
- public boolean isPageComplete() {
- return super.isPageComplete();
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDTypeMapper.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDTypeMapper.java
deleted file mode 100644
index 04e35d8500..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDTypeMapper.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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.ui.views.properties.tabbed.ITypeMapper;
-
-public class DTDTypeMapper implements ITypeMapper {
- public DTDTypeMapper() {
- super();
- }
-
- public Class mapType(Object object) {
- return object.getClass();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DocumentSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DocumentSection.java
deleted file mode 100644
index 4f720eb49e..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DocumentSection.java
+++ /dev/null
@@ -1,101 +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.wst.dtd.ui.internal.properties.section;
-
-import java.util.Iterator;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.Comment;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-
-public class DocumentSection extends AbstractSection {
- private Text commentText;
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
-
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
- commentText = getWidgetFactory().createText(composite, "", SWT.MULTI | SWT.NONE); //$NON-NLS-1$
- commentText.addListener(SWT.Modify, this);
-
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(0, 0);
- data.bottom = new FormAttachment(100, 0);
- commentText.setLayoutData(data);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- commentText.setEnabled(true);
- Object input = getInput();
- commentText.setText(""); //$NON-NLS-1$
- if (input != null) {
- if (input instanceof DTDNode) {
- Comment comment = getCommentNode((DTDNode) input);
- if (comment != null)
- commentText.setText(comment.getText());
- }
- }
- setListenerEnabled(true);
- }
-
- public void doHandleEvent(Event event) {
- Object input = getInput();
- if (input != null) {
- String newValue = commentText.getText();
- if (input instanceof DTDNode) {
- Comment comment = getCommentNode((DTDNode) input);
- if (comment != null)
- comment.setText(newValue);
- else {
- // Create a new comment node.
- ((DTDNode) input).getDTDFile().createComment((DTDNode) input, newValue, false);
- }
- }
- }
-
- }
-
- private Comment getCommentNode(DTDNode node) {
- Iterator iterator = node.getDTDFile().getNodes().iterator();
- DTDNode currentNode = null;
- DTDNode prevNode = null;
- while (iterator.hasNext()) {
- currentNode = (DTDNode) iterator.next();
- if (node == currentNode && prevNode != null && prevNode instanceof Comment)
- return (Comment) prevNode;
- else
- prevNode = currentNode;
- }
- return null;
- }
-
- public boolean shouldUseExtraSpace() {
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EmptySection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EmptySection.java
deleted file mode 100644
index 78f42939ca..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EmptySection.java
+++ /dev/null
@@ -1,50 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-
-public class EmptySection extends AbstractSection {
- public void doHandleEvent(Event event) {
- super.doHandleEvent(event);
- }
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- super.refresh();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#shouldUseExtraSpace()
- */
- public boolean shouldUseExtraSpace() {
- return false;
- }
-
- public int getMinimumHeight() {
- return 0;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EntityTypeSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EntityTypeSection.java
deleted file mode 100644
index 3f634baf4a..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EntityTypeSection.java
+++ /dev/null
@@ -1,141 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class EntityTypeSection extends AbstractSection {
- private final String ENTITY_TYPE = DTDPropertiesMessages._UI_LABEL_ENTITY_TYPE;
- private final String EXTERNAL_ENTITY = DTDPropertiesMessages._UI_LABEL_EXTERNAL_ENTITY;
- private final String PARAMETER = DTDPropertiesMessages._UI_LABEL_PARAMETER_ENTITY;
- private final String GENERAL = DTDPropertiesMessages._UI_LABEL_GENERAL_ENTITY;
-
- private CCombo typeCombo;
- private String[] typeComboValues = {PARAMETER, GENERAL};
- private Button checkBox;
-
- public static boolean isExternalEntity = false;
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- CLabel cLabel = getWidgetFactory().createCLabel(composite, ENTITY_TYPE);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = cLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- cLabel.setLayoutData(data);
-
- typeCombo = getWidgetFactory().createCCombo(composite, SWT.FLAT);
- data = new FormData();
- data.left = new FormAttachment(cLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(cLabel, 0, SWT.CENTER);
- typeCombo.setLayoutData(data);
- typeCombo.addSelectionListener(this);
- typeCombo.setItems(typeComboValues);
-
- checkBox = getWidgetFactory().createButton(composite, EXTERNAL_ENTITY, SWT.CHECK);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- p = checkBox.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(95, 0);
- data.top = new FormAttachment(cLabel, +ITabbedPropertyConstants.VSPACE);
- checkBox.setLayoutData(data);
- checkBox.addSelectionListener(this);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- Object input = getInput();
-
- if (input != null) {
- if (input instanceof Entity) {
- Entity entity = (Entity) input;
- if (entity.isParameterEntity())
- typeCombo.setText(PARAMETER);
- else
- typeCombo.setText(GENERAL);
-
- if (entity.isExternalEntity()) {
- checkBox.setSelection(true);
- isExternalEntity = true;
- }
- else {
- checkBox.setSelection(false);
- isExternalEntity = false;
- }
- }
- }
- setListenerEnabled(true);
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (e.widget == typeCombo) {
- Object input = getInput();
- if (input instanceof Entity) {
- Entity node = (Entity) input;
- String selected = typeCombo.getText();
- if (PARAMETER.equals(selected))
- node.setParameterEntity(true);
- else
- node.setParameterEntity(false);
- }
- }
- else if (e.widget == checkBox) {
- Object input = getInput();
- if (input instanceof Entity) {
- Entity node = (Entity) input;
- boolean selected = checkBox.getSelection();
- if (selected) {
- node.setExternalEntity(true);
- isExternalEntity = true;
- }
- else {
- node.setExternalEntity(false);
- isExternalEntity = false;
- }
- }
- }
- }
-
- public boolean shouldUseExtraSpace() {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EntityValueSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EntityValueSection.java
deleted file mode 100644
index abf35698d1..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EntityValueSection.java
+++ /dev/null
@@ -1,185 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class EntityValueSection extends AbstractSection {
- private final String VALUE = DTDPropertiesMessages._UI_LABEL_ENTITY_VALUE;
- private final String PUBLIC_ID = DTDPropertiesMessages._UI_LABEL_PUBLIC_ID;
- private final String SYSTEM_ID = DTDPropertiesMessages._UI_LABEL_SYSTEM_ID;
-
- private Text valueText;
- private Text publicIdText;
- private Text systemIdText;
-
- private CLabel valueLabel;
- private CLabel publicIdLabel;
- private CLabel systemIdLabel;
-
- public void doHandleEvent(Event event) {
- if (event.widget == valueText) {
- Object input = getInput();
- String newValue = valueText.getText();
- if (input instanceof Entity) {
- Entity entity = (Entity) input;
- entity.setValue(newValue);
- }
- }
- else if (event.widget == publicIdText) {
- Object input = getInput();
- String newValue = publicIdText.getText();
- if (input instanceof Entity) {
- Entity entity = (Entity) input;
- entity.setPublicID(newValue);
- }
- }
- else if (event.widget == systemIdText) {
- Object input = getInput();
- String newValue = systemIdText.getText();
- if (input instanceof Entity) {
- Entity entity = (Entity) input;
- entity.setSystemID(newValue);
- }
- }
- }
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- valueLabel = getWidgetFactory().createCLabel(composite, VALUE);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = valueLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- valueLabel.setLayoutData(data);
-
- // Entity Value
- valueText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(valueLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(valueLabel, 0, SWT.CENTER);
- valueText.setLayoutData(data);
- valueText.addListener(SWT.Modify, this);
-
- // Create label first then attach other control to it
- publicIdLabel = getWidgetFactory().createCLabel(composite, PUBLIC_ID);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- p = publicIdLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(valueLabel, +ITabbedPropertyConstants.VSPACE);
- publicIdLabel.setLayoutData(data);
-
- // Public ID
- publicIdText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(publicIdLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(publicIdLabel, 0, SWT.CENTER);
- publicIdText.setLayoutData(data);
- publicIdText.addListener(SWT.Modify, this);
-
- // Create label first then attach other control to it
- systemIdLabel = getWidgetFactory().createCLabel(composite, SYSTEM_ID);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- p = systemIdLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(publicIdLabel, +ITabbedPropertyConstants.VSPACE);
- systemIdLabel.setLayoutData(data);
-
- // System ID
- systemIdText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(systemIdLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(systemIdLabel, 0, SWT.CENTER);
- systemIdText.setLayoutData(data);
- systemIdText.addListener(SWT.Modify, this);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- Object input = getInput();
- if (isExternalEntity()) {
- valueLabel.setVisible(false);
- valueText.setVisible(false);
- publicIdLabel.setVisible(true);
- publicIdText.setVisible(true);
- systemIdLabel.setVisible(true);
- systemIdText.setVisible(true);
-
- publicIdText.setText(""); //$NON-NLS-1$
- systemIdText.setText(""); //$NON-NLS-1$
- if (input != null && input instanceof Entity) {
- Entity entity = (Entity) input;
- publicIdText.setText((entity).getPublicID());
- systemIdText.setText((entity).getSystemID());
- }
- }
- else {
- valueLabel.setVisible(true);
- valueText.setVisible(true);
- publicIdLabel.setVisible(false);
- publicIdText.setVisible(false);
- systemIdLabel.setVisible(false);
- systemIdText.setVisible(false);
-
- valueText.setText(""); //$NON-NLS-1$
- if (input != null && input instanceof Entity)
- valueText.setText(((Entity) input).getValue());
- }
- setListenerEnabled(true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#shouldUseExtraSpace()
- */
- public boolean shouldUseExtraSpace() {
- return false;
- }
-
- private boolean isExternalEntity() {
- return EntityTypeSection.isExternalEntity;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NameSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NameSection.java
deleted file mode 100644
index 0014c6779f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NameSection.java
+++ /dev/null
@@ -1,96 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class NameSection extends AbstractSection {
- private final String NAME = DTDPropertiesMessages._UI_LABEL_NAME;
- private Text nameText;
-
- public void doHandleEvent(Event event) {
- if (event.widget == nameText) {
- Object input = getInput();
- String newValue = nameText.getText();
- if (newValue.length() > 0 && input instanceof DTDNode) {
- DTDNode dtdNode = (DTDNode) input;
- dtdNode.setName(newValue);
- }
- }
- }
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- CLabel nameLabel = getWidgetFactory().createCLabel(composite, NAME);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- nameLabel.setLayoutData(data);
-
- nameText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(nameLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100);
- data.top = new FormAttachment(nameLabel, 0, SWT.CENTER);
- nameText.setLayoutData(data);
- nameText.addListener(SWT.Modify, this);
-
- // listener.startListeningForEnter(nameText);
- // listener.startListeningTo(nameText);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- nameText.setEnabled(true);
- Object input = getInput();
- nameText.setText(""); //$NON-NLS-1$
- if (input != null) {
- if (input instanceof DTDNode)
- nameText.setText(((DTDNode) input).getName());
- }
- setListenerEnabled(true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#shouldUseExtraSpace()
- */
- public boolean shouldUseExtraSpace() {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NewEntitySection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NewEntitySection.java
deleted file mode 100644
index 64492227e7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NewEntitySection.java
+++ /dev/null
@@ -1,376 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.common.ui.internal.viewers.ResourceFilter;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-public class NewEntitySection extends AbstractSection {
- private final String NAME = DTDPropertiesMessages._UI_LABEL_NAME;
- private final String ENTITY_TYPE = DTDPropertiesMessages._UI_LABEL_ENTITY_TYPE;
- private final String EXTERNAL_ENTITY = DTDPropertiesMessages._UI_LABEL_EXTERNAL_ENTITY;
- private final String PARAMETER = DTDPropertiesMessages._UI_LABEL_PARAMETER_ENTITY;
- private final String GENERAL = DTDPropertiesMessages._UI_LABEL_GENERAL_ENTITY;
- private final String VALUE = DTDPropertiesMessages._UI_LABEL_ENTITY_VALUE;
- private final String PUBLIC_ID = DTDPropertiesMessages._UI_LABEL_PUBLIC_ID;
- private final String SYSTEM_ID = DTDPropertiesMessages._UI_LABEL_SYSTEM_ID;
-
- private Text systemIdText;
- private Text publicIdText;
- private Text nameText;
- private Button wizardButton;
-
- private Text entityValueText;
- private Button checkBox;
-
- private CCombo typeCombo;
- private String[] typeComboValues = {PARAMETER, GENERAL};
- private PageBook pageBook;
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- createEntityCommonComposite(composite);
-
- pageBook = new PageBook(composite, SWT.FLAT);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(entityCommonComposite, 0);
- data.bottom = new FormAttachment(100, 0);
- pageBook.setLayoutData(data);
-
- createExternalEntityComposite(pageBook);
- createInternalEntityComposite(pageBook);
-
- pageBook.showPage(externalEntityComposite);
- }
-
- private Composite entityCommonComposite;
-
- private Composite createEntityCommonComposite(Composite parent) {
- entityCommonComposite = getWidgetFactory().createFlatFormComposite(parent);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(0, 0);
- entityCommonComposite.setLayoutData(data);
-
- // Create label first then attach other control to it
- CLabel nameLabel = getWidgetFactory().createCLabel(entityCommonComposite, NAME); //$NON-NLS-1$
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- nameLabel.setLayoutData(data);
-
- nameText = getWidgetFactory().createText(entityCommonComposite, "", SWT.NONE); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(nameLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(nameLabel, 0, SWT.CENTER);
- nameText.setLayoutData(data);
- nameText.addListener(SWT.Modify, this);
-
- // Create label first then attach other control to it
- CLabel cLabel = getWidgetFactory().createCLabel(entityCommonComposite, ENTITY_TYPE);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- p = cLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(nameLabel, +ITabbedPropertyConstants.VSPACE);
- cLabel.setLayoutData(data);
-
- // Create Checkbox
- checkBox = getWidgetFactory().createButton(entityCommonComposite, EXTERNAL_ENTITY, SWT.CHECK); //$NON-NLS-1$
- data = new FormData();
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(cLabel, 0, SWT.CENTER);
- checkBox.setLayoutData(data);
- checkBox.addSelectionListener(this);
-
- // Create CCombo
- typeCombo = getWidgetFactory().createCCombo(entityCommonComposite, SWT.FLAT | SWT.READ_ONLY);
- data = new FormData();
- data.left = new FormAttachment(cLabel, -ITabbedPropertyConstants.HSPACE - 2);
- data.right = new FormAttachment(checkBox, -ITabbedPropertyConstants.HSPACE);
- data.top = new FormAttachment(cLabel, 0, SWT.CENTER);
- typeCombo.setLayoutData(data);
- typeCombo.addSelectionListener(this);
- typeCombo.setItems(typeComboValues);
- typeCombo.setText(PARAMETER);
-
- return entityCommonComposite;
- }
-
- private Composite internalEntityComposite;
-
- private Composite createInternalEntityComposite(Composite parent) {
- internalEntityComposite = getWidgetFactory().createFlatFormComposite(parent);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(entityCommonComposite, -ITabbedPropertyConstants.VSPACE);
- internalEntityComposite.setLayoutData(data);
-
- // Create label first then attach other control to it
- CLabel entityValueLabel = getWidgetFactory().createCLabel(internalEntityComposite, VALUE); //$NON-NLS-1$
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = entityValueLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- entityValueLabel.setLayoutData(data);
-
- entityValueText = getWidgetFactory().createText(internalEntityComposite, "", SWT.NONE); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(entityValueLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(entityValueLabel, 0, SWT.CENTER);
- entityValueText.setLayoutData(data);
- entityValueText.setEditable(true);
- entityValueText.addListener(SWT.Modify, this);
-
- return internalEntityComposite;
- }
-
- private Composite externalEntityComposite;
-
- private Composite createExternalEntityComposite(Composite parent) {
- externalEntityComposite = getWidgetFactory().createFlatFormComposite(parent);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(entityCommonComposite, -ITabbedPropertyConstants.VSPACE);
- externalEntityComposite.setLayoutData(data);
-
- // Create label first then attach other control to it
- CLabel publicIdLabel = getWidgetFactory().createCLabel(externalEntityComposite, PUBLIC_ID); //$NON-NLS-1$
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = publicIdLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- publicIdLabel.setLayoutData(data);
-
- publicIdText = getWidgetFactory().createText(externalEntityComposite, "", SWT.NONE); //$NON-NLS-1$
- publicIdText.setEditable(true);
- data = new FormData();
- data.left = new FormAttachment(publicIdLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(publicIdLabel, 0, SWT.CENTER);
- publicIdText.setLayoutData(data);
- publicIdText.addListener(SWT.Modify, this);
-
- // Create label first then attach other control to it
- // Create System ID Label
- CLabel systemIdLabel = getWidgetFactory().createCLabel(externalEntityComposite, SYSTEM_ID); //$NON-NLS-1$
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- p = systemIdLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(publicIdLabel, +ITabbedPropertyConstants.VSPACE);
- systemIdLabel.setLayoutData(data);
-
- // Create Wizard Button
- wizardButton = getWidgetFactory().createButton(externalEntityComposite, "", SWT.NONE); //$NON-NLS-1$
- wizardButton.setImage(AbstractUIPlugin.imageDescriptorFromPlugin(DTDUIPlugin.getDefault().getBundle().getSymbolicName(), "icons/browsebutton.gif").createImage()); //$NON-NLS-1$
- data = new FormData();
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(systemIdLabel, 0, SWT.CENTER);
- wizardButton.setLayoutData(data);
- wizardButton.addSelectionListener(this);
-
- // Create System ID Text
- systemIdText = getWidgetFactory().createText(externalEntityComposite, "", SWT.NONE); //$NON-NLS-1$
- // systemIdText.setEditable(false);
- data = new FormData();
- data.left = new FormAttachment(systemIdLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(wizardButton, -ITabbedPropertyConstants.HSPACE);
- data.top = new FormAttachment(systemIdLabel, 0, SWT.CENTER);
- systemIdText.setLayoutData(data);
- systemIdText.addListener(SWT.Modify, this);
-
- return externalEntityComposite;
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (e.widget == typeCombo) {
- Object input = getInput();
- if (input instanceof Entity) {
- Entity node = (Entity) input;
- String selected = typeCombo.getText();
- if (PARAMETER.equals(selected))
- node.setParameterEntity(true);
- else
- node.setParameterEntity(false);
- }
- }
- else if (e.widget == checkBox) {
- Object input = getInput();
- if (input instanceof Entity) {
- Entity node = (Entity) input;
- boolean selected = checkBox.getSelection();
- if (selected) {
- node.setExternalEntity(true);
- pageBook.showPage(externalEntityComposite);
- }
- else {
- node.setExternalEntity(false);
- pageBook.showPage(internalEntityComposite);
- }
- }
- }
- else if (e.widget == wizardButton) {
- Shell shell = Display.getCurrent().getActiveShell();
- IFile currentIFile = ((IFileEditorInput) getActiveEditor().getEditorInput()).getFile();
- ViewerFilter filter = new ResourceFilter(new String[]{".dtd"}, new IFile[]{currentIFile}, null); //$NON-NLS-1$
-
- DTDSelectIncludeFileWizard fileSelectWizard = new DTDSelectIncludeFileWizard(DTDPropertiesMessages._UI_FILEDIALOG_SELECT_DTD, DTDPropertiesMessages._UI_FILEDIALOG_SELECT_DTD_DESC, filter, (IStructuredSelection) fSelection);
-
- WizardDialog wizardDialog = new WizardDialog(shell, fileSelectWizard);
- wizardDialog.create();
- wizardDialog.setBlockOnOpen(true);
- int result = wizardDialog.open();
- if (result == Window.OK) {
- String value = systemIdText.getText();
- IFile selectedIFile = fileSelectWizard.getResultFile();
- String dtdFileString = value;
- if (selectedIFile != null) {
- dtdFileString = URIHelper.getRelativeURI(selectedIFile.getFullPath(), currentIFile.getFullPath());
- }
- systemIdText.setText(dtdFileString);
- }
- }
-
- }
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- Object input = getInput();
- nameText.setText(""); //$NON-NLS-1$
- if (input != null) {
- if (input instanceof Entity) {
- Entity entity = (Entity) input;
- nameText.setText(entity.getName());
-
- if (entity.isParameterEntity())
- typeCombo.setText(PARAMETER);
- else
- typeCombo.setText(GENERAL);
-
- if (entity.isExternalEntity()) {
- checkBox.setSelection(true);
- pageBook.showPage(externalEntityComposite);
- publicIdText.setText(entity.getPublicID());
- systemIdText.setText(entity.getSystemID());
- }
- else {
- checkBox.setSelection(false);
- pageBook.showPage(internalEntityComposite);
- entityValueText.setText(entity.getValue());
- }
- }
- }
- setListenerEnabled(true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#shouldUseExtraSpace()
- */
- public boolean shouldUseExtraSpace() {
- return true;
- }
-
- public void doHandleEvent(Event event) {
- if (event.widget == nameText) {
- Object input = getInput();
- String newValue = nameText.getText();
- if (newValue.length() > 0 && input instanceof Entity) {
- Entity entity = (Entity) input;
- entity.setName(newValue);
- }
- }
- else if (event.widget == entityValueText) {
- Object input = getInput();
- String newValue = entityValueText.getText();
- if (input instanceof Entity) {
- Entity entity = (Entity) input;
- entity.setValue(newValue);
- }
- }
- else if (event.widget == publicIdText) {
- Object input = getInput();
- String newValue = publicIdText.getText();
- if (input instanceof Entity) {
- Entity entity = (Entity) input;
- entity.setPublicID(newValue);
- }
- }
- else if (event.widget == systemIdText) {
- Object input = getInput();
- String newValue = systemIdText.getText();
- if (input instanceof Entity) {
- Entity entity = (Entity) input;
- entity.setSystemID(newValue);
- }
- }
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NotationSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NotationSection.java
deleted file mode 100644
index 2e960e77fc..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NotationSection.java
+++ /dev/null
@@ -1,131 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.Notation;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class NotationSection extends AbstractSection {
- private final String PUBLIC_ID = DTDPropertiesMessages._UI_LABEL_PUBLIC_ID;
- private final String SYSTEM_ID = DTDPropertiesMessages._UI_LABEL_SYSTEM_ID;
-
- private Text publicIdText;
- private Text systemIdText;
-
- private CLabel publicIdLabel;
- private CLabel systemIdLabel;
-
- public void doHandleEvent(Event event) {
- if (event.widget == publicIdText) {
- Object input = getInput();
- String newValue = publicIdText.getText();
- if (input instanceof Notation) {
- Notation notation = (Notation) input;
- notation.setPublicID(newValue);
- }
- }
- else if (event.widget == systemIdText) {
- Object input = getInput();
- String newValue = systemIdText.getText();
- if (input instanceof Notation) {
- Notation notation = (Notation) input;
- notation.setSystemID(newValue);
- }
- }
- }
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- publicIdLabel = getWidgetFactory().createCLabel(composite, PUBLIC_ID);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = publicIdLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- publicIdLabel.setLayoutData(data);
-
- // Public ID
- publicIdText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(publicIdLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(publicIdLabel, 0, SWT.CENTER);
- publicIdText.setLayoutData(data);
- publicIdText.addListener(SWT.Modify, this);
-
- // Create label first then attach other control to it
- systemIdLabel = getWidgetFactory().createCLabel(composite, SYSTEM_ID);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- p = systemIdLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- labelWidth = Math.max(p.x, 98);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(publicIdLabel, +ITabbedPropertyConstants.VSPACE);
- systemIdLabel.setLayoutData(data);
-
- // System ID
- systemIdText = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(systemIdLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(systemIdLabel, 0, SWT.CENTER);
- systemIdText.setLayoutData(data);
- systemIdText.addListener(SWT.Modify, this);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- Object input = getInput();
- publicIdText.setText(""); //$NON-NLS-1$
- systemIdText.setText(""); //$NON-NLS-1$
-
- if (input != null && input instanceof Notation) {
- Notation notation = (Notation) input;
- publicIdText.setText((notation).getPublicID());
- systemIdText.setText((notation).getSystemID());
- }
-
- setListenerEnabled(true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ISection#shouldUseExtraSpace()
- */
- public boolean shouldUseExtraSpace() {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/OccurrenceFilter.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/OccurrenceFilter.java
deleted file mode 100644
index eb57e01655..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/OccurrenceFilter.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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.CMRepeatableNode;
-
-public class OccurrenceFilter implements IFilter {
- public boolean select(Object toTest) {
- if (toTest instanceof CMBasicNode && ((CMBasicNode) toTest).isEmptyAnyOrPCData())
- return false;
- else if (toTest instanceof CMRepeatableNode)
- return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/OccurrenceSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/OccurrenceSection.java
deleted file mode 100644
index 90f5ffa5a5..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/OccurrenceSection.java
+++ /dev/null
@@ -1,105 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.CMRepeatableNode;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class OccurrenceSection extends AbstractSection {
- private final String ONCE = DTDPropertiesMessages._UI_ONCE;
- private final String ONE_OR_MORE = DTDPropertiesMessages._UI_ONE_OR_MORE;
- private final String OPTIONAL = DTDPropertiesMessages._UI_OPTIONAL;
- private final String ZERO_OR_MORE = DTDPropertiesMessages._UI_ZERO_OR_MORE;
- private final String OCCURENCE = DTDPropertiesMessages._UI_LABEL_OCCURRENCE;
-
- private CCombo occurrenceCombo;
- private String[] occurrenceComboValues = {ONCE, ONE_OR_MORE, OPTIONAL, ZERO_OR_MORE};
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- CLabel usageLabel = getWidgetFactory().createCLabel(composite, OCCURENCE);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = usageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- usageLabel.setLayoutData(data);
-
- occurrenceCombo = getWidgetFactory().createCCombo(composite, SWT.FLAT);
- data = new FormData();
- data.left = new FormAttachment(usageLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(usageLabel, 0, SWT.CENTER);
- occurrenceCombo.setLayoutData(data);
- occurrenceCombo.addSelectionListener(this);
- occurrenceCombo.setItems(occurrenceComboValues);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- setListenerEnabled(false);
- Object input = getInput();
- if (input instanceof CMRepeatableNode) {
- char occurence = ((CMRepeatableNode) input).getOccurrence();
- if (CMRepeatableNode.ONCE == occurence)
- occurrenceCombo.setText(ONCE);
- else if (CMRepeatableNode.ONE_OR_MORE == occurence)
- occurrenceCombo.setText(ONE_OR_MORE);
- else if (CMRepeatableNode.OPTIONAL == occurence)
- occurrenceCombo.setText(OPTIONAL);
- else if (CMRepeatableNode.ZERO_OR_MORE == occurence)
- occurrenceCombo.setText(ZERO_OR_MORE);
- else
- occurrenceCombo.setText(ONCE);
- }
- setListenerEnabled(true);
- }
-
- public void widgetSelected(SelectionEvent e) {
- Object input = getInput();
- if (input instanceof CMRepeatableNode) {
- setListenerEnabled(false);
- CMRepeatableNode node = (CMRepeatableNode) input;
- String occurrence = occurrenceCombo.getText();
- if (ONCE.equals(occurrence))
- node.setOccurrence(CMRepeatableNode.ONCE);
- else if (ONE_OR_MORE.equals(occurrence))
- node.setOccurrence(CMRepeatableNode.ONE_OR_MORE);
- else if (OPTIONAL.equals(occurrence))
- node.setOccurrence(CMRepeatableNode.OPTIONAL);
- else if (ZERO_OR_MORE.equals(occurrence))
- node.setOccurrence(CMRepeatableNode.ZERO_OR_MORE);
- setListenerEnabled(true);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/TypeSection.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/TypeSection.java
deleted file mode 100644
index d18795c46a..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/TypeSection.java
+++ /dev/null
@@ -1,92 +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.wst.dtd.ui.internal.properties.section;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
-
-public class TypeSection extends AbstractSection {
- private final String TYPE = DTDPropertiesMessages._UI_LABEL_TYPE;
-
- private CCombo typeCombo;
- private String[] typeComboValues = {Attribute.CDATA, Attribute.ID, Attribute.IDREF, Attribute.IDREFS, Attribute.ENTITY, Attribute.ENTITIES, Attribute.NMTOKEN, Attribute.NMTOKENS, Attribute.ENUMERATED_NAME, Attribute.ENUMERATED_NOTATION};
-
- /**
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory)
- */
- public void createControls(Composite parent, TabbedPropertySheetWidgetFactory factory) {
- super.createControls(parent, factory);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
-
- // Create label first then attach other control to it
- CLabel cLabel = getWidgetFactory().createCLabel(composite, TYPE);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141106
- Point p = cLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
- int labelWidth = Math.max(p.x, 98);
- FormData data = new FormData(labelWidth, SWT.DEFAULT);
- data = new FormData(labelWidth, SWT.DEFAULT);
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- cLabel.setLayoutData(data);
-
- typeCombo = getWidgetFactory().createCCombo(composite, SWT.FLAT);
- data = new FormData();
- data.left = new FormAttachment(cLabel, -ITabbedPropertyConstants.HSPACE);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(cLabel, 0, SWT.CENTER);
- typeCombo.setLayoutData(data);
- typeCombo.addSelectionListener(this);
- typeCombo.setItems(typeComboValues);
- }
-
- /*
- * @see org.eclipse.wst.common.ui.properties.internal.provisional.view.ITabbedPropertySection#refresh()
- */
- public void refresh() {
- Object input = getInput();
-
- if (input != null) {
- if (input instanceof Attribute)
- typeCombo.setText(((Attribute) input).getType());
- }
-
- }
-
- /**
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- if (e.widget == typeCombo) {
- Object input = getInput();
- if (input instanceof Attribute) {
- Attribute attribute = (Attribute) input;
- attribute.setType(typeCombo.getText());
- }
- }
- }
-
- public boolean shouldUseExtraSpace() {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextViewerConfigurationDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextViewerConfigurationDTD.java
deleted file mode 100644
index 80a5dd1f2d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextViewerConfigurationDTD.java
+++ /dev/null
@@ -1,70 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui;
-
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.wst.dtd.core.text.IDTDPartitions;
-import org.eclipse.wst.dtd.ui.internal.style.LineStyleProviderForDTD;
-import org.eclipse.wst.sse.core.text.IStructuredPartitions;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-
-
-/**
- * Configuration for a source viewer which shows DTD 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 StructuredTextViewerConfigurationDTD 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[] fLineStyleProviders;
-
- /**
- * Create new instance of StructuredTextViewerConfigurationDTD
- */
- public StructuredTextViewerConfigurationDTD() {
- // Must have empty constructor to createExecutableExtension
- super();
- }
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- if (fConfiguredContentTypes == null) {
- fConfiguredContentTypes = new String[]{IDTDPartitions.DTD_DEFAULT, IStructuredPartitions.DEFAULT_PARTITION, IStructuredPartitions.UNKNOWN_PARTITION};
- }
- return fConfiguredContentTypes;
- }
-
- public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
- if (fLineStyleProviders == null) {
- fLineStyleProviders = new LineStyleProvider[]{createLineStyleProviderForDTD()};
- }
- return fLineStyleProviders;
- }
-
- private LineStyleProvider createLineStyleProviderForDTD() {
- return new LineStyleProviderForDTD();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIMessages.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIMessages.java
deleted file mode 100644
index fc77591b3e..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIMessages.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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by DTD UI
- *
- * @plannedfor 1.0
- */
-public class DTDUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.wst.dtd.ui.internal.DTDUIPluginResources";//$NON-NLS-1$
-
- public static String _UI_ACTION_ADD_ATTRIBUTELIST;
- public static String _UI_ACTION_ADD_DTD_NOTATION;
- public static String _UI_ACTION_ADD_DTD_ENTITY;
- public static String _UI_ACTION_ADD_DTD_ELEMENT;
- public static String _UI_ACTION_ADD_DTD_COMMENT;
- public static String _UI_ACTION_DTD_DELETE;
- public static String _UI_ACTION_ADD_ATTRIBUTE;
- public static String _UI_ACTION_GROUP_ADD_GROUP;
- public static String _UI_ACTION_ADD_ELEMENT;
- public static String _UI_BUTTON_GROUP_ITEMS_LOGICALLY;
- public static String _UI_BUTTON_SORT_ITEMS;
- public static String _UI_ACTION_ADD_PARAM_ENTITY_REF;
- public static String _UI_MOVE_ATTRIBUTE;
- public static String _UI_MOVE_CONTENT;
- public static String _UI_MOVE_NODE;
- public static String _UI_MOVE_NODES;
- public static String _ERROR_FILENAME_MUST_END_DTD;
- public static String Creating_files;
- public static String DTDFilesPreferencePage_ExtensionLabel;
- public static String DTDFilesPreferencePage_ExtensionError;
- public static String DTDColorPage_0;
- public static String DTDColorPage_1;
- public static String DTDColorPage_2;
- public static String DTDColorPage_3;
- public static String DTDColorPage_4;
- public static String DTDColorPage_5;
- public static String DTDColorPage_6;
- public static String DTDColorPage_7;
- public static String DTDColorPage_8;
- public static String DTDPropertySourceAdapter_0;
- public static String DTDPropertySourceAdapter_1;
- public static String DTDPropertySourceAdapter_2;
- public static String SourceMenu_label;
- public static String _UI_CREATE_NEW_DTD_FILE;
- public static String _UI_WIZARD_NEW_DTD_TITLE;
- public static String _UI_WIZARD_NEW_DTD_EXPL;
- public static String _UI_LABEL_DTD_FILE_DELETE;
- public static String ResourceGroup_nameExists;
- public static String NewDTDTemplatesWizardPage_0;
- public static String NewDTDTemplatesWizardPage_1;
- public static String NewDTDTemplatesWizardPage_2;
- public static String NewDTDTemplatesWizardPage_3;
- public static String NewDTDTemplatesWizardPage_4;
- public static String NewDTDTemplatesWizardPage_5;
- public static String NewDTDTemplatesWizardPage_6;
- 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;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, DTDUIMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
deleted file mode 100644
index e76e6db423..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
+++ /dev/null
@@ -1,99 +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.wst.dtd.ui.internal;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-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.dtd.ui.internal.preferences.DTDUIPreferenceNames;
-import org.eclipse.wst.dtd.ui.internal.templates.TemplateContextTypeIdsDTD;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class DTDUIPlugin extends AbstractUIPlugin {
- // The shared instance.
- private static DTDUIPlugin plugin;
-
- /**
- * The template store for the dtd ui.
- */
- private TemplateStore fTemplateStore;
-
- /**
- * The template context type registry for dtd ui.
- */
- private ContextTypeRegistry fContextTypeRegistry;
-
- /**
- * Returns the shared instance.
- */
- public static DTDUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * The constructor.
- */
- public DTDUIPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the template store for the dtd editor templates.
- *
- * @return the template store for the dtd editor templates
- */
- public TemplateStore getTemplateStore() {
- if (fTemplateStore == null) {
- fTemplateStore = new ContributionTemplateStore(getTemplateContextRegistry(), getPreferenceStore(), DTDUIPreferenceNames.TEMPLATES_KEY);
-
- try {
- fTemplateStore.load();
- } catch (IOException e) {
- Logger.logException(e);
- }
- }
- return fTemplateStore;
- }
-
- /**
- * Returns the template context type registry for the dtd plugin.
- *
- * @return the template context type registry for the dtd plugin
- */
- public ContextTypeRegistry getTemplateContextRegistry() {
- if (fContextTypeRegistry == null) {
- ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
- registry.addContextType(TemplateContextTypeIdsDTD.NEW);
-
- fContextTypeRegistry = registry;
- }
-
- return fContextTypeRegistry;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties
deleted file mode 100644
index d4ae96cfc3..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties
+++ /dev/null
@@ -1,89 +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
-###############################################################################
-
-_UI_ACTION_ADD_ATTRIBUTELIST=Add Attribute &List
-
-!DTDOutliner
-_UI_ACTION_ADD_DTD_NOTATION=Add &Notation
-_UI_ACTION_ADD_DTD_ENTITY=Add &Entity
-_UI_ACTION_ADD_DTD_ELEMENT=Add Ele&ment
-_UI_ACTION_ADD_DTD_COMMENT=Add &Comment
-_UI_ACTION_DTD_DELETE=&Delete
-_UI_ACTION_ADD_ATTRIBUTE=Add &Attribute
-_UI_ACTION_GROUP_ADD_GROUP=Add Group to Con&tent Model
-_UI_ACTION_ADD_ELEMENT=Add Element to C&ontent Model
-
-!DTDContentOutlinePage
-_UI_BUTTON_GROUP_ITEMS_LOGICALLY=Group items logically.
-_UI_BUTTON_SORT_ITEMS=Sort items alphabetically.
-
-!DTDContextContributer
-_UI_ACTION_ADD_PARAM_ENTITY_REF=Add &Parameter Entity Reference
-
-!DragAttributeCommand
-_UI_MOVE_ATTRIBUTE=Move Attribute
-
-!DragContentModelCommand
-_UI_MOVE_CONTENT=Move Content
-
-!DragTopLevelNodesCommand
-_UI_MOVE_NODE=Move Node
-_UI_MOVE_NODES=Move Nodes
-
-_ERROR_FILENAME_MUST_END_DTD=The file name must end in one of the following extensions {0}.
-
-#DTD File page
-Creating_files=Creating files
-DTDFilesPreferencePage_ExtensionLabel=Add this suffix (if not specified):
-DTDFilesPreferencePage_ExtensionError=Suffix must be one of the following {0}.
-
-#DTD Style page
-DTDColorPage_0=<!ELEMENT Main (One,Two+)>\r\n<!ELEMENT One (Three,Four)>\r\n<!ATTLIST One\r\n oneone CDATA #REQUIRED\r\n>\r\n<!-- You need this -->\r\n<!ELEMENT Two (moremore*)>\r\n<!ATTLIST Two\r\n twotwo CDATA #REQUIRED\r\n twothree (aaa | bbb) "aaa"\r\n>\r\n
-DTDColorPage_1=Comments
-DTDColorPage_2=Data
-DTDColorPage_3=Default
-DTDColorPage_4=Keywords
-DTDColorPage_5=Strings
-DTDColorPage_6=Symbols
-DTDColorPage_7=Tag Delimiters
-DTDColorPage_8=Tag Names
-DTDPropertySourceAdapter_0=Name
-DTDPropertySourceAdapter_1=Contents
-DTDPropertySourceAdapter_2=Attributes
-
-! NewDTDWizard.java
-_UI_CREATE_NEW_DTD_FILE = Create a new DTD file.
-_UI_WIZARD_NEW_DTD_TITLE = Create DTD
-_UI_WIZARD_NEW_DTD_EXPL = Create a new DTD file. Specify the folder and name for the file.
-
-# copied from dtd core
-_UI_LABEL_DTD_FILE_DELETE=Delete
-##
-ResourceGroup_nameExists = The same name already exists.
-NewDTDTemplatesWizardPage_0=Select DTD Template
-NewDTDTemplatesWizardPage_1=Select a template as initial content in the DTD page.
-NewDTDTemplatesWizardPage_2=Name
-NewDTDTemplatesWizardPage_3=Description
-NewDTDTemplatesWizardPage_4=Use DTD Template
-NewDTDTemplatesWizardPage_5=Preview:
-NewDTDTemplatesWizardPage_6=Templates are 'New DTD' templates found in the <a>DTD Templates</a> preference page.
-
-SourceMenu_label=Source
-
-SyntaxColoringPage_0=Syntax Element:
-SyntaxColoringPage_2=Enable
-SyntaxColoringPage_3=&Bold
-SyntaxColoringPage_4=&Italic
-SyntaxColoringPage_5=&Strikethrough
-SyntaxColoringPage_6=&Underline
-
-_UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK=DTD preferences. Note that some preferences may be set on the <a>{0}</a> preference page.
-
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/Logger.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/Logger.java
deleted file mode 100644
index d224ef26f2..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/Logger.java
+++ /dev/null
@@ -1,143 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.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.wst.dtd.ui"; //$NON-NLS-1$
-
- public static final int ERROR = IStatus.ERROR; // 4
- public static final int ERROR_DEBUG = 200 + ERROR;
- public static final int INFO = IStatus.INFO; // 1
- public static final int INFO_DEBUG = 200 + INFO;
-
- public static final int OK = IStatus.OK; // 0
-
- public static final int OK_DEBUG = 200 + OK;
-
- private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$
- public static final int WARNING = IStatus.WARNING; // 2
- public static final int WARNING_DEBUG = 200 + WARNING;
-
- /**
- * 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;
- }
- 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 (!isDebugging())
- return;
-
- 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)) {
- 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;
- }
- }
- }
- }
-
- /**
- * @return true if the platform is debugging
- */
- public static boolean isDebugging() {
- return Platform.inDebugMode();
- }
-
- 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 trace(String category, String message) {
- _trace(category, message, null);
- }
-
- 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);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DTDDragAndDropManager.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DTDDragAndDropManager.java
deleted file mode 100644
index a95050d6a7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DTDDragAndDropManager.java
+++ /dev/null
@@ -1,46 +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.wst.dtd.ui.internal.dnd;
-
-import java.util.Collection;
-
-import org.eclipse.wst.common.ui.internal.dnd.DragAndDropCommand;
-import org.eclipse.wst.common.ui.internal.dnd.DragAndDropManager;
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.CMNode;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.TopLevelNode;
-
-public class DTDDragAndDropManager implements DragAndDropManager {
-
- public DragAndDropCommand createCommand(Object target, float location, int operations, int operation, Collection source) {
- if (target instanceof DTDNode) {
- DTDNode node = (DTDNode) target;
-
- if (node instanceof TopLevelNode) {
- return new DragTopLevelNodesCommand(target, location, operations, operation, source);
- }
- if (node instanceof Attribute) {
- return new DragAttributeCommand(target, location, operations, operation, source);
- }
- if (node instanceof CMNode) {
- return new DragContentModelCommand(target, location, operations, operation, source);
- }
-
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragAttributeCommand.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragAttributeCommand.java
deleted file mode 100644
index 45511c1cf3..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragAttributeCommand.java
+++ /dev/null
@@ -1,61 +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.wst.dtd.ui.internal.dnd;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.common.ui.internal.dnd.DefaultDragAndDropCommand;
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-
-
-
-public class DragAttributeCommand extends DefaultDragAndDropCommand {
-
- public DragAttributeCommand(Object target, float location, int operations, int operation, Collection sources) {
- super(target, location, operations, operation, sources);
- }
-
- public boolean canExecute() {
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- Object source = iter.next();
- if (!(source instanceof Attribute)) {
- return false;
- }
- }
- return true;
- }
-
- public void execute() {
- DTDNode referenceNode = (DTDNode) target;
- DTDFile dtdFile = referenceNode.getDTDFile();
- if (referenceNode instanceof Attribute) {
- dtdFile.getDTDModel().beginRecording(this, DTDUIMessages._UI_MOVE_ATTRIBUTE); //$NON-NLS-1$
- AttributeList attList = (AttributeList) referenceNode.getParentNode();
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof Attribute) {
- attList.insertIntoModel(this, (Attribute) referenceNode, (Attribute) node, isAfter());
- dtdFile.deleteNode(this, node);
- }
- }
- dtdFile.getDTDModel().endRecording(this);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragContentModelCommand.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragContentModelCommand.java
deleted file mode 100644
index 51cdb8735f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragContentModelCommand.java
+++ /dev/null
@@ -1,113 +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.wst.dtd.ui.internal.dnd;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.wst.common.ui.internal.dnd.DefaultDragAndDropCommand;
-import org.eclipse.wst.dtd.core.internal.CMBasicNode;
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-import org.eclipse.wst.dtd.core.internal.CMNode;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-
-
-public class DragContentModelCommand extends DefaultDragAndDropCommand {
-
- public DragContentModelCommand(Object target, float location, int operations, int operation, Collection sources) {
- super(target, location, operations, operation, sources);
- }
-
- public boolean canExecute() {
- if (!(target instanceof CMNode)) {
- return false;
- }
-
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- Object source = iter.next();
- if (!(source instanceof CMNode)) {
- return false;
- }
- }
- return true;
- }
-
- public void execute() {
- DTDNode referenceNode = (DTDNode) target;
-
- if (referenceNode instanceof CMNode) {
- DTDFile dtdFile = referenceNode.getDTDFile();
-
- DTDNode parent = (DTDNode) referenceNode.getParentNode();
- dtdFile.getDTDModel().beginRecording(this, DTDUIMessages._UI_MOVE_CONTENT); //$NON-NLS-1$
- boolean parentIsElement = false;
- Element element = null;
- CMGroupNode group = null;
- if (parent instanceof Element) {
- parentIsElement = true;
- element = (Element) parent;
- }
- else {
- group = (CMGroupNode) parent;
- }
-
- if (element == null && group == null) {
- // no parent to add to
- return;
- }
-
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof CMNode) {
- if (parentIsElement) {
- if (element.getContentModel() == node) {
- continue;
- }
- element.replaceContentModel(this, (CMNode) node);
- }
- else {
- if (referenceNode == node || (isAfter() && referenceNode.getNextSibling() == node) || (!isAfter() && node.getNextSibling() == referenceNode)) {
- continue;
- }
-
- group.insertIntoModel(this, (CMNode) referenceNode, (CMNode) node, isAfter());
-
- }
- DTDNode nodeParent = (DTDNode) node.getParentNode();
- nodeParent.delete(this, node);
- }
- }
- dtdFile.getDTDModel().endRecording(this);
- }
- }
-
- public int getFeedback() {
- DTDNode referenceNode = (DTDNode) target;
- if (referenceNode instanceof CMNode) {
- CMNode cmNode = (CMNode) referenceNode;
- if (cmNode.isRootElementContent() && cmNode instanceof CMBasicNode) {
- return DND.FEEDBACK_SELECT;
- }
- }
-
- return super.getFeedback();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragTopLevelNodesCommand.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragTopLevelNodesCommand.java
deleted file mode 100644
index 59b872eff9..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragTopLevelNodesCommand.java
+++ /dev/null
@@ -1,64 +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.wst.dtd.ui.internal.dnd;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.wst.common.ui.internal.dnd.DefaultDragAndDropCommand;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.TopLevelNode;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-
-public class DragTopLevelNodesCommand extends DefaultDragAndDropCommand {
-
- static private final String moveNode = DTDUIMessages._UI_MOVE_NODE; //$NON-NLS-1$
- static private final String moveNodes = DTDUIMessages._UI_MOVE_NODES; //$NON-NLS-1$
-
- public DragTopLevelNodesCommand(Object target, float location, int operations, int operation, Collection sources) {
- super(target, location, operations, operation, sources);
- }
-
- public boolean canExecute() {
- if (!(target instanceof TopLevelNode)) {
- return false;
- }
-
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- Object source = iter.next();
- if (!(source instanceof TopLevelNode)) {
- return false;
- }
- }
- return true;
- }
-
- public void execute() {
- DTDNode referenceNode = (DTDNode) target;
-
- DTDFile dtdFile = referenceNode.getDTDFile();
- dtdFile.getDTDModel().beginRecording(this, sources.size() > 1 ? moveNodes : moveNode);
- Iterator iter = sources.iterator();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (node instanceof TopLevelNode) {
- dtdFile.moveNode(this, referenceNode, node, isAfter());
- }
- }
- dtdFile.getDTDModel().endRecording(this);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/ActionContributorDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/ActionContributorDTD.java
deleted file mode 100644
index a624936ea5..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/ActionContributorDTD.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.internal.editor;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.sse.ui.internal.actions.ActionContributor;
-
-/**
- * XMLEditorActionContributor
- *
- * 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 ActionContributorDTD extends ActionContributor {
- protected static final String[] EDITOR_IDS = {"org.eclipse.wst.dtd.core.dtdsource.source", "org.eclipse.wst.sse.ui.StructuredTextEditor"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.edit.util.ActionContributor#getExtensionIDs()
- */
- protected String[] getExtensionIDs() {
- return EDITOR_IDS;
- }
-
- protected void addToMenu(IMenuManager menu) {
- // edit commands
- IMenuManager editMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
- if (editMenu != null) {
- editMenu.add(fCommandsSeparator);
- editMenu.add(fToggleInsertModeAction);
- editMenu.add(fCommandsSeparator);
- editMenu.add(fExpandSelectionToMenu);
- editMenu.add(fCommandsSeparator);
- editMenu.add(fMenuAdditionsGroupMarker);
- }
-
- // source commands
- String sourceMenuLabel = DTDUIMessages.SourceMenu_label;
- String sourceMenuId = "sourceMenuId"; //$NON-NLS-1$
- IMenuManager sourceMenu = new MenuManager(sourceMenuLabel, sourceMenuId);
- menu.insertAfter(IWorkbenchActionConstants.M_EDIT, sourceMenu);
- if (sourceMenu != null) {
- sourceMenu.add(fCommandsSeparator);
- sourceMenu.add(fShiftRight);
- sourceMenu.add(fShiftLeft);
- sourceMenu.add(fCommandsSeparator);
- }
- IMenuManager navigateMenu = menu.findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE);
- if (navigateMenu != null) {
- IMenuManager gotoGroup = navigateMenu.findMenuUsingPath(IWorkbenchActionConstants.GO_TO);
- if (gotoGroup != null) {
- gotoGroup.add(fGotoMatchingBracketAction);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImageHelper.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImageHelper.java
deleted file mode 100644
index 70d949d4cb..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImageHelper.java
+++ /dev/null
@@ -1,157 +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.wst.dtd.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.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-
-/**
- * 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 DTDEditorPluginImageHelper {
- private static DTDEditorPluginImageHelper instance = null;
-
- /**
- * Gets the instance.
- *
- * @return Returns a DTDEditorPluginImageHelper
- */
- public synchronized static DTDEditorPluginImageHelper getInstance() {
- if (instance == null)
- instance = new DTDEditorPluginImageHelper();
- return instance;
- }
-
- // save a descriptor for each image
- private HashMap fImageDescRegistry = null;
- private final String PLUGINID = DTDUIPlugin.getDefault().getBundle().getSymbolicName();
-
- /**
- * 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;
- }
-
- /**
- * 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 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();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImages.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImages.java
deleted file mode 100644
index bb2befbabb..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImages.java
+++ /dev/null
@@ -1,44 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.internal.editor;
-
-/**
- * Bundle of most images used by the DTD Source Editor plug-in.
- */
-public class DTDEditorPluginImages {
- public static final String IMG_CTOOL_ADD_ATTRIBUTE = "icons/full/ctool16/ADD_Attribute.gif"; //$NON-NLS-1$
-
- public static final String IMG_CTOOL_ADD_ELEMENT = "icons/full/ctool16/ADD_Element.gif"; //$NON-NLS-1$
-
- public static final String IMG_CTOOL_ADD_ELEMENTTOCONMODEL = "icons/full/ctool16/ADD_ElementToConModel.gif"; //$NON-NLS-1$
-
- public static final String IMG_CTOOL_ADD_GROUPTOCONMODEL = "icons/full/ctool16/ADD_GroupToConModel.gif"; //$NON-NLS-1$
- public static final String IMG_DTOOL_ADD_ATTRIBUTE = "icons/full/dtool16/ADD_Attribute.gif"; //$NON-NLS-1$
- public static final String IMG_DTOOL_ADD_ELEMENT = "icons/full/dtool16/ADD_Element.gif"; //$NON-NLS-1$
- public static final String IMG_DTOOL_ADD_ELEMENTTOCONMODEL = "icons/full/dtool16/ADD_ElementToConModel.gif"; //$NON-NLS-1$
- public static final String IMG_DTOOL_ADD_GROUPTOCONMODEL = "icons/full/dtool16/ADD_GroupToConModel.gif"; //$NON-NLS-1$
- public static final String IMG_ETOOL_ADD_ATTRIBUTE = "icons/full/etool16/ADD_Attribute.gif"; //$NON-NLS-1$
- public static final String IMG_ETOOL_ADD_ELEMENT = "icons/full/etool16/ADD_Element.gif"; //$NON-NLS-1$
- public static final String IMG_ETOOL_ADD_ELEMENTTOCONMODEL = "icons/full/etool16/ADD_ElementToConModel.gif"; //$NON-NLS-1$
- public static final String IMG_ETOOL_ADD_GROUPTOCONMODEL = "icons/full/etool16/ADD_GroupToConModel.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_ADD_COMMENT = "icons/full/obj16/ADD_Comment.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_ADD_ENTITY = "icons/full/obj16/ADD_Entity.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_ADD_ENTITY_REFERENCE = "icons/full/obj16/ADD_Entity_Reference.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_ADD_NOTATION = "icons/full/obj16/ADD_Notation.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_ORGANIZE_DTD_LOGICALLY = "icons/full/obj16/organize_dtd_logically.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_SORT = "icons/full/obj16/sort.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_VALIDATE = "icons/full/obj16/validate.gif"; //$NON-NLS-1$
-
- public static final String IMG_WIZBAN_NEWDTDFILE = "icons/full/wizban/newdtdfile_wiz.png"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/IHelpContextIds.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/IHelpContextIds.java
deleted file mode 100644
index e0ce21090d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/IHelpContextIds.java
+++ /dev/null
@@ -1,43 +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.wst.dtd.ui.internal.editor;
-
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-
-/**
- * Help context ids for the DTD Source Editor.
- * <p>
- * This interface contains constants only; it is not intended to be
- * implemented.
- * </p>
- *
- */
-public interface IHelpContextIds {
-
- // org.eclipse.wst.dtd.ui.
- public static final String PREFIX = DTDUIPlugin.getDefault().getBundle().getSymbolicName() + "."; //$NON-NLS-1$
- // DTD Files Preference page
- public static final String DTD_PREFWEBX_FILES_HELPID = PREFIX + "webx0020"; //$NON-NLS-1$
- // DTD Styles Preference page
- public static final String DTD_PREFWEBX_STYLES_HELPID = PREFIX + "webx0021"; //$NON-NLS-1$
- // DTD Template Preference page (no id for this yet)
- public static final String DTD_PREFWEBX_TEMPLATES_HELPID = PREFIX + "webx0022"; //$NON-NLS-1$
-
- // // figured out on the fly
- // // DTD Source page editor
- // public static final String DTD_SOURCEVIEW_HELPID =
- // ContentTypeIdForDTD.ContentTypeID_DTD + "_source_HelpId"; //$NON-NLS-1$
-
- // DTD New File Wizard - Template Page
- public static final String DTD_NEWWIZARD_TEMPLATE_HELPID = PREFIX + "dtdw0010"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDColorPage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDColorPage.java
deleted file mode 100644
index ed1855d55d..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDColorPage.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.internal.preferences;
-
-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.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.dtd.ui.internal.style.IStyleConstantsDTD;
-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.AbstractColorPage;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.StyledTextColorPicker;
-
-/**
- * @deprecated
- */
-public class DTDColorPage extends AbstractColorPage {
-
- protected Control createContents(Composite parent) {
- Composite pageComponent = createComposite(parent, 1);
- ((GridData) pageComponent.getLayoutData()).horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
-
- super.createContents(pageComponent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.DTD_PREFWEBX_STYLES_HELPID);
-
- return pageComponent;
- }
-
- /**
- * 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;
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return DTDUIPlugin.getDefault().getPreferenceStore();
- }
-
- public String getSampleText() {
- return DTDUIMessages.DTDColorPage_0; //$NON-NLS-1$
- }
-
- protected void initContextStyleMap(Dictionary contextStyleMap) {
- contextStyleMap.put(DTDRegionTypes.CONTENT_EMPTY, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.CONTENT_ANY, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.CONTENT_PCDATA, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.NDATA_VALUE, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.NAME, IStyleConstantsDTD.DTD_DATA);
- contextStyleMap.put(DTDRegionTypes.ENTITY_PARM, IStyleConstantsDTD.DTD_DATA);
-
- contextStyleMap.put(DTDRegionTypes.ELEMENT_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- contextStyleMap.put(DTDRegionTypes.ENTITY_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- contextStyleMap.put(DTDRegionTypes.ATTLIST_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- contextStyleMap.put(DTDRegionTypes.NOTATION_TAG, IStyleConstantsDTD.DTD_TAGNAME);
-
- contextStyleMap.put(DTDRegionTypes.CONNECTOR, IStyleConstantsDTD.DTD_SYMBOL);
- contextStyleMap.put(DTDRegionTypes.OCCUR_TYPE, IStyleConstantsDTD.DTD_SYMBOL);
-
- contextStyleMap.put(DTDRegionTypes.START_TAG, IStyleConstantsDTD.DTD_TAG);
- contextStyleMap.put(DTDRegionTypes.END_TAG, IStyleConstantsDTD.DTD_TAG);
- contextStyleMap.put(DTDRegionTypes.EXCLAMATION, IStyleConstantsDTD.DTD_TAG);
-
- contextStyleMap.put(DTDRegionTypes.COMMENT_START, IStyleConstantsDTD.DTD_COMMENT);
- contextStyleMap.put(DTDRegionTypes.COMMENT_CONTENT, IStyleConstantsDTD.DTD_COMMENT);
- contextStyleMap.put(DTDRegionTypes.COMMENT_END, IStyleConstantsDTD.DTD_COMMENT);
-
- contextStyleMap.put(DTDRegionTypes.SINGLEQUOTED_LITERAL, IStyleConstantsDTD.DTD_STRING);
- contextStyleMap.put(DTDRegionTypes.DOUBLEQUOTED_LITERAL, IStyleConstantsDTD.DTD_STRING);
-
- contextStyleMap.put(DTDRegionTypes.SYSTEM_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.PUBLIC_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.NDATA_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.CDATA_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.ID_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.IDREF_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.IDREFS_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.ENTITY_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.ENTITIES_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.NMTOKEN_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.NMTOKENS_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.NOTATION_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.REQUIRED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.IMPLIED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- contextStyleMap.put(DTDRegionTypes.FIXED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- }
-
- protected void initDescriptions(Dictionary descriptions) {
- descriptions.put(IStyleConstantsDTD.DTD_COMMENT, DTDUIMessages.DTDColorPage_1); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_DATA, DTDUIMessages.DTDColorPage_2); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_DEFAULT, DTDUIMessages.DTDColorPage_3); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_KEYWORD, DTDUIMessages.DTDColorPage_4); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_STRING, DTDUIMessages.DTDColorPage_5); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_SYMBOL, DTDUIMessages.DTDColorPage_6); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_TAG, DTDUIMessages.DTDColorPage_7); //$NON-NLS-1$
- descriptions.put(IStyleConstantsDTD.DTD_TAGNAME, DTDUIMessages.DTDColorPage_8); //$NON-NLS-1$
- }
-
- protected void initStyleList(ArrayList list) {
- list.add(IStyleConstantsDTD.DTD_COMMENT);
- list.add(IStyleConstantsDTD.DTD_DATA);
- list.add(IStyleConstantsDTD.DTD_DEFAULT);
- list.add(IStyleConstantsDTD.DTD_KEYWORD);
- list.add(IStyleConstantsDTD.DTD_STRING);
- list.add(IStyleConstantsDTD.DTD_SYMBOL);
- list.add(IStyleConstantsDTD.DTD_TAG);
- list.add(IStyleConstantsDTD.DTD_TAGNAME);
- }
-
- protected void setupPicker(StyledTextColorPicker picker) {
- IModelManager mmanager = StructuredModelManager.getModelManager();
- picker.setParser(mmanager.createStructuredDocumentFor(ContentTypeIdForDTD.ContentTypeID_DTD).getParser());
-
- Dictionary descriptions = new Hashtable();
- initDescriptions(descriptions);
-
- 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.wst.sse.ui.preferences.ui.AbstractColorPage#savePreferences()
- */
- protected void savePreferences() {
- DTDUIPlugin.getDefault().savePluginPreferences();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDFilesPreferencePage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDFilesPreferencePage.java
deleted file mode 100644
index 7bff14c6cc..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDFilesPreferencePage.java
+++ /dev/null
@@ -1,160 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.internal.preferences;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Combo;
-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.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferenceLinkArea;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.preferences.DTDCorePreferenceNames;
-import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
-
-
-public class DTDFilesPreferencePage extends AbstractPreferencePage {
- private Combo fDefaultSuffix = null;
- private List fValidExtensions = null;
-
- protected Control createContents(final Composite parent) {
- Composite composite = super.createComposite(parent, 1);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.DTD_PREFWEBX_FILES_HELPID);
-
- new PreferenceLinkArea(composite, SWT.WRAP | SWT.MULTI, "org.eclipse.wst.sse.ui.preferences.editor", DTDUIMessages._UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK,//$NON-NLS-1$
- (IWorkbenchPreferenceContainer) getContainer(), null).getControl().setLayoutData(GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).create());
- new Label(composite, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().create());
-
-
- Group creatingGroup = createGroup(composite, 2);
- creatingGroup.setText(DTDUIMessages.Creating_files);
-
- // Default extension for New file Wizard
- createLabel(creatingGroup, DTDUIMessages.DTDFilesPreferencePage_ExtensionLabel);
- fDefaultSuffix = createDropDownBox(creatingGroup);
- String[] validExtensions = (String[]) getValidExtensions().toArray(new String[0]);
- Arrays.sort(validExtensions);
- fDefaultSuffix.setItems(validExtensions);
- fDefaultSuffix.addSelectionListener(this);
-
- setSize(composite);
- loadPreferences();
-
- return composite;
- }
-
- public void dispose() {
- fDefaultSuffix.removeModifyListener(this);
- super.dispose();
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return DTDUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected void doSavePreferenceStore() {
- DTDCorePlugin.getInstance().savePluginPreferences(); // model
- }
-
- /**
- * Get content type associated with this new file wizard
- *
- * @return IContentType
- */
- private IContentType getContentType() {
- return Platform.getContentTypeManager().getContentType(ContentTypeIdForDTD.ContentTypeID_DTD);
- }
-
- /**
- * Get list of valid extensions
- *
- * @return List
- */
- private List getValidExtensions() {
- if (fValidExtensions == null) {
- IContentType type = getContentType();
- fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
- }
- return fValidExtensions;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage#getModelPreferences()
- */
- protected Preferences getModelPreferences() {
- return DTDCorePlugin.getInstance().getPluginPreferences();
- }
-
- protected void initializeValues() {
- String suffix = getModelPreferences().getString(DTDCorePreferenceNames.DEFAULT_EXTENSION);
- fDefaultSuffix.setText(suffix);
- }
-
- protected void performDefaults() {
- String suffix = getModelPreferences().getDefaultString(DTDCorePreferenceNames.DEFAULT_EXTENSION);
- fDefaultSuffix.setText(suffix);
-
- super.performDefaults();
- }
-
- public boolean performOk() {
- boolean result = super.performOk();
-
- doSavePreferenceStore();
-
- return result;
- }
-
- protected void storeValues() {
- String suffix = fDefaultSuffix.getText();
- getModelPreferences().setValue(DTDCorePreferenceNames.DEFAULT_EXTENSION, suffix);
- }
-
- protected void validateValues() {
- boolean isValid = false;
- Iterator i = getValidExtensions().iterator();
- while (i.hasNext() && !isValid) {
- String extension = (String) i.next();
- isValid = extension.equalsIgnoreCase(fDefaultSuffix.getText());
- }
-
- if (!isValid) {
- setErrorMessage(NLS.bind(DTDUIMessages.DTDFilesPreferencePage_ExtensionError, getValidExtensions().toString()));
- setValid(false);
- }
- else {
- setErrorMessage(null);
- setValid(true);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDSyntaxColoringPage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDSyntaxColoringPage.java
deleted file mode 100644
index a675cbd575..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDSyntaxColoringPage.java
+++ /dev/null
@@ -1,855 +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.wst.dtd.ui.internal.preferences;
-
-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.preference.PreferencePage;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.TextAttribute;
-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.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.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.dtd.ui.internal.style.IStyleConstantsDTD;
-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.ColorHelper;
-import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
-
-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 DTDSyntaxColoringPage extends PreferencePage 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;
-
- // 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);
- fBold.setEnabled(true);
- fItalic.setEnabled(true);
- fStrike.setEnabled(true);
- fUnderline.setEnabled(true);
- fForegroundLabel.setEnabled(true);
- fBackgroundLabel.setEnabled(true);
- fForegroundColorEditor.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.DTD_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, DTDUIMessages.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, DTDUIMessages.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);
-
- 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);
-
- fBold = createCheckbox(editControls, DTDUIMessages.SyntaxColoringPage_3);
- fBold.setEnabled(false);
- ((GridData) fBold.getLayoutData()).horizontalSpan = 2;
- fItalic = createCheckbox(editControls, DTDUIMessages.SyntaxColoringPage_4);
- fItalic.setEnabled(false);
- ((GridData) fItalic.getLayoutData()).horizontalSpan = 2;
- fStrike = createCheckbox(editControls, DTDUIMessages.SyntaxColoringPage_5);
- fStrike.setEnabled(false);
- ((GridData) fStrike.getLayoutData()).horizontalSpan = 2;
- fUnderline = createCheckbox(editControls, DTDUIMessages.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:"
- SourceViewer viewer = new SourceViewer(sampleArea, null, SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY);
- fText = viewer.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(ContentTypeIdForDTD.ContentTypeID_DTD);
- fDocument.set(getExampleText());
- viewer.setDocument(fDocument);
-
- top.setWeights(new int[]{1, 1});
- editor.setWeights(new int[]{1, 1});
- PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.DTD_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;
- }
-
- 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 DTDUIPlugin.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 DTDUIMessages.DTDColorPage_0;
- }
-
- 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(IStyleConstantsDTD.DTD_COMMENT); //$NON-NLS-1$
- styles.add(IStyleConstantsDTD.DTD_DATA); //$NON-NLS-1$
- styles.add(IStyleConstantsDTD.DTD_DEFAULT); //$NON-NLS-1$
- styles.add(IStyleConstantsDTD.DTD_KEYWORD); //$NON-NLS-1$
- styles.add(IStyleConstantsDTD.DTD_STRING); //$NON-NLS-1$
- styles.add(IStyleConstantsDTD.DTD_SYMBOL); //$NON-NLS-1$
- styles.add(IStyleConstantsDTD.DTD_TAG); //$NON-NLS-1$
- styles.add(IStyleConstantsDTD.DTD_TAGNAME); //$NON-NLS-1$
- 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(DTDRegionTypes.CONTENT_EMPTY, IStyleConstantsDTD.DTD_DATA);
- fContextToStyleMap.put(DTDRegionTypes.CONTENT_ANY, IStyleConstantsDTD.DTD_DATA);
- fContextToStyleMap.put(DTDRegionTypes.CONTENT_PCDATA, IStyleConstantsDTD.DTD_DATA);
- fContextToStyleMap.put(DTDRegionTypes.NDATA_VALUE, IStyleConstantsDTD.DTD_DATA);
- fContextToStyleMap.put(DTDRegionTypes.NAME, IStyleConstantsDTD.DTD_DATA);
- fContextToStyleMap.put(DTDRegionTypes.ENTITY_PARM, IStyleConstantsDTD.DTD_DATA);
-
- fContextToStyleMap.put(DTDRegionTypes.ELEMENT_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- fContextToStyleMap.put(DTDRegionTypes.ENTITY_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- fContextToStyleMap.put(DTDRegionTypes.ATTLIST_TAG, IStyleConstantsDTD.DTD_TAGNAME);
- fContextToStyleMap.put(DTDRegionTypes.NOTATION_TAG, IStyleConstantsDTD.DTD_TAGNAME);
-
- fContextToStyleMap.put(DTDRegionTypes.CONNECTOR, IStyleConstantsDTD.DTD_SYMBOL);
- fContextToStyleMap.put(DTDRegionTypes.OCCUR_TYPE, IStyleConstantsDTD.DTD_SYMBOL);
-
- fContextToStyleMap.put(DTDRegionTypes.START_TAG, IStyleConstantsDTD.DTD_TAG);
- fContextToStyleMap.put(DTDRegionTypes.END_TAG, IStyleConstantsDTD.DTD_TAG);
- fContextToStyleMap.put(DTDRegionTypes.EXCLAMATION, IStyleConstantsDTD.DTD_TAG);
-
- fContextToStyleMap.put(DTDRegionTypes.COMMENT_START, IStyleConstantsDTD.DTD_COMMENT);
- fContextToStyleMap.put(DTDRegionTypes.COMMENT_CONTENT, IStyleConstantsDTD.DTD_COMMENT);
- fContextToStyleMap.put(DTDRegionTypes.COMMENT_END, IStyleConstantsDTD.DTD_COMMENT);
-
- fContextToStyleMap.put(DTDRegionTypes.SINGLEQUOTED_LITERAL, IStyleConstantsDTD.DTD_STRING);
- fContextToStyleMap.put(DTDRegionTypes.DOUBLEQUOTED_LITERAL, IStyleConstantsDTD.DTD_STRING);
-
- fContextToStyleMap.put(DTDRegionTypes.SYSTEM_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.PUBLIC_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.NDATA_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.CDATA_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.ID_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.IDREF_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.IDREFS_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.ENTITY_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.ENTITIES_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.NMTOKEN_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.NMTOKENS_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.NOTATION_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.REQUIRED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.IMPLIED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- fContextToStyleMap.put(DTDRegionTypes.FIXED_KEYWORD, IStyleConstantsDTD.DTD_KEYWORD);
- }
-
- private void initStyleToDescriptionMap() {
- fStyleToDescriptionMap.put(IStyleConstantsDTD.DTD_COMMENT, DTDUIMessages.DTDColorPage_1); //$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsDTD.DTD_DATA, DTDUIMessages.DTDColorPage_2); //$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsDTD.DTD_DEFAULT, DTDUIMessages.DTDColorPage_3); //$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsDTD.DTD_KEYWORD, DTDUIMessages.DTDColorPage_4); //$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsDTD.DTD_STRING, DTDUIMessages.DTDColorPage_5); //$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsDTD.DTD_SYMBOL, DTDUIMessages.DTDColorPage_6); //$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsDTD.DTD_TAG, DTDUIMessages.DTDColorPage_7); //$NON-NLS-1$
- fStyleToDescriptionMap.put(IStyleConstantsDTD.DTD_TAGNAME, DTDUIMessages.DTDColorPage_8); //$NON-NLS-1$
- }
-
- protected void performDefaults() {
- super.performDefaults();
- getOverlayStore().loadDefaults();
- applyStyles();
- fStylesViewer.setSelection(StructuredSelection.EMPTY);
- activate(null);
- fText.redraw();
- }
-
- public boolean performOk() {
- getOverlayStore().propagate();
-
- DTDUIPlugin.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.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDTemplatePreferencePage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDTemplatePreferencePage.java
deleted file mode 100644
index 8cca3874aa..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDTemplatePreferencePage.java
+++ /dev/null
@@ -1,167 +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.wst.dtd.ui.internal.preferences;
-
-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.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.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.ui.StructuredTextViewerConfigurationDTD;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
-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 DTD templates
- */
-public class DTDTemplatePreferencePage extends TemplatePreferencePage {
-
- class DTDEditTemplateDialog extends EditTemplateDialog {
- public DTDEditTemplateDialog(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 StructuredTextViewerConfigurationDTD();
-
- 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 DTDTemplatePreferencePage() {
- DTDUIPlugin dtdUIPlugin = DTDUIPlugin.getDefault();
-
- setPreferenceStore(dtdUIPlugin.getPreferenceStore());
- setTemplateStore(dtdUIPlugin.getTemplateStore());
- setContextTypeRegistry(dtdUIPlugin.getTemplateContextRegistry());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- boolean ok = super.performOk();
- DTDUIPlugin.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.DTD_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 StructuredTextViewerConfigurationDTD();
-
- 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 = ContentTypeIdForDTD.ContentTypeID_DTD;
- viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- ((StructuredTextViewer) 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 DTDEditTemplateDialog(getShell(), template, edit, isNameModifiable, getContextTypeRegistry());
- if (dialog.open() == Window.OK) {
- return dialog.getTemplate();
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java
deleted file mode 100644
index 34d558db4f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java
+++ /dev/null
@@ -1,65 +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.wst.dtd.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.ui.PlatformUI;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.style.IStyleConstantsDTD;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
-
-/**
- * Sets default values for DTD UI preferences
- */
-public class DTDUIPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = DTDUIPlugin.getDefault().getPreferenceStore();
- ColorRegistry registry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
-
- // DTD Style Preferences
- String NOBACKGROUNDBOLD = " | null | false"; //$NON-NLS-1$
- String JUSTITALIC = " | null | false | true"; //$NON-NLS-1$
- String styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_DEFAULT, 0, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_DEFAULT, styleValue); // black
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_TAG, 63, 63, 191) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_TAG, styleValue); // blue
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_TAGNAME, 63, 63, 191) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_TAGNAME, styleValue); // blue
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_COMMENT, 127, 127, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_COMMENT, styleValue); // grey
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_KEYWORD, 128, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_KEYWORD, styleValue); // dark
- // red
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_STRING, 63, 159, 95) + JUSTITALIC;
- store.setDefault(IStyleConstantsDTD.DTD_STRING, styleValue); // green
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_DATA, 191, 95, 95) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_DATA, styleValue); // light
- // red
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsDTD.DTD_SYMBOL, 128, 0, 0) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsDTD.DTD_SYMBOL, styleValue); // dark
- // red
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceNames.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceNames.java
deleted file mode 100644
index 73f2f71d8f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceNames.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.wst.dtd.ui.internal.preferences;
-
-/**
- * Preference keys for DTD UI
- */
-public class DTDUIPreferenceNames {
- private DTDUIPreferenceNames() {
- // cannot create instance
- }
- /**
- * The key to store customized templates.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String TEMPLATES_KEY = "org.eclipse.wst.sse.ui.custom_templates"; //$NON-NLS-1$
-
- /**
- * The key to store the last template name used in new DTD 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$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/projection/StructuredTextFoldingProviderDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/projection/StructuredTextFoldingProviderDTD.java
deleted file mode 100644
index fddd13acfc..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/projection/StructuredTextFoldingProviderDTD.java
+++ /dev/null
@@ -1,563 +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.wst.dtd.ui.internal.projection;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentExtension;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.ITextInputListener;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.projection.IProjectionListener;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.TopLevelNode;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.event.IDTDFileListener;
-import org.eclipse.wst.dtd.core.internal.event.NodesEvent;
-import org.eclipse.wst.dtd.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.ui.internal.projection.IStructuredTextFoldingProvider;
-import org.w3c.dom.Node;
-
-/**
- * Updates the projection model of a structured model for DTD.
- */
-public class StructuredTextFoldingProviderDTD implements IStructuredTextFoldingProvider, IProjectionListener, IDTDFileListener, ITextInputListener {
- private final static boolean debugProjectionPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.dtd.ui/projectionperf")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private class TagProjectionAnnotation extends ProjectionAnnotation {
- private boolean fIsVisible = false; /* workaround for BUG85874 */
- private Node fNode;
-
- public TagProjectionAnnotation(Node node, boolean isCollapsed) {
- super(isCollapsed);
- fNode = node;
- }
-
- public Node getNode() {
- return fNode;
- }
-
- public void setNode(Node node) {
- fNode = node;
- }
-
- /**
- * Does not paint hidden annotations. Annotations are hidden when they
- * only span one line.
- *
- * @see ProjectionAnnotation#paint(org.eclipse.swt.graphics.GC,
- * org.eclipse.swt.widgets.Canvas,
- * org.eclipse.swt.graphics.Rectangle)
- */
- public void paint(GC gc, Canvas canvas, Rectangle rectangle) {
- /* workaround for BUG85874 */
- /*
- * only need to check annotations that are expanded because hidden
- * annotations should never have been given the chance to
- * collapse.
- */
- if (!isCollapsed()) {
- // working with rectangle, so line height
- FontMetrics metrics = gc.getFontMetrics();
- if (metrics != null) {
- // do not draw annotations that only span one line and
- // mark them as not visible
- if ((rectangle.height / metrics.getHeight()) <= 1) {
- fIsVisible = false;
- return;
- }
- }
- }
- fIsVisible = true;
- super.paint(gc, canvas, rectangle);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.projection.ProjectionAnnotation#markCollapsed()
- */
- public void markCollapsed() {
- /* workaround for BUG85874 */
- // do not mark collapsed if annotation is not visible
- if (fIsVisible)
- super.markCollapsed();
- }
- }
-
- /**
- * Listens to document to be aware of when to update the projection
- * annotation model.
- */
- class DocumentListener implements IDocumentListener {
- public void documentAboutToBeChanged(DocumentEvent event) {
- if (fDocument == event.getDocument())
- fIsDocumentChanging = true;
- }
-
- public void documentChanged(DocumentEvent event) {
- // register a post notification replace so that projection
- // annotation model will be updated after all documentChanged
- // listeners have been notified
- IDocument document = event.getDocument();
- if (document instanceof IDocumentExtension && fDocument == document) {
- if (fViewer != null && fQueuedNodeChanges != null && !fQueuedNodeChanges.isEmpty()) {
- ((IDocumentExtension) document).registerPostNotificationReplace(this, new PostDocumentChangedListener());
- }
- }
- }
- }
-
- /**
- * Essentially a post document changed listener because it is called after
- * documentchanged has been fired.
- */
- class PostDocumentChangedListener implements IDocumentExtension.IReplace {
- public void perform(IDocument document, IDocumentListener owner) {
- applyAnnotationModelChanges();
- fIsDocumentChanging = false;
- }
- }
-
- /**
- * Contains node and an indication on how it changed
- */
- class NodeChange {
- static final int ADD = 1;
- static final int REMOVE = 2;
-
- private Node fNode;
- private int fChangeType;
-
- public NodeChange(Node node, int changeType) {
- fNode = node;
- fChangeType = changeType;
- }
-
- public Node getNode() {
- return fNode;
- }
-
- public int getChangeType() {
- return fChangeType;
- }
- }
-
- IDocument fDocument;
- ProjectionViewer fViewer;
- private boolean fProjectionNeedsToBeEnabled = false;
- /**
- * Listener to fProjectionViewer's document
- */
- private IDocumentListener fDocumentListener;
- /**
- * Indicates whether or not document is in the middle of changing
- */
- boolean fIsDocumentChanging = false;
- /**
- * List of changed nodes that need to be recalculated
- */
- List fQueuedNodeChanges = null;
-
- /**
- * Processes all the queued node changes and updates projection annotation
- * model.
- */
- void applyAnnotationModelChanges() {
- if (fViewer != null && fQueuedNodeChanges != null && !fQueuedNodeChanges.isEmpty()) {
- ProjectionAnnotationModel annotationModel = fViewer.getProjectionAnnotationModel();
-
- // go through all the pending annotation changes and apply them to
- // the projection annotation model
- while (!fQueuedNodeChanges.isEmpty()) {
- NodeChange changes = (NodeChange) fQueuedNodeChanges.remove(0);
- if (changes.getChangeType() == NodeChange.ADD) {
- // add
- Node node = changes.getNode();
- Position newPos = createProjectionPosition(node);
- if (newPos != null) {
- TagProjectionAnnotation newAnnotation = new TagProjectionAnnotation(node, false);
- // add to map containing annotations to add
- try {
- annotationModel.addAnnotation(newAnnotation, newPos);
- }
- catch (Exception e) {
- // if anything goes wrong, log it and continue
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
- else if (changes.getChangeType() == NodeChange.REMOVE) {
- // remove
- Node node = changes.getNode();
- TagProjectionAnnotation anno = findExistingAnnotation(node);
- if (anno != null) {
- try {
- annotationModel.removeAnnotation(anno);
- }
- catch (Exception e) {
- // if anything goes wrong, log it and continue
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
- }
- fQueuedNodeChanges = null;
- }
- }
-
- /**
- * Goes through every node creates projection annotation if needed
- *
- * @param DTDFile
- * assumes file is not null
- */
- private void addAllAnnotations(DTDFile file) {
- long start = System.currentTimeMillis();
-
- List nodes = file.getNodes();
- Iterator it = nodes.iterator();
- while (it.hasNext()) {
- DTDNode node = (DTDNode) it.next();
- Position newPos = createProjectionPosition(node);
- if (newPos != null) {
- TagProjectionAnnotation newAnnotation = new TagProjectionAnnotation(node, false);
- // add to map containing annotations to add
- fViewer.getProjectionAnnotationModel().addAnnotation(newAnnotation, newPos);
- }
- }
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderDTD.addAllAnnotations: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- /**
- * Create a projection position from the given node. Able to get
- * projection position if node isNodeProjectable.
- *
- * @param node
- * @return null if no projection position possible, a Position otherwise
- */
- private Position createProjectionPosition(Node node) {
- Position pos = null;
- if (isNodeProjectable(node) && node instanceof IndexedRegion) {
- IDocument document = fViewer.getDocument();
- if (document != null) {
- IndexedRegion inode = (IndexedRegion) node;
- int start = inode.getStartOffset();
- int end = inode.getEndOffset();
- if (start >= 0 && start < end) {
- pos = new Position(start, end - start);
- }
- }
- }
- return pos;
- }
-
- /**
- * Searches through projection annotation model and retrieves
- * TagProjectionAnnotation for node
- *
- * @param node
- * @return TagProjectionAnnotation for node or null if could not be found
- */
- private TagProjectionAnnotation findExistingAnnotation(Node node) {
- TagProjectionAnnotation anno = null;
-
- if (node != null) {
- Iterator it = fViewer.getProjectionAnnotationModel().getAnnotationIterator();
- while (it.hasNext() && anno == null) {
- TagProjectionAnnotation a = (TagProjectionAnnotation) it.next();
- if (node.equals(a.getNode()))
- anno = a;
- }
- }
- return anno;
- }
-
- /**
- * Get the dtd file for the fDocument
- *
- * @return DTDFile if it exists, null otherwise
- */
- private DTDFile getDTDFile() {
- DTDFile dtdFile = null;
-
- if (fDocument != null) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (sModel instanceof DTDModelImpl) {
- dtdFile = ((DTDModelImpl) sModel).getDTDFile();
- }
- }
- finally {
- if (sModel != null) {
- sModel.releaseFromRead();
- }
- }
- }
- return dtdFile;
- }
-
- /**
- * Initialize this provider with the correct document. Assumes projection
- * is enabled. (otherwise, only install would have been called)
- */
- public void initialize() {
- if (!isInstalled())
- return;
-
- long start = System.currentTimeMillis();
- // remove old info
- projectionDisabled();
-
- fDocument = fViewer.getDocument();
- DTDFile file = getDTDFile();
-
- if (fDocument != null && file != null && fViewer.getProjectionAnnotationModel() != null) {
- if (fDocumentListener == null)
- fDocumentListener = new DocumentListener();
-
- fDocument.addDocumentListener(fDocumentListener);
-
- // add dtd file listener to new dtd file
- file.addDTDFileListener(this);
-
- try {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=198304
- // disable redraw while adding all adapters
- fViewer.setRedraw(false);
- addAllAnnotations(file);
- }
- finally {
- fViewer.setRedraw(true);
- }
- }
- fProjectionNeedsToBeEnabled = false;
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderDTD.initialize: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- /**
- * Associate a ProjectionViewer with this IStructuredTextFoldingProvider
- *
- * @param viewer
- */
- public void install(ProjectionViewer viewer) {
- // uninstall before trying to install new viewer
- if (isInstalled()) {
- uninstall();
- }
- fViewer = viewer;
- fViewer.addProjectionListener(this);
- fViewer.addTextInputListener(this);
- }
-
- private boolean isInstalled() {
- return fViewer != null;
- }
-
- /**
- * Returns true if node is a node type able to fold
- *
- * @param node
- * @return boolean true if node is projectable, false otherwise
- */
- private boolean isNodeProjectable(Node node) {
- if (node != null) {
- if (node instanceof TopLevelNode)
- return true;
- }
- return false;
- }
-
- public void nodeChanged(DTDNode node) {
- /*
- * Don't believe this is necessary (used to need it to only add
- * projection annotations to elements that span more than one line,
- * but now just always add projection annotation)
- */
- // long start = System.currentTimeMillis();
- // // recalculate projection annotations for node
- // // check if this was even a projectable node to start with
- // if (isNodeProjectable(node)) {
- // // find the existing annotation
- // TagProjectionAnnotation anno = findExistingAnnotation(node);
- // // if able to project node see if projection annotation was
- // // already created and create new if needed
- // Position newPos = createProjectionPosition(node);
- // if (newPos != null && anno == null) {
- // TagProjectionAnnotation newAnnotation = new
- // TagProjectionAnnotation(node, false);
- // // add to map containing annotations to add
- // fViewer.getProjectionAnnotationModel().addAnnotation(newAnnotation,
- // newPos);
- // }
- // // if not able to project node see if projection annotation was
- // // already created and remove it
- // if (newPos == null && anno != null) {
- // fViewer.getProjectionAnnotationModel().removeAnnotation(anno);
- // }
- // }
- //
- // long end = System.currentTimeMillis();
- // if (debugProjectionPerf) {
- // String nodeName = node != null ? node.getNodeName() : "null";
- // //$NON-NLS-1$
- // System.out.println("StructuredTextFoldingProviderDTD.nodeChanged ("
- // + nodeName + "):" + (end - start)); //$NON-NLS-1$ //$NON-NLS-2$
- // }
- }
-
- public void nodesAdded(NodesEvent event) {
- long start = System.currentTimeMillis();
-
- processNodesEvent(event, NodeChange.ADD);
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderDTD.nodesAdded: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- /**
- * Goes through every changed node in event and add to queue of node
- * changes that will be recalculated for projection annotation model.
- *
- * @param event
- * @param changeType
- */
- private void processNodesEvent(NodesEvent event, int changeType) {
- List nodes = event.getNodes();
- Iterator it = nodes.iterator();
- while (it.hasNext()) {
- DTDNode node = (DTDNode) it.next();
- if (isNodeProjectable(node)) {
- if (fQueuedNodeChanges == null) {
- fQueuedNodeChanges = new ArrayList();
- }
-
- int existingIndex = fQueuedNodeChanges.indexOf(node);
- if (existingIndex > -1) {
- // node is already queued up
- NodeChange existingChange = (NodeChange) fQueuedNodeChanges.remove(existingIndex);
- // don't add if added then removed node or vice versa
- if (existingChange.getChangeType() == changeType) {
- NodeChange newChange = new NodeChange(node, changeType);
- fQueuedNodeChanges.add(newChange);
- }
- }
- else {
- // not queued up yet, so queue node
- NodeChange newChange = new NodeChange(node, changeType);
- fQueuedNodeChanges.add(newChange);
- }
- }
- }
- // if document isn't changing, go ahead and apply it
- if (!fIsDocumentChanging) {
- applyAnnotationModelChanges();
- }
- }
-
- public void nodesRemoved(NodesEvent event) {
- long start = System.currentTimeMillis();
-
- processNodesEvent(event, NodeChange.REMOVE);
-
- if (debugProjectionPerf) {
- long end = System.currentTimeMillis();
- System.out.println("StructuredTextFoldingProviderDTD.nodesRemoved: " + (end - start)); //$NON-NLS-1$
- }
- }
-
- public void projectionDisabled() {
- DTDFile file = getDTDFile();
- if (file != null) {
- file.removeDTDFileListener(this);
- }
-
- // remove document listener
- if (fDocumentListener != null && fDocument != null) {
- fDocument.removeDocumentListener(fDocumentListener);
- fDocument = null;
-
- // clear out list of queued changes since it may no longer be
- // accurate
- if (fQueuedNodeChanges != null) {
- fQueuedNodeChanges.clear();
- fQueuedNodeChanges = null;
- }
- }
-
- fDocument = null;
- fProjectionNeedsToBeEnabled = false;
- }
-
- public void projectionEnabled() {
- initialize();
- }
-
- public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
- // if folding is enabled and new document is going to be a totally
- // different document, disable projection
- if (fDocument != null && fDocument != newInput) {
- // disable projection and disconnect everything
- projectionDisabled();
- fProjectionNeedsToBeEnabled = true;
- }
- }
-
- public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
- // if projection was previously enabled before input document changed
- // and new document is different than old document
- if (fProjectionNeedsToBeEnabled && fDocument == null && newInput != null) {
- projectionEnabled();
- fProjectionNeedsToBeEnabled = false;
- }
- }
-
- /**
- * Disconnect this IStructuredTextFoldingProvider from projection viewer
- */
- public void uninstall() {
- if (isInstalled()) {
- projectionDisabled();
-
- fViewer.removeProjectionListener(this);
- fViewer.addTextInputListener(this);
- fViewer = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/registry/AdapterFactoryProviderForDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/registry/AdapterFactoryProviderForDTD.java
deleted file mode 100644
index 61a22f19c7..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/registry/AdapterFactoryProviderForDTD.java
+++ /dev/null
@@ -1,53 +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.wst.dtd.ui.internal.registry;
-
-import org.eclipse.wst.dtd.core.internal.modelhandler.ModelHandlerForDTD;
-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.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryProvider;
-import org.eclipse.wst.sse.ui.internal.util.Assert;
-
-
-/**
- * @author nitin
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class AdapterFactoryProviderForDTD implements AdapterFactoryProvider {
-
- /**
- *
- */
- public AdapterFactoryProviderForDTD() {
- super();
- }
-
- /*
- * @see AdapterFactoryProvider#addAdapterFactories(IStructuredModel)
- */
- public void addAdapterFactories(IStructuredModel structuredModel) {
- FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
- Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
- }
-
- public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
- return (contentTypeDescription instanceof ModelHandlerForDTD);
- }
-
- public void reinitializeFactories(IStructuredModel structuredModel) {
- // nothing to do, since no embedded type
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/IStyleConstantsDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/IStyleConstantsDTD.java
deleted file mode 100644
index 68bdb5e870..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/IStyleConstantsDTD.java
+++ /dev/null
@@ -1,41 +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.wst.dtd.ui.internal.style;
-
-/**
- * Contains the symbolic name of styles used by LineStyleProvider,
- * ColorManager, and any others who may be interested
- */
-public interface IStyleConstantsDTD {
-
- public static final String DTD_COMMENT = "dtdComment"; //$NON-NLS-1$
-
- // Data are variables
- public static final String DTD_DATA = "dtdData"; //$NON-NLS-1$
- public static final String DTD_DEFAULT = "dtdDefault"; //$NON-NLS-1$
-
- // keywords are constants like IMPLIED or PCDATA
- public static final String DTD_KEYWORD = "dtdKeyword"; //$NON-NLS-1$
-
- // strings are anything in quotes
- public static final String DTD_STRING = "dtdString"; //$NON-NLS-1$
-
- // All the remaining symbols
- public static final String DTD_SYMBOL = "dtdSymbol"; //$NON-NLS-1$
-
- // tags are '<', '!', or '>'
- public static final String DTD_TAG = "dtdTag"; //$NON-NLS-1$
-
- // tagnames are like ELEMENT, ATTLIST, etc.
- public static final String DTD_TAGNAME = "dtdTagName"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/LineStyleProviderForDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/LineStyleProviderForDTD.java
deleted file mode 100644
index 443a940ae1..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/LineStyleProviderForDTD.java
+++ /dev/null
@@ -1,133 +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.wst.dtd.ui.internal.style;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-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;
-
-public class LineStyleProviderForDTD extends AbstractLineStyleProvider implements LineStyleProvider {
- public LineStyleProviderForDTD() {
- super();
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- /**
- * a method to centralize all the "format rules" for regions
- * specifically associated for how to "open" the region.
- */
- // not sure why this is coming through null, but just to catch it
- if (region == null) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_DEFAULT);
- }
- String type = region.getType();
- if (type == DTDRegionTypes.CONTENT_EMPTY || type == DTDRegionTypes.CONTENT_ANY || type == DTDRegionTypes.CONTENT_PCDATA) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_DATA);
- }
- else if (type == DTDRegionTypes.ELEMENT_TAG || type == DTDRegionTypes.ENTITY_TAG || type == DTDRegionTypes.ATTLIST_TAG || type == DTDRegionTypes.NOTATION_TAG) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_TAGNAME);
- }
- else if (type == DTDRegionTypes.CONNECTOR || type == DTDRegionTypes.OCCUR_TYPE) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_SYMBOL);
- }
- else if (type == DTDRegionTypes.NDATA_VALUE) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_DATA);
- }
- else if (type == DTDRegionTypes.START_TAG || type == DTDRegionTypes.END_TAG || type == DTDRegionTypes.EXCLAMATION) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_TAG);
- }
- else if (type == DTDRegionTypes.COMMENT_START || type == DTDRegionTypes.COMMENT_CONTENT || type == DTDRegionTypes.COMMENT_END) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_COMMENT);
- }
- else if (type == DTDRegionTypes.SINGLEQUOTED_LITERAL || type == DTDRegionTypes.DOUBLEQUOTED_LITERAL) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_STRING);
- }
- else if (type == DTDRegionTypes.SYSTEM_KEYWORD || type == DTDRegionTypes.PUBLIC_KEYWORD || type == DTDRegionTypes.NDATA_KEYWORD || type == DTDRegionTypes.CDATA_KEYWORD || type == DTDRegionTypes.ID_KEYWORD || type == DTDRegionTypes.IDREF_KEYWORD || type == DTDRegionTypes.IDREFS_KEYWORD || type == DTDRegionTypes.ENTITY_KEYWORD || type == DTDRegionTypes.ENTITIES_KEYWORD || type == DTDRegionTypes.NMTOKEN_KEYWORD || type == DTDRegionTypes.NMTOKENS_KEYWORD || type == DTDRegionTypes.NOTATION_KEYWORD || type == DTDRegionTypes.REQUIRED_KEYWORD || type == DTDRegionTypes.IMPLIED_KEYWORD || type == DTDRegionTypes.FIXED_KEYWORD) {
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_KEYWORD);
- }
- else if (type == DTDRegionTypes.NAME || type == DTDRegionTypes.ENTITY_PARM) {
- // if (region instanceof DTDRegion) {
- // DTDRegion dtdRegion = (DTDRegion) region;
- // IStructuredDocumentRegion flatNode = dtdRegion.getParent();
- // String regionText = flatNode.getText(dtdRegion);
- // if (regionText.equals("ANY") || regionText.equals("EMPTY")) {
- // return new TextAttribute(DTDColors.DTD_KEYWORD);
- // }
- // }
- return (TextAttribute) getTextAttributes().get(IStyleConstantsDTD.DTD_DATA);
- }
-
- // default, return null to signal "not handled"
- // in which case, other factories should be tried
- return null;
- }
-
- protected IPreferenceStore getColorPreferences() {
- return DTDUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected void handlePropertyChange(PropertyChangeEvent event) {
- String styleKey = null;
-
- if (event != null) {
- String prefKey = event.getProperty();
- // check if preference changed is a style preference
- if (IStyleConstantsDTD.DTD_DEFAULT.equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_DEFAULT;
- }
- else if (IStyleConstantsDTD.DTD_TAG.equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_TAG;
- }
- else if (IStyleConstantsDTD.DTD_TAGNAME.equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_TAGNAME;
- }
- else if (IStyleConstantsDTD.DTD_COMMENT.equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_COMMENT;
- }
- else if (IStyleConstantsDTD.DTD_KEYWORD.equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_KEYWORD;
- }
- else if (IStyleConstantsDTD.DTD_STRING.equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_STRING;
- }
- else if (IStyleConstantsDTD.DTD_DATA.equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_DATA;
- }
- else if (IStyleConstantsDTD.DTD_SYMBOL.equals(prefKey)) {
- styleKey = IStyleConstantsDTD.DTD_SYMBOL;
- }
- }
-
- if (styleKey != null) {
- // overwrite style preference with new value
- addTextAttribute(styleKey);
- super.handlePropertyChange(event);
- }
- }
-
- protected void loadColors() {
- addTextAttribute(IStyleConstantsDTD.DTD_DEFAULT);
- addTextAttribute(IStyleConstantsDTD.DTD_TAG);
- addTextAttribute(IStyleConstantsDTD.DTD_TAGNAME);
- addTextAttribute(IStyleConstantsDTD.DTD_COMMENT);
- addTextAttribute(IStyleConstantsDTD.DTD_KEYWORD);
- addTextAttribute(IStyleConstantsDTD.DTD_STRING);
- addTextAttribute(IStyleConstantsDTD.DTD_DATA);
- addTextAttribute(IStyleConstantsDTD.DTD_SYMBOL);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/LineStyleProviderForDTDSubSet.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/LineStyleProviderForDTDSubSet.java
deleted file mode 100644
index 0f25b7e633..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/LineStyleProviderForDTDSubSet.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.internal.style;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.core.text.IDTDPartitions;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-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.IStructuredPartitioning;
-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;
-
-public class LineStyleProviderForDTDSubSet extends AbstractLineStyleProvider implements LineStyleProvider {
- private IStructuredModel fInternalModel = null;
- private LineStyleProviderForDTD fInternalProvider = null;
- private StyleRange[] fInternalRanges;
- private String fPartitioning = null;
-
- public LineStyleProviderForDTDSubSet() {
- super();
- fInternalProvider = new LineStyleProviderForDTD();
- fInternalRanges = new StyleRange[0];
- fPartitioning = IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING;
- }
-
-
- /**
- * @param lineRequestStart
- * @param lineRequestLength
- * @param holdResults
- */
- private void addStyleRanges(int lineRequestStart, int lineRequestLength, Collection holdResults, int adjustment) {
- int lineRequestEnd = lineRequestStart + lineRequestLength;
- for (int i = 0; i < fInternalRanges.length; i++) {
- int adjustedStyleRangeStart = adjustment + fInternalRanges[i].start;
- int adjustedStyleRangeEnd = adjustedStyleRangeStart + fInternalRanges[i].length;
- if (adjustedStyleRangeEnd < lineRequestStart || lineRequestEnd < adjustedStyleRangeStart)
- continue;
- int end = Math.min(adjustedStyleRangeEnd, lineRequestEnd);
- StyleRange range = new StyleRange();
- range.start = Math.max(adjustedStyleRangeStart, lineRequestStart);
- range.length = end - range.start;
- range.fontStyle = fInternalRanges[i].fontStyle;
- range.foreground = fInternalRanges[i].foreground;
- range.background = fInternalRanges[i].background;
- holdResults.add(range);
- }
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- TextAttribute ta = null;
-
- String prefString = getColorPreferences().getString(IStyleConstantsDTD.DTD_DEFAULT);
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- RGB foreground = ColorHelper.toRGB(stylePrefs[0]);
- RGB background = ColorHelper.toRGB(stylePrefs[1]);
- boolean bold = Boolean.valueOf(stylePrefs[2]).booleanValue();
- ta = createTextAttribute(foreground, background, bold);
- }
- return ta;
- }
-
- protected IPreferenceStore getColorPreferences() {
- return DTDUIPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * @return
- */
- private IStructuredDocument getInternalDocument() {
- if (fInternalModel == null) {
- fInternalModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(ContentTypeIdForDTD.ContentTypeID_DTD);
- }
- return fInternalModel.getStructuredDocument();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.structured.style.AbstractLineStyleProvider#prepareRegions(org.eclipse.jface.text.ITypedRegion,
- * int, int, java.util.Collection)
- */
- public boolean prepareRegions(ITypedRegion typedRegion, int lineRequestStart, int lineRequestLength, Collection holdResults) {
- if (!IDTDPartitions.DTD_DEFAULT.equals(typedRegion.getType())) {
- // compute an internal DTD model and return linestyles for it
- ITextRegion dtdContentRegion = null;
- IStructuredDocumentRegion doctype = fDocument.getRegionAtCharacterOffset(typedRegion.getOffset());
- if (doctype != null)
- dtdContentRegion = doctype.getRegionAtCharacterOffset(typedRegion.getOffset());
- String contents = dtdContentRegion != null ? doctype.getFullText(dtdContentRegion) : null;
- IStructuredDocument document = getInternalDocument();
- if (document == null)
- return false;
-
- updateStyleRanges(document, contents);
-
- addStyleRanges(lineRequestStart, lineRequestLength, holdResults, doctype.getStartOffset(dtdContentRegion));
- return true;
- }
- return false;
- }
-
- public void release() {
- super.release();
- if (fInternalProvider != null) {
- fInternalProvider.release();
- }
- }
-
- private void updateStyleRanges(IStructuredDocument document, String contents) {
- if (!document.get().equals(contents)) {
- document.set(contents);
- try {
- ITypedRegion regions[] = TextUtilities.computePartitioning(getInternalDocument(), fPartitioning, 0, document.getLength(), false);
- List ranges = new ArrayList();
- fInternalProvider.init(getInternalDocument(), fRecHighlighter);
- for (int i = 0; i < regions.length; i++) {
- fInternalProvider.prepareRegions(regions[i], regions[i].getOffset(), regions[i].getLength(), ranges);
- }
- fInternalRanges = (StyleRange[]) ranges.toArray(new StyleRange[0]);
- }
- catch (BadLocationException e) {
- fInternalRanges = new StyleRange[0];
- }
- }
- }
-
-
- protected void loadColors() {
- fInternalProvider.loadColors();
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/templates/TemplateContextTypeDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/templates/TemplateContextTypeDTD.java
deleted file mode 100644
index c63d5933ce..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/templates/TemplateContextTypeDTD.java
+++ /dev/null
@@ -1,36 +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
- * David Carver, STAR - added Encoding Content Resolver, bug 162321
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.wst.xml.ui.internal.templates.EncodingTemplateVariableResolverXML;
-
-/**
- * Base class for DTD template context types. Templates of this context type
- * apply to any place within DTD content type.
- */
-public class TemplateContextTypeDTD extends TemplateContextType {
-
- public TemplateContextTypeDTD() {
- 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 EncodingTemplateVariableResolverXML());
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/templates/TemplateContextTypeIdsDTD.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/templates/TemplateContextTypeIdsDTD.java
deleted file mode 100644
index 0aa4ee0ee5..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/templates/TemplateContextTypeIdsDTD.java
+++ /dev/null
@@ -1,17 +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.wst.dtd.ui.internal.templates;
-
-
-public class TemplateContextTypeIdsDTD {
- public static final String NEW = "dtd_new"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/text/DTDDocumentRegionEdgeMatcher.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/text/DTDDocumentRegionEdgeMatcher.java
deleted file mode 100644
index 5cf9a66050..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/text/DTDDocumentRegionEdgeMatcher.java
+++ /dev/null
@@ -1,28 +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.wst.dtd.ui.internal.text;
-
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.sse.ui.internal.text.DocumentRegionEdgeMatcher;
-
-
-public class DTDDocumentRegionEdgeMatcher extends DocumentRegionEdgeMatcher {
-
- /**
- * @param validContexts
- * @param nextMatcher
- */
- public DTDDocumentRegionEdgeMatcher() {
- super(new String[]{DTDRegionTypes.START_TAG, DTDRegionTypes.COMMENT_START}, null);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeAction.java
deleted file mode 100644
index ed94bc9f58..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeAction.java
+++ /dev/null
@@ -1,56 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-
-
-public class AddAttributeAction extends BaseAction {
-
- public AddAttributeAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
- String newName = "NewAttribute"; //$NON-NLS-1$
- if (selectedNode instanceof AttributeList) {
- ((AttributeList) selectedNode).addAttribute(newName);
- }
- else if (selectedNode instanceof Element) {
- ((Element) selectedNode).addAttribute(newName);
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- boolean rc = super.updateSelection(selection);
- DTDNode node = getFirstNodeSelected(selection);
- if (node instanceof Element) {
- // System.out.println("attribute set to true");
- setEnabled(true);
- }
- else {
- // System.out.println("attribute set to false");
- setEnabled(false);
- }
-
- return rc;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeListAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeListAction.java
deleted file mode 100644
index 1bcc5a1c75..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeListAction.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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-
-
-public class AddAttributeListAction extends BaseAction {
-
- public AddAttributeListAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
- DTDFile dtdFile = getModel().getDTDFile();
- String attListName = "NewAttList"; //$NON-NLS-1$
- if (selectedNode != null) {
- DTDNode topLevelNode = dtdFile.getTopLevelNodeAt(selectedNode.getStartOffset());
- if (topLevelNode instanceof Element) {
- attListName = ((Element) topLevelNode).getName();
- }
- }
-
- getModel().getDTDFile().createAttributeList(selectedNode, attListName, true);
- // newElement.setName(DTDUniqueNameHelper.getUniqueElementName(dtdFile));
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddCommentAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddCommentAction.java
deleted file mode 100644
index bdd9630ce5..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddCommentAction.java
+++ /dev/null
@@ -1,32 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-
-
-public class AddCommentAction extends BaseAction {
-
- public AddCommentAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
- getModel().getDTDFile().createComment(selectedNode, "NewComment", true); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementAction.java
deleted file mode 100644
index 6b00a259ac..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementAction.java
+++ /dev/null
@@ -1,33 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.util.DTDUniqueNameHelper;
-
-
-public class AddElementAction extends BaseAction {
-
- public AddElementAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
- DTDFile dtdFile = getModel().getDTDFile();
- String elementName = DTDUniqueNameHelper.getUniqueElementName(dtdFile);
- dtdFile.createElement(selectedNode, elementName, true); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementToContentModelAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementToContentModelAction.java
deleted file mode 100644
index c398cf9fb2..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementToContentModelAction.java
+++ /dev/null
@@ -1,52 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-
-
-public class AddElementToContentModelAction extends BaseAction {
-
- public AddElementToContentModelAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode node = getFirstNodeSelected();
-
- if (node instanceof CMGroupNode) {
- ((CMGroupNode) node).addChild();
- }
- else if (node instanceof Element) {
- ((Element) node).addChild();
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- boolean rc = super.updateSelection(selection);
- DTDNode node = getFirstNodeSelected(selection);
- if (node instanceof CMGroupNode) {
- setEnabled(true);
- }
- else {
- setEnabled(false);
- }
- return rc;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddEntityAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddEntityAction.java
deleted file mode 100644
index c51669ec2e..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddEntityAction.java
+++ /dev/null
@@ -1,35 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-
-
-public class AddEntityAction extends BaseAction {
-
- public AddEntityAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
-
- getModel().getDTDFile().createEntity(selectedNode, "NewEntity", true); //$NON-NLS-1$
- // newElement.setName(DTDUniqueNameHelper.getUniqueElementName(dtdFile));
-
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddGroupToContentModelAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddGroupToContentModelAction.java
deleted file mode 100644
index 866e1c9168..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddGroupToContentModelAction.java
+++ /dev/null
@@ -1,39 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-
-
-public class AddGroupToContentModelAction extends BaseAction {
-
- public AddGroupToContentModelAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode node = getFirstNodeSelected();
-
- if (node instanceof CMGroupNode) {
- ((CMGroupNode) node).addGroup();
- }
- else if (node instanceof Element) {
- ((Element) node).addGroup();
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddNotationAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddNotationAction.java
deleted file mode 100644
index b11f82df70..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddNotationAction.java
+++ /dev/null
@@ -1,34 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-
-
-public class AddNotationAction extends BaseAction {
-
- public AddNotationAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode selectedNode = getFirstNodeSelected();
-
- getModel().getDTDFile().createNotation(selectedNode, "NewNotation", true); //$NON-NLS-1$
-
- // newNotation.setName(DTDUniqueNameHelper.getUniqueNotationName(dtdFile));
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddParameterEntityReferenceAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddParameterEntityReferenceAction.java
deleted file mode 100644
index 05ebced519..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddParameterEntityReferenceAction.java
+++ /dev/null
@@ -1,49 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.util.LabelValuePair;
-
-
-public class AddParameterEntityReferenceAction extends BaseAction {
- public AddParameterEntityReferenceAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public String getFirstExternalParameterEntity(DTDFile dtdFile) {
- LabelValuePair[] freeExternalEntities = dtdFile.getDTDModel().createParmEntityContentItems(null);
-
- if (freeExternalEntities.length > 0) {
- return (String) freeExternalEntities[0].fValue;
- // return (Entity) freeExternalEntities[0].fValue;
- }
- return null;
- }
-
- public void run() {
- DTDFile dtdFile = getModel().getDTDFile();
- String extEntity = getFirstExternalParameterEntity(dtdFile);
- DTDNode selectedNode = getFirstNodeSelected();
- if (extEntity != null) {
- dtdFile.createParameterEntityReference(selectedNode, extEntity, true);
- }
- else {
- dtdFile.createParameterEntityReference(selectedNode, "%NewEntityReference;", true); //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/BaseAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/BaseAction.java
deleted file mode 100644
index 411e9c3e91..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/BaseAction.java
+++ /dev/null
@@ -1,67 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorActionBarContributor;
-import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-
-abstract public class BaseAction extends SelectionListenerAction {
-
- protected IEditorActionBarContributor contextContributor;
- private IStructuredModel fModel;
-
- public BaseAction(IStructuredModel model, String text) {
- this(model, text, null);
- }
-
- public BaseAction(IStructuredModel model, String text, ImageDescriptor imageDesc) {
- super(text);
- fModel = model;
- setImageDescriptor(imageDesc);
- }
-
- protected DTDNode getFirstNodeSelected() {
- return getFirstNodeSelected(getStructuredSelection());
- }
-
- protected DTDNode getFirstNodeSelected(IStructuredSelection selection) {
- Iterator iter = selection.iterator();
- // DTDNode referencePoint = null;
- while (iter.hasNext()) {
- Object element = iter.next();
- if (element instanceof DTDNode) {
- return (DTDNode) element;
- }
- }
- return null;
- }
-
- protected DTDModelImpl getModel() {
- return (DTDModelImpl) fModel;
- }
-
- public void setContextContributor(IEditorActionBarContributor contributor) {
- contextContributor = contributor;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/DeleteAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/DeleteAction.java
deleted file mode 100644
index 679c1dce9b..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/DeleteAction.java
+++ /dev/null
@@ -1,70 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.wst.dtd.core.internal.CMNode;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.util.DTDBatchNodeDelete;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-
-
-public class DeleteAction extends SelectionListenerAction {
-
- public DeleteAction(String label) {
- super(label);
- }
-
- public void run() {
- IStructuredSelection selection = getStructuredSelection();
-
- Iterator iter = selection.iterator();
- DTDBatchNodeDelete batchDelete = null;
- DTDFile dtdFile = null;
- while (iter.hasNext()) {
- Object element = iter.next();
- if (element instanceof DTDNode) {
- DTDNode node = (DTDNode) element;
- dtdFile = node.getDTDFile();
- if (batchDelete == null) {
- batchDelete = new DTDBatchNodeDelete(dtdFile);
- }
- batchDelete.addNode((DTDNode) element);
- }
- }
- dtdFile.getDTDModel().beginRecording(this, DTDUIMessages._UI_LABEL_DTD_FILE_DELETE); //$NON-NLS-1$
- batchDelete.deleteNodes(this);
- dtdFile.getDTDModel().endRecording(this);
- }
-
- public boolean updateSelection(IStructuredSelection sel) {
- if (!super.updateSelection(sel))
- return false;
-
- Object selectedObject = sel.getFirstElement();
- if (selectedObject instanceof DTDNode && !(selectedObject instanceof CMNode && ((CMNode) selectedObject).isRootElementContent())) {
- setEnabled(true);
- return true; // enable delete menu item
- }
- else {
- setEnabled(false);
- return false; // disable it - grey out
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/ReplaceEmptyContentModelWithGroupAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/ReplaceEmptyContentModelWithGroupAction.java
deleted file mode 100644
index 5523965513..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/ReplaceEmptyContentModelWithGroupAction.java
+++ /dev/null
@@ -1,44 +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.wst.dtd.ui.internal.views.contentoutline.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.dtd.core.internal.CMNode;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-
-public class ReplaceEmptyContentModelWithGroupAction extends BaseAction {
-
- public ReplaceEmptyContentModelWithGroupAction(DTDModelImpl model, String label) {
- super(model, label);
- }
-
- public void run() {
- DTDNode node = getFirstNodeSelected();
- if (node instanceof Element) {
- CMNode contentModel = ((Element) node).getContentModel();
- if (CMNode.EMPTY.equals(contentModel.getType())) {
- getModel().beginRecording(this, getText());
- ((Element) node).replaceContentModel(this, "()"); //$NON-NLS-1$
- getModel().endRecording(this);
- }
- }
- }
-
- protected boolean updateSelection(IStructuredSelection selection) {
- boolean rc = super.updateSelection(selection);
- DTDNode node = getFirstNodeSelected(selection);
- setEnabled(node instanceof Element);
- return rc;
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/properties/DTDPropertySourceAdapter.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/properties/DTDPropertySourceAdapter.java
deleted file mode 100644
index cc90289ae0..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/properties/DTDPropertySourceAdapter.java
+++ /dev/null
@@ -1,130 +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.wst.dtd.ui.internal.views.properties;
-
-import java.util.Stack;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.internal.properties.CustomPropertyDescriptor;
-
-
-/**
- * An IPropertySource implementation for a JFace viewer used to display
- * properties of DOM nodes. Requires an adapter factory to create JFace
- * adapters for the nodes in the tree.
- */
-public class DTDPropertySourceAdapter implements INodeAdapter, IPropertySource {
- protected final static String CATEGORY_ATTRIBUTES = "Attributes"; //$NON-NLS-1$
-
- private static final String ID_NAME = DTDUIMessages.DTDPropertySourceAdapter_0; //$NON-NLS-1$
- private static final String ID_TEXT = DTDUIMessages.DTDPropertySourceAdapter_1; //$NON-NLS-1$
-
- protected IPropertyDescriptor[] fDescriptors = null;
- protected INodeNotifier fNode = null;
-
- protected Stack fValuesBeingSet = new Stack();
-
- public DTDPropertySourceAdapter(INodeNotifier target) {
- super();
- fNode = target;
- }
-
- /**
- * @return
- */
- private IPropertyDescriptor[] createPropertyDescriptors() {
- CustomPropertyDescriptor nameDescriptor = new CustomPropertyDescriptor(ID_NAME, ID_NAME, null);
- nameDescriptor.setCategory(DTDUIMessages.DTDPropertySourceAdapter_2); //$NON-NLS-1$
- // CustomPropertyDescriptor contentDescriptor = new
- // CustomPropertyDescriptor(ID_TEXT, ID_TEXT, null);
- // contentDescriptor.setCategory("Attributes");
- return new IPropertyDescriptor[]{nameDescriptor};
- }
-
- /**
- * Returns a value for this Node that can be editted in a property sheet.
- *
- * @return a value that can be editted
- */
- public Object getEditableValue() {
- return null;
- }
-
- /**
- * Returns the current collection of property descriptors.
- *
- * @return all valid descriptors.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- if (fDescriptors == null || fDescriptors.length == 0) {
- fDescriptors = createPropertyDescriptors();
- }
- else {
- updatePropertyDescriptors();
- }
- return fDescriptors;
- }
-
- /**
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
- public Object getPropertyValue(Object id) {
- Object value = null;
- if (id.equals(ID_NAME) && fNode instanceof DTDNode) {
- value = ((DTDNode) fNode).getName();
- }
- if (id.equals(ID_TEXT) && fNode instanceof DTDNode) {
- value = ((DTDNode) fNode).getFullNodeText();
- }
- return value;
- }
-
- /**
- * Allowing the INodeAdapter to compare itself against the type allows it
- * to return true in more than one case.
- */
- public boolean isAdapterForType(Object type) {
- return type == IPropertySource.class;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)
- */
- public boolean isPropertySet(Object id) {
- return false;
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
- */
- public void resetPropertyValue(Object id) {
- }
-
- public void setPropertyValue(Object nameObject, Object value) {
- }
-
- protected void updatePropertyDescriptors() {
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/properties/DTDPropertySourceAdapterFactory.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/properties/DTDPropertySourceAdapterFactory.java
deleted file mode 100644
index 59606bbb6f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/properties/DTDPropertySourceAdapterFactory.java
+++ /dev/null
@@ -1,42 +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.wst.dtd.ui.internal.views.properties;
-
-
-
-import org.eclipse.ui.views.properties.IPropertySource;
-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;
-
-
-public class DTDPropertySourceAdapterFactory extends AbstractAdapterFactory {
-
- public DTDPropertySourceAdapterFactory() {
- super(IPropertySource.class, true);
- }
-
- public DTDPropertySourceAdapterFactory(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
- public INodeAdapterFactory copy() {
- return new DTDPropertySourceAdapterFactory(getAdapterKey(), isShouldRegisterAdapter());
- }
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- // at the moment, only one implementation exists
- return new DTDPropertySourceAdapter(target);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDTemplatesWizardPage.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDTemplatesWizardPage.java
deleted file mode 100644
index 63a52f3cbb..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDTemplatesWizardPage.java
+++ /dev/null
@@ -1,506 +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.wst.dtd.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.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.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.ui.StructuredTextViewerConfigurationDTD;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.Logger;
-import org.eclipse.wst.dtd.ui.internal.editor.IHelpContextIds;
-import org.eclipse.wst.dtd.ui.internal.preferences.DTDUIPreferenceNames;
-import org.eclipse.wst.dtd.ui.internal.templates.TemplateContextTypeIdsDTD;
-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 NewDTDTemplatesWizardPage 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(TemplateContextTypeIdsDTD.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 NewDTDTemplatesWizardPage() {
- super("NewDTDTemplatesWizardPage", DTDUIMessages.NewDTDTemplatesWizardPage_0, null); //$NON-NLS-1$
- setDescription(DTDUIMessages.NewDTDTemplatesWizardPage_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 DTD Template
- fUseTemplateButton = new Button(parent, SWT.CHECK);
- fUseTemplateButton.setText(DTDUIMessages.NewDTDTemplatesWizardPage_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);
-
- // Create linked text to just to templates preference page
- Link link = new Link(innerParent, SWT.NONE);
- link.setText(DTDUIMessages.NewDTDTemplatesWizardPage_6);
- data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
- link.setLayoutData(data);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- linkClicked();
- }
- });
-
- // 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(DTDUIMessages.NewDTDTemplatesWizardPage_2);
-
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- column2.setText(DTDUIMessages.NewDTDTemplatesWizardPage_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 = DTDUIPlugin.getDefault().getTemplateStore();
- fTableViewer.setInput(fTemplateStore);
-
- configureTableResizing(innerParent, table, column1, column2);
- loadLastSavedPreferences();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.DTD_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 StructuredTextViewerConfigurationDTD();
-
- 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);
- ((StructuredTextViewer) viewer).getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
- IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(ContentTypeIdForDTD.ContentTypeID_DTD);
- 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(DTDUIMessages.NewDTDTemplatesWizardPage_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);
- 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.dtd.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 = DTDUIPlugin.getDefault().getTemplateContextRegistry().getContextType(TemplateContextTypeIdsDTD.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 dtd", 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 DTD File wizard.
- */
- private void loadLastSavedPreferences() {
- String templateName = DTDUIPlugin.getDefault().getPreferenceStore().getString(DTDUIPreferenceNames.NEW_FILE_TEMPLATE_NAME);
- if (templateName == null || templateName.length() == 0) {
- fLastSelectedTemplateName = ""; //$NON-NLS-1$
- fUseTemplateButton.setSelection(false);
- }
- else {
- fLastSelectedTemplateName = templateName;
- fUseTemplateButton.setSelection(true);
- }
- enableTemplates();
- }
-
- /**
- * Save template name used for next call to New DTD File wizard.
- */
- void saveLastSavedPreferences() {
- String templateName = ""; //$NON-NLS-1$
-
- Template template = getSelectedTemplate();
- if (template != null) {
- templateName = template.getName();
- }
-
- DTDUIPlugin.getDefault().getPreferenceStore().setValue(DTDUIPreferenceNames.NEW_FILE_TEMPLATE_NAME, templateName);
- DTDUIPlugin.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, TemplateContextTypeIdsDTD.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.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java
deleted file mode 100644
index 06e15a1c80..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java
+++ /dev/null
@@ -1,264 +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.wst.dtd.ui.internal.wizard;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-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.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.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.osgi.util.NLS;
-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.dialogs.WizardNewFileCreationPage;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.dtd.core.internal.DTDCorePlugin;
-import org.eclipse.wst.dtd.core.internal.preferences.DTDCorePreferenceNames;
-import org.eclipse.wst.dtd.core.internal.provisional.contenttype.ContentTypeIdForDTD;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.dtd.ui.internal.Logger;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImageHelper;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-public class NewDTDWizard extends Wizard implements INewWizard {
- private WizardNewFileCreationPage fNewFilePage;
- private NewDTDTemplatesWizardPage fNewFileTemplatesPage;
- private IStructuredSelection fSelection;
- private IContentType fContentType;
- private List fValidExtensions = null;
-
- /**
- * Adds default extension to the filename
- *
- * @param filename
- * @return
- */
- String addDefaultExtension(String filename) {
- StringBuffer newFileName = new StringBuffer(filename);
-
- Preferences preference = DTDCorePlugin.getInstance().getPluginPreferences();
- String ext = preference.getString(DTDCorePreferenceNames.DEFAULT_EXTENSION);
-
- newFileName.append("."); //$NON-NLS-1$
- newFileName.append(ext);
-
- return newFileName.toString();
- }
-
- /**
- * Get content type associated with this new file wizard
- *
- * @return IContentType
- */
- IContentType getContentType() {
- if (fContentType == null)
- fContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForDTD.ContentTypeID_DTD);
- return fContentType;
- }
-
- /**
- * Get list of valid extensions for DTD Content type
- *
- * @return
- */
- List getValidExtensions() {
- if (fValidExtensions == null) {
- IContentType type = getContentType();
- fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
- }
- return fValidExtensions;
- }
-
- 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;
- }
-
- /**
- * 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
- */
- 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;
- }
-
- public void addPages() {
- fNewFilePage = new WizardNewFileCreationPage("DTDWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))) { //$NON-NLS-1$
- protected boolean validatePage() {
- 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(DTDUIMessages._ERROR_FILENAME_MUST_END_DTD, 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(DTDUIMessages.ResourceGroup_nameExists);
- return false;
- }
- }
- }
- setErrorMessage(null);
- return super.validatePage();
- }
- };
- fNewFilePage.setTitle(DTDUIMessages._UI_CREATE_NEW_DTD_FILE);
- fNewFilePage.setDescription(DTDUIMessages._UI_WIZARD_NEW_DTD_EXPL);
-
- addPage(fNewFilePage);
-
- fNewFileTemplatesPage = new NewDTDTemplatesWizardPage();
- addPage(fNewFileTemplatesPage);
- }
-
- public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
- fSelection = aSelection;
- setWindowTitle(DTDUIMessages._UI_WIZARD_NEW_DTD_TITLE); //$NON-NLS-1$
-
- ImageDescriptor descriptor = DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_WIZBAN_NEWDTDFILE);
- 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 = 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 = DTDCorePlugin.getInstance().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 DTD 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.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java
deleted file mode 100644
index e42869c7cf..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.views.contentoutline;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.util.TransferDragSourceListener;
-import org.eclipse.jface.util.TransferDropTargetListener;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.wst.common.ui.internal.dnd.DragAndDropCommand;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
-import org.eclipse.wst.dtd.ui.internal.dnd.DTDDragAndDropManager;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateActionContributionItem;
-import org.eclipse.wst.sse.ui.internal.util.Assert;
-import org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration;
-
-/**
- * Configuration for outline view page which shows DTD content.
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration
- * @since 1.0
- */
-public class DTDContentOutlineConfiguration extends ContentOutlineConfiguration {
- private IContentProvider fContentProvider = null;
- private ILabelProvider fLabelProvider = null;
-
- private DTDContextMenuHelper fMenuHelper;
- private TransferDragSourceListener[] fTransferDragSourceListeners;
- private TransferDropTargetListener[] fTransferDropTargetListeners;
- private Map fViewerContributions;
- private final String OUTLINE_ORDER_PREF = "outline-order"; //$NON-NLS-1$
- private final String OUTLINE_SORT_PREF = "outline-sort"; //$NON-NLS-1$
-
- /**
- * Default constructor for DTDContentOutlineConfiguration.
- */
- public DTDContentOutlineConfiguration() {
- // Must have empty constructor to createExecutableExtension
- super();
- fViewerContributions = new HashMap(2);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#createToolbarContributions(org.eclipse.jface.viewers.TreeViewer)
- */
- public IContributionItem[] createToolbarContributions(TreeViewer viewer) {
- Assert.isTrue(getContentProvider(viewer) instanceof DTDTreeContentProvider, "invalid content provider on viewer"); //$NON-NLS-1$
- IContributionItem[] items = super.createToolbarContributions(viewer);
-
- SortAction sortAction = new SortAction(viewer, DTDUIPlugin.getDefault().getPreferenceStore(), OUTLINE_SORT_PREF);
- OrderAction orderAction = new OrderAction(viewer, (DTDTreeContentProvider) getContentProvider(viewer), DTDUIPlugin.getDefault().getPreferenceStore(), OUTLINE_ORDER_PREF);
- IContributionItem sortItem = new PropertyChangeUpdateActionContributionItem(sortAction);
- IContributionItem orderItem = new PropertyChangeUpdateActionContributionItem(orderAction);
-
- if (items == null) {
- items = new IContributionItem[2];
- items[0] = sortItem;
- items[1] = orderItem;
- }
- else {
- IContributionItem[] combinedItems = new IContributionItem[items.length + 2];
- combinedItems[0] = sortItem;
- combinedItems[1] = orderItem;
- System.arraycopy(items, 0, combinedItems, 2, items.length);
- items = combinedItems;
- }
- return items;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getContentProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- public IContentProvider getContentProvider(TreeViewer viewer) {
- if (fContentProvider == null) {
- fContentProvider = new DTDTreeContentProvider();
- }
- // return super.getContentProvider(viewer);
- return fContentProvider;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getLabelProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- public ILabelProvider getLabelProvider(TreeViewer viewer) {
- if (fLabelProvider == null) {
- fLabelProvider = new DTDLabelProvider();
- }
- // return super.getLabelProvider(viewer);
- return fLabelProvider;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getMenuListener(org.eclipse.jface.viewers.TreeViewer)
- */
- public IMenuListener getMenuListener(TreeViewer viewer) {
- IMenuListener listener = null;
- if (fMenuHelper == null && viewer.getInput() instanceof DTDModelImpl) {
- fMenuHelper = new DTDContextMenuHelper((DTDModelImpl) viewer.getInput());
- fMenuHelper.createMenuListenersFor(viewer);
- }
- if (fMenuHelper != null) {
- listener = fMenuHelper.getMenuListener();
- }
- return listener;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getPreferenceStore()
- */
- protected IPreferenceStore getPreferenceStore() {
- return DTDUIPlugin.getDefault().getPreferenceStore();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getTransferDragSourceListeners(org.eclipse.jface.viewers.TreeViewer)
- */
- public TransferDragSourceListener[] getTransferDragSourceListeners(final TreeViewer treeViewer) {
- if (fTransferDragSourceListeners == null) {
- fTransferDragSourceListeners = new TransferDragSourceListener[]{new TransferDragSourceListener() {
- public void dragFinished(DragSourceEvent event) {
- LocalSelectionTransfer.getTransfer().setSelection(null);
- }
-
- public void dragSetData(DragSourceEvent event) {
- }
-
- public void dragStart(DragSourceEvent event) {
- LocalSelectionTransfer.getTransfer().setSelection(treeViewer.getSelection());
- }
-
- public Transfer getTransfer() {
- return LocalSelectionTransfer.getTransfer();
- }
- }};
- }
-
- return fTransferDragSourceListeners;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getTransferDropTargetListeners(org.eclipse.jface.viewers.TreeViewer)
- */
- public TransferDropTargetListener[] getTransferDropTargetListeners(final TreeViewer treeViewer) {
- if (fTransferDropTargetListeners == null) {
- fTransferDropTargetListeners = new TransferDropTargetListener[]{new TransferDropTargetListener() {
- public void dragEnter(DropTargetEvent event) {
- }
-
- public void dragLeave(DropTargetEvent event) {
- }
-
- public void dragOperationChanged(DropTargetEvent event) {
- }
-
- public void dragOver(DropTargetEvent event) {
- event.feedback = DND.FEEDBACK_SELECT;
- float feedbackFloat = getHeightInItem(event);
- if (feedbackFloat > 0.75) {
- event.feedback = DND.FEEDBACK_INSERT_AFTER;
- }
- else if (feedbackFloat < 0.25) {
- event.feedback = DND.FEEDBACK_INSERT_BEFORE;
- }
- event.feedback |= DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
- }
-
- public void drop(DropTargetEvent event) {
- if (event.operations != DND.DROP_NONE && LocalSelectionTransfer.getTransfer().getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection();
- if (selection != null && !selection.isEmpty() && event.item != null && event.item.getData() != null) {
- /*
- * the command uses these numbers instead of the
- * feedback constants (even though it converts in
- * the other direction as well)
- */
- float feedbackFloat = getHeightInItem(event);
-
- final DragAndDropCommand command = new DTDDragAndDropManager().createCommand(event.item.getData(), feedbackFloat, event.operations, event.detail, selection.toList());
- if (command != null && command.canExecute()) {
- SafeRunnable.run(new SafeRunnable() {
- public void run() throws Exception {
- command.execute();
- }
- });
- }
- }
- }
- }
-
- public void dropAccept(DropTargetEvent event) {
- }
-
- private float getHeightInItem(DropTargetEvent event) {
- if(event.item == null) return .5f;
- if (event.item instanceof TreeItem) {
- TreeItem treeItem = (TreeItem) event.item;
- Control control = treeItem.getParent();
- Point point = control.toControl(new Point(event.x, event.y));
- Rectangle bounds = treeItem.getBounds();
- return (float) (point.y - bounds.y) / (float) bounds.height;
- }
- else if (event.item instanceof TableItem) {
- TableItem tableItem = (TableItem) event.item;
- Control control = tableItem.getParent();
- Point point = control.toControl(new Point(event.x, event.y));
- Rectangle bounds = tableItem.getBounds(0);
- return (float) (point.y - bounds.y) / (float) bounds.height;
- }
- else {
- return 0.0F;
- }
- }
-
- public Transfer getTransfer() {
- return LocalSelectionTransfer.getTransfer();
- }
-
- public boolean isEnabled(DropTargetEvent event) {
- return getTransfer().isSupportedType(event.currentDataType);
- }
- }};
- }
- return fTransferDropTargetListeners;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#unconfigure(org.eclipse.jface.viewers.TreeViewer)
- */
- public void unconfigure(TreeViewer viewer) {
- super.unconfigure(viewer);
- fViewerContributions.remove(viewer);
- if (fMenuHelper != null) {
- fMenuHelper.removeMenuListenersFor(viewer);
- fMenuHelper = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java
deleted file mode 100644
index 272a9a452f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java
+++ /dev/null
@@ -1,284 +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.wst.dtd.ui.views.contentoutline;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.CMGroupNode;
-import org.eclipse.wst.dtd.core.internal.CMNode;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.NodeList;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
-import org.eclipse.wst.dtd.core.internal.util.LabelValuePair;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImageHelper;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddAttributeAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddAttributeListAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddCommentAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddElementAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddElementToContentModelAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddEntityAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddGroupToContentModelAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddNotationAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.AddParameterEntityReferenceAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.DeleteAction;
-import org.eclipse.wst.dtd.ui.internal.views.contentoutline.actions.ReplaceEmptyContentModelWithGroupAction;
-
-/**
- * Menu helper for Content Outline page. This should not be used elsewhere.
- */
-class DTDContextMenuHelper {
- class DTDMenuListener implements IMenuListener {
- public void menuAboutToShow(IMenuManager manager) {
- // update the action selection now
- addNotationAction.selectionChanged(fViewerSelection);
- addEntityAction.selectionChanged(fViewerSelection);
- addElementAction.selectionChanged(fViewerSelection);
- addCommentAction.selectionChanged(fViewerSelection);
- addParameterEntityReferenceAction.selectionChanged(fViewerSelection);
- deleteAction.selectionChanged(fViewerSelection);
- addAttributeAction.selectionChanged(fViewerSelection);
- addAttributeListAction.selectionChanged(fViewerSelection);
- addGroupToContentModelAction.selectionChanged(fViewerSelection);
- addElementToContentModelAction.selectionChanged(fViewerSelection);
- replaceEmptyContentModelWithGroupAction.selectionChanged(fViewerSelection);
-
-
- if (!fViewerSelection.isEmpty()) {
- addActionItemsForSelection(fViewerSelection.getFirstElement(), manager);
- }
- }
- }
-
- class ViewerSelectionChangeListener implements ISelectionChangedListener {
- public void selectionChanged(SelectionChangedEvent event) {
- _selectionChanged(event);
- }
- }
-
- AddAttributeAction addAttributeAction;
-
- AddAttributeListAction addAttributeListAction;
- AddCommentAction addCommentAction;
- AddElementAction addElementAction;
- AddElementToContentModelAction addElementToContentModelAction;
- AddEntityAction addEntityAction;
- AddGroupToContentModelAction addGroupToContentModelAction;
- AddNotationAction addNotationAction;
- AddParameterEntityReferenceAction addParameterEntityReferenceAction;
- DeleteAction deleteAction;
- private ISelectionChangedListener fInternalSelectionChangedListener = new ViewerSelectionChangeListener();
-
- private IMenuListener fMenuListener;
- private DTDModelImpl fModel;
- private List fViewerList;
-
- IStructuredSelection fViewerSelection = StructuredSelection.EMPTY;
-
- ReplaceEmptyContentModelWithGroupAction replaceEmptyContentModelWithGroupAction;
-
- public DTDContextMenuHelper(DTDModelImpl model) {
- fModel = model;
- fViewerList = new ArrayList(1);
- fMenuListener = new DTDMenuListener();
-
- addNotationAction = new AddNotationAction(model, DTDUIMessages._UI_ACTION_ADD_DTD_NOTATION); //$NON-NLS-1$
- addEntityAction = new AddEntityAction(model, DTDUIMessages._UI_ACTION_ADD_DTD_ENTITY); //$NON-NLS-1$
- addElementAction = new AddElementAction(model, DTDUIMessages._UI_ACTION_ADD_DTD_ELEMENT); //$NON-NLS-1$
- addCommentAction = new AddCommentAction(model, DTDUIMessages._UI_ACTION_ADD_DTD_COMMENT); //$NON-NLS-1$
-
- addParameterEntityReferenceAction = new AddParameterEntityReferenceAction(model, DTDUIMessages._UI_ACTION_ADD_PARAM_ENTITY_REF); //$NON-NLS-1$
- deleteAction = new DeleteAction(DTDUIMessages._UI_ACTION_DTD_DELETE); //$NON-NLS-1$
- addAttributeAction = new AddAttributeAction(model, DTDUIMessages._UI_ACTION_ADD_ATTRIBUTE); //$NON-NLS-1$
- addAttributeListAction = new AddAttributeListAction(model, DTDUIMessages._UI_ACTION_ADD_ATTRIBUTELIST); //$NON-NLS-1$
-
- addGroupToContentModelAction = new AddGroupToContentModelAction(model, DTDUIMessages._UI_ACTION_GROUP_ADD_GROUP); //$NON-NLS-1$
- addElementToContentModelAction = new AddElementToContentModelAction(model, DTDUIMessages._UI_ACTION_ADD_ELEMENT); //$NON-NLS-1$
-
- replaceEmptyContentModelWithGroupAction = new ReplaceEmptyContentModelWithGroupAction(model, DTDUIMessages._UI_ACTION_GROUP_ADD_GROUP); //$NON-NLS-1$
-
- addNotationAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_NOTATION));
- addEntityAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_ENTITY));
- addCommentAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_COMMENT));
- addParameterEntityReferenceAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ADD_ENTITY_REFERENCE));
-
- // Tri-state images
- addElementAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ELEMENT));
- addElementAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ELEMENT));
- addElementAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ELEMENT));
-
- addAttributeAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ATTRIBUTE));
- addAttributeAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ATTRIBUTE));
- addAttributeAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ATTRIBUTE));
-
- addAttributeListAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ATTRIBUTE));
- addAttributeListAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ATTRIBUTE));
- addAttributeListAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ATTRIBUTE));
-
- addGroupToContentModelAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_GROUPTOCONMODEL));
- addGroupToContentModelAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_GROUPTOCONMODEL));
- addGroupToContentModelAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_GROUPTOCONMODEL));
-
- addElementToContentModelAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_ELEMENTTOCONMODEL));
- addElementToContentModelAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_ELEMENTTOCONMODEL));
- addElementToContentModelAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_ELEMENTTOCONMODEL));
-
- // use the same images as addGroupToContentModelAction
- replaceEmptyContentModelWithGroupAction.setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_ETOOL_ADD_GROUPTOCONMODEL));
- replaceEmptyContentModelWithGroupAction.setHoverImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_CTOOL_ADD_GROUPTOCONMODEL));
- replaceEmptyContentModelWithGroupAction.setDisabledImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_DTOOL_ADD_GROUPTOCONMODEL));
- }
-
- void _selectionChanged(SelectionChangedEvent event) {
- /*
- * Save the selection so we only notify the actions when the menu is
- * shown
- */
- ISelection selection = event.getSelection();
- if (selection instanceof IStructuredSelection) {
- fViewerSelection = (IStructuredSelection) selection;
- }
- else {
- fViewerSelection = StructuredSelection.EMPTY;
- }
- }
-
- void addActionItemsForSelection(Object selectedObject, IMenuManager menu) {
- if (selectedObject instanceof NodeList) {
- // add appropriate menu to logical view
- NodeList folder = (NodeList) selectedObject;
- if (folder.getListType().equals(DTDRegionTypes.NOTATION_TAG)) {
- menu.add(addNotationAction);
- }
- else if (folder.getListType().equals(DTDRegionTypes.ENTITY_TAG)) {
- menu.add(addEntityAction);
- }
- else if (folder.getListType().equals(DTDRegionTypes.ELEMENT_TAG)) {
- LabelValuePair[] availableEntities = fModel.createParmEntityContentItems(null);
- addParameterEntityReferenceAction.setEnabled(availableEntities.length > 0);
-
- menu.add(addElementAction);
- menu.add(addParameterEntityReferenceAction);
- }
- else if (folder.getListType().equals(DTDRegionTypes.ATTLIST_TAG)) {
- menu.add(addAttributeAction);
- }
- }
- if (selectedObject instanceof DTDFile || selectedObject == null) {
- LabelValuePair[] availableEntities = fModel.createParmEntityContentItems(null);
- addParameterEntityReferenceAction.setEnabled(availableEntities.length > 0);
-
- menu.add(addElementAction);
- menu.add(addEntityAction);
- menu.add(addNotationAction);
- menu.add(addParameterEntityReferenceAction);
- menu.add(addCommentAction);
- menu.add(addAttributeListAction);
- menu.add(new Separator());
- }
-
- if (selectedObject instanceof Element) {
- Element dtdElement = (Element) selectedObject;
-
- CMNode contentModel = dtdElement.getContentModel();
- if (contentModel == null) {
- menu.add(addGroupToContentModelAction);
- menu.add(addElementToContentModelAction);
- }
- else if (contentModel != null && CMNode.EMPTY.equals(contentModel.getType())) {
- menu.add(replaceEmptyContentModelWithGroupAction);
- }
- // if (!(((Element)selectedObject).getContentModel() instanceof
- // CMGroupNode))
- // {
- // menu.add(addGroupToContentModelAction);
- // }
- // addAttributeAction.setElement(selectedObject);
- menu.add(addAttributeAction);
- }
- else if (selectedObject instanceof CMGroupNode) {
- // addElementToContentModelAction.setElement(selectedObject);
- // addGroupToContentModelAction.setElement(selectedObject);
- menu.add(addElementToContentModelAction);
- menu.add(addGroupToContentModelAction);
- }
- else if (selectedObject instanceof AttributeList) {
- menu.add(addAttributeAction);
- }
-
- menu.add(new Separator());
- addEditActions(menu);
- menu.add(new Separator());
-
- if (selectedObject instanceof DTDNode && !(selectedObject instanceof CMNode && ((CMNode) selectedObject).isRootElementContent())) {
- menu.add(deleteAction);
- deleteAction.setEnabled(true);
- // if (selectedObject instanceof DTDElementContent)
- // {
- // DTDElementContent content = (DTDElementContent) selectedObject;
- // if (content.getElement() != null && (content instanceof
- // DTDPCDataContent || content instanceof DTDEmptyContent))
- // {
- // deleteAction.setEnabled(false);
- // } // end of if ()
- // } // end of if ()
- }
- }
-
- void addEditActions(IMenuManager menu) {
- // menu.add(undoAction);
- // menu.add(redoAction);
- // menu.add(new Separator());
- // menu.add(cutAction);
- // menu.add(copyAction);
- // menu.add(pasteAction);
- }
-
- public void createMenuListenersFor(Viewer viewer) {
- viewer.addSelectionChangedListener(fInternalSelectionChangedListener);
- ISelection selection = viewer.getSelection();
- if (selection instanceof IStructuredSelection) {
- fViewerSelection = (IStructuredSelection) selection;
- }
- else {
- fViewerSelection = StructuredSelection.EMPTY;
- }
-
- fViewerList.add(viewer);
- }
-
- public IMenuListener getMenuListener() {
- return fMenuListener;
- }
-
- public void removeMenuListenersFor(Viewer viewer) {
- viewer.removeSelectionChangedListener(fInternalSelectionChangedListener);
- fViewerList.remove(viewer);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java
deleted file mode 100644
index 6c7fb1f3ef..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java
+++ /dev/null
@@ -1,94 +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.wst.dtd.ui.views.contentoutline;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.NodeList;
-
-class DTDLabelProvider extends LabelProvider {
-
- public DTDLabelProvider() {
- super();
- }
-
- /**
- * Returns the image for the label of the given element.
- *
- * @param element
- * the element for which to provide the label image
- * @return the image used to label the element, or <code>null</code> if
- * these is no image for the given object
- */
- public Image getImage(Object element) {
- Image image = null;
- if (element instanceof DTDNode) {
- image = ((DTDNode) element).getImage();
- }
- else if (element instanceof NodeList) {
- image = ((NodeList) element).getImage();
- }
- else if (element instanceof DTDFile) {
- image = ((DTDFile) element).getImage();
- }
- else {
- image = super.getImage(element);
- }
- return image;
- }
-
- /**
- * Returns the text for the label of the given element.
- *
- * @param element
- * the element for which to provide the label text
- * @return the text string used to label the element, or <code>null</code>
- * if these is no text label for the given object
- */
- public String getText(Object element) {
- if (element instanceof DTDNode) {
- String name = ((DTDNode) element).getName();
-
- // strip leading whitespace (useful for multi-line comments)
- int firstSignificantCharacter = 0;
- int lastVisibleCharacter = name.length() - 1;
- for (firstSignificantCharacter = 0; firstSignificantCharacter < name.length(); firstSignificantCharacter++) {
- if (!Character.isWhitespace(name.charAt(firstSignificantCharacter)))
- break;
- }
- // keep only the first line of text in a multi-line name
- if (firstSignificantCharacter < lastVisibleCharacter) {
- for (lastVisibleCharacter = firstSignificantCharacter + 1; lastVisibleCharacter < name.length(); lastVisibleCharacter++) {
- char character = name.charAt(lastVisibleCharacter);
- if (character == '\r' || character == '\n')
- break;
- }
- }
- if (firstSignificantCharacter > 0 && firstSignificantCharacter < name.length() - 1) {
- name = name.substring(firstSignificantCharacter, lastVisibleCharacter);
- }
-
- return name;
- }
- else if (element instanceof NodeList) {
- // return ((NodeList) element).getListType();
- return ((NodeList) element).getName();
- }
- else if (element instanceof DTDFile) {
- return ((DTDFile) element).getName();
- }
- return super.getText(element);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java
deleted file mode 100644
index f3bf54fd2f..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java
+++ /dev/null
@@ -1,349 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.views.contentoutline;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.dtd.core.internal.Attribute;
-import org.eclipse.wst.dtd.core.internal.AttributeList;
-import org.eclipse.wst.dtd.core.internal.Comment;
-import org.eclipse.wst.dtd.core.internal.DTDFile;
-import org.eclipse.wst.dtd.core.internal.DTDNode;
-import org.eclipse.wst.dtd.core.internal.Element;
-import org.eclipse.wst.dtd.core.internal.Entity;
-import org.eclipse.wst.dtd.core.internal.NodeList;
-import org.eclipse.wst.dtd.core.internal.Notation;
-import org.eclipse.wst.dtd.core.internal.ParameterEntityReference;
-import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
-import org.eclipse.wst.dtd.core.internal.event.IDTDFileListener;
-import org.eclipse.wst.dtd.core.internal.event.NodesEvent;
-
-class DTDTreeContentProvider implements ITreeContentProvider, IDTDFileListener {
-
- private Object fInputObject;
- protected Viewer fViewer;
-
- // A cached set of IndexedNodeLists, required for getParent to return the
- // correct instances mapping to TreeItems
- protected Object[] logicalNodeLists = null;
-
- private boolean showLogicalOrder = false;
-
- public DTDTreeContentProvider() {
- super();
- }
-
- public void dispose() {
- fViewer = null;
- }
-
- private void expandToNode(DTDNode node) {
- DTDFile dtdFile = node.getDTDFile();
- // first expand the root
- AbstractTreeViewer viewer = (AbstractTreeViewer) fViewer;
- viewer.expandToLevel(dtdFile, 1);
- NodeList listToExpand = null;
- if (node instanceof Element || node instanceof ParameterEntityReference) {
- listToExpand = dtdFile.getElementsAndParameterEntityReferences();
- }
- else if (node instanceof Notation) {
- listToExpand = dtdFile.getNotations();
- }
- else if (node instanceof Entity) {
- listToExpand = dtdFile.getEntities();
- }
- else if (node instanceof Comment) {
- listToExpand = dtdFile.getComments();
- }
- if (listToExpand != null) {
- viewer.expandToLevel(listToExpand, 1);
- }
- viewer.expandToLevel(node, 0);
- }
-
- public Object[] getChildren(Object parentElement) {
- // return the lists of nodes when in logical order mode, all the Nodes
- // otherwise
- if (parentElement instanceof DTDFile) {
- if (isShowLogicalOrder()) {
- // return the visible node lists
- if (logicalNodeLists == null) {
- Iterator nodeLists = ((DTDFile) parentElement).getNodeLists().iterator();
- List visibleLists = new ArrayList(7);
- while (nodeLists.hasNext()) {
- NodeList list = (NodeList) nodeLists.next();
- if (isVisibleNodeList(list)) {
- visibleLists.add(list);
- }
- }
- logicalNodeLists = visibleLists.toArray();
- }
- return logicalNodeLists;
- }
- else {
- // return the visible nodes
- List allNodes = ((DTDFile) parentElement).getNodes();
- List visibleNodes = new ArrayList(allNodes.size());
- for (int i = 0; i < allNodes.size(); i++) {
- Object o = allNodes.get(i);
- if (isVisibleNode(o)) {
- visibleNodes.add(o);
- }
- }
- return visibleNodes.toArray();
- }
- }
- else if (parentElement instanceof NodeList) {
- return ((NodeList) parentElement).getNodes().toArray();
- }
- else if (parentElement instanceof Element) {
- // always group the attributes directly under the element
- Object[] children = ((DTDNode) parentElement).getChildren();
- List attributes = ((Element) parentElement).getElementAttributes();
- Object[] logicalChildren = new Object[children.length + attributes.size()];
- int index = 0;
- for (index = 0; index < children.length; index++) {
- logicalChildren[index] = children[index];
- }
- for (Iterator iter = attributes.iterator(); iter.hasNext();) {
- logicalChildren[index++] = iter.next();
- }
- return logicalChildren;
- }
- else if (parentElement instanceof DTDNode) {
- return ((DTDNode) parentElement).getChildren();
- }
- return Collections.EMPTY_LIST.toArray();
- }
-
- public Object[] getElements(java.lang.Object inputElement) {
- Object[] elements = null;
- // Always show the DTDFile "node"
- if (inputElement instanceof DTDModelImpl) {
- elements = new Object[]{((DTDModelImpl) inputElement).getDTDFile()};
- }
- if (elements == null) {
- elements = new Object[0];
- }
- return elements;
- }
-
- public Object getParent(Object element) {
- Object parent = null;
- if (element instanceof DTDNode) {
- DTDNode node = (DTDNode) element;
- if (element instanceof Attribute) {
- // then we must say that the element with the same name
- // as our attribute's parent attributelist is our parent
- parent = node.getParentNode();
- if (parent != null && parent instanceof AttributeList) {
- return getParent(parent);
- }
- }
- if (element instanceof AttributeList) {
- // then we must say that the element with the same name
- // as our attributelist is our parent
- String attListName = ((AttributeList) element).getName();
- Iterator iter = node.getDTDFile().getElementsAndParameterEntityReferences().getNodes().iterator();
- while (iter.hasNext() && parent == null) {
- DTDNode currentNode = (DTDNode) iter.next();
- if (currentNode instanceof Element && currentNode.getName().equals(attListName)) {
- parent = currentNode;
- }
- }
- }
-
- if (parent == null) {
- parent = ((DTDNode) element).getParentNode();
- }
-
- // if showing in the logical order, return the IndexedNodeList
- // acting as the parent in the tree
- if (parent == null) {
- if (isShowLogicalOrder()) {
- Object[] indexedNodeLists = getChildren(((DTDModelImpl) fInputObject).getDTDFile());
- for (int i = 0; i < indexedNodeLists.length && parent == null; i++) {
- if (indexedNodeLists[i] instanceof NodeList) {
- if (((NodeList) indexedNodeLists[i]).getNodes().contains(element))
- parent = indexedNodeLists[i];
- }
- }
- }
- else {
- parent = ((DTDModelImpl) fInputObject).getDTDFile();
- }
- }
- }
- else if (element instanceof NodeList && fInputObject instanceof DTDModelImpl) {
- parent = ((DTDModelImpl) fInputObject).getDTDFile();
- }
- return parent;
- }
-
- public boolean hasChildren(Object element) {
- Object[] children = getChildren(element);
- return children.length > 0;
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- fViewer = viewer;
-
- if (fInputObject instanceof DTDModelImpl) {
- ((DTDModelImpl) fInputObject).getDTDFile().removeDTDFileListener(this);
- }
- fInputObject = newInput;
- if (fInputObject instanceof DTDModelImpl) {
- ((DTDModelImpl) fInputObject).getDTDFile().addDTDFileListener(this);
- }
- }
-
- /**
- * Get the value of showLogicalOrder.
- *
- * @return value of showLogicalOrder.
- */
- public boolean isShowLogicalOrder() {
- return showLogicalOrder;
- }
-
- private boolean isVisibleNode(Object o) {
- if (o instanceof AttributeList) {
- return false;
- }
- return true;
- }
-
- private boolean isVisibleNodeList(NodeList nodeList) {
- /*
- * All NodesLists should be visible because you can momentarily have
- * an ATTLIST (for example) without a corresponding ELEMENT
- * declaration
- */
- return true;// !nodeList.getListType().equals(DTDRegionTypes.ATTLIST_TAG);
- }
-
- public void nodeChanged(DTDNode node) {
- if (fViewer instanceof StructuredViewer) {
- // System.out.println("node changed notified");
- // System.out.println("selection before = " +
- // ((StructuredViewer)view).getSelection());
- if (node instanceof AttributeList && isShowLogicalOrder()) {
- // in this case, we are showing attributes under the element.
- // refresh the element object instead
- Iterator iter = node.getDTDFile().getNodes().iterator();
- while (iter.hasNext()) {
- DTDNode currentNode = (DTDNode) iter.next();
- if (currentNode.getName().equals(node.getName()) && currentNode instanceof Element) {
- ((StructuredViewer) fViewer).refresh(currentNode);
- }
- } // end of while ()
- }
- else {
- // do standard stuff
- ((StructuredViewer) fViewer).refresh(node);
- }
- // System.out.println("selection after = " +
- // ((StructuredViewer)view).getSelection());
- }
- }
-
- public void nodesAdded(NodesEvent event) {
- if (fViewer instanceof AbstractTreeViewer) {
- StructuredViewer viewer = (StructuredViewer) fViewer;
- ISelection selection = viewer.getSelection();
-
- Object firstObj = (!selection.isEmpty() && selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
- DTDNode oldSelectedNode = null;
- if (firstObj instanceof DTDNode) {
- oldSelectedNode = (DTDNode) firstObj;
- }
-
- AbstractTreeViewer abstractTreeViewer = (AbstractTreeViewer) fViewer;
- for (Iterator it = event.getNodes().iterator(); it.hasNext();) {
- Object node = it.next();
- Object parent = getParent(node);
- // Bug 111100 - If it is a top level node (ie. parent is a
- // DTDFile),
- // insert the node directly to improve performance
- if (parent instanceof DTDFile) {
- Object[] objs = getChildren(parent);
- for (int i = 0; i < objs.length; i++) {
- if (objs[i] == node) {
- abstractTreeViewer.insert(parent, node, i);
- break;
- }
- }
- }
- // If the parent node is not a DTDFile, just refresh the
- // parent for now
- else if (parent != null) {
- abstractTreeViewer.refresh(parent);
- }
- // You should never reach this block, if you do, just refresh
- // the whole tree
- else {
- abstractTreeViewer.refresh();
- }
- }
-
- Iterator iter = event.getNodes().iterator();
- List newSelection = new ArrayList();
- while (iter.hasNext()) {
- DTDNode node = (DTDNode) iter.next();
- if (oldSelectedNode == null || node.getStructuredDTDDocumentRegion() != oldSelectedNode.getStructuredDTDDocumentRegion() || node.getStartOffset() != oldSelectedNode.getStartOffset() || node.getEndOffset() != oldSelectedNode.getEndOffset()) {
- // add to selection
- newSelection.add(node);
- expandToNode(node);
- }
- }
- if (newSelection.size() > 0) {
- viewer.setSelection(new StructuredSelection(newSelection));
- }
-
- }
- }
-
- public void nodesRemoved(NodesEvent event) {
- if (fViewer instanceof AbstractTreeViewer) {
- AbstractTreeViewer abstractTreeViewer = (AbstractTreeViewer) fViewer;
- for (Iterator iter = event.getNodes().iterator(); iter.hasNext();) {
- abstractTreeViewer.remove(iter.next());
- }
- }
-
- }
-
- /**
- * Set the value of showLogicalOrder.
- *
- * @param value
- * Value to assign to showLogicalOrder.
- */
- public void setShowLogicalOrder(boolean value) {
- this.showLogicalOrder = value;
- if (!value) {
- // if not using logical order, lose the cached lists
- logicalNodeLists = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/OrderAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/OrderAction.java
deleted file mode 100644
index 227bc77269..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/OrderAction.java
+++ /dev/null
@@ -1,57 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-/*
- * Created on Jan 22, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.dtd.ui.views.contentoutline;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImageHelper;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateAction;
-
-class OrderAction extends PropertyChangeUpdateAction {
- private DTDTreeContentProvider contentProvider;
- private TreeViewer treeViewer;
-
- public OrderAction(TreeViewer viewer, DTDTreeContentProvider provider, IPreferenceStore store, String preferenceKey) {
- super(DTDUIMessages._UI_BUTTON_GROUP_ITEMS_LOGICALLY, store, preferenceKey, false); //$NON-NLS-1$
- setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_ORGANIZE_DTD_LOGICALLY));
- treeViewer = viewer;
- contentProvider = provider;
- setToolTipText(getText());
- contentProvider.setShowLogicalOrder(isChecked());
- }
-
- public void update() {
- super.update();
- treeViewer.getControl().setRedraw(false);
- setChecked(getPreferenceStore().getBoolean(getPreferenceKey()));
- Object[] expandedElements = treeViewer.getExpandedElements();
- ISelection selection = treeViewer.getSelection();
- contentProvider.setShowLogicalOrder(isChecked());
-
- // treeViewer.setInput(treeViewer.getInput());
- treeViewer.refresh(treeViewer.getInput());
-
- treeViewer.setExpandedElements(expandedElements);
- treeViewer.getControl().setRedraw(true);
- treeViewer.setSelection(selection);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/SortAction.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/SortAction.java
deleted file mode 100644
index 482a1f629c..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/SortAction.java
+++ /dev/null
@@ -1,55 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.dtd.ui.views.contentoutline;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.wst.dtd.ui.internal.DTDUIMessages;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImageHelper;
-import org.eclipse.wst.dtd.ui.internal.editor.DTDEditorPluginImages;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateAction;
-
-class SortAction extends PropertyChangeUpdateAction {
- private TreeViewer treeViewer;
-
- public SortAction(TreeViewer viewer, IPreferenceStore store, String preferenceKey) {
- super(DTDUIMessages._UI_BUTTON_SORT_ITEMS, store, preferenceKey, false); //$NON-NLS-1$
- setImageDescriptor(DTDEditorPluginImageHelper.getInstance().getImageDescriptor(DTDEditorPluginImages.IMG_OBJ_SORT));
- setToolTipText(getText());
- treeViewer = viewer;
- if (isChecked()) {
- treeViewer.setComparator(new ViewerComparator());
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- super.update();
- treeViewer.getControl().setRedraw(false);
- Object[] expandedElements = treeViewer.getExpandedElements();
- if (isChecked()) {
- treeViewer.setComparator(new ViewerComparator());
- }
- else {
- treeViewer.setComparator(null);
- }
- treeViewer.setInput(treeViewer.getInput());
- treeViewer.setExpandedElements(expandedElements);
- treeViewer.getControl().setRedraw(true);
- }
-}
diff --git a/bundles/org.eclipse.wst.dtd.ui/templates/dtddefault-templates.properties b/bundles/org.eclipse.wst.dtd.ui/templates/dtddefault-templates.properties
deleted file mode 100644
index 89682b9d95..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/templates/dtddefault-templates.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 STAR Standards for Technology in Automotive Retail
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# David Carver, STAR - initial API and implementation, bug 162321
-#
-###############################################################################
-Templates.xmldeclaration.name=xml declaration
-Templates.xmldeclaration.desc=xml declaration
diff --git a/bundles/org.eclipse.wst.dtd.ui/templates/dtddefault-templates.xml b/bundles/org.eclipse.wst.dtd.ui/templates/dtddefault-templates.xml
deleted file mode 100644
index b2c642283c..0000000000
--- a/bundles/org.eclipse.wst.dtd.ui/templates/dtddefault-templates.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*******************************************************************************
- * Copyright (c) 2007 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - STAR - initial contribution, bug 162321
- *******************************************************************************/
- -->
-<templates>
- <template name="%Templates.xmldeclaration.name" description="%Templates.xmldeclaration.desc" id="org.eclipse.wst.dtd.ui.internal.templates.xmldeclaration" context="dtd_new" enabled="true">&lt;?xml version="1.0" encoding="${encoding}"?&gt;</template>
-</templates>
diff --git a/bundles/org.eclipse.wst.html.core/.classpath b/bundles/org.eclipse.wst.html.core/.classpath
deleted file mode 100644
index 2c6f8c1f34..0000000000
--- a/bundles/org.eclipse.wst.html.core/.classpath
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/w3c/dom/css/**/*"/>
- <accessrule kind="accessible" pattern="org/eclipse/wst/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.html.core/.cvsignore b/bundles/org.eclipse.wst.html.core/.cvsignore
deleted file mode 100644
index 02ca6cb2c7..0000000000
--- a/bundles/org.eclipse.wst.html.core/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-bin
-htmlmodel.jar
-temp.folder
-dev.properties
-build.xml
-@dot
-src.zip
-javaCompiler...args
diff --git a/bundles/org.eclipse.wst.html.core/.options b/bundles/org.eclipse.wst.html.core/.options
deleted file mode 100644
index e66a59f041..0000000000
--- a/bundles/org.eclipse.wst.html.core/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.wst.html.core/debug=true
-org.eclipse.wst.html.core/debug/tracefilter= \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/.project b/bundles/org.eclipse.wst.html.core/.project
deleted file mode 100644
index 13a9facdf9..0000000000
--- a/bundles/org.eclipse.wst.html.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.html.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index afa5c91352..0000000000
--- a/bundles/org.eclipse.wst.html.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.wst.html.core/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 7ec5750225..0000000000
--- a/bundles/org.eclipse.wst.html.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.wst.html.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0667e35a52..0000000000
--- a/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,79 +0,0 @@
-#Wed Mar 28 03:23:07 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.wst.html.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 301c7adde6..0000000000
--- a/bundles/org.eclipse.wst.html.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.wst.html.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index c59368c5e1..0000000000
--- a/bundles/org.eclipse.wst.html.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.wst.html.core/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.html.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 061cd53dd0..0000000000
--- a/bundles/org.eclipse.wst.html.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.wst.html.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF
deleted file mode 100644
index c659f03076..0000000000
--- a/bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.html.core; singleton:=true
-Bundle-Version: 1.1.200.qualifier
-Bundle-Activator: org.eclipse.wst.html.core.internal.HTMLCorePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.html.core.internal;x-internal:=true,
- org.eclipse.wst.html.core.internal.cleanup;x-internal:=true,
- org.eclipse.wst.html.core.internal.commentelement.handlers;x-internal:=true,
- org.eclipse.wst.html.core.internal.contentmodel;x-internal:=true,
- org.eclipse.wst.html.core.internal.contentmodel.chtml;x-internal:=true,
- org.eclipse.wst.html.core.internal.contentmodel.ssi;x-internal:=true,
- org.eclipse.wst.html.core.internal.contentproperties;x-internal:=true,
- org.eclipse.wst.html.core.internal.contenttype;x-internal:=true,
- org.eclipse.wst.html.core.internal.document;x-internal:=true,
- org.eclipse.wst.html.core.internal.encoding;x-internal:=true,
- org.eclipse.wst.html.core.internal.format;x-internal:=true,
- org.eclipse.wst.html.core.internal.htmlcss;x-internal:=true,
- org.eclipse.wst.html.core.internal.modelhandler;x-internal:=true,
- org.eclipse.wst.html.core.internal.modelquery;x-internal:=true,
- org.eclipse.wst.html.core.internal.preferences;x-internal:=true,
- org.eclipse.wst.html.core.internal.provisional;x-internal:=true,
- org.eclipse.wst.html.core.internal.provisional.contenttype;x-internal:=true,
- org.eclipse.wst.html.core.internal.provisional.text;x-internal:=true,
- org.eclipse.wst.html.core.internal.text;x-internal:=true,
- org.eclipse.wst.html.core.internal.validate;x-internal:=true,
- org.eclipse.wst.html.core.text
-Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- com.ibm.icu;bundle-version="[3.8.1,4.0.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.css.core;bundle-version="[1.1.200,1.2.0)"
-Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.wst.html.core.internal.contenttype"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.wst.html.core/about.html b/bundles/org.eclipse.wst.html.core/about.html
deleted file mode 100644
index 2199df3f05..0000000000
--- a/bundles/org.eclipse.wst.html.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.wst.html.core/build.properties b/bundles/org.eclipse.wst.html.core/build.properties
deleted file mode 100644
index 7ea2b7efc3..0000000000
--- a/bundles/org.eclipse.wst.html.core/build.properties
+++ /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
-###############################################################################
-bin.includes = plugin.xml,\
- .options,\
- data/,\
- plugin.properties,\
- META-INF/,\
- .,\
- about.html
-bin.excludes = bin/**,\
- @dot/**,\
- temp.folder/**
-src.includes = component.xml,\
- build.properties
-source.. = src/
diff --git a/bundles/org.eclipse.wst.html.core/component.xml b/bundles/org.eclipse.wst.html.core/component.xml
deleted file mode 100644
index 8565aecd93..0000000000
--- a/bundles/org.eclipse.wst.html.core/component.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.wst.html">
- <component-depends unrestricted="true"></component-depends>
- <plugin id="org.eclipse.wst.html.core" fragment="false" />
- <plugin id="org.eclipse.wst.html.standard.dtds" fragment="false" />
- <plugin id="org.eclipse.wst.html.ui" fragment="false" />
- <description url="http://eclipse.org/webtools/wst/components/html/overview.html" />
- <package name="org.eclipse.wst.html.ui" api="false">
- <type name="StructuredTextViewerConfigurationHTML" subclass="true" instantiate="true" />
- </package>
- <package name="org.eclipse.wst.html.ui.views.contentoutline" api="false">
- <type name="HTMLContentOutlineConfiguration" subclass="true" instantiate="true" />
- </package>
- <plugin id="org.eclipse.wst.html.ui.infopop" fragment="false" />
-</component>
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref.properties b/bundles/org.eclipse.wst.html.core/data/htmref.properties
deleted file mode 100644
index 9cd460d81e..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref.properties
+++ /dev/null
@@ -1,108 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-ATagInfo=A link if the href attribute is present, and the target for a link if the name attribute is present
-ABBRTagInfo=An abbreviation (for example, WWW, HTTP)
-ACRONYMTagInfo=An acronym (for example, SCUBA)
-ADDRESSTagInfo=Address information for the author of the page
-APPLETTagInfo=A Java applet
-AREATagInfo=Defines a client-side image map area
-BTagInfo=Displays contained text as bold
-BASETagInfo=The base URI for the page, to be used when calculating relative paths
-BASEFONTTagInfo=The base font size for the page
-BDOTagInfo=Overrides default bidirectional display. For use with bidirectional languages.
-BIGTagInfo=Displays contained text as large
-BGSOUNDTagInfo=Defines a sound file for the page. Not supported by W3C HTML 4.01.
-BLINKTagInfo=Displays text as blinking. Not supported by W3C HTML 4.01.
-BLOCKQUOTETagInfo=A long quotation
-BODYTagInfo=The document body. Contains all the content for the page.
-BRTagInfo=Forces a line break
-BUTTONTagInfo=Defines a push button
-CAPTIONTagInfo=Defines a table caption
-CENTERTagInfo=Displays contained text centered. Equivalent to DIV with align=center.
-CITETagInfo=A citation
-CODETagInfo=A computer code fragment
-COLTagInfo=A table column
-COLGROUPTagInfo=A group of table columns
-DDTagInfo=A definition or description in a definition or description list
-DELTagInfo=Displays text as deleted
-DFNTagInfo=A definition
-DIRTagInfo=A directory listing
-DIVTagInfo=A generic container, which can be used for defining language or style for the contents
-DLTagInfo=A definition or description list
-DTTagInfo=A term or subject in a definition or description list
-EMTagInfo=Displays text emphasized (generally italicized)
-EMBEDTagInfo=Defines an embedded plug-in. Not supported by W3C HTML 4.01.
-FIELDSETTagInfo=Defines a form control group
-FONTTagInfo=Displays text in the given font
-FORMTagInfo=Defines an interactive form
-FRAMETagInfo=Defines a frame within the current window
-FRAMESETTagInfo=Defines a frameset that divides the window into frames
-H1TagInfo=A top-level heading
-H2TagInfo=A second-level heading
-H3TagInfo=A third-level heading
-H4TagInfo=A fourth-level heading
-H5TagInfo=A fifth-level heading
-H6TagInfo=A sixth-level heading
-HEADTagInfo=Contains metadata and window title information for the document
-HRTagInfo=A horizontal rule
-HTMLTagInfo=The root element for the document.
-ITagInfo=Displays text as italic
-IFRAMETagInfo=Defines an inline subwindow
-IMGTagInfo=Displays the referenced image as embedded content
-INPUTTagInfo=Defines a form control for user input
-INSTagInfo=Defines inserted text
-ISINDEXTagInfo=Defines a single line prompt
-KBDTagInfo=Defines text to be entered by the user
-LABELTagInfo=Defines the label for a form field
-LEGENDTagInfo=Defines the label for a set of form fields
-LITagInfo=Defines a list item within a list
-LINKTagInfo=A media-independent link
-MAPTagInfo=Defines a client-side image map
-MARQUEETagInfo=Displays text as scrolling. Not supported by W3C HTML 4.01.
-MENUTagInfo=Defines a menu list
-METATagInfo=Defines metadata information for the document
-NOBRTagInfo=Overrides and prevents line breaks. Not supported by W3C HTML 4.01.
-NOFRAMESTagInfo=Provides information to display if the current browser does not support frames
-NOSCRIPTTagInfo=Provides information to display if the current browser does not support scripting
-OBJECTTagInfo=Defines a generic embedded object
-OLTagInfo=An ordered list
-OPTGROUPTagInfo=An option group
-OPTIONTagInfo=A selectable choice
-PTagInfo=A paragraph
-PARAMTagInfo=A named property value
-PRETagInfo=Preformatted text
-QTagInfo=A short inline quotation
-STagInfo=Display text in strike-through style
-SAMPTagInfo=Sample program output, scripts, etc. Displays in monospace font.
-SCRIPTTagInfo=Script statements
-SELECTTagInfo=An option selector
-SMALLTagInfo=Displays text as small
-SPANTagInfo=A generic container, which can be used for defining language or style for the contents
-STRIKETagInfo=Display text in strike-through style
-STRONGTagInfo=Displays text as strongly emphasized (generally bold)
-STYLETagInfo=Defines a style for the contained information
-SUBTagInfo=Display as subscript
-SUPTagInfo=Display as superscript
-TABLETagInfo=Defines a table
-TBODYTagInfo=The body of the table
-TDTagInfo=A cell within a table
-TEXTAREATagInfo=A multi-line text field
-TFOOTTagInfo=A table footer
-THTagInfo=A table header cell
-THEADTagInfo=A table header
-TITLETagInfo=The document title, displayed in the browser's title bar
-TRTagInfo=A table row
-TTTagInfo=Displays text in teletype or monospaced text style
-UTagInfo=Displays text as underlined
-ULTagInfo=An unordered list
-VARTagInfo=An instance of a variable or program argument
-WBRTagInfo=Allows a line break within <B>&lt;NOBR&gt;</B> tag. Not supported by W3C HTML 4.01.
diff --git a/bundles/org.eclipse.wst.html.core/data/htmref.xml b/bundles/org.eclipse.wst.html.core/data/htmref.xml
deleted file mode 100644
index c7bcd64385..0000000000
--- a/bundles/org.eclipse.wst.html.core/data/htmref.xml
+++ /dev/null
@@ -1,306 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*******************************************************************************
- * 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
- *******************************************************************************/
- -->
-<abstractGrammarAnnotations propertiesLocation="htmref" caseSensitive="false">
- <annotation spec="A">
- <property name="tagInfo">%ATagInfo</property>
- </annotation>
- <annotation spec="ABBR">
- <property name="tagInfo">%ABBRTagInfo</property>
- </annotation>
- <annotation spec="ACRONYM">
- <property name="tagInfo">%ACRONYMTagInfo</property>
- </annotation>
- <annotation spec="ADDRESS">
- <property name="tagInfo">%ADDRESSTagInfo</property>
- </annotation>
- <annotation spec="APPLET">
- <property name="tagInfo">%APPLETTagInfo</property>
- </annotation>
- <annotation spec="AREA">
- <property name="tagInfo">%AREATagInfo</property>
- </annotation>
- <annotation spec="B">
- <property name="tagInfo">%BTagInfo</property>
- </annotation>
- <annotation spec="BASE">
- <property name="tagInfo">%BASETagInfo</property>
- </annotation>
- <annotation spec="BASEFONT">
- <property name="tagInfo">%BASEFONTTagInfo</property>
- </annotation>
- <annotation spec="BDO">
- <property name="tagInfo">%BDOTagInfo</property>
- </annotation>
- <annotation spec="BGSOUND">
- <property name="tagInfo">%BGSOUNDTagInfo</property>
- </annotation>
- <annotation spec="BIG">
- <property name="tagInfo">%BIGTagInfo</property>
- </annotation>
- <annotation spec="BLINK">
- <property name="tagInfo">%BLINKTagInfo</property>
- </annotation>
- <annotation spec="BLOCKQUOTE">
- <property name="tagInfo">%BLOCKQUOTETagInfo</property>
- </annotation>
- <annotation spec="BODY">
- <property name="tagInfo">%BODYTagInfo</property>
- </annotation>
- <annotation spec="BR">
- <property name="tagInfo">%BRTagInfo</property>
- </annotation>
- <annotation spec="BUTTON">
- <property name="tagInfo">%BUTTONTagInfo</property>
- </annotation>
- <annotation spec="CAPTION">
- <property name="tagInfo">%CAPTIONTagInfo</property>
- </annotation>
- <annotation spec="CENTER">
- <property name="tagInfo">%CENTERTagInfo</property>
- </annotation>
- <annotation spec="CITE">
- <property name="tagInfo">%CITETagInfo</property>
- </annotation>
- <annotation spec="CODE">
- <property name="tagInfo">%CODETagInfo</property>
- </annotation>
- <annotation spec="COL">
- <property name="tagInfo">%COLTagInfo</property>
- </annotation>
- <annotation spec="COLGROUP">
- <property name="tagInfo">%COLGROUPTagInfo</property>
- </annotation>
- <annotation spec="DD">
- <property name="tagInfo">%DDTagInfo</property>
- </annotation>
- <annotation spec="DEL">
- <property name="tagInfo">%DELTagInfo</property>
- </annotation>
- <annotation spec="DFN">
- <property name="tagInfo">%DFNTagInfo</property>
- </annotation>
- <annotation spec="DIR">
- <property name="tagInfo">%DIRTagInfo</property>
- </annotation>
- <annotation spec="DIV">
- <property name="tagInfo">%DIVTagInfo</property>
- </annotation>
- <annotation spec="DL">
- <property name="tagInfo">%DLTagInfo</property>
- </annotation>
- <annotation spec="DT">
- <property name="tagInfo">%DTTagInfo</property>
- </annotation>
- <annotation spec="EM">
- <property name="tagInfo">%EMTagInfo</property>
- </annotation>
- <annotation spec="EMBED">
- <property name="tagInfo">%EMBEDTagInfo</property>
- </annotation>
- <annotation spec="FIELDSET">
- <property name="tagInfo">%FIELDSETTagInfo</property>
- </annotation>
- <annotation spec="FONT">
- <property name="tagInfo">%FONTTagInfo</property>
- </annotation>
- <annotation spec="FORM">
- <property name="tagInfo">%FORMTagInfo</property>
- </annotation>
- <annotation spec="FRAME">
- <property name="tagInfo">%FRAMETagInfo</property>
- </annotation>
- <annotation spec="FRAMESET">
- <property name="tagInfo">%FRAMESETTagInfo</property>
- </annotation>
- <annotation spec="H1">
- <property name="tagInfo">%H1TagInfo</property>
- </annotation>
- <annotation spec="H2">
- <property name="tagInfo">%H2TagInfo</property>
- </annotation>
- <annotation spec="H3">
- <property name="tagInfo">%H3TagInfo</property>
- </annotation>
- <annotation spec="H4">
- <property name="tagInfo">%H4TagInfo</property>
- </annotation>
- <annotation spec="H5">
- <property name="tagInfo">%H5TagInfo</property>
- </annotation>
- <annotation spec="H6">
- <property name="tagInfo">%H6TagInfo</property>
- </annotation>
- <annotation spec="HEAD">
- <property name="tagInfo">%HEADTagInfo</property>
- </annotation>
- <annotation spec="HR">
- <property name="tagInfo">%HRTagInfo</property>
- </annotation>
- <annotation spec="HTML">
- <property name="tagInfo">%HTMLTagInfo</property>
- </annotation>
- <annotation spec="I">
- <property name="tagInfo">%ITagInfo</property>
- </annotation>
- <annotation spec="IFRAME">
- <property name="tagInfo">%IFRAMETagInfo</property>
- </annotation>
- <annotation spec="IMG">
- <property name="tagInfo">%IMGTagInfo</property>
- </annotation>
- <annotation spec="INPUT">
- <property name="tagInfo">%INPUTTagInfo</property>
- </annotation>
- <annotation spec="INS">
- <property name="tagInfo">%INSTagInfo</property>
- </annotation>
- <annotation spec="ISINDEX">
- <property name="tagInfo">%ISINDEXTagInfo</property>
- </annotation>
- <annotation spec="KBD">
- <property name="tagInfo">%KBDTagInfo</property>
- </annotation>
- <annotation spec="LABEL">
- <property name="tagInfo">%LABELTagInfo</property>
- </annotation>
- <annotation spec="LEGEND">
- <property name="tagInfo">%LEGENDTagInfo</property>
- </annotation>
- <annotation spec="LI">
- <property name="tagInfo">%LITagInfo</property>
- </annotation>
- <annotation spec="LINK">
- <property name="tagInfo">%LINKTagInfo</property>
- </annotation>
- <annotation spec="MAP">
- <property name="tagInfo">%MAPTagInfo</property>
- </annotation>
- <annotation spec="MARQUEE">
- <property name="tagInfo">%MARQUEETagInfo</property>
- </annotation>
- <annotation spec="MENU">
- <property name="tagInfo">%MENUTagInfo</property>
- </annotation>
- <annotation spec="META">
- <property name="tagInfo">%METATagInfo</property>
- </annotation>
- <annotation spec="NOBR">
- <property name="tagInfo">%NOBRTagInfo</property>
- </annotation>
- <annotation spec="NOFRAMES">
- <property name="tagInfo">%NOFRAMESTagInfo</property>
- </annotation>
- <annotation spec="NOSCRIPT">
- <property name="tagInfo">%NOSCRIPTTagInfo</property>
- </annotation>
- <annotation spec="OBJECT">
- <property name="tagInfo">%OBJECTTagInfo</property>
- </annotation>
- <annotation spec="OL">
- <property name="tagInfo">%OLTagInfo</property>
- </annotation>
- <annotation spec="OPTGROUP">
- <property name="tagInfo">%OPTGROUPTagInfo</property>
- </annotation>
- <annotation spec="OPTION">
- <property name="tagInfo">%OPTIONTagInfo</property>
- </annotation>
- <annotation spec="P">
- <property name="tagInfo">%PTagInfo</property>
- </annotation>
- <annotation spec="PARAM">
- <property name="tagInfo">%PARAMTagInfo</property>
- </annotation>
- <annotation spec="PRE">
- <property name="tagInfo">%PRETagInfo</property>
- </annotation>
- <annotation spec="Q">
- <property name="tagInfo">%QTagInfo</property>
- </annotation>
- <annotation spec="S">
- <property name="tagInfo">%STagInfo</property>
- </annotation>
- <annotation spec="SAMP">
- <property name="tagInfo">%SAMPTagInfo</property>
- </annotation>
- <annotation spec="SCRIPT">
- <property name="tagInfo">%SCRIPTTagInfo</property>
- </annotation>
- <annotation spec="SELECT">
- <property name="tagInfo">%SELECTTagInfo</property>
- </annotation>
- <annotation spec="SMALL">
- <property name="tagInfo">%SMALLTagInfo</property>
- </annotation>
- <annotation spec="SPAN">
- <property name="tagInfo">%SPANTagInfo</property>
- </annotation>
- <annotation spec="STRIKE">
- <property name="tagInfo">%STRIKETagInfo</property>
- </annotation>
- <annotation spec="STRONG">
- <property name="tagInfo">%STRONGTagInfo</property>
- </annotation>
- <annotation spec="STYLE">
- <property name="tagInfo">%STYLETagInfo</property>
- </annotation>
- <annotation spec="SUB">
- <property name="tagInfo">%SUBTagInfo</property>
- </annotation>
- <annotation spec="SUP">
- <property name="tagInfo">%SUPTagInfo</property>
- </annotation>
- <annotation spec="TABLE">
- <property name="tagInfo">%TABLETagInfo</property>
- </annotation>
- <annotation spec="TBODY">
- <property name="tagInfo">%TBODYTagInfo</property>
- </annotation>
- <annotation spec="TD">
- <property name="tagInfo">%TDTagInfo</property>
- </annotation>
- <annotation spec="TEXTAREA">
- <property name="tagInfo">%TEXTAREATagInfo</property>
- </annotation>
- <annotation spec="TFOOT">
- <property name="tagInfo">%TFOOTTagInfo</property>
- </annotation>
- <annotation spec="TH">
- <property name="tagInfo">%THTagInfo</property>
- </annotation>
- <annotation spec="THEAD">
- <property name="tagInfo">%THEADTagInfo</property>
- </annotation>
- <annotation spec="TITLE">
- <property name="tagInfo">%TITLETagInfo</property>
- </annotation>
- <annotation spec="TR">
- <property name="tagInfo">%TRTagInfo</property>
- </annotation>
- <annotation spec="TT">
- <property name="tagInfo">%TTTagInfo</property>
- </annotation>
- <annotation spec="U">
- <property name="tagInfo">%UTagInfo</property>
- </annotation>
- <annotation spec="UL">
- <property name="tagInfo">%ULTagInfo</property>
- </annotation>
- <annotation spec="VAR">
- <property name="tagInfo">%VARTagInfo</property>
- </annotation>
- <annotation spec="WBR">
- <property name="tagInfo">%WBRTagInfo</property>
- </annotation>
-</abstractGrammarAnnotations> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/plugin.properties b/bundles/org.eclipse.wst.html.core/plugin.properties
deleted file mode 100644
index 7ba24870ce..0000000000
--- a/bundles/org.eclipse.wst.html.core/plugin.properties
+++ /dev/null
@@ -1,16 +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
-###############################################################################
-providerName=Eclipse.org
-pluginName=Structured Source HTML Model
-Structured_HTML_Document_Factory_Extension.name=Structured HTML Document Factory Extension
-HTML_Content_Type_Extension_Element.name=HTML
-_taskMarker.name=HTML Task
-_validationMarker.name=HTML Problem
diff --git a/bundles/org.eclipse.wst.html.core/plugin.xml b/bundles/org.eclipse.wst.html.core/plugin.xml
deleted file mode 100644
index 0bd5628462..0000000000
--- a/bundles/org.eclipse.wst.html.core/plugin.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- default="no"
- class="org.eclipse.wst.html.core.internal.modelhandler.ModelHandlerForHTML"
- associatedContentTypeId="org.eclipse.wst.html.core.htmlsource"
- id="org.eclipse.wst.html.core.internal.modelhandler">
- </modelHandler>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.embeddedTypeHandler">
- <embeddedTypeHandler
- class="org.eclipse.wst.html.core.internal.modelhandler.EmbeddedHTML">
- </embeddedTypeHandler>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.taskscanner">
- <scanner
- id="org.eclipse.wst.html.core.internal.tasks.HTMLFileTaskScanner"
- class="org.eclipse.wst.xml.core.internal.tasks.XMLFileTaskScanner:org.eclipse.wst.html.core.taskMarker"
- contentTypeIds="org.eclipse.wst.html.core.htmlsource" />
- </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.wst.html.core.documentfactories"
- name="%Structured_HTML_Document_Factory_Extension.name">
- <factory
- contentTypeId="org.eclipse.wst.html.core.htmlsource"
- class="org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory" />
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.commentElementHandler">
- <handler-custom
- commenttype="xml"
- class="org.eclipse.wst.html.core.internal.commentelement.handlers.CommentElementHandlerForSSI">
- <startwith prefix="#"></startwith>
- </handler-custom>
- </extension>
-
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="html">
- </fileTypes>
- <fileTypes
- type="text"
- extension="htm">
- </fileTypes>
- <fileTypes
- type="text"
- extension="xhtml">
- </fileTypes>
- <fileTypes
- type="text"
- extension="htpl">
- </fileTypes>
- <fileTypes
- type="text"
- extension="wml">
- </fileTypes>
- <fileTypes
- type="text"
- extension="shtml">
- </fileTypes>
- <fileTypes
- type="text"
- extension="shtm">
- </fileTypes>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.formatProcessors">
- <processor
- class="org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl"
- contentTypeId="org.eclipse.wst.html.core.htmlsource">
- </processor>
- </extension>
-
- <!-- Extension point for taghelp documentation -->
- <extension point="org.eclipse.wst.xml.core.annotationFiles">
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML 1.0 Strict//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML 1.0 Transitional//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML 1.0 Frameset//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML Basic 1.0//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//W3C//DTD XHTML 1.1//EN">
- </annotationFile>
- <annotationFile
- location="data/htmref.xml"
- publicId="-//WAPFORUM//DTD XHTML Mobile 1.0//EN">
- </annotationFile>
- </extension>
-
- <extension point="org.eclipse.core.runtime.contentTypes">
- <content-type
- file-extensions="html,htm,xhtml,htpl,wml,shtml,shtm"
- priority="high"
- name="%HTML_Content_Type_Extension_Element.name"
- id="htmlsource"
- base-type="org.eclipse.core.runtime.text">
- <!-- note: no default-charset for HTML, should use 'platform' -->
- <describer
- class="org.eclipse.wst.html.core.internal.contenttype.ContentDescriberForHTML" />
- </content-type>
- </extension>
-
-<!-- moved to where the dtd's are contributed
-
- <extension point="org.eclipse.wst.sse.core.documentTypes">
- <documentType
- elementName="html"
- displayName="XHTML 1.0 Strict"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//W3C//DTD XHTML 1.0 Strict//EN"
- systemID="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML 1.0 Transitional"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//W3C//DTD XHTML 1.0 Transitional//EN"
- defaultXHTML="true"
- systemID="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML 1.0 Frameset"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="true"
- publicID="-//W3C//DTD XHTML 1.0 Frameset//EN"
- systemID="http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML Basic 1.0"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//W3C//DTD XHTML Basic 1.0//EN"
- systemID="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML 1.1"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//W3C//DTD XHTML 1.1//EN"
- systemID="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- </documentType>
- <documentType
- elementName="html"
- displayName="XHTML MP 1.0"
- namespaceURI="http://www.w3.org/1999/xhtml"
- isXHTML="true"
- hasFrameset="false"
- publicID="-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
- systemID="http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
- </documentType>
- <documentType
- elementName="wml"
- displayName="WML 1.3"
- namespaceURI=""
- isWML="true"
- hasFrameset="false"
- publicID="-//WAPFORUM//DTD WML 1.3//EN"
- defaultWML="true"
- systemID="http://www.wapforum.org/DTD/wml13.dtd">
- </documentType>
- </extension>
--->
- <!-- initialize html core preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceInitializer" />
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLContentBuilder.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLContentBuilder.java
deleted file mode 100644
index ce33f1d6c0..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLContentBuilder.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.wst.html.core.internal;
-
-
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames;
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilderImpl;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-public class HTMLContentBuilder extends DOMContentBuilderImpl {
-
- private int fTagCase;
- private int fAttrCase;
-
- /**
- * DOMContentBuilder constructor comment.
- * @param document org.w3c.dom.Document
- */
- public HTMLContentBuilder(Document document) {
- super(document);
- Preferences prefs = HTMLCorePlugin.getDefault().getPluginPreferences();
- fTagCase = prefs.getInt(HTMLCorePreferenceNames.TAG_NAME_CASE);
- fAttrCase = prefs.getInt(HTMLCorePreferenceNames.ATTR_NAME_CASE);
- // Element caseSettings = HTMLPreferenceManager.getHTMLInstance().getElement(PreferenceNames.PREFERRED_CASE);
- // fTagCase = caseSettings.getAttribute(PreferenceNames.TAGNAME);
- // fAttrCase = caseSettings.getAttribute(PreferenceNames.ATTRIBUTENAME);
- }
-
- public String computeName(CMNode cmnode, Node parent) {
- String name = super.computeName(cmnode, parent);
- // don't change the case unless we're certain it is meaningless
- // if (cmnode instanceof HTMLCMNode && ((HTMLCMNode) cmnode).shouldIgnoreCase()) {
- if (shouldIgnoreCase(cmnode)) {
- if (cmnode.getNodeType() == CMNode.ELEMENT_DECLARATION) {
- if (fTagCase == HTMLCorePreferenceNames.LOWER)
- name = name.toLowerCase();
- else if (fTagCase == HTMLCorePreferenceNames.UPPER)
- name = name.toUpperCase();
- // else do nothing
- }
- else if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
- if (fAttrCase == HTMLCorePreferenceNames.LOWER)
- name = name.toLowerCase();
- else if (fAttrCase == HTMLCorePreferenceNames.UPPER)
- name = name.toUpperCase();
- // else do nothing
- }
- }
- return name;
-
- }
-
- private boolean shouldIgnoreCase(CMNode cmnode) {
- if (!cmnode.supports(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return false;
- return ((Boolean) cmnode.getProperty(HTMLCMProperties.SHOULD_IGNORE_CASE)).booleanValue();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCoreMessages.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCoreMessages.java
deleted file mode 100644
index 92f6df1ce2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCoreMessages.java
+++ /dev/null
@@ -1,62 +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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by HTML Core
- *
- * @plannedfor 1.0
- */
-public class HTMLCoreMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.wst.html.core.internal.HTMLCorePluginResources";//$NON-NLS-1$
-
- public static String No_error__UI_;
- public static String Undefined_attribute_name___ERROR_;
- public static String Undefined_attribute_value__ERROR_;
- public static String Multiple_values_specified__ERROR_;
- public static String Attribute_name___0___uses__ERROR_;
- public static String Invalid_attribute_name___0_ERROR_;
- public static String Invalid_attribute___0____ERROR_;
- public static String Invalid_location_of_tag____ERROR_;
- public static String Duplicate_tag___0____ERROR_;
- public static String No_start_tag____0_____ERROR_;
- public static String No_end_tag_____0_____ERROR_;
- public static String End_tag_____0____not_neede_ERROR_;
- public static String Unknown_tag___0____ERROR_;
- public static String Tag_name___0___uses_wrong__ERROR_;
- public static String Invalid_tag_name___0____ERROR_;
- public static String Invalid_JSP_directive___0__ERROR_;
- public static String Invalid_text_string___0____ERROR_;
- public static String Invalid_character_used_in__ERROR_;
- public static String Unknown_error__ERROR_;
- public static String Start_tag____0____not_clos_ERROR_;
- public static String End_tag_____0____not_close_ERROR_;
- public static String Attribute_value___0___uses_ERROR_;
- public static String Comment_not_closed__ERROR_;
- public static String DOCTYPE_declaration_not_cl_ERROR_;
- public static String Processing_instruction_not_ERROR_;
- public static String CDATA_section_not_closed__ERROR_;
- public static String _ERROR_Tag___0___should_be_an_empty_element_tag_1;
- public static String _ERROR_Attribute_value___0___not_closed__1;
- public static String HTMLContentPropertiesManager_Updating;
- public static String HTMLContentPropertiesManager_Problems_Updating;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, HTMLCoreMessages.class);
- }
-
- private HTMLCoreMessages() {
- // cannot create new instance
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java
deleted file mode 100644
index d1a486b526..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java
+++ /dev/null
@@ -1,62 +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.wst.html.core.internal;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.wst.html.core.internal.contentproperties.HTMLContentPropertiesManager;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class HTMLCorePlugin extends Plugin {
- // The shared instance.
- private static HTMLCorePlugin plugin;
-
- /**
- * The constructor.
- */
- public HTMLCorePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static HTMLCorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- // listen for resource changes to update content properties keys
- HTMLContentPropertiesManager.startup();
- }
-
- public void stop(BundleContext context) throws Exception {
- // stop listenning for resource changes to update content properties
- // keys
- HTMLContentPropertiesManager.shutdown();
-
- super.stop(context);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties
deleted file mode 100644
index 7cb04b6fcf..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties
+++ /dev/null
@@ -1,42 +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
-###############################################################################
-No_error__UI_=No error.
-Undefined_attribute_name___ERROR_=Undefined attribute name ({0}).
-Undefined_attribute_value__ERROR_=Undefined attribute value ({0}).
-Multiple_values_specified__ERROR_=Multiple values specified for an attribute ({0}).
-Attribute_name___0___uses__ERROR_=Attribute name ({0}) uses wrong case character.
-Invalid_attribute_name___0_ERROR_=Invalid attribute name ({0}).
-Invalid_attribute___0____ERROR_=Invalid attribute ({0}).
-Invalid_location_of_tag____ERROR_=Invalid location of tag ({0}).
-Duplicate_tag___0____ERROR_=Duplicate tag ({0}).
-No_start_tag____0_____ERROR_=No start tag (<{0}>).
-No_end_tag_____0_____ERROR_=No end tag (</{0}>).
-End_tag_____0____not_neede_ERROR_=End tag (</{0}>) not needed.
-Unknown_tag___0____ERROR_=Unknown tag ({0}).
-Tag_name___0___uses_wrong__ERROR_=Tag name ({0}) uses wrong case character.
-Invalid_tag_name___0____ERROR_=Invalid tag name ({0}).
-Invalid_JSP_directive___0__ERROR_=Invalid JSP directive ({0}).
-Invalid_text_string___0____ERROR_=Invalid text string ({0}).
-Invalid_character_used_in__ERROR_=Invalid character used in text string ({0}).
-Unknown_error__ERROR_=Unknown error.
-Start_tag____0____not_clos_ERROR_=Start tag (<{0}>) not closed.
-End_tag_____0____not_close_ERROR_=End tag (</{0}>) not closed.
-Attribute_value___0___uses_ERROR_=Attribute value ({0}) uses wrong case character.
-Comment_not_closed__ERROR_=Comment not closed.
-DOCTYPE_declaration_not_cl_ERROR_=DOCTYPE declaration not closed.
-Processing_instruction_not_ERROR_=Processing instruction not closed.
-CDATA_section_not_closed__ERROR_=CDATA section not closed.
-# From here, the new messages are added for V5
-_ERROR_Tag___0___should_be_an_empty_element_tag_1=Tag ({0}) should be an empty-element tag.
-_ERROR_Attribute_value___0___not_closed__1=Attribute value ({0}) not closed.
-#
-HTMLContentPropertiesManager_Updating=Updating Web Content Settings
-HTMLContentPropertiesManager_Problems_Updating=Problem saving Web Content Settings for {0}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/Logger.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/Logger.java
deleted file mode 100644
index c547950d06..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/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.wst.html.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.wst.html.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.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java
deleted file mode 100644
index b4356102ab..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.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.wst.html.core.internal.cleanup;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-abstract class AbstractNodeCleanupHandler implements IStructuredCleanupHandler {
-
- protected IStructuredCleanupPreferences fCleanupPreferences = null;
- protected IProgressMonitor fProgressMonitor = null;
-
- public void setCleanupPreferences(IStructuredCleanupPreferences cleanupPreferences) {
-
- fCleanupPreferences = cleanupPreferences;
- }
-
-
- public IStructuredCleanupPreferences getCleanupPreferences() {
- if (fCleanupPreferences == null) {
- fCleanupPreferences = new StructuredCleanupPreferences();
-
- Preferences preferences = getModelPreferences();
- if (preferences != null) {
- fCleanupPreferences.setTagNameCase(preferences.getInt(HTMLCorePreferenceNames.CLEANUP_TAG_NAME_CASE));
- fCleanupPreferences.setAttrNameCase(preferences.getInt(HTMLCorePreferenceNames.CLEANUP_ATTR_NAME_CASE));
- fCleanupPreferences.setCompressEmptyElementTags(preferences.getBoolean(HTMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS));
- fCleanupPreferences.setInsertRequiredAttrs(preferences.getBoolean(HTMLCorePreferenceNames.INSERT_REQUIRED_ATTRS));
- fCleanupPreferences.setInsertMissingTags(preferences.getBoolean(HTMLCorePreferenceNames.INSERT_MISSING_TAGS));
- fCleanupPreferences.setQuoteAttrValues(preferences.getBoolean(HTMLCorePreferenceNames.QUOTE_ATTR_VALUES));
- fCleanupPreferences.setFormatSource(preferences.getBoolean(HTMLCorePreferenceNames.FORMAT_SOURCE));
- fCleanupPreferences.setConvertEOLCodes(preferences.getBoolean(HTMLCorePreferenceNames.CONVERT_EOL_CODES));
- fCleanupPreferences.setEOLCode(preferences.getString(HTMLCorePreferenceNames.CLEANUP_EOL_CODE));
- }
- }
-
- return fCleanupPreferences;
- }
-
-
- public void setProgressMonitor(IProgressMonitor progressMonitor) {
-
- fProgressMonitor = progressMonitor;
- }
-
- static protected StructuredDocumentEvent replaceSource(IDOMModel model, Object requester, int offset, int length, String source) {
-
- StructuredDocumentEvent result = null;
- if (model == null)
- return result;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- if (structuredDocument == null)
- return result;
- if (source == null)
- source = new String();
- if (structuredDocument.containsReadOnly(offset, length))
- return result;
- if (requester == null) {
- requester = structuredDocument;
- }
- return structuredDocument.replaceText(requester, offset, length, source);
- }
-
- protected Preferences getModelPreferences() {
- return HTMLCorePlugin.getDefault().getPluginPreferences();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java
deleted file mode 100644
index 05675c6d2c..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java
+++ /dev/null
@@ -1,89 +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.wst.html.core.internal.cleanup;
-
-
-
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatter;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleSheetAdapter;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-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.core.internal.provisional.text.IStructuredDocument;
-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;
-
-// nakamori_TODO: check and remove
-
-public class CSSTextNodeCleanupHandler extends AbstractNodeCleanupHandler {
-
- public Node cleanup(Node node) {
- if (node == null)
- return node;
- IDOMModel model = ((IDOMNode) node).getModel();
- if (model == null)
- return node;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- if (structuredDocument == null)
- return node;
-
- String content = getCSSContent(node);
- if (content == null)
- return node;
-
- int offset = ((IDOMNode) node).getStartOffset();
- int length = ((IDOMNode) node).getEndOffset() - offset;
- replaceSource(model, this, offset, length, content);
- return (IDOMNode) model.getIndexedRegion(offset);
- }
-
- /**
- */
- private String getCSSContent(Node text) {
- ICSSModel model = getCSSModel(text);
- if (model == null)
- return null;
- ICSSNode document = model.getDocument();
- if (document == null)
- return null;
- INodeNotifier notifier = (INodeNotifier) document;
- CSSSourceFormatter formatter = (CSSSourceFormatter) notifier.getAdapterFor(CSSSourceFormatter.class);
- // try another way to get formatter
- if (formatter == null)
- formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(notifier);
- if (formatter == null)
- return null;
- StringBuffer buffer = formatter.cleanup(document);
- if (buffer == null)
- return null;
- return buffer.toString();
- }
-
- /**
- */
- private ICSSModel getCSSModel(Node text) {
- if (text == null)
- return null;
- INodeNotifier notifier = (INodeNotifier) text.getParentNode();
- if (notifier == null)
- return null;
- INodeAdapter adapter = notifier.getAdapterFor(IStyleSheetAdapter.class);
- if (adapter == null)
- return null;
- if (!(adapter instanceof IStyleSheetAdapter))
- return null;
- IStyleSheetAdapter styleAdapter = (IStyleSheetAdapter) adapter;
- return styleAdapter.getModel();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java
deleted file mode 100644
index 11af74b52d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java
+++ /dev/null
@@ -1,695 +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.wst.html.core.internal.cleanup;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatter;
-import org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatterFactory;
-import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleDeclarationAdapter;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.html.core.internal.Logger;
-import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-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.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-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.provisional.document.ISourceGenerator;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-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;
-
-// nakamori_TODO: check and remove CSS formatting
-
-public class ElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
-
- /** Non-NLS strings */
- protected static final String START_TAG_OPEN = "<"; //$NON-NLS-1$
- protected static final String END_TAG_OPEN = "</"; //$NON-NLS-1$
- protected static final String TAG_CLOSE = ">"; //$NON-NLS-1$
- protected static final String EMPTY_TAG_CLOSE = "/>"; //$NON-NLS-1$
- protected static final String SINGLE_QUOTES = "''"; //$NON-NLS-1$
- protected static final String DOUBLE_QUOTES = "\"\""; //$NON-NLS-1$
- protected static final char SINGLE_QUOTE = '\''; //$NON-NLS-1$
- protected static final char DOUBLE_QUOTE = '\"'; //$NON-NLS-1$
-
- public Node cleanup(Node node) {
- IDOMNode renamedNode = (IDOMNode) cleanupChildren(node);
-
- // call quoteAttrValue() first so it will close any unclosed attr
- // quoteAttrValue() will return the new start tag if there is a
- // structure change
- renamedNode = quoteAttrValue(renamedNode);
-
- // insert tag close if missing
- // if node is not comment tag
- // and not implicit tag
- if (!((IDOMElement) renamedNode).isCommentTag() && (renamedNode.getStartStructuredDocumentRegion() != null)) {
- IDOMModel structuredModel = renamedNode.getModel();
-
- // save start offset before insertTagClose()
- // or else renamedNode.getStartOffset() will be zero if
- // renamedNode replaced by insertTagClose()
- int startTagStartOffset = renamedNode.getStartOffset();
-
- // for start tag
- IStructuredDocumentRegion startTagStructuredDocumentRegion = renamedNode.getStartStructuredDocumentRegion();
- insertTagClose(structuredModel, startTagStructuredDocumentRegion);
-
- // update renamedNode and startTagStructuredDocumentRegion after
- // insertTagClose()
- renamedNode = (IDOMNode) structuredModel.getIndexedRegion(startTagStartOffset);
- startTagStructuredDocumentRegion = renamedNode.getStartStructuredDocumentRegion();
-
- // for end tag
- IStructuredDocumentRegion endTagStructuredDocumentRegion = renamedNode.getEndStructuredDocumentRegion();
- if (endTagStructuredDocumentRegion != startTagStructuredDocumentRegion)
- insertTagClose(structuredModel, endTagStructuredDocumentRegion);
- }
-
- // call insertMissingTags() next, it will generate implicit tags if
- // there are any
- // insertMissingTags() will return the new missing start tag if one is
- // missing
- // applyTagNameCase() will return the renamed node.
- // The renamed/new node will be saved and returned to caller when all
- // cleanup is done.
- renamedNode = insertMissingTags(renamedNode);
- renamedNode = insertRequiredAttrs(renamedNode);
- renamedNode = applyTagNameCase(renamedNode);
- applyAttrNameCase(renamedNode);
- cleanupCSSAttrValue(renamedNode);
-
- return renamedNode;
- }
-
- /**
- * Checks if cleanup should modify case. Returns true case should be
- * preserved, false otherwise.
- *
- * @param element
- * @return true if element is case sensitive, false otherwise
- */
- private boolean shouldPreserveCase(IDOMElement element) {
- // case option can be applied to no namespace tags
- return !element.isGlobalTag();
- /*
- * ModelQueryAdapter mqadapter = (ModelQueryAdapter)
- * element.getAdapterFor(ModelQueryAdapter.class); ModelQuery mq =
- * null; CMNode nodedecl = null; if (mqadapter != null) mq =
- * mqadapter.getModelQuery(); if (mq != null) nodedecl =
- * mq.getCMNode(node); // if a Node isn't recognized as HTML or is and
- * cares about case, do not alter it // if (nodedecl == null ||
- * (nodedecl instanceof HTMLCMNode && ((HTMLCMNode)
- * nodedecl).shouldIgnoreCase())) if (!
- * nodedecl.supports(HTMLCMProperties.SHOULD_IGNORE_CASE)) return
- * false; return
- * ((Boolean)cmnode.getProperty(HTMLCMProperties.SHOULD_IGNORE_CASE)).booleanValue();
- */
- }
-
- /**
- * Checks if cleanup should force modifying element name to all lowercase.
- *
- * @param element
- * @return true if cleanup should lowercase element name, false otherwise
- */
- private boolean isXMLTag(IDOMElement element) {
- return element.isXMLTag();
- }
-
- protected void applyAttrNameCase(IDOMNode node) {
- IDOMElement element = (IDOMElement) node;
- if (element.isCommentTag())
- return; // do nothing
-
- int attrNameCase = HTMLCorePreferenceNames.ASIS;
- if (!shouldPreserveCase(element)) {
- if (isXMLTag(element))
- attrNameCase = HTMLCorePreferenceNames.LOWER;
- else
- attrNameCase = getCleanupPreferences().getAttrNameCase();
- }
-
- NamedNodeMap attributes = node.getAttributes();
- int attributesLength = attributes.getLength();
-
- for (int i = 0; i < attributesLength; i++) {
- IDOMNode eachAttr = (IDOMNode) attributes.item(i);
- String oldAttrName = eachAttr.getNodeName();
- String newAttrName = oldAttrName;
- /*
- * 254961 - all HTML tag names and attribute names should be in
- * English even for HTML files in other languages like Japanese or
- * Turkish. English locale should be used to convert between
- * uppercase and lowercase (otherwise "link" would be converted to
- * Turkish "I Overdot Capital").
- */
- if (attrNameCase == HTMLCorePreferenceNames.LOWER)
- newAttrName = oldAttrName.toLowerCase(Locale.US);
- else if (attrNameCase == HTMLCorePreferenceNames.UPPER)
- newAttrName = oldAttrName.toUpperCase(Locale.US);
-
- if (newAttrName.compareTo(oldAttrName) != 0) {
- int attrNameStartOffset = eachAttr.getStartOffset();
- int attrNameLength = oldAttrName.length();
-
- IDOMModel structuredModel = node.getModel();
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, attrNameStartOffset, attrNameLength, newAttrName);
- }
- }
- }
-
- protected IDOMNode applyTagNameCase(IDOMNode node) {
- IDOMElement element = (IDOMElement) node;
- if (element.isCommentTag())
- return node; // do nothing
-
- int tagNameCase = HTMLCorePreferenceNames.ASIS;
-
- if (!shouldPreserveCase(element)) {
- if (isXMLTag(element))
- tagNameCase = HTMLCorePreferenceNames.LOWER;
- else
- tagNameCase = getCleanupPreferences().getTagNameCase();
- }
-
- String oldTagName = node.getNodeName();
- String newTagName = oldTagName;
- IDOMNode newNode = node;
-
- /*
- * 254961 - all HTML tag names and attribute names should be in
- * English even for HTML files in other languages like Japanese or
- * Turkish. English locale should be used to convert between uppercase
- * and lowercase (otherwise "link" would be converted to Turkish "I
- * Overdot Capital").
- */
- if (tagNameCase == HTMLCorePreferenceNames.LOWER)
- newTagName = oldTagName.toLowerCase(Locale.US);
- else if (tagNameCase == HTMLCorePreferenceNames.UPPER)
- newTagName = oldTagName.toUpperCase(Locale.US);
-
- IDOMModel structuredModel = node.getModel();
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
-
- IStructuredDocumentRegion startTagStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
- if (startTagStructuredDocumentRegion != null) {
- ITextRegionList regions = startTagStructuredDocumentRegion.getRegions();
- if (regions != null && regions.size() > 0) {
- ITextRegion startTagNameRegion = regions.get(1);
- int startTagNameStartOffset = startTagStructuredDocumentRegion.getStartOffset(startTagNameRegion);
- int startTagNameLength = startTagStructuredDocumentRegion.getTextEndOffset(startTagNameRegion) - startTagNameStartOffset;
-
- replaceSource(structuredModel, structuredDocument, startTagNameStartOffset, startTagNameLength, newTagName);
- newNode = (IDOMNode) structuredModel.getIndexedRegion(startTagNameStartOffset); // save
- // new
- // node
- }
- }
-
- IStructuredDocumentRegion endTagStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
- if (endTagStructuredDocumentRegion != null) {
- ITextRegionList regions = endTagStructuredDocumentRegion.getRegions();
- if (regions != null && regions.size() > 0) {
- ITextRegion endTagNameRegion = regions.get(1);
- int endTagNameStartOffset = endTagStructuredDocumentRegion.getStartOffset(endTagNameRegion);
- int endTagNameLength = endTagStructuredDocumentRegion.getTextEndOffset(endTagNameRegion) - endTagNameStartOffset;
-
- if (startTagStructuredDocumentRegion != endTagStructuredDocumentRegion)
- replaceSource(structuredModel, structuredDocument, endTagNameStartOffset, endTagNameLength, newTagName);
- }
- }
-
- return newNode;
- }
-
- protected Node cleanupChildren(Node node) {
- Node parentNode = node;
-
- if (node != null) {
- Node childNode = node.getFirstChild();
- HTMLCleanupHandlerFactory factory = HTMLCleanupHandlerFactory.getInstance();
- while (childNode != null) {
- // cleanup this child node
- IStructuredCleanupHandler cleanupHandler = factory.createHandler(childNode, getCleanupPreferences());
- childNode = cleanupHandler.cleanup(childNode);
-
- // get new parent node
- parentNode = childNode.getParentNode();
-
- // get next child node
- childNode = childNode.getNextSibling();
- }
- }
-
- return parentNode;
- }
-
- /**
- */
- protected void cleanupCSSAttrValue(IDOMNode node) {
- if (node == null || node.getNodeType() != Node.ELEMENT_NODE)
- return;
- IDOMElement element = (IDOMElement) node;
- if (!element.isGlobalTag())
- return;
-
- Attr attr = element.getAttributeNode("style"); //$NON-NLS-1$
- if (attr == null)
- return;
- String value = getCSSValue(attr);
- if (value == null)
- return;
- String oldValue = ((IDOMNode) attr).getValueSource();
- if (oldValue != null && value.equals(oldValue))
- return;
- attr.setValue(value);
- }
-
- /**
- */
- private ICSSModel getCSSModel(Attr attr) {
- if (attr == null)
- return null;
- INodeNotifier notifier = (INodeNotifier) attr.getOwnerElement();
- if (notifier == null)
- return null;
- INodeAdapter adapter = notifier.getAdapterFor(IStyleDeclarationAdapter.class);
- if (adapter == null)
- return null;
- if (!(adapter instanceof IStyleDeclarationAdapter))
- return null;
- IStyleDeclarationAdapter styleAdapter = (IStyleDeclarationAdapter) adapter;
- return styleAdapter.getModel();
- }
-
- /**
- */
- private String getCSSValue(Attr attr) {
- ICSSModel model = getCSSModel(attr);
- if (model == null)
- return null;
- ICSSNode document = model.getDocument();
- if (document == null)
- return null;
- INodeNotifier notifier = (INodeNotifier) document;
- CSSSourceFormatter formatter = (CSSSourceFormatter) notifier.getAdapterFor(CSSSourceFormatter.class);
- // try another way to get formatter
- if (formatter == null)
- formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(notifier);
- if (formatter == null)
- return null;
- StringBuffer buffer = formatter.cleanup(document);
- if (buffer == null)
- return null;
- return buffer.toString();
- }
-
- private boolean isEmptyElement(IDOMElement element) {
- Document document = element.getOwnerDocument();
- if (document == null)
- // undefined tag, return default
- return false;
-
- ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
- if (modelQuery == null)
- // undefined tag, return default
- return false;
-
- CMElementDeclaration decl = modelQuery.getCMElementDeclaration(element);
- if (decl == null)
- // undefined tag, return default
- return false;
-
- return (decl.getContentType() == CMElementDeclaration.EMPTY);
- }
-
- protected IDOMNode insertEndTag(IDOMNode node) {
- IDOMElement element = (IDOMElement) node;
-
- int startTagStartOffset = node.getStartOffset();
- IDOMModel structuredModel = node.getModel();
- IDOMNode newNode = null;
-
- if (element.isCommentTag()) {
- // do nothing
- }
- else if (isEmptyElement(element)) {
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
- ITextRegionList regions = startStructuredDocumentRegion.getRegions();
- ITextRegion lastRegion = regions.get(regions.size() - 1);
- replaceSource(structuredModel, structuredDocument, startStructuredDocumentRegion.getStartOffset(lastRegion), lastRegion.getLength(), EMPTY_TAG_CLOSE);
-
- if (regions.size() > 1) {
- ITextRegion regionBeforeTagClose = regions.get(regions.size() - 1 - 1);
-
- // insert a space separator before tag close if the previous
- // region does not have extra spaces
- if (regionBeforeTagClose.getTextLength() == regionBeforeTagClose.getLength())
- replaceSource(structuredModel, structuredDocument, startStructuredDocumentRegion.getStartOffset(lastRegion), 0, " "); //$NON-NLS-1$
- }
- }
- else {
- String tagName = node.getNodeName();
- String endTag = END_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);
-
- IDOMNode lastChild = (IDOMNode) node.getLastChild();
- int endTagStartOffset = 0;
- if (lastChild != null)
- // if this node has children, insert the end tag after the
- // last child
- endTagStartOffset = lastChild.getEndOffset();
- else
- // if this node does not has children, insert the end tag
- // after the start tag
- endTagStartOffset = node.getEndOffset();
-
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, endTagStartOffset, 0, endTag);
- }
-
- newNode = (IDOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
- // new
- // node
-
- return newNode;
- }
-
- protected IDOMNode insertMissingTags(IDOMNode node) {
- boolean insertMissingTags = getCleanupPreferences().getInsertMissingTags();
- IDOMNode newNode = node;
-
- if (insertMissingTags) {
- IStructuredDocumentRegion startTagStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
- if (startTagStructuredDocumentRegion == null) {
- // implicit start tag; generate tag for it
- newNode = insertStartTag(node);
- startTagStructuredDocumentRegion = newNode.getStartStructuredDocumentRegion();
- }
-
- IStructuredDocumentRegion endTagStructuredDocumentRegion = newNode.getEndStructuredDocumentRegion();
-
- ITextRegionList regionList = startTagStructuredDocumentRegion.getRegions();
- if (startTagStructuredDocumentRegion != null && regionList != null && regionList.get(regionList.size() - 1).getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE) {
-
- }
- else {
- if (startTagStructuredDocumentRegion == null) {
- // start tag missing
- if (isStartTagRequired(newNode))
- newNode = insertStartTag(newNode);
- }
- else if (endTagStructuredDocumentRegion == null) {
- // end tag missing
- if (isEndTagRequired(newNode))
- newNode = insertEndTag(newNode);
- }
- }
- }
-
- return newNode;
- }
-
- protected IDOMNode insertStartTag(IDOMNode node) {
- IDOMElement element = (IDOMElement) node;
- if (element.isCommentTag())
- return node; // do nothing
-
- IDOMNode newNode = null;
-
- String tagName = node.getNodeName();
- String startTag = START_TAG_OPEN.concat(tagName).concat(TAG_CLOSE);
- int startTagStartOffset = node.getStartOffset();
-
- IDOMModel structuredModel = node.getModel();
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, startTagStartOffset, 0, startTag);
- newNode = (IDOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
- // new
- // node
-
- return newNode;
- }
-
- protected void insertTagClose(IDOMModel structuredModel, IStructuredDocumentRegion flatNode) {
- if ((flatNode != null) && (flatNode.getRegions() != null)) {
- ITextRegionList regionList = flatNode.getRegions();
- ITextRegion lastRegion = regionList.get(regionList.size() - 1);
- if (lastRegion != null) {
- String regionType = lastRegion.getType();
- if ((regionType != DOMRegionContext.XML_EMPTY_TAG_CLOSE) && (regionType != DOMRegionContext.XML_TAG_CLOSE)) {
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
-
- // insert ">" after lastRegion of flatNode
- // as in "<a</a>" if flatNode is for start tag, or in
- // "<a></a" if flatNode is for end tag
- replaceSource(structuredModel, structuredDocument, flatNode.getTextEndOffset(lastRegion), 0, ">"); //$NON-NLS-1$
- }
- }
- }
- }
-
- protected boolean isEndTagRequired(IDOMNode node) {
- if (node == null)
- return false;
- return node.isContainer();
- }
-
- /**
- * The end tags of HTML EMPTY content type, such as IMG, and HTML
- * undefined tags are parsed separately from the start tags. So inserting
- * the missing start tag is useless and even harmful.
- */
- protected boolean isStartTagRequired(IDOMNode node) {
- if (node == null)
- return false;
- return node.isContainer();
- }
-
- protected boolean isXMLType(IDOMModel structuredModel) {
- boolean result = false;
-
- if (structuredModel != null && structuredModel != null) {
- IDOMDocument document = structuredModel.getDocument();
-
- if (document != null)
- result = document.isXMLType();
- }
-
- return result;
- }
-
- protected IDOMNode quoteAttrValue(IDOMNode node) {
- IDOMElement element = (IDOMElement) node;
- if (element.isCommentTag())
- return node; // do nothing
-
- boolean quoteAttrValues = getCleanupPreferences().getQuoteAttrValues();
- IDOMNode newNode = node;
-
- if (quoteAttrValues) {
- NamedNodeMap attributes = newNode.getAttributes();
- int attributesLength = attributes.getLength();
- ISourceGenerator generator = node.getModel().getGenerator();
-
- for (int i = 0; i < attributesLength; i++) {
- attributes = newNode.getAttributes();
- attributesLength = attributes.getLength();
- IDOMAttr eachAttr = (IDOMAttr) attributes.item(i);
- // ITextRegion oldAttrValueRegion = eachAttr.getValueRegion();
- String oldAttrValue = eachAttr.getValueRegionText();
- if (oldAttrValue == null) {
- IDOMModel structuredModel = node.getModel();
- if (isXMLType(structuredModel)) {
- // TODO: Kit, please check. Is there any way to not
- // rely on getting regions from attributes?
- String newAttrValue = "=\"" + eachAttr.getNameRegionText() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
-
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, eachAttr.getNameRegionEndOffset(), 0, newAttrValue);
- newNode = (IDOMNode) structuredModel.getIndexedRegion(node.getStartOffset()); // save
- // new
- // node
- }
- }
- else {
-
- char quote = StringUtils.isQuoted(oldAttrValue) ? oldAttrValue.charAt(0) : DOUBLE_QUOTE;
- String newAttrValue = generator.generateAttrValue(eachAttr, quote);
-
- // There is a problem in
- // StructuredDocumentRegionUtil.getAttrValue(ITextRegion)
- // when the region is instanceof ContextRegion.
- // Workaround for now...
- if (oldAttrValue.length() == 1) {
- char firstChar = oldAttrValue.charAt(0);
- if (firstChar == SINGLE_QUOTE)
- newAttrValue = SINGLE_QUOTES;
- else if (firstChar == DOUBLE_QUOTE)
- newAttrValue = DOUBLE_QUOTES;
- }
-
- if (newAttrValue != null) {
- if (newAttrValue.compareTo(oldAttrValue) != 0) {
- int attrValueStartOffset = eachAttr.getValueRegionStartOffset();
- int attrValueLength = oldAttrValue.length();
- int startTagStartOffset = node.getStartOffset();
-
- IDOMModel structuredModel = node.getModel();
- IStructuredDocument structuredDocument = structuredModel.getStructuredDocument();
- replaceSource(structuredModel, structuredDocument, attrValueStartOffset, attrValueLength, newAttrValue);
- newNode = (IDOMNode) structuredModel.getIndexedRegion(startTagStartOffset); // save
- // new
- // node
- }
- }
- }
- }
- }
-
- return newNode;
- }
-
- private IDOMNode insertRequiredAttrs(IDOMNode node) {
- boolean insertRequiredAttrs = getCleanupPreferences().getInsertRequiredAttrs();
- IDOMNode newNode = node;
-
- if (insertRequiredAttrs) {
- List requiredAttrs = getRequiredAttrs(newNode);
- if (requiredAttrs.size() > 0) {
- NamedNodeMap currentAttrs = node.getAttributes();
- List insertAttrs = new ArrayList();
- if (currentAttrs.getLength() == 0)
- insertAttrs.addAll(requiredAttrs);
- else {
- for (int i = 0; i < requiredAttrs.size(); i++) {
- String requiredAttrName = ((CMAttributeDeclaration) requiredAttrs.get(i)).getAttrName();
- boolean found = false;
- for (int j = 0; j < currentAttrs.getLength(); j++) {
- String currentAttrName = currentAttrs.item(j).getNodeName();
- if (requiredAttrName.compareToIgnoreCase(currentAttrName) == 0) {
- found = true;
- break;
- }
- }
- if (!found)
- insertAttrs.add(requiredAttrs.get(i));
- }
- }
- if (insertAttrs.size() > 0) {
- IStructuredDocumentRegion startStructuredDocumentRegion = newNode.getStartStructuredDocumentRegion();
- int index = startStructuredDocumentRegion.getEndOffset();
- ITextRegion lastRegion = startStructuredDocumentRegion.getLastRegion();
- if (lastRegion.getType() == DOMRegionContext.XML_TAG_CLOSE) {
- index--;
- lastRegion = startStructuredDocumentRegion.getRegionAtCharacterOffset(index - 1);
- }
- else if (lastRegion.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE) {
- index = index - 2;
- lastRegion = startStructuredDocumentRegion.getRegionAtCharacterOffset(index - 1);
- }
- MultiTextEdit multiTextEdit = new MultiTextEdit();
- try {
- for (int i = insertAttrs.size() - 1; i >= 0; i--) {
- CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) insertAttrs.get(i);
- String requiredAttributeName = attrDecl.getAttrName();
- String defaultValue = attrDecl.getDefaultValue();
- if (defaultValue == null)
- defaultValue = ""; //$NON-NLS-1$
- String nameAndDefaultValue = " "; //$NON-NLS-1$
- if (i == 0 && lastRegion.getLength() > lastRegion.getTextLength())
- nameAndDefaultValue = ""; //$NON-NLS-1$
- nameAndDefaultValue += requiredAttributeName + "=\"" + defaultValue + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- multiTextEdit.addChild(new InsertEdit(index, nameAndDefaultValue));
- // BUG3381: MultiTextEdit applies all child
- // TextEdit's basing on offsets
- // in the document before the first TextEdit, not
- // after each
- // child TextEdit. Therefore, do not need to
- // advance the index.
- // index += nameAndDefaultValue.length();
- }
- multiTextEdit.apply(newNode.getStructuredDocument());
- }
- catch (BadLocationException e) {
- // log or now, unless we find reason not to
- Logger.log(Logger.INFO, e.getMessage());
- }
- }
- }
- }
-
- return newNode;
- }
-
-
- protected ModelQuery getModelQuery(Node node) {
- ModelQuery result = null;
- if (node.getNodeType() == Node.DOCUMENT_NODE) {
- result = ModelQueryUtil.getModelQuery((Document) node);
- }
- else {
- result = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
- }
- return result;
- }
-
- protected List getRequiredAttrs(Node node) {
- List result = new ArrayList();
-
- ModelQuery modelQuery = getModelQuery(node);
- if (modelQuery != null) {
- CMElementDeclaration elementDecl = modelQuery.getCMElementDeclaration((Element) node);
- if (elementDecl != null) {
- CMNamedNodeMap attrMap = elementDecl.getAttributes();
- Iterator it = attrMap.iterator();
- CMAttributeDeclaration attr = null;
- while (it.hasNext()) {
- attr = (CMAttributeDeclaration) it.next();
- if (attr.getUsage() == CMAttributeDeclaration.REQUIRED) {
- result.add(attr);
- }
- }
- }
- }
-
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java
deleted file mode 100644
index 256079060d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.cleanup;
-
-
-
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.w3c.dom.Node;
-
-// nakamori_TODO: check and remove CSS formatting
-
-class HTMLCleanupHandlerFactory {
-
-
-
- private static HTMLCleanupHandlerFactory fInstance = null;
-
- static synchronized HTMLCleanupHandlerFactory getInstance() {
- if (fInstance == null) {
- fInstance = new HTMLCleanupHandlerFactory();
- }
- return fInstance;
- }
-
- private HTMLCleanupHandlerFactory() {
- super();
- }
-
- IStructuredCleanupHandler createHandler(Node node, IStructuredCleanupPreferences cleanupPreferences) {
- short nodeType = node.getNodeType();
- IStructuredCleanupHandler handler = null;
- switch (nodeType) {
- case Node.ELEMENT_NODE : {
- if (isJSPTag(node))
- handler = new JSPElementNodeCleanupHandler();
- else
- handler = new ElementNodeCleanupHandler();
- break;
- }
- case Node.TEXT_NODE : {
- if (isParentStyleTag(node))
- handler = new CSSTextNodeCleanupHandler();
- else
- handler = new NodeCleanupHandler();
- break;
- }
- default : {
- handler = new NodeCleanupHandler();
- }
- }
-
- handler.setCleanupPreferences(cleanupPreferences);
-
- return handler;
- }
-
- /**
- * ISSUE: this is a bit of hidden JSP knowledge that was implemented this
- * way for expedency. Should be evolved in future to depend on "nestedContext".
- */
-
- private boolean isJSPTag(Node node) {
-
- final String JSP_CLOSE = "JSP_CLOSE"; //$NON-NLS-1$
- // final String JSP_COMMENT_CLOSE = "JSP_COMMENT_CLOSE"; //$NON-NLS-1$
-
- // final String JSP_COMMENT_OPEN = "JSP_COMMENT_OPEN"; //$NON-NLS-1$
- // final String JSP_COMMENT_TEXT = "JSP_COMMENT_TEXT"; //$NON-NLS-1$
-
- final String JSP_CONTENT = "JSP_CONTENT"; //$NON-NLS-1$
- final String JSP_DECLARATION_OPEN = "JSP_DECLARATION_OPEN"; //$NON-NLS-1$
- final String JSP_DIRECTIVE_CLOSE = "JSP_DIRECTIVE_CLOSE"; //$NON-NLS-1$
- final String JSP_DIRECTIVE_NAME = "JSP_DIRECTIVE_NAME"; //$NON-NLS-1$
-
- final String JSP_DIRECTIVE_OPEN = "JSP_DIRECTIVE_OPEN"; //$NON-NLS-1$
- final String JSP_EXPRESSION_OPEN = "JSP_EXPRESSION_OPEN"; //$NON-NLS-1$
-
- // final String JSP_ROOT_TAG_NAME = "JSP_ROOT_TAG_NAME"; //$NON-NLS-1$
-
- final String JSP_SCRIPTLET_OPEN = "JSP_SCRIPTLET_OPEN"; //$NON-NLS-1$
-
- boolean result = false;
-
- if (node instanceof IDOMNode) {
- IStructuredDocumentRegion flatNode = ((IDOMNode) node).getFirstStructuredDocumentRegion();
- // in some cases, the nodes exists, but hasn't been associated
- // with
- // a flatnode yet (the screen updates can be initiated on a
- // different thread,
- // so the request for a flatnode can come in before the node is
- // fully formed.
- // if the flatnode is null, we'll just allow the defaults to
- // apply.
- if (flatNode != null) {
- String flatNodeType = flatNode.getType();
- // should not be null, but just to be sure
- if (flatNodeType != null) {
- if ((flatNodeType.equals(JSP_CONTENT)) || (flatNodeType.equals(JSP_EXPRESSION_OPEN)) || (flatNodeType.equals(JSP_SCRIPTLET_OPEN)) || (flatNodeType.equals(JSP_DECLARATION_OPEN)) || (flatNodeType.equals(JSP_DIRECTIVE_CLOSE)) || (flatNodeType.equals(JSP_DIRECTIVE_NAME)) || (flatNodeType.equals(JSP_DIRECTIVE_OPEN)) || (flatNodeType.equals(JSP_CLOSE))) {
- result = true;
- }
- }
- }
- }
-
- return result;
- }
-
- private boolean isParentStyleTag(Node node) {
- if (node == null)
- return false;
- if (node.getNodeType() != Node.TEXT_NODE)
- return false;
- if (!(node instanceof IDOMNode))
- return false;
- IStructuredDocumentRegion flatNode = ((IDOMNode) node).getFirstStructuredDocumentRegion();
- if (flatNode == null)
- return false;
- if (flatNode.getType() != DOMRegionContext.BLOCK_TEXT)
- return false;
-
- // check if the parent is STYLE element
- Node parent = node.getParentNode();
- if (parent == null)
- return false;
- if (parent.getNodeType() != Node.ELEMENT_NODE)
- return false;
- String name = parent.getNodeName();
- if (name == null)
- return false;
- if (!name.equalsIgnoreCase("STYLE"))//$NON-NLS-1$
- return false;
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupProcessorImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupProcessorImpl.java
deleted file mode 100644
index 94b29291d2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupProcessorImpl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.cleanup;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl;
-import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames;
-import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeIdForHTML;
-import org.eclipse.wst.sse.core.internal.cleanup.AbstractStructuredCleanupProcessor;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupHandler;
-import org.eclipse.wst.sse.core.internal.cleanup.IStructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.internal.cleanup.StructuredCleanupPreferences;
-import org.eclipse.wst.sse.core.internal.format.IStructuredFormatProcessor;
-import org.w3c.dom.Node;
-
-public class HTMLCleanupProcessorImpl extends AbstractStructuredCleanupProcessor {
- private IStructuredCleanupPreferences fCleanupPreferences = null;
-
- protected String getContentType() {
- return ContentTypeIdForHTML.ContentTypeID_HTML;
- }
-
- protected IStructuredCleanupHandler getCleanupHandler(Node node) {
- return HTMLCleanupHandlerFactory.getInstance().createHandler(node, getCleanupPreferences());
- }
-
- public IStructuredCleanupPreferences getCleanupPreferences() {
- if (fCleanupPreferences == null) {
- fCleanupPreferences = new StructuredCleanupPreferences();
-
- Preferences preferences = getModelPreferences();
- if (preferences != null) {
- fCleanupPreferences.setTagNameCase(preferences.getInt(HTMLCorePreferenceNames.CLEANUP_TAG_NAME_CASE));
- fCleanupPreferences.setAttrNameCase(preferences.getInt(HTMLCorePreferenceNames.CLEANUP_ATTR_NAME_CASE));
- fCleanupPreferences.setCompressEmptyElementTags(preferences.getBoolean(HTMLCorePreferenceNames.COMPRESS_EMPTY_ELEMENT_TAGS));
- fCleanupPreferences.setInsertRequiredAttrs(preferences.getBoolean(HTMLCorePreferenceNames.INSERT_REQUIRED_ATTRS));
- fCleanupPreferences.setInsertMissingTags(preferences.getBoolean(HTMLCorePreferenceNames.INSERT_MISSING_TAGS));
- fCleanupPreferences.setQuoteAttrValues(preferences.getBoolean(HTMLCorePreferenceNames.QUOTE_ATTR_VALUES));
- fCleanupPreferences.setFormatSource(preferences.getBoolean(HTMLCorePreferenceNames.FORMAT_SOURCE));
- fCleanupPreferences.setConvertEOLCodes(preferences.getBoolean(HTMLCorePreferenceNames.CONVERT_EOL_CODES));
- fCleanupPreferences.setEOLCode(preferences.getString(HTMLCorePreferenceNames.CLEANUP_EOL_CODE));
- }
- }
-
- return fCleanupPreferences;
- }
-
- protected IStructuredFormatProcessor getFormatProcessor() {
- return new HTMLFormatProcessorImpl();
- }
-
- protected Preferences getModelPreferences() {
- return HTMLCorePlugin.getDefault().getPluginPreferences();
- }
-
- protected void refreshCleanupPreferences() {
- fCleanupPreferences = null;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/JSPElementNodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/JSPElementNodeCleanupHandler.java
deleted file mode 100644
index fcc8a419dc..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/JSPElementNodeCleanupHandler.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.wst.html.core.internal.cleanup;
-
-
-
-import org.w3c.dom.Node;
-
-public class JSPElementNodeCleanupHandler extends AbstractNodeCleanupHandler {
-
- public Node cleanup(Node node) {
- return node;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/NodeCleanupHandler.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/NodeCleanupHandler.java
deleted file mode 100644
index c31f34ed05..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/NodeCleanupHandler.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.wst.html.core.internal.cleanup;
-
-
-
-import org.w3c.dom.Node;
-
-public class NodeCleanupHandler extends AbstractNodeCleanupHandler {
-
- public Node cleanup(Node node) {
- return node;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/commentelement/handlers/CommentElementHandlerForSSI.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/commentelement/handlers/CommentElementHandlerForSSI.java
deleted file mode 100644
index 3a528bcb07..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/commentelement/handlers/CommentElementHandlerForSSI.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.commentelement.handlers;
-
-
-
-import org.eclipse.wst.xml.core.internal.commentelement.CommentElementHandler;
-import org.eclipse.wst.xml.core.internal.commentelement.util.CommentElementFactory;
-import org.eclipse.wst.xml.core.internal.commentelement.util.TagScanner;
-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.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.ISourceGenerator;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-
-public class CommentElementHandlerForSSI implements CommentElementHandler {
-
- public Element createElement(Document document, String data, boolean isJSPTag) {
- ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
- if (modelQuery == null) {
- return null;
- }
- CMDocument cm = modelQuery.getCorrespondingCMDocument(document);
- if (cm == null) {
- return null;
- }
- CMNamedNodeMap map = cm.getElements();
- if (map == null) {
- return null;
- }
-
- TagScanner scanner = new TagScanner(data, 1);
- String name = scanner.nextName();
- if (name == null) {
- return null;
- }
- StringBuffer buffer = new StringBuffer(name.length() + 4);
- buffer.append(SSI_PREFIX);
- buffer.append(':');
- buffer.append(name);
- String tagName = buffer.toString();
- // check if valid (defined) SSI tag or not
- if (map.getNamedItem(tagName) == null) {
- return null;
- }
-
- CommentElementFactory factory = new CommentElementFactory(document, isJSPTag, this);
- Element element = factory.create(tagName, CommentElementFactory.IS_START);
-
- // set attributes
- String attrName = scanner.nextName();
- while (attrName != null) {
- String attrValue = scanner.nextValue();
- Attr attr = document.createAttribute(attrName);
- if (attr != null) {
- if (attrValue != null)
- attr.setValue(attrValue);
- element.setAttributeNode(attr);
- }
- attrName = scanner.nextName();
- }
- return element;
- }
-
- public String generateStartTagContent(IDOMElement element) {
- ISourceGenerator generator = element.getModel().getGenerator();
- StringBuffer buffer = new StringBuffer();
-
- buffer.append('#');
- buffer.append(element.getLocalName());
-
- NamedNodeMap attributes = element.getAttributes();
- int length = attributes.getLength();
- for (int i = 0; i < length; i++) {
- Attr attr = (Attr) attributes.item(i);
- if (attr == null) {
- continue;
- }
- buffer.append(' ');
- String attrName = generator.generateAttrName(attr);
- if (attrName != null) {
- buffer.append(attrName);
- }
- String attrValue = generator.generateAttrValue(attr);
- if (attrValue != null) {
- // attr name only for HTML boolean and JSP
- buffer.append('=');
- buffer.append(attrValue);
- }
- }
-
- return buffer.toString();
- }
-
- public String generateEndTagContent(IDOMElement element) {
- return null; // always empty
- }
-
- public boolean isEmpty() {
- return true;
- }
-
- public boolean isCommentElement(IDOMElement element) {
- if (element == null) {
- return false;
- }
- Document document = element.getOwnerDocument();
- ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
- if (modelQuery == null) {
- return false;
- }
- CMDocument cm = modelQuery.getCorrespondingCMDocument(document);
- if (cm == null) {
- return false;
- }
- CMNamedNodeMap map = cm.getElements();
- if (map == null) {
- return false;
- }
- String prefix = element.getPrefix();
- if (prefix == null || !prefix.equals(SSI_PREFIX)) {
- return false;
- }
- String tagName = element.getTagName();
- if (tagName.length() <= 4) {
- return false;
- }
- if (map.getNamedItem(tagName) == null) {
- return false;
- }
- else {
- return true;
- }
- }
-
- private static final String SSI_PREFIX = "ssi";//$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java
deleted file mode 100644
index ab2a71c236..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java
+++ /dev/null
@@ -1,1285 +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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Factory for attribute declarations.
- */
-final class AttributeCollection extends CMNamedNodeMapImpl implements HTML40Namespace {
-
- /** bodycolors. */
- private static final String[] BODYCOLORS = {ATTR_NAME_BGCOLOR, ATTR_NAME_TEXT, ATTR_NAME_LINK, ATTR_NAME_VLINK, HTML40Namespace.ATTR_NAME_ALINK};
- /** coreattrs. */
- private static final String[] CORE = {ATTR_NAME_ID, ATTR_NAME_CLASS, ATTR_NAME_STYLE, ATTR_NAME_TITLE};
- /** events. */
- private static final String[] EVENTS = {ATTR_NAME_ONCLICK, ATTR_NAME_ONDBLCLICK, ATTR_NAME_ONMOUSEDOWN, ATTR_NAME_ONMOUSEUP, ATTR_NAME_ONMOUSEOVER, ATTR_NAME_ONMOUSEMOVE, ATTR_NAME_ONMOUSEOUT, ATTR_NAME_ONKEYPRESS, ATTR_NAME_ONKEYDOWN, ATTR_NAME_ONKEYUP, ATTR_NAME_ONHELP};
- /** i18n. lang, dir */
- private static final String[] I18N = {ATTR_NAME_LANG, ATTR_NAME_DIR};
- /** cellhaligh. */
- private static final String[] CELLHALIGN = {ATTR_NAME_CHAR, ATTR_NAME_CHAROFF};
-
- /**
- * constructor.
- */
- public AttributeCollection() {
- super();
- }
-
- /**
- * Create an attribute declaration.
- *
- * @param attrName
- * java.lang.String
- */
- private HTMLAttrDeclImpl create(String attrName) {
- HTMLAttrDeclImpl attr = null;
- HTMLCMDataTypeImpl atype = null;
-
- if (attrName.equalsIgnoreCase(ATTR_NAME_ABBR)) {
- // (abbr %Text; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ABBR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ACCEPT)) {
- // (accept %ContentTypes; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACCEPT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ACCEPT_CHARSET)) {
- // (accept-charset %Charsets;; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARSETS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACCEPT_CHARSET, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ACTION)) {
- // (action %URI #REQUIRED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACTION, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ARCHIVE)) {
- // (archive CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ARCHIVE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ACCESSKEY)) {
- // (accesskey %Character; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARACTER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACCESSKEY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ALINK)) {
- // (alink %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ALINK, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ALT)) {
- // (alt %Text; #REQUIRED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ALT, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_AUTOSTART)) {
- // (autostart (true|false) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_AUTOSTART, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_AUTOPLAY)) {
- // (autoplay (true|false) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_AUTOPLAY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_AUTOSIZE)) {
- // (autosize (true|false) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_AUTOSIZE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_AXIS)) {
- // (axis CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_AXIS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BACKGROUND)) {
- // (background %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BACKGROUND, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BEHAVIOR)) {
- // (behavior (scroll|slide|alternate) scroll)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_SCROLL, ATTR_VALUE_SLIDE, ATTR_VALUE_ALTERNATE};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_SCROLL);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BEHAVIOR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BGCOLOR)) {
- // (bgcolor %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BGCOLOR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BORDER)) {
- // (border %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BORDER, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CELLSPACING)) {
- // (cellspacing %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CELLSPACING, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CELLPADDING)) {
- // (cellpadding %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CELLPADDING, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CGI)) {
- // (cgi %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CGI, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHAR)) {
- // (char %Character; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARACTER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHAR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHAROFF)) {
- // (charoff %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHAROFF, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHARSET)) {
- // (charset %Charset; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARSET);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHARSET, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CITE)) {
- // (cite %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CITE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CLASS)) {
- // (class CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CLASS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CLASSID)) {
- // (classid %URI #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CLASSID, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CMD)) {
- // (cmd CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CMD, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHECKED)) {
- // (checked (checked) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_CHECKED};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHECKED, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CLEAR)) {
- // (clear (left | all | right | none) none)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_LEFT, ATTR_VALUE_ALL, ATTR_VALUE_RIGHT, ATTR_VALUE_NONE};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_NONE);
-
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CLEAR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CODE)) {
- // (code CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CODE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CODEBASE)) {
- // (codebase %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CODEBASE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CODETYPE)) {
- // (codetype %CotentType; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CODETYPE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_COLOR)) {
- // (color %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_COLOR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_COMPACT)) {
- // (compact (compact) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_COMPACT};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_COMPACT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_COLS)) {
- // (cols NUMBER #REQUIRED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_COLS, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_COLSPAN)) {
- // (colspan NUMBER 1)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_1);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_COLSPAN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CONTENT)) {
- // (content CDATA #REQUIRED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CONTENT, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CONTROLLER)) {
- // (controller (true|false) true)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_TRUE);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CONTROLLER, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_COORDS)) {
- // (coords %Coords; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COORDS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_COORDS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DATA)) {
- // (data %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DATA, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DATETIME)) {
- // (datetime %Datetime; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.DATETIME);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DATETIME, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DATAPAGESIZE)) {
- // (datapagesize CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DATAPAGESIZE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DECLARE)) {
- // (declare (declare) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_DECLARE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DECLARE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DEFER)) {
- // (defer (defer) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_DEFER};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DEFER, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DIR)) {
- // (dir (ltr|rtl) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_LTR, ATTR_VALUE_RTL};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DIR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DIRECTION)) {
- // (direction (left|right|up|down) left)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_LEFT, ATTR_VALUE_RIGHT, ATTR_VALUE_UP, ATTR_VALUE_DOWN};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DIRECTION, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DIRECTKEY)) {
- // (directkey %Character; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CHARACTER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DIRECTKEY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_DISABLED)) {
- // (disabled (disabled) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- // boolean attribute must have the same value as its name.
- String[] values = {ATTR_NAME_DISABLED};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_DISABLED, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ENCTYPE)) {
- // (enctype %ContentType; "application/x-www-form-urlencoded")
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_WWW_FORM_URLENCODED);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ENCTYPE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ERRMSG)) {
- // (errmsg CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ERRMSG, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_EVENT)) {
- // (event CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_EVENT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_FACE)) {
- // (face CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_FACE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_FILE)) {
- // (file %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_FILE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_FOR)) {
- // (for %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_FOR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_FRAME)) {
- // (frame %TFrame; #IMPLIED)
- // %TFrame; is
- // (void|above|below|hsides|lhs|rhs|vsides|box|border).
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_VOID, ATTR_VALUE_ABOVE, ATTR_VALUE_BELOW, ATTR_VALUE_HSIDES, ATTR_VALUE_LHS, ATTR_VALUE_RHS, ATTR_VALUE_VSIDES, ATTR_VALUE_BOX, ATTR_VALUE_BORDER};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_FRAME, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_FRAMEBORDER)) {
- // (frameborder (1|0) 1)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_1, ATTR_VALUE_0};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_1);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_FRAMEBORDER, atype, CMAttributeDeclaration.OPTIONAL);
-
- // <<D215684
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_FRAMESPACING)) {
- // (framespacing CDATA; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_FRAMESPACING, atype, CMAttributeDeclaration.OPTIONAL);
- // D215684
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HEADERS)) {
- // (HEADERS IDREFS; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.IDREFS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HEADERS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HEIGHT)) {
- // (height %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HEIGHT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HIDDEN)) {
- // (hidden CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HIDDEN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HREF)) {
- // (href %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HREF, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HREFLANG)) {
- // (hreflang %LanguageCode; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LANGUAGE_CODE);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HREFLANG, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HSPACE)) {
- // (hspace %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HSPACE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HTTP_EQUIV)) {
- // (http-equiv NAME #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.NAME);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HTTP_EQUIV, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ID)) {
- // (id ID #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ID);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ID, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ISMAP)) {
- // (ismap (ismap) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_ISMAP};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ISMAP, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ISTYLE)) {
- // (istyle CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ISTYLE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_LABEL)) {
- // (label %Text; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_LABEL, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_LANG)) {
- // (lang %LanguageCode; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LANGUAGE_CODE);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_LANG, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_LANGUAGE)) {
- // (language %CDATA; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_LANGUAGE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_LINK)) {
- // (link %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_LINK, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_LONGDESC)) {
- // (longdesc %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_LONGDESC, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_LOOP)) {
- // (loop CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_LOOP, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MACRO)) {
- // (macro CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MACRO, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MAPFILE)) {
- // (mapfile %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MAPFILE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MARGINWIDTH)) {
- // (marginwidth %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MARGINWIDTH, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MARGINHEIGHT)) {
- // (marginheight %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MARGINHEIGHT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MAXLENGTH)) {
- // (maxlength NUMBER #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MAXLENGTH, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MAYSCRIPT)) {
- // (mayscript (mayscript) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_MAYSCRIPT};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MAYSCRIPT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MEDIA)) {
- // (media %MediaDesc; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.MEDIA_DESC);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MEDIA, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_METHOD)) {
- // (method (GET|POST) GET)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_GET, ATTR_VALUE_POST};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_GET);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_METHOD, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MULTIPLE)) {
- // (multiple (multiple) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_MULTIPLE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MULTIPLE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_NAME)) {
- // (name CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_NAME, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_NOHREF)) {
- // (nohref (nohref) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_NOHREF};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_NOHREF, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_NORESIZE)) {
- // (noresize (noresize) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_NORESIZE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_NORESIZE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_NOSHADE)) {
- // (noshade (noshade) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_NOSHADE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_NOSHADE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_NOWRAP)) {
- // (nowrap (nowrap) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_NOWRAP};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_NOWRAP, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_OBJECT)) {
- // (object CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_OBJECT};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_OBJECT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONBLUR)) {
- // (onblur %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONBLUR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONCLICK)) {
- // (onclick %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONCLICK, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONCHANGE)) {
- // (onchange %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONCHANGE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONDBLCLICK)) {
- // (ondblclick %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONDBLCLICK, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONFOCUS)) {
- // (onfocus %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONFOCUS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONHELP)) {
- // (onhelp %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONHELP, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONKEYPRESS)) {
- // (onkeypress %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONKEYPRESS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONKEYDOWN)) {
- // (onkeydown %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONKEYDOWN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONKEYUP)) {
- // (onkyeup %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONKEYUP, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONLOAD)) {
- // (onload %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONLOAD, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONMOUSEDOWN)) {
- // (onmousedown %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONMOUSEDOWN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONMOUSEUP)) {
- // (onmouseup %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONMOUSEUP, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONMOUSEOVER)) {
- // (onmouseover %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONMOUSEOVER, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONMOUSEMOVE)) {
- // (onmousemove %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONMOUSEMOVE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONMOUSEOUT)) {
- // (onmouseout %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONMOUSEOUT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONRESET)) {
- // (onreset %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONRESET, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONSELECT)) {
- // (onselect %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONSELECT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONSUBMIT)) {
- // (onsubmit %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONSUBMIT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ONUNLOAD)) {
- // (onunload %Script; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.SCRIPT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ONUNLOAD, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_PALETTE)) {
- // (palette CDATA; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_PALETTE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_PANEL)) {
- // (panel CDATA; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_PANEL, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_PLAYCOUNT)) {
- // (playcount NUMBER; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_PLAYCOUNT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_PROFILE)) {
- // (profile %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_PROFILE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_PROMPT)) {
- // (prompt %Text; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_PROMPT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_READONLY)) {
- // (readonly (readonly) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_READONLY};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_READONLY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_REPEAT)) {
- // (repeat CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_REPEAT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_REL)) {
- // (rel %LinkTypes; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LINK_TYPES);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_REL, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_REV)) {
- // (rev %LinkTypes; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LINK_TYPES);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_REV, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ROWS)) {
- // (rows NUMBER #REQUIRED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ROWS, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ROWSPAN)) {
- // (rowspan NUMBER 1)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_1);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ROWSPAN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_RULES)) {
- // (rules %TRules; #IMPLIED)
- // %TRules; is (none | groups | rows | cols | all).
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_NONE, ATTR_VALUE_GROUPS, ATTR_VALUE_ROWS, ATTR_VALUE_COLS, ATTR_VALUE_ALL};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_RULES, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SCALE)) {
- // (scale CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SCALE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SCHEME)) {
- // (scheme CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SCHEME, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SELECTED)) {
- // (selected (selected) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_SELECTED};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SELECTED, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SCOPE)) {
- // (SCOPE %Scope; #IMPLIED)
- // %Scope; is (row|col|rowgroup|colgroup)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_ROW, ATTR_VALUE_COL, ATTR_VALUE_ROWGROUP, ATTR_VALUE_COLGROUP};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SCOPE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SCROLLAMOUNT)) {
- // (scrollamount NUMBER #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SCROLLAMOUNT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SCROLLDELAY)) {
- // (scrolldelay NUMBER #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SCROLLDELAY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SCROLLING)) {
- // (scrolling (yes|no|auto) auto)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_YES, ATTR_VALUE_NO, ATTR_VALUE_AUTO};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_AUTO);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SCROLLING, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SHAPE)) {
- // (shape %Shape; rect): %Shape; is (rect|circle|poly|default).
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_RECT, ATTR_VALUE_CIRCLE, ATTR_VALUE_POLY, ATTR_VALUE_DEFAULT};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_RECT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SHAPE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SHOWCONTROLS)) {
- // (showcontrols (true|false) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SHOWCONTROLS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SIZE)) {
- // (size %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SIZE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SIZEFMT)) {
- // (sizefmt CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SIZEFMT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SPAN)) {
- // (span NUMBER 1)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_1);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SPAN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SRC)) {
- // (src %URI; #IMPLIED)
- // NOTE: "src" attributes are defined in several elements.
- // The definition of IMG is different from others.
- // So, it should be locally defined.
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SRC, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_START)) {
- // (start NUMBER #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_START, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_STANDBY)) {
- // (standby %Text; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_STANDBY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_STYLE)) {
- // (style %StyleSheet; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.STYLE_SHEET);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_STYLE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SUMMARY)) {
- // (summary %Text; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SUMMARY, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TABINDEX)) {
- // (tabindex NUMBER #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TABINDEX, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TARGET)) {
- // (target %FrameTarget; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.FRAME_TARGET);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TARGET, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TEXT)) {
- // (text %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TEXT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TEXTFOCUS)) {
- // (textfocus CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TEXTFOCUS, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TITLE)) {
- // (title %Text; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TITLE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TIMEFMT)) {
- // (timefmt CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TIMEFMT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TRUESPEED)) {
- // (truespeed (truespeed) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_TRUESPEED};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TRUESPEED, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TYPE)) {
- // (type %CotentType; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_USEMAP)) {
- // (usemap %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_USEMAP, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VALIGN)) {
- // (valign (top|middle|bottom|baseline) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TOP, ATTR_VALUE_MIDDLE, ATTR_VALUE_BOTTOM, ATTR_VALUE_BASELINE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VALIGN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VALUE)) {
- // (value CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VALUE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VALUETYPE)) {
- // (valuetype (DATA|REF|OBJECT) DATA)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_DATA, ATTR_VALUE_REF, ATTR_VALUE_OBJECT};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_DATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VALUETYPE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VAR)) {
- // (var CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VAR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VERSION)) {
- // (version CDATA #FIXED '%HTML.Version;)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_FIXED, ATTR_VALUE_VERSION_TRANSITIONAL);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VERSION, atype, CMAttributeDeclaration.FIXED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VIRTUAL)) {
- // (virtual %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VIRTUAL, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VLINK)) {
- // (vlink %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VLINK, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VOLUME)) {
- // (volume CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VOLUME, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_WIDTH)) {
- // (width %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_WIDTH, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VSPACE)) {
- // (vspace %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VSPACE, atype, CMAttributeDeclaration.OPTIONAL);
-
- // <<D205514
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TOPMARGIN)) {
- // (topmargin, CDATA, #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TOPMARGIN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BOTTOMMARGIN)) {
- // (bottommargin, CDATA, #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BOTTOMMARGIN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_LEFTMARGIN)) {
- // (leftmargin, CDATA, #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_LEFTMARGIN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_RIGHTMARGIN)) {
- // (rightmargin, CDATA, #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_RIGHTMARGIN, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BORDERCOLOR)) {
- // (bordercolor, %Color; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.COLOR);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BORDERCOLOR, atype, CMAttributeDeclaration.OPTIONAL);
- // D205514
-
- }
- else {
- // unknown attribute; maybe error.
- // should warn.
- attr = null;
- }
-
- return attr;
- }
-
- /**
- * Get align attribute which has %CAlign; as values.. At this time
- * (4/19/2001), it is identical to %LAlign;.
- *
- */
- public static final HTMLAttrDeclImpl createAlignForCaption() {
- // align (local)
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- // set enum values
- String[] values = {ATTR_VALUE_TOP, ATTR_VALUE_BOTTOM, ATTR_VALUE_LEFT, ATTR_VALUE_RIGHT};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- return attr;
- }
-
- /**
- * Get align attribute which has %IAlign; as values..
- */
- public static final HTMLAttrDeclImpl createAlignForImage() {
- // align (local)
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- // set enum values
- String[] values = {ATTR_VALUE_TOP, ATTR_VALUE_MIDDLE, ATTR_VALUE_BOTTOM, ATTR_VALUE_LEFT, ATTR_VALUE_RIGHT};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- return attr;
- }
-
- /**
- * Get align attribute which has %LAlign; as values..
- */
- public static final HTMLAttrDeclImpl createAlignForLegend() {
- // align (local)
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- // set enum values
- String[] values = {ATTR_VALUE_TOP, ATTR_VALUE_BOTTOM, ATTR_VALUE_LEFT, ATTR_VALUE_RIGHT};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- return attr;
- }
-
- /**
- * Create an attribute declaration for <code>align</code> in several
- * elements, like <code>P</code>, <code>DIV</code>. The values are
- * different from attributes those have the same name in other elements (<code>IMG</code>
- * and <code>TABLE</code>). So, it can't treat as global attributes.
- * <strong>NOTE: These attribute declaration has no owner CMDocument
- * instance.</strong>
- */
- public static final HTMLAttrDeclImpl createAlignForParagraph() {
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- // set enum values: left|center|right|justify
- String[] values = {ATTR_VALUE_LEFT, ATTR_VALUE_CENTER, ATTR_VALUE_RIGHT, ATTR_VALUE_JUSTIFY};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- return attr;
- }
-
- /**
- * Get %attrs; declarations. %attrs; consists of %coreattrs;, %i18n, and
- * %events;.
- */
- public void getAttrs(CMNamedNodeMapImpl declarations) {
- // %coreattrs;
- Iterator names = Arrays.asList(CORE).iterator();
- getDeclarations(declarations, names);
- // %i18n;
- names = Arrays.asList(I18N).iterator();
- getDeclarations(declarations, names);
- // %events;
- names = Arrays.asList(EVENTS).iterator();
- getDeclarations(declarations, names);
- }
-
- /**
- * Get %bodycolors; declarations.
- */
- public void getBodycolors(CMNamedNodeMapImpl declarations) {
- Iterator names = Arrays.asList(BODYCOLORS).iterator();
- getDeclarations(declarations, names);
- }
-
- /**
- * Get %cellhalign; declarations. %cellhaligh; consists of: - (align
- * (left|center|right|justify|char) #IMPLIED) - (char %Character;
- * #IMPLIED) - (charoff %Length; #IMPLIED)
- */
- public void getCellhalign(CMNamedNodeMapImpl declarations) {
- // (align (left|center|right|justify|char) #IMPLIED) should be defined
- // locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- // set enum values
- String[] values = {ATTR_VALUE_LEFT, ATTR_VALUE_CENTER, ATTR_VALUE_RIGHT, ATTR_VALUE_JUSTIFY, ATTR_VALUE_CHAR};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- declarations.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
-
- // the rest.
- Iterator names = Arrays.asList(CELLHALIGN).iterator();
- getDeclarations(declarations, names);
- }
-
- /**
- * Get %cellvalign; declarations. %cellhaligh; is: - (valign
- * (top|middle|bottom|baseline) #IMPLIED)
- */
- public void getCellvalign(CMNamedNodeMapImpl declarations) {
- HTMLAttributeDeclaration dec = getDeclaration(HTML40Namespace.ATTR_NAME_VALIGN);
- if (dec != null)
- declarations.putNamedItem(HTML40Namespace.ATTR_NAME_VALIGN, dec);
- }
-
- /**
- * Get %coreattrs; declarations.
- */
- public void getCore(CMNamedNodeMapImpl declarations) {
- Iterator names = Arrays.asList(CORE).iterator();
- getDeclarations(declarations, names);
- }
-
- /**
- * Get a global attribute declaration.
- *
- * @param attrName
- * java.lang.String
- */
- public HTMLAttributeDeclaration getDeclaration(String attrName) {
- CMNode cmnode = getNamedItem(attrName);
- if (cmnode != null)
- return (HTMLAttributeDeclaration) cmnode; // already exists.
-
- HTMLAttrDeclImpl dec = create(attrName);
- if (dec != null)
- putNamedItem(attrName, dec);
-
- return dec;
- }
-
- /**
- * Get declarations which are specified by names.
- *
- * @param names
- * java.util.Iterator
- */
- public void getDeclarations(CMNamedNodeMapImpl declarations, Iterator names) {
- while (names.hasNext()) {
- String attrName = (String) names.next();
- HTMLAttributeDeclaration dec = getDeclaration(attrName);
- if (dec != null)
- declarations.putNamedItem(attrName, dec);
- }
- }
-
- /**
- * Get %events; declarations.
- */
- public void getEvents(CMNamedNodeMapImpl declarations) {
- Iterator names = Arrays.asList(EVENTS).iterator();
- getDeclarations(declarations, names);
- }
-
- /**
- * Get %i18n; declarations.
- */
- public void getI18n(CMNamedNodeMapImpl declarations) {
- Iterator names = Arrays.asList(I18N).iterator();
- getDeclarations(declarations, names);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMContentImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMContentImpl.java
deleted file mode 100644
index 07973a51c3..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMContentImpl.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.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-
-
-
-/**
- * Implementation of CMContent for HTML CM.
- */
-abstract class CMContentImpl extends CMNodeImpl implements CMContent {
-
- public static final int UNBOUNDED = -1;
- /** -1: it's UNBOUNDED. */
- private int maxOccur = UNBOUNDED;
- /** 0: it's OPTIONAL, 1, it's REQUIRED. */
- private int minOccur = 0;
-
- /**
- * The primary consturctor.
- * Use this one for usual cases.<br>
- */
- public CMContentImpl(String name, int min, int max) {
- super(name);
- minOccur = min;
- maxOccur = max;
- }
-
- /**
- * 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;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMGroupImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMGroupImpl.java
deleted file mode 100644
index 0108c618cb..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMGroupImpl.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.wst.html.core.internal.contentmodel;
-
-
-
-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;
-
-/**
- */
-class CMGroupImpl extends CMContentImpl implements CMGroup {
-
- private int operator = CMGroup.SEQUENCE;
- private CMNodeListImpl children = null;
-
- /**
- * CMGroupImpl constructor comment.
- */
- public CMGroupImpl(int op, int minOccur, int maxOccur) {
- super(null, minOccur, maxOccur);
- switch (op) {
- case CMGroup.ALL :
- case CMGroup.CHOICE :
- case CMGroup.SEQUENCE :
- operator = op;
- break;
- default :
- // should warn.
- break;
- }
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- protected CMNode appendChild(CMNode child) {
- if (child == null)
- return null;
- if (children == null)
- children = new CMNodeListImpl();
- return children.appendNode(child);
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList
- */
- public CMNodeList getChildNodes() {
- return children;
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- * ELEMENT_DECLARATION, ATTRIBUTE_DECLARATION, GROUP, ENTITY_DECLARATION.
- */
- public int getNodeType() {
- return CMNode.GROUP;
- }
-
- /**
- * getOperation method
- * @return int
- *
- * Returns one of :
- * ALONE (a), SEQUENCE (a,b), CHOICE (a|b), ALL (a&b).
- */
- public int getOperator() {
- return operator;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamedNodeMapImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamedNodeMapImpl.java
deleted file mode 100644
index f8a5e601b8..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamedNodeMapImpl.java
+++ /dev/null
@@ -1,114 +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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Locale;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * An implementation of the CMNamedNodeMap interface. This class is intented
- * to be used as a container of attribute declarations. If someone wants to
- * use this class for other purpose, he must pay attention to the fact that
- * this class is tolerant of the key name case. That is, this class does not
- * distinguish "name", "NAME", and "Name" as a key name.
- */
-class CMNamedNodeMapImpl implements CMNamedNodeMap {
-
- private Hashtable items = null;
-
- /**
- */
- public CMNamedNodeMapImpl() {
- super();
- items = new Hashtable();
- }
-
- /**
- * getLength method
- *
- * @return int
- */
- public int getLength() {
- return items.size();
- }
-
- /**
- * getNamedItem method
- *
- * @return CMNode <code>null</code> for unknown keys.
- * @param name
- * java.lang.String
- */
- public CMNode getNamedItem(String name) {
- String cookedName = makeCanonicalForm(name);
- if (!items.containsKey(cookedName))
- return null;
- return (CMNode) items.get(cookedName);
- }
-
- /**
- * item method
- *
- * @return CMNode
- * @param index
- * int
- */
- public CMNode item(int index) {
- Iterator iter = iterator();
- while (iter.hasNext()) {
- CMNode node = (CMNode) iter.next();
- if (--index < 0)
- return node;
- }
- return null;
- }
-
- /**
- * @return java.util.Iterator
- */
- public Iterator iterator() {
- return items.values().iterator();
- }
-
- /**
- * @return java.lang.String
- * @param rawForm
- * java.lang.String
- */
- private String makeCanonicalForm(String raw) {
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=100152
- // we are able to "cheat" here a little and use US Locale
- // to get a good cononical form, since we are using this only
- // for HTML and JSP standard tags.
- // Long term, for similar needs with XML 1.1 (for example)
- // we should use a class such as com.ibm.icu.text.Normalizer
- return raw.toUpperCase(Locale.US);
- }
-
- /**
- * @param key
- * java.lang.String
- * @param item
- * java.lang.String
- */
- void putNamedItem(String name, CMNode item) {
- String cookedName = makeCanonicalForm(name);
- if (items.containsKey(cookedName))
- return; // already registered.
- items.put(cookedName, item);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamespaceImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamespaceImpl.java
deleted file mode 100644
index 6ef737a913..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamespaceImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * CMNamespace implementation.
- */
-class CMNamespaceImpl extends CMNodeImpl implements CMNamespace {
-
- private java.lang.String prefix = null;
-
- /**
- * CMNamespaceImpl constructor comment.
- */
- public CMNamespaceImpl(String uri, String pfx) {
- super(uri);
- prefix = pfx;
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- *
- */
- public int getNodeType() {
- return CMNode.NAME_SPACE;
- }
-
- /**
- * getPrefix method
- * @return java.lang.String
- */
- public String getPrefix() {
- return prefix;
- }
-
- /**
- * getURI method
- * @return java.lang.String
- */
- public String getURI() {
- return getNodeName();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeImpl.java
deleted file mode 100644
index 2f6eb44f7b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-
-
-/**
- */
-abstract class CMNodeImpl implements CMNode {
-
- private java.lang.String name = null;
-
- /**
- * CMNodeImpl constructor comment.
- */
- public CMNodeImpl(String nm) {
- super();
- name = nm;
- }
-
- /**
- * getNodeName method
- * @return java.lang.String
- */
- public String getNodeName() {
- return name;
- }
-
- /**
- * getProperty method
- * @return java.lang.Object
- *
- * Returns the object property desciped by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.IS_XHTML))
- return new Boolean(false);
- return null;
- }
-
- /**
- * supports method
- * @return boolean
- *
- * Returns true if the CMNode supports a specified property
- *
- */
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.IS_XHTML))
- return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeListImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeListImpl.java
deleted file mode 100644
index 08bf21ab05..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeListImpl.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
-
-/**
- * Analog of dom.NodeList for CM.
- * So, the implementation is very similar to
- * NodeListImpl<br>
- */
-class CMNodeListImpl implements CMNodeList {
-
- private java.util.Vector nodes = null;
-
- /**
- * CMNodeListImpl constructor comment.
- */
- public CMNodeListImpl() {
- super();
- nodes = new java.util.Vector();
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param node org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- protected CMNode appendNode(CMNode node) {
- nodes.addElement(node);
- return 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.elementAt(index);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinition.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinition.java
deleted file mode 100644
index 91dba7ca17..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinition.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-
-/**
- * This class is intended to represent a complex type definition
- * in XML Schema.<br>
- */
-abstract class ComplexTypeDefinition {
-
- protected CMGroupImpl content = null;
- protected ElementCollection collection = null;
- protected String primaryCandidateName = null;
-
- /**
- * ComplexTypeDefinition constructor comment.
- */
- public ComplexTypeDefinition(ElementCollection elementCollection) {
- super();
- collection = elementCollection;
- createContent();
- }
-
- /**
- * Create an actual content model.
- * This method should be called once and only once in the constructor.<br>
- */
- protected abstract void createContent();
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMGroup
- */
- public CMGroup getContent() {
- return content;
- }
-
- /**
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- /* NOTE: Do we need LOGICAL type?
- * -- 3/7/2001
- */
- public abstract int getContentType();
-
- /**
- * Get content hint.
- */
- public HTMLElementDeclaration getPrimaryCandidate() {
- if (primaryCandidateName == null)
- return null;
- return (HTMLElementDeclaration) collection.getNamedItem(primaryCandidateName);
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public abstract String getTypeName();
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinitionFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinitionFactory.java
deleted file mode 100644
index 9a38d5379b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinitionFactory.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-/**
- * Factory of ComplexTypeDefinition.
- */
-final class ComplexTypeDefinitionFactory {
-
- private static ComplexTypeDefinitionFactory instance = null;
- private java.util.Hashtable definitions = null;
- // constants for complex type name
- /** for ADDRESS. */
- public final static String CTYPE_ADDRESS = "CTYPE_ADDRESS";//$NON-NLS-1$
- /** CDATA content. No ComplexTypeDefinition instance shuld be created. */
- public final static String CTYPE_CDATA = "CTYPE_CDATA";//$NON-NLS-1$
- /** col group content. COL* */
- public final static String CTYPE_COLUMN_GROUP = "CTYPE_COLUMN_GROUP";//$NON-NLS-1$
- /** for DL. */
- public final static String CTYPE_DEFINITION_LIST = "CTYPE_DEFINITION_LIST";//$NON-NLS-1$
- /** for EMBED. */
- public final static String CTYPE_EMBED = "CTYPE_EMBED";//$NON-NLS-1$
- /** empty content. No ComplexTypeDefinition instance should be created. */
- public final static String CTYPE_EMPTY = "CTYPE_EMPTY";//$NON-NLS-1$
- /** for FIELDSET. */
- public final static String CTYPE_FIELDSET = "CTYPE_FIELDSET";//$NON-NLS-1$
- /** for FRAMESET. */
- public final static String CTYPE_FRAMESET = "CTYPE_FRAMESET";//$NON-NLS-1$
- /** flow content. (%flow;)* */
- public final static String CTYPE_FLOW_CONTAINER = "CTYPE_FLOW_CONTAINER";//$NON-NLS-1$
- /** html content. HEAD, (FRAMESET|BODY) */
- public final static String CTYPE_HTML = "CTYPE_HTML";//$NON-NLS-1$
- /** head content. TITLE & ISINDEX? & BASE? */
- public final static String CTYPE_HEAD = "CTYPE_HEAD";//$NON-NLS-1$
- /** inline content. (%inline;)* */
- public final static String CTYPE_INLINE_CONTAINER = "CTYPE_INLINE_CONTAINER";//$NON-NLS-1$
- /** list item container. (LI)+ */
- public final static String CTYPE_LI_CONTAINER = "CTYPE_LI_CONTAINER";//$NON-NLS-1$
- /** for MAP. */
- public final static String CTYPE_MAP = "CTYPE_MAP";//$NON-NLS-1$
- /** noframes content. */
- public final static String CTYPE_NOFRAMES_CONTENT = "CTYPE_NOFRAMES_CONTENT";//$NON-NLS-1$
- /** for OPTGROUP. */
- public final static String CTYPE_OPTION_CONTAINER = "CTYPE_OPTION_CONTAINER";//$NON-NLS-1$
- /** param container. For OBJECT/APPLET. */
- public final static String CTYPE_PARAM_CONTAINER = "CTYPE_PARAM_CONTAINER";//$NON-NLS-1$
- /** PCDATA content. No ComplexTypeDefinition instance shuld be created. */
- public final static String CTYPE_PCDATA = "CTYPE_PCDATA";//$NON-NLS-1$
- /** for SELECT. */
- public final static String CTYPE_SELECT = "CTYPE_SELECT";//$NON-NLS-1$
- /** table content. CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+ */
- public final static String CTYPE_TABLE = "CTYPE_TABLE";//$NON-NLS-1$
- /** table cell contaier. (TH|TD)+ */
- public final static String CTYPE_TCELL_CONTAINER = "CTYPE_TCELL_CONTAINER";//$NON-NLS-1$
- /** table record container. (TR)+ */
- public final static String CTYPE_TR_CONTAINER = "CTYPE_TR_CONTAINER";//$NON-NLS-1$
-
- /**
- * ComplexTypeDefinitionFactory constructor comment.
- */
- private ComplexTypeDefinitionFactory() {
- super();
- definitions = new java.util.Hashtable();
- }
-
- /**
- * Factory method for ComplexTypeDefinition.
- * Each instance created in this method must be registered into
- * the map with its name.
- * @param definitionName java.lang.String
- * @param elementCollection ElementCollection
- */
- public ComplexTypeDefinition createTypeDefinition(String definitionName, ElementCollection elementCollection) {
- if (definitions.containsKey(definitionName)) {
- return (ComplexTypeDefinition) definitions.get(definitionName);
- }
-
- ComplexTypeDefinition def = null;
- if (definitionName == CTYPE_ADDRESS) {
- def = new CtdAddress(elementCollection);
-
- }
- else if (definitionName == CTYPE_COLUMN_GROUP) {
- def = new CtdColumnGroup(elementCollection);
-
- }
- else if (definitionName == CTYPE_DEFINITION_LIST) {
- def = new CtdDl(elementCollection);
-
- }
- else if (definitionName == CTYPE_EMBED) {
- def = new CtdEmbed(elementCollection);
-
- }
- else if (definitionName == CTYPE_FIELDSET) {
- def = new CtdFieldset(elementCollection);
-
- }
- else if (definitionName == CTYPE_FLOW_CONTAINER) {
- def = new CtdFlowContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_FRAMESET) {
- def = new CtdFrameset(elementCollection);
-
- }
- else if (definitionName == CTYPE_HEAD) {
- def = new CtdHead(elementCollection);
-
- }
- else if (definitionName == CTYPE_HTML) {
- def = new CtdHtml(elementCollection);
-
- }
- else if (definitionName == CTYPE_INLINE_CONTAINER) {
- def = new CtdInlineContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_LI_CONTAINER) {
- def = new CtdLiContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_MAP) {
- def = new CtdMap(elementCollection);
-
- }
- else if (definitionName == CTYPE_NOFRAMES_CONTENT) {
- def = new CtdNoframesContent(elementCollection);
-
- }
- else if (definitionName == CTYPE_OPTION_CONTAINER) {
- def = new CtdOptionContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_PARAM_CONTAINER) {
- def = new CtdParamContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_SELECT) {
- def = new CtdSelect(elementCollection);
-
- }
- else if (definitionName == CTYPE_TABLE) {
- def = new CtdTable(elementCollection);
-
- }
- else if (definitionName == CTYPE_TCELL_CONTAINER) {
- def = new CtdTableCellContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_TR_CONTAINER) {
- def = new CtdTrContainer(elementCollection);
-
- }
- else {
- def = null;
- }
- if (def == null)
- return null; // fail to create.
- definitions.put(definitionName, def);
- return def;
- }
-
- /**
- * For singleton.
- */
- public synchronized static ComplexTypeDefinitionFactory getInstance() {
- if (instance != null)
- return instance;
- instance = new ComplexTypeDefinitionFactory();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdAddress.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdAddress.java
deleted file mode 100644
index 76847d053f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdAddress.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for ADDRESS.
- */
-final class CtdAddress extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdAddress(ElementCollection elementCollection) {
- super(elementCollection);
- }
-
- /**
- * ((%inline) | P)*.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( | )*
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- // (%inline)
- CMGroupImpl inlines = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- if (inlines == null)
- return;
- collection.getInline(inlines);
- content.appendChild(inlines);
- // P
- CMNode p = collection.getNamedItem(HTML40Namespace.ElementName.P);
- if (p != null)
- content.appendChild(p);
- }
-
- /**
- * ((%inline) | P)*.
- * Because %inline; contains #PCDATA, the type is MIXED.
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.MIXED;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_ADDRESS;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdColumnGroup.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdColumnGroup.java
deleted file mode 100644
index 623399d1dc..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdColumnGroup.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * COL group.
- * (COL)*
- */
-final class CtdColumnGroup extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdColumnGroup(ElementCollection elementCollection) {
- super(elementCollection);
- }
-
- /**
- * (COL)*
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( )*
- content = new CMGroupImpl(CMGroup.SEQUENCE, 0, CMContentImpl.UNBOUNDED);
- // COL
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.COL);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (COL)*
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_COLUMN_GROUP;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdDl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdDl.java
deleted file mode 100644
index 626eb8fc4b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdDl.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for DL.
- */
-final class CtdDl extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdDl(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.DT;
- }
-
- /**
- * (DT | DD)+
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( | )+
- content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
- // DT
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.DT);
- if (dec != null)
- content.appendChild(dec);
- // DD
- dec = collection.getNamedItem(HTML40Namespace.ElementName.DD);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (DT | DD)+.
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_DEFINITION_LIST;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdEmbed.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdEmbed.java
deleted file mode 100644
index da5e725c60..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdEmbed.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for EMBED.
- */
-final class CtdEmbed extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdEmbed(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.NOEMBED;
- }
-
- /**
- * (NOEMBED).
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( )
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- // NOEMBED
- CMNode noembed = collection.getNamedItem(HTML40Namespace.ElementName.NOEMBED);
- if (noembed != null)
- content.appendChild(noembed);
- }
-
- /**
- * (NOEMBED).
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_EMBED;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFieldset.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFieldset.java
deleted file mode 100644
index b4f2dfdc02..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFieldset.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for FIELDSET.
- */
-final class CtdFieldset extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdFieldset(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.LEGEND;
- }
-
- /**
- * (#PCDATA, LEGEND, (%flow;)*)
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( , , )
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- // #PCDATA
- // ...??
-
- // LEGEND
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.LEGEND);
- if (dec != null)
- content.appendChild(dec);
- // (%flow;)*
- CMGroupImpl flows = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- if (flows == null)
- return;
- collection.getFlow(flows);
- content.appendChild(flows);
- }
-
- /**
- * (#PCDATA, LEGEND, (%flow;)*)
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.MIXED;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_FIELDSET;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFlowContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFlowContainer.java
deleted file mode 100644
index 6c7a08b0c6..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFlowContainer.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-
-/**
- * Complex type definition for containers of <code>%flow;</code>.
- */
-final class CtdFlowContainer extends ComplexTypeDefinition {
-
- /**
- */
- public CtdFlowContainer(ElementCollection elementCollection) {
- super(elementCollection);
- }
-
- /**
- * (%flow;)*
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- collection.getFlow(content);
- }
-
- public int getContentType() {
- return CMElementDeclaration.MIXED;
- }
-
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_FLOW_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFrameset.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFrameset.java
deleted file mode 100644
index 03da4b4128..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFrameset.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for FRAMESET.
- * ((FRAMESET | FRAME)+ & NOFRAMES?)
- */
-final class CtdFrameset extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdFrameset(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.FRAME;
- }
-
- /**
- * ((FRAMESET | FRAME)+ & NOFRAMES?).
- * --> ((FRAMESET | FRAME)+ & (NOFRAMES)?)
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( & )
- content = new CMGroupImpl(CMGroup.ALL, 1, 1);
-
- // ( | )+
- CMGroupImpl group = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
- if (group == null)
- return;
- content.appendChild(group);
-
- // FRAMESET
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.FRAMESET);
- if (dec != null)
- group.appendChild(dec);
- // FRAME
- dec = collection.getNamedItem(HTML40Namespace.ElementName.FRAME);
- if (dec != null)
- group.appendChild(dec);
-
- // ( )?
- group = new CMGroupImpl(CMGroup.SEQUENCE, 0, 1);
- if (group == null)
- return;
- content.appendChild(group);
-
- // NOFRAMES
- dec = collection.getNamedItem(HTML40Namespace.ElementName.NOFRAMES);
- if (dec != null)
- group.appendChild(dec);
- }
-
- /**
- * ((FRAMESET | FRAME)+ & NOFRAMES?)
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_FRAMESET;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHead.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHead.java
deleted file mode 100644
index 48bc24fa75..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHead.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * Complex type definition for the head content.
- * Content Model: (TITLE & ISINDEX? & BASE?)
- */
-final class CtdHead extends ComplexTypeDefinition {
-
- /**
- */
- public CtdHead(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.TITLE;
- }
-
- /**
- * for HEAD.
- * To avoid using inclusion, the content model comes from the XHTML 1.0.
- *
- * (%head.misc;, ((title, %head.misc;, (base, %head.misc;)?) | (base, %head.misc;, (title, %head.misc;))))
- * And %head.misc; is:
- * (script|style|meta|link|object|isindex)*
- *
- * 0: (%head.misc, A)
- * A: (B | C)
- * B: (title, %head.misc;, D)
- * C: (base, %head.misc;, E)
- * D: (base, %head.misc;)?
- * E: (title, %head.misc;)
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // At 1st, create %head.misc; content.
- // %head.misc;
- // ( | )*
- CMGroupImpl misc = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- if (misc == null)
- return;
- String[] names = {HTML40Namespace.ElementName.SCRIPT, HTML40Namespace.ElementName.STYLE, HTML40Namespace.ElementName.META, HTML40Namespace.ElementName.LINK, HTML40Namespace.ElementName.OBJECT, HTML40Namespace.ElementName.ISINDEX};
- collection.getDeclarations(misc, Arrays.asList(names).iterator());
- // 2nd, get a title
- CMNode title = collection.getNamedItem(HTML40Namespace.ElementName.TITLE);
- // 3rd, get a base
- CMNode base = collection.getNamedItem(HTML40Namespace.ElementName.BASE);
- if (title == null || base == null)
- return;
-
- // Top level content is a sequence of %head.misc; and A.
- // 0: (%head.misc;, A)
- // create a sequence
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (content == null)
- return;
- // append %head.misc;
- content.appendChild(misc);
- // create A and append it to the top level.
- {
- // A is a choice of B and C.
- // A: (B | C)
- // create a choice
- CMGroupImpl gA = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- if (gA == null)
- return;
- // append A to the top level.
- content.appendChild(gA);
-
- // create B and append it to A
- {
- // B is a sequence of title, %head.misc;, and D.
- // B: (title, %head.misc;, D)
- // create a sequence
- CMGroupImpl gB = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (gB == null)
- return;
- // append B to A.
- gA.appendChild(gB);
-
- // append title to B
- gB.appendChild(title);
- // append %head.misc; to B
- gB.appendChild(misc);
- // create D and append it to B.
- {
- // D is a sequence of base, %head.misc;.
- // D: (base, %head.misc;)?
- // create a sequence
- CMGroupImpl gD = new CMGroupImpl(CMGroup.SEQUENCE, 0, 1);
- if (gD == null)
- return;
- // append D to B.
- gB.appendChild(gD);
-
- // append base to D
- gD.appendChild(base);
- // append %head.misc; to D.
- gD.appendChild(misc);
- }
- }
- // create C and append it to A
- {
- // C is a sequence of base, %head.misc;, and E
- // C: (base, %head.misc;, E)
- // create a sequence
- CMGroupImpl gC = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (gC == null)
- return;
- // append C to A.
- gA.appendChild(gC);
-
- // append base to C
- gC.appendChild(base);
- // append %head.misc; to C
- gC.appendChild(misc);
-
- // create E and append it to C.
- {
- // E is a sequence of title and %head.misc;.
- // E: (title, %head.misc;)
- // create a sequence
- CMGroupImpl gE = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (gE == null)
- return;
- // append E to C.
- gC.appendChild(gE);
-
- // append title to E
- gE.appendChild(title);
- // append %head.misc; to E.
- gE.appendChild(misc);
- }
- }
- }
- }
-
- /**
- * Element content.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_HEAD;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHtml.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHtml.java
deleted file mode 100644
index d2396fc680..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHtml.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * Complex type definition for <code>HTML</code>.<br>
- * Content Model:
- * HEAD, (FRAMESET|BODY)<br>
- */
-final class CtdHtml extends ComplexTypeDefinition {
-
- /**
- */
- public CtdHtml(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.HEAD;
- }
-
- /**
- * (%html.content;).
- * %html.content; is HEAD, (FRAMESET | BODY).
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( )
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (content == null)
- return;
-
- // HEAD
- CMNode edec = collection.getNamedItem(HTML40Namespace.ElementName.HEAD);
- if (edec != null)
- content.appendChild(edec);
-
- // ( | )
- CMGroupImpl group = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- content.appendChild(group);
-
- // FRAMESET, BODY
- String[] names = {HTML40Namespace.ElementName.FRAMESET, HTML40Namespace.ElementName.BODY};
- collection.getDeclarations(group, Arrays.asList(names).iterator());
-
- // since BODY start and end are omissable
- // adding valid children of BODY here under HTML
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=97342
- edec = collection.getNamedItem(HTML40Namespace.ElementName.MAP);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.PRE);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.BDO);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.INPUT);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.P);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.NOSCRIPT);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.I);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.BUTTON);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.LABEL);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.U);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.H6);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.CENTER);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.BASEFONT);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.S);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.BLOCKQUOTE);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.H3);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.UL);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.B);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.SELECT);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.Q);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.STRIKE);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.SCRIPT);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.ABBR);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.BIG);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.H1);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.IMG);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.ACRONYM);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.DEL);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.NOFRAMES);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.TEXTAREA);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.H2);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.FONT);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.OBJECT);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.KBD);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.IFRAME);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.HR);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.H4);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.DIR);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.SAMP);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.INS);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.H5);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.SUP);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.A);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.DFN);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.ISINDEX);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.DL);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.VAR);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.FIELDSET);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.TABLE);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.BR);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.TT);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.APPLET);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.OL);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.SMALL);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.CITE);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.FORM);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.DIV);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.CODE);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.SPAN);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.SUB);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.EM);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.MENU);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.ADDRESS);
- if (edec != null)
- content.appendChild(edec);
-
- edec = collection.getNamedItem(HTML40Namespace.ElementName.STRONG);
- if (edec != null)
- content.appendChild(edec);
- }
-
- /**
- * Element content.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_HTML;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdInlineContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdInlineContainer.java
deleted file mode 100644
index 7fbfeabd9f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdInlineContainer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-
-/**
- * Complex type definition for (%inline;)*.
- */
-final class CtdInlineContainer extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdInlineContainer(ElementCollection elementCollection) {
- super(elementCollection);
- }
-
- /**
- * (%inline)*.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- collection.getInline(content);
- }
-
- public int getContentType() {
- return CMElementDeclaration.MIXED;
- }
-
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_INLINE_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdLiContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdLiContainer.java
deleted file mode 100644
index 5ccb079cb0..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdLiContainer.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * List item container.
- * (LI)+
- */
-final class CtdLiContainer extends ComplexTypeDefinition {
-
- /**
- * @param elemenCollection ElementCollection
- */
- public CtdLiContainer(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.LI;
- }
-
- /**
- * (LI)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // (LI)+
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
- CMNode li = collection.getNamedItem(HTML40Namespace.ElementName.LI);
- if (li != null)
- content.appendChild(li);
- }
-
- /**
- * ELEMENT content.<br>
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_LI_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdMap.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdMap.java
deleted file mode 100644
index 3ff2a165bf..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdMap.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for MAP.
- */
-final class CtdMap extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdMap(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.AREA;
- }
-
- /**
- * ((%block;) | AREA)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( | )+
- content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
- // (%block;)
- CMGroupImpl blocks = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- if (blocks == null)
- return;
- collection.getBlock(blocks);
- content.appendChild(blocks);
- // AREA
- CMNode area = collection.getNamedItem(HTML40Namespace.ElementName.AREA);
- if (area != null)
- content.appendChild(area);
- }
-
- /**
- * ((%block;) | AREA)+.
- * Because %block; consists of elements only, the type is ELEMENT.
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_MAP;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdNoframesContent.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdNoframesContent.java
deleted file mode 100644
index d193a6c884..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdNoframesContent.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for NOFRAMES.
- */
-final class CtdNoframesContent extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdNoframesContent(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.BODY;
- }
-
- /**
- * (BODY).
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( )
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- // BODY
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.BODY);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (BODY)
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_NOFRAMES_CONTENT;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdOptionContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdOptionContainer.java
deleted file mode 100644
index b53480abf9..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdOptionContainer.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * OPTION container.
- * (OPTION)+
- */
-final class CtdOptionContainer extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdOptionContainer(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.OPTION;
- }
-
- /**
- * (OPTION)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( )+
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
- // OPTION
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.OPTION);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (OPTION)+
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_OPTION_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdParamContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdParamContainer.java
deleted file mode 100644
index 4732191e1a..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdParamContainer.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * PARAM container. For OBJECT and APPLET.
- */
-final class CtdParamContainer extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdParamContainer(ElementCollection elementCollection) {
- super(elementCollection);
- }
-
- /**
- * (PARAM | %flow;)*.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( | )*
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- // PARAM
- CMNode param = collection.getNamedItem(HTML40Namespace.ElementName.PARAM);
- if (param != null)
- content.appendChild(param);
- // %flow;
- CMGroupImpl flows = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- if (flows == null)
- return;
- collection.getInline(flows);
- content.appendChild(flows);
- }
-
- /**
- * (PARAM | %flow;)*.
- * Because %flow; contains #PCDATA, the type is MIXED.
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.MIXED;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_PARAM_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdSelect.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdSelect.java
deleted file mode 100644
index b1d12843cc..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdSelect.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for SELECT.
- */
-final class CtdSelect extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdSelect(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.OPTION;
- }
-
- /**
- * (OPTGROUP | OPTION)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( | )+
- content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
- // OPTGROUP
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.OPTGROUP);
- if (dec != null)
- content.appendChild(dec);
- // OPTION
- dec = collection.getNamedItem(HTML40Namespace.ElementName.OPTION);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (OPTGROUP | OPTION)+.
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_SELECT;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTable.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTable.java
deleted file mode 100644
index 7fd73d5152..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTable.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * for TABLE.
- * (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+, TR+)
- */
-final class CtdTable extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdTable(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.TBODY;
- }
-
- /**
- * (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)
- * --> ((CAPTION)?, ((COL)* | (COLGROUP)*), (THEAD)?, (TFOOT)?, (TBODY)+, (TR)+)
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( , , , ,)
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
-
- // (CAPTION)?
- // ( )?
- CMGroupImpl wrap = new CMGroupImpl(CMGroup.SEQUENCE, 0, 1);
- if (wrap == null)
- return;
- content.appendChild(wrap);
- // CAPTION
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.CAPTION);
- if (dec != null)
- wrap.appendChild(dec);
-
- // ((COL)* | (COLGROUP)*)
- // ( | )
- CMGroupImpl group = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- if (group == null)
- return;
- content.appendChild(group);
- // (COL)*
- wrap = new CMGroupImpl(CMGroup.SEQUENCE, 0, CMContentImpl.UNBOUNDED);
- if (wrap == null)
- return;
- group.appendChild(wrap);
- dec = collection.getNamedItem(HTML40Namespace.ElementName.COL);
- if (dec != null)
- wrap.appendChild(dec);
- // (COLGROUP)*
- wrap = new CMGroupImpl(CMGroup.SEQUENCE, 0, CMContentImpl.UNBOUNDED);
- if (wrap == null)
- return;
- group.appendChild(wrap);
- dec = collection.getNamedItem(HTML40Namespace.ElementName.COLGROUP);
- if (dec != null)
- wrap.appendChild(dec);
-
- // (THEAD)?
- wrap = new CMGroupImpl(CMGroup.SEQUENCE, 0, 1);
- if (wrap == null)
- return;
- content.appendChild(wrap);
- dec = collection.getNamedItem(HTML40Namespace.ElementName.THEAD);
- if (dec != null)
- wrap.appendChild(dec);
-
- // (TFOOT)?
- wrap = new CMGroupImpl(CMGroup.SEQUENCE, 0, 1);
- if (wrap == null)
- return;
- content.appendChild(wrap);
- dec = collection.getNamedItem(HTML40Namespace.ElementName.TFOOT);
- if (dec != null)
- wrap.appendChild(dec);
-
- // (TBODY)+
- // TBODY has optional start and end tags
- wrap = new CMGroupImpl(CMGroup.SEQUENCE, 0, CMContentImpl.UNBOUNDED);
- if (wrap == null)
- return;
- content.appendChild(wrap);
- dec = collection.getNamedItem(HTML40Namespace.ElementName.TBODY);
- if (dec != null)
- wrap.appendChild(dec);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=96101
- // TBODY start and end tag are optional, so TR should be allowed here
- // (TR)+
- wrap = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
- if (wrap == null)
- return;
- content.appendChild(wrap);
- dec = collection.getNamedItem(HTML40Namespace.ElementName.TR);
- if (dec != null)
- wrap.appendChild(dec);
- }
-
- /**
- * ((FRAMESET | FRAME)+ & NOFRAMES?)
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_TABLE;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTableCellContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTableCellContainer.java
deleted file mode 100644
index a207876cb2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTableCellContainer.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * Table cell container.
- * (TH | TD)+
- */
-final class CtdTableCellContainer extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdTableCellContainer(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.TD;
- }
-
- /**
- * (TH | TD)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( )+
- content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
- // TH
- CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.TH);
- if (dec != null)
- content.appendChild(dec);
- // TD
- dec = collection.getNamedItem(HTML40Namespace.ElementName.TD);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (TH | TD)+
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_TCELL_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTrContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTrContainer.java
deleted file mode 100644
index 734c204fac..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTrContainer.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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;
-
-/**
- * Table record container.
- * (TR)+
- */
-final class CtdTrContainer extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdTrContainer(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = HTML40Namespace.ElementName.TR;
- }
-
- /**
- * (TR)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // (TR)+
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
- CMNode tr = collection.getNamedItem(HTML40Namespace.ElementName.TR);
- if (tr != null)
- content.appendChild(tr);
- }
-
- /**
- * ELEMENT content.<br>
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_TR_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/DeclCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/DeclCollection.java
deleted file mode 100644
index d5aab547ae..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/DeclCollection.java
+++ /dev/null
@@ -1,244 +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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Locale;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- */
-abstract class DeclCollection implements CMNamedNodeMap {
-
-
- protected class DualMap {
- public DualMap() {
- super();
- }
-
- public DualMap(Object[] objects) {
- super();
- initialize(objects);
- }
-
- public int size() {
- return table.length;
- }
-
- public Object getValue(int key) {
- if (!isValidIndex(key))
- return null;
- return table[key];
- }
-
- public int getKey(Object value) {
- Integer keyObj = (Integer) map.get(value);
- if (keyObj == null)
- return ID_UNKNOWN;
- return keyObj.intValue();
- }
-
- protected void initialize(Object[] objects) {
- if (objects == null)
- return;
- table = objects;
- map = new HashMap();
- for (int key = 0; key < objects.length; key++) {
- Object value = table[key];
- map.put(value, new Integer(key));
- }
- }
-
- private Object[] table = null;
- private HashMap map = null;
-
- private boolean isValidIndex(int index) {
- return index >= 0 && index < table.length;
- }
- }
-
- protected class TolerantStringDualMap extends DualMap {
- public TolerantStringDualMap(String[] names) {
- super();
- Object[] objects = new Object[names.length];
- for (int i = 0; i < names.length; i++) {
- objects[i] = makeCanonicalForm(names[i]);
- }
- initialize(objects);
- }
-
- public int getKey(Object value) {
- try {
- String name = (String) value;
- return super.getKey(makeCanonicalForm(name));
- }
- catch (ClassCastException e) {
- return ID_UNKNOWN;
- }
- }
-
- private String makeCanonicalForm(String raw) {
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=100152
- // we are able to "cheat" here a little and use US Locale
- // to get a good cononical form, since we are using this only
- // for HTML and JSP standard tags.
- // Long term, for similar needs with XML 1.1 (for example)
- // we should use a class such as com.ibm.icu.text.Normalizer
- return raw.toUpperCase(Locale.US);
- }
- }
-
- private class DeclIterator implements Iterator {
- public DeclIterator() {
- maxid = fDecls.length - 1;
- }
-
- public boolean hasNext() {
- return id < maxid;
- }
-
- public Object next() {
- if (!hasNext())
- return null;
- return item(++id);
- }
-
- public void remove() { /* nothing should be done. */
- }
-
- private int id = -1;
- private int maxid = -1;
- }
-
- CMNode[] fDecls = null;
- protected final static boolean STRICT_CASE = false;
- protected final static boolean TOLERANT_CASE = true;
- protected final static int ID_UNKNOWN = -1;
- private DualMap fMap = null;
-
- /**
- */
- public DeclCollection(String[] names, boolean tolerant) {
- super();
- fDecls = new CMNode[names.length];
- if (tolerant) {
- fMap = new TolerantStringDualMap(names);
- }
- else {
- fMap = new DualMap(names);
- }
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param id int
- */
- protected abstract CMNode create(String name);
-
- /**
- */
- public CMNamedNodeMap getDeclarations(String[] names) {
- CMNamedNodeMapImpl map = new CMNamedNodeMapImpl();
- for (int i = 0; i < names.length; i++) {
- String name = names[i];
- CMNode node = getNamedItem(name);
- if (node == null)
- continue;
- map.putNamedItem(name, node);
- }
- return map;
- }
-
- /**
- * @param names java.util.Iterator
- */
- public void getDeclarations(CMGroupImpl group, Iterator names) {
- while (names.hasNext()) {
- String entityName = (String) names.next();
- CMNode dec = getNamedItem(entityName);
- if (dec != null)
- group.appendChild(dec);
- }
- }
-
- /**
- * Map name to id.
- * @return int
- * @param name java.lang.String
- */
- protected int getID(String name) {
- return fMap.getKey(name);
- }
-
- /**
- * getLength method
- * @return int
- */
- public int getLength() {
- return fDecls.length;
- }
-
- /**
- * @return java.lang.String
- * @param id int
- */
- protected String getName(int id) {
- return (String) fMap.getValue(id);
- }
-
- /**
- * getNamedItem method
- * @return CMNode
- * @param name java.lang.String
- */
- public CMNode getNamedItem(String name) {
- int id = getID(name);
- if (!isValidID(id))
- return null;
- return item(id);
- }
-
- /**
- * @return boolean
- * @param id int
- */
- private boolean isValidID(int id) {
- return id >= 0 && id < fDecls.length;
- }
-
- /**
- * item method
- * @return CMNode
- * @param index int
- */
- public CMNode item(int index) {
- if (!isValidID(index))
- return null;
- CMNode decl = fDecls[index];
- if (decl != null)
- return decl; // already exist.
-
- decl = create(getName(index));
- fDecls[index] = decl;
- return decl;
- }
-
- /**
- */
- public Iterator iterator() {
- return new DeclIterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ElementCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ElementCollection.java
deleted file mode 100644
index 8349964147..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ElementCollection.java
+++ /dev/null
@@ -1,881 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Vector;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Factory for element declarations.
- */
-final class ElementCollection extends DeclCollection implements org.eclipse.wst.html.core.internal.provisional.HTML40Namespace.ElementName {
-
-
- // Element IDs
- private static class Ids {
- public static final int ID_A = 0;
- public static final int ID_ABBR = 1;
- public static final int ID_ACRONYM = 2;
- public static final int ID_ADDRESS = 3;
- public static final int ID_APPLET = 4;
- public static final int ID_AREA = 5;
- public static final int ID_B = 6;
- public static final int ID_BASE = 7;
- public static final int ID_BASEFONT = 8;
- public static final int ID_BDO = 9;
- public static final int ID_BIG = 10;
- public static final int ID_BLINK = 11;
- public static final int ID_BLOCKQUOTE = 12;
- public static final int ID_BODY = 13;
- public static final int ID_BR = 14;
- public static final int ID_BUTTON = 15;
- public static final int ID_CAPTION = 16;
- public static final int ID_CENTER = 17;
- public static final int ID_CITE = 18;
- public static final int ID_CODE = 19;
- public static final int ID_COL = 20;
- public static final int ID_COLGROUP = 21;
- public static final int ID_DD = 22;
- public static final int ID_DEL = 23;
- public static final int ID_DFN = 24;
- public static final int ID_DIR = 25;
- public static final int ID_DIV = 26;
- public static final int ID_DL = 27;
- public static final int ID_DT = 28;
- public static final int ID_EM = 29;
- public static final int ID_EMBED = 30;
- public static final int ID_FIELDSET = 31;
- public static final int ID_FONT = 32;
- public static final int ID_FORM = 33;
- public static final int ID_FRAME = 34;
- public static final int ID_FRAMESET = 35;
- public static final int ID_H1 = 36;
- public static final int ID_H2 = 37;
- public static final int ID_H3 = 38;
- public static final int ID_H4 = 39;
- public static final int ID_H5 = 40;
- public static final int ID_H6 = 41;
- public static final int ID_HEAD = 42;
- public static final int ID_HR = 43;
- public static final int ID_HTML = 44;
- public static final int ID_I = 45;
- public static final int ID_IFRAME = 46;
- public static final int ID_IMG = 47;
- public static final int ID_INPUT = 48;
- public static final int ID_INS = 49;
- public static final int ID_ISINDEX = 50;
- public static final int ID_KBD = 51;
- public static final int ID_LABEL = 52;
- public static final int ID_LEGEND = 53;
- public static final int ID_LI = 54;
- public static final int ID_LINK = 55;
- public static final int ID_MAP = 56;
- public static final int ID_MENU = 57;
- public static final int ID_META = 58;
- public static final int ID_NOEMBED = 59;
- public static final int ID_NOFRAMES = 60;
- public static final int ID_NOSCRIPT = 61;
- public static final int ID_OBJECT = 62;
- public static final int ID_OL = 63;
- public static final int ID_OPTGROUP = 64;
- public static final int ID_OPTION = 65;
- public static final int ID_P = 66;
- public static final int ID_PARAM = 67;
- public static final int ID_PRE = 68;
- public static final int ID_Q = 69;
- public static final int ID_S = 70;
- public static final int ID_SAMP = 71;
- public static final int ID_SCRIPT = 72;
- public static final int ID_SELECT = 73;
- public static final int ID_SMALL = 74;
- public static final int ID_SPAN = 75;
- public static final int ID_STRIKE = 76;
- public static final int ID_STRONG = 77;
- public static final int ID_STYLE = 78;
- public static final int ID_SUB = 79;
- public static final int ID_SUP = 80;
- public static final int ID_TABLE = 81;
- public static final int ID_TBODY = 82;
- public static final int ID_TD = 83;
- public static final int ID_TEXTAREA = 84;
- public static final int ID_TFOOT = 85;
- public static final int ID_TH = 86;
- public static final int ID_THEAD = 87;
- public static final int ID_TITLE = 88;
- public static final int ID_TR = 89;
- public static final int ID_TT = 90;
- public static final int ID_U = 91;
- public static final int ID_UL = 92;
- public static final int ID_VAR = 93;
- public static final int ID_MARQUEE = 94;
- public static final int ID_SSI_CONFIG = 95;
- public static final int ID_SSI_ECHO = 96;
- public static final int ID_SSI_EXEC = 97;
- public static final int ID_SSI_FSIZE = 98;
- public static final int ID_SSI_FLASTMOD = 99;
- public static final int ID_SSI_INCLUDE = 100;
- public static final int ID_SSI_PRINTENV = 101;
- public static final int ID_SSI_SET = 102;
- // <<D205513
- public static final int ID_BGSOUND = 103;
- public static final int ID_NOBR = 104;
- public static final int ID_WBR = 105;
-
- // D205513
-
- public static int getNumOfIds() {
- if (numofids != -1)
- return numofids;
-
- // NOTE: If the reflection is too slow, this method should
- // just return the literal value, like 105.
- // -- 5/25/2001
- Class clazz = Ids.class;
- Field[] fields = clazz.getFields();
- numofids = 0;
- for (int i = 0; i < fields.length; i++) {
- String name = fields[i].getName();
- if (name.startsWith("ID_"))//$NON-NLS-1$
- numofids++;
- }
- return numofids;
- }
-
- // chache the result of the reflection.
- private static int numofids = -1;
- }
-
- /** %fontstyle;. TT | I | B | U | S | STRIKE | BIG | SMALL | BLINK */
- private static final String[] FONTSTYLE = {TT, I, B, U, S, STRIKE, BIG, SMALL, BLINK};
- /** %formctl;. INPUT | SELECT | TEXTAREA | LABEL | BUTTON */
- private static final String[] FORMCTL = {INPUT, SELECT, TEXTAREA, LABEL, BUTTON};
- /** %phrase;.
- * EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM
- */
- private static final String[] PHRASE = {EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR, ACRONYM};
- /** %special;.
- * A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT |
- * MAP | Q | SUB | SUP | SPAN | BDO | IFRAME | EMBED | MARQUEE |
- * D2W | SUBMIT
- * WBR | NOBR | BGSOUND
- */
- private static final String[] SPECIAL = {A, IMG, APPLET, OBJECT, FONT, BASEFONT, BR, WBR, // D205513
- SCRIPT, MAP, Q, SUB, SUP, SPAN, BDO, IFRAME, EMBED, BGSOUND, // D205513
- MARQUEE, NOBR // D205513
- };
- /** %heading;. H[1-6] */
- private static final String[] HEADING = {H1, H2, H3, H4, H5, H6};
- /** %list;. UL | OL | DIR | MENU */
- private static final String[] LIST = {UL, OL, DIR, MENU};
- /** %preformatted;. PRE */
- private static final String[] PREFORMATTED = {PRE};
- private AttributeCollection attributeCollection = null;
- private static String[] fNames = null;
-
- static {
- fNames = new String[Ids.getNumOfIds()];
- fNames[Ids.ID_A] = A;
- fNames[Ids.ID_ABBR] = ABBR;
- fNames[Ids.ID_ACRONYM] = ACRONYM;
- fNames[Ids.ID_ADDRESS] = ADDRESS;
- fNames[Ids.ID_APPLET] = APPLET;
- fNames[Ids.ID_AREA] = AREA;
- fNames[Ids.ID_B] = B;
- fNames[Ids.ID_BASE] = BASE;
- fNames[Ids.ID_BASEFONT] = BASEFONT;
- fNames[Ids.ID_BDO] = BDO;
- fNames[Ids.ID_BIG] = BIG;
- fNames[Ids.ID_BLINK] = BLINK;
- fNames[Ids.ID_BLOCKQUOTE] = BLOCKQUOTE;
- fNames[Ids.ID_BODY] = BODY;
- fNames[Ids.ID_BR] = BR;
- fNames[Ids.ID_BUTTON] = BUTTON;
- fNames[Ids.ID_CAPTION] = CAPTION;
- fNames[Ids.ID_CENTER] = CENTER;
- fNames[Ids.ID_CITE] = CITE;
- fNames[Ids.ID_CODE] = CODE;
- fNames[Ids.ID_COL] = COL;
- fNames[Ids.ID_COLGROUP] = COLGROUP;
- fNames[Ids.ID_DD] = DD;
- fNames[Ids.ID_DEL] = DEL;
- fNames[Ids.ID_DFN] = DFN;
- fNames[Ids.ID_DIR] = DIR;
- fNames[Ids.ID_DIV] = DIV;
- fNames[Ids.ID_DL] = DL;
- fNames[Ids.ID_DT] = DT;
- fNames[Ids.ID_EM] = EM;
- fNames[Ids.ID_EMBED] = EMBED;
- fNames[Ids.ID_FIELDSET] = FIELDSET;
- fNames[Ids.ID_FONT] = FONT;
- fNames[Ids.ID_FORM] = FORM;
- fNames[Ids.ID_FRAME] = FRAME;
- fNames[Ids.ID_FRAMESET] = FRAMESET;
- fNames[Ids.ID_H1] = H1;
- fNames[Ids.ID_H2] = H2;
- fNames[Ids.ID_H3] = H3;
- fNames[Ids.ID_H4] = H4;
- fNames[Ids.ID_H5] = H5;
- fNames[Ids.ID_H6] = H6;
- fNames[Ids.ID_HEAD] = HEAD;
- fNames[Ids.ID_HR] = HR;
- fNames[Ids.ID_HTML] = HTML;
- fNames[Ids.ID_I] = I;
- fNames[Ids.ID_IFRAME] = IFRAME;
- fNames[Ids.ID_IMG] = IMG;
- fNames[Ids.ID_INPUT] = INPUT;
- fNames[Ids.ID_INS] = INS;
- fNames[Ids.ID_ISINDEX] = ISINDEX;
- fNames[Ids.ID_KBD] = KBD;
- fNames[Ids.ID_LABEL] = LABEL;
- fNames[Ids.ID_LEGEND] = LEGEND;
- fNames[Ids.ID_LI] = LI;
- fNames[Ids.ID_LINK] = LINK;
- fNames[Ids.ID_MAP] = MAP;
- fNames[Ids.ID_MENU] = MENU;
- fNames[Ids.ID_META] = META;
- fNames[Ids.ID_NOEMBED] = NOEMBED;
- fNames[Ids.ID_NOFRAMES] = NOFRAMES;
- fNames[Ids.ID_NOSCRIPT] = NOSCRIPT;
- fNames[Ids.ID_OBJECT] = OBJECT;
- fNames[Ids.ID_OL] = OL;
- fNames[Ids.ID_OPTGROUP] = OPTGROUP;
- fNames[Ids.ID_OPTION] = OPTION;
- fNames[Ids.ID_P] = P;
- fNames[Ids.ID_PARAM] = PARAM;
- fNames[Ids.ID_PRE] = PRE;
- fNames[Ids.ID_Q] = Q;
- fNames[Ids.ID_S] = S;
- fNames[Ids.ID_SAMP] = SAMP;
- fNames[Ids.ID_SCRIPT] = SCRIPT;
- fNames[Ids.ID_SELECT] = SELECT;
- fNames[Ids.ID_SMALL] = SMALL;
- fNames[Ids.ID_SPAN] = SPAN;
- fNames[Ids.ID_STRIKE] = STRIKE;
- fNames[Ids.ID_STRONG] = STRONG;
- fNames[Ids.ID_STYLE] = STYLE;
- fNames[Ids.ID_SUB] = SUB;
- fNames[Ids.ID_SUP] = SUP;
- fNames[Ids.ID_TABLE] = TABLE;
- fNames[Ids.ID_TBODY] = TBODY;
- fNames[Ids.ID_TD] = TD;
- fNames[Ids.ID_TEXTAREA] = TEXTAREA;
- fNames[Ids.ID_TFOOT] = TFOOT;
- fNames[Ids.ID_TH] = TH;
- fNames[Ids.ID_THEAD] = THEAD;
- fNames[Ids.ID_TITLE] = TITLE;
- fNames[Ids.ID_TR] = TR;
- fNames[Ids.ID_TT] = TT;
- fNames[Ids.ID_U] = U;
- fNames[Ids.ID_UL] = UL;
- fNames[Ids.ID_VAR] = VAR;
- fNames[Ids.ID_MARQUEE] = MARQUEE;
- fNames[Ids.ID_SSI_CONFIG] = SSI_CONFIG;
- fNames[Ids.ID_SSI_ECHO] = SSI_ECHO;
- fNames[Ids.ID_SSI_EXEC] = SSI_EXEC;
- fNames[Ids.ID_SSI_FSIZE] = SSI_FSIZE;
- fNames[Ids.ID_SSI_FLASTMOD] = SSI_FLASTMOD;
- fNames[Ids.ID_SSI_INCLUDE] = SSI_INCLUDE;
- fNames[Ids.ID_SSI_PRINTENV] = SSI_PRINTENV;
- fNames[Ids.ID_SSI_SET] = SSI_SET;
- fNames[Ids.ID_BGSOUND] = BGSOUND;
- fNames[Ids.ID_NOBR] = NOBR;
- fNames[Ids.ID_WBR] = WBR;
- }
-
- /**
- */
- public ElementCollection(AttributeCollection collection) {
- super(fNames, TOLERANT_CASE);
- attributeCollection = collection;
- }
-
- /**
- * Actually creates HTMLElementDeclaration instance.
- * @return HTMLElementDeclaration
- */
- protected CMNode create(String elementName) {
- HTMLElemDeclImpl edec = null;
-
- if (elementName.equalsIgnoreCase(A)) {
- edec = new HedA(this);
- }
- else if (elementName.equalsIgnoreCase(ABBR)) {
- edec = new HedPhrase(ABBR, this);
-
- }
- else if (elementName.equalsIgnoreCase(ACRONYM)) {
- edec = new HedPhrase(ACRONYM, this);
-
- }
- else if (elementName.equalsIgnoreCase(ADDRESS)) {
- edec = new HedADDRESS(this);
-
- }
- else if (elementName.equalsIgnoreCase(APPLET)) {
- edec = new HedAPPLET(this);
-
- }
- else if (elementName.equalsIgnoreCase(AREA)) {
- edec = new HedAREA(this);
-
- }
- else if (elementName.equalsIgnoreCase(B)) {
- edec = new HedFontStyle(B, this);
-
- }
- else if (elementName.equalsIgnoreCase(BASE)) {
- edec = new HedBASE(this);
-
- }
- else if (elementName.equalsIgnoreCase(BASEFONT)) {
- edec = new HedBASEFONT(this);
-
- }
- else if (elementName.equalsIgnoreCase(BDO)) {
- edec = new HedBDO(this);
-
- }
- else if (elementName.equalsIgnoreCase(BIG)) {
- edec = new HedFontStyle(BIG, this);
-
- }
- else if (elementName.equalsIgnoreCase(BLINK)) {
- edec = new HedFontStyle(BLINK, this);
-
- }
- else if (elementName.equalsIgnoreCase(BLOCKQUOTE)) {
- edec = new HedBLOCKQUOTE(this);
-
- }
- else if (elementName.equalsIgnoreCase(BODY)) {
- edec = new HedBODY(this);
-
- }
- else if (elementName.equalsIgnoreCase(BR)) {
- edec = new HedBR(this);
-
- }
- else if (elementName.equalsIgnoreCase(BUTTON)) {
- edec = new HedBUTTON(this);
-
- }
- else if (elementName.equalsIgnoreCase(CAPTION)) {
- edec = new HedCAPTION(this);
-
- }
- else if (elementName.equalsIgnoreCase(CENTER)) {
- edec = new HedCENTER(this);
-
- }
- else if (elementName.equalsIgnoreCase(CITE)) {
- edec = new HedPhrase(CITE, this);
-
- }
- else if (elementName.equalsIgnoreCase(CODE)) {
- edec = new HedPhrase(CODE, this);
-
- }
- else if (elementName.equalsIgnoreCase(COL)) {
- edec = new HedCOL(this);
-
- }
- else if (elementName.equalsIgnoreCase(COLGROUP)) {
- edec = new HedCOLGROUP(this);
-
- }
- else if (elementName.equalsIgnoreCase(DD)) {
- edec = new HedDD(this);
-
- }
- else if (elementName.equalsIgnoreCase(DEL)) {
- edec = new HedMarkChanges(DEL, this);
-
- }
- else if (elementName.equalsIgnoreCase(DFN)) {
- edec = new HedPhrase(DFN, this);
-
- }
- else if (elementName.equalsIgnoreCase(DIR)) {
- edec = new HedMENU(DIR, this);
-
- }
- else if (elementName.equalsIgnoreCase(DIV)) {
- edec = new HedDIV(this);
-
- }
- else if (elementName.equalsIgnoreCase(DL)) {
- edec = new HedDL(this);
-
- }
- else if (elementName.equalsIgnoreCase(DT)) {
- edec = new HedDT(this);
-
- }
- else if (elementName.equalsIgnoreCase(EM)) {
- edec = new HedPhrase(EM, this);
-
- }
- else if (elementName.equalsIgnoreCase(EMBED)) {
- edec = new HedEMBED(this);
-
- }
- else if (elementName.equalsIgnoreCase(FIELDSET)) {
- edec = new HedFIELDSET(this);
-
- }
- else if (elementName.equalsIgnoreCase(FONT)) {
- edec = new HedFONT(this);
-
- }
- else if (elementName.equalsIgnoreCase(FORM)) {
- edec = new HedFORM(this);
-
- }
- else if (elementName.equalsIgnoreCase(FRAME)) {
- edec = new HedFRAME(this);
-
- }
- else if (elementName.equalsIgnoreCase(FRAMESET)) {
- edec = new HedFRAMESET(this);
-
- }
- else if (elementName.equalsIgnoreCase(H1)) {
- edec = new HedHeading(H1, this);
-
- }
- else if (elementName.equalsIgnoreCase(H2)) {
- edec = new HedHeading(H2, this);
-
- }
- else if (elementName.equalsIgnoreCase(H3)) {
- edec = new HedHeading(H3, this);
-
- }
- else if (elementName.equalsIgnoreCase(H4)) {
- edec = new HedHeading(H4, this);
-
- }
- else if (elementName.equalsIgnoreCase(H5)) {
- edec = new HedHeading(H5, this);
-
- }
- else if (elementName.equalsIgnoreCase(H6)) {
- edec = new HedHeading(H6, this);
-
- }
- else if (elementName.equalsIgnoreCase(HEAD)) {
- edec = new HedHEAD(this);
-
- }
- else if (elementName.equalsIgnoreCase(HR)) {
- edec = new HedHR(this);
-
- }
- else if (elementName.equalsIgnoreCase(HTML)) {
- edec = new HedHTML(this);
-
- }
- else if (elementName.equalsIgnoreCase(I)) {
- edec = new HedFontStyle(I, this);
-
- }
- else if (elementName.equalsIgnoreCase(IFRAME)) {
- edec = new HedIFRAME(this);
-
- }
- else if (elementName.equalsIgnoreCase(IMG)) {
- edec = new HedIMG(this);
-
- }
- else if (elementName.equalsIgnoreCase(INPUT)) {
- edec = new HedINPUT(this);
-
- }
- else if (elementName.equalsIgnoreCase(INS)) {
- edec = new HedMarkChanges(INS, this);
-
- }
- else if (elementName.equalsIgnoreCase(ISINDEX)) {
- edec = new HedISINDEX(this);
-
- }
- else if (elementName.equalsIgnoreCase(KBD)) {
- edec = new HedPhrase(KBD, this);
-
- }
- else if (elementName.equalsIgnoreCase(LABEL)) {
- edec = new HedLABEL(this);
-
- }
- else if (elementName.equalsIgnoreCase(LEGEND)) {
- edec = new HedLEGEND(this);
-
- }
- else if (elementName.equalsIgnoreCase(LI)) {
- edec = new HedLI(this);
-
- }
- else if (elementName.equalsIgnoreCase(LINK)) {
- edec = new HedLINK(this);
-
- }
- else if (elementName.equalsIgnoreCase(MAP)) {
- edec = new HedMAP(this);
-
- }
- else if (elementName.equalsIgnoreCase(MARQUEE)) {
- edec = new HedMARQUEE(this);
-
- }
- else if (elementName.equalsIgnoreCase(MENU)) {
- edec = new HedMENU(MENU, this);
-
- }
- else if (elementName.equalsIgnoreCase(META)) {
- edec = new HedMETA(this);
-
- }
- else if (elementName.equalsIgnoreCase(NOEMBED)) {
- edec = new HedNOEMBED(this);
-
- }
- else if (elementName.equalsIgnoreCase(NOFRAMES)) {
- edec = new HedNOFRAMES(this);
-
- }
- else if (elementName.equalsIgnoreCase(NOSCRIPT)) {
- edec = new HedNOSCRIPT(this);
-
- }
- else if (elementName.equalsIgnoreCase(OBJECT)) {
- edec = new HedOBJECT(this);
-
- }
- else if (elementName.equalsIgnoreCase(OL)) {
- edec = new HedOL(this);
-
- }
- else if (elementName.equalsIgnoreCase(OPTGROUP)) {
- edec = new HedOPTGROUP(this);
-
- }
- else if (elementName.equalsIgnoreCase(OPTION)) {
- edec = new HedOPTION(this);
-
- }
- else if (elementName.equalsIgnoreCase(P)) {
- edec = new HedP(this);
-
- }
- else if (elementName.equalsIgnoreCase(PARAM)) {
- edec = new HedPARAM(this);
-
- }
- else if (elementName.equalsIgnoreCase(PRE)) {
- edec = new HedPRE(this);
-
- }
- else if (elementName.equalsIgnoreCase(Q)) {
- edec = new HedQ(this);
-
- }
- else if (elementName.equalsIgnoreCase(S)) {
- edec = new HedFontStyle(S, this);
-
- }
- else if (elementName.equalsIgnoreCase(SAMP)) {
- edec = new HedPhrase(SAMP, this);
-
- }
- else if (elementName.equalsIgnoreCase(SCRIPT)) {
- edec = new HedSCRIPT(this);
-
- }
- else if (elementName.equalsIgnoreCase(SELECT)) {
- edec = new HedSELECT(this);
-
- }
- else if (elementName.equalsIgnoreCase(SMALL)) {
- edec = new HedFontStyle(SMALL, this);
-
- }
- else if (elementName.equalsIgnoreCase(SPAN)) {
- edec = new HedSPAN(this);
-
- }
- else if (elementName.equalsIgnoreCase(STRIKE)) {
- edec = new HedFontStyle(STRIKE, this);
-
- }
- else if (elementName.equalsIgnoreCase(STRONG)) {
- edec = new HedPhrase(STRONG, this);
-
- }
- else if (elementName.equalsIgnoreCase(STYLE)) {
- edec = new HedSTYLE(this);
-
- }
- else if (elementName.equalsIgnoreCase(SUB)) {
- edec = new HedScripts(SUB, this);
-
- }
- else if (elementName.equalsIgnoreCase(SUP)) {
- edec = new HedScripts(SUP, this);
-
- }
- else if (elementName.equalsIgnoreCase(TABLE)) {
- edec = new HedTABLE(this);
-
- }
- else if (elementName.equalsIgnoreCase(TBODY)) {
- edec = new HedTableBody(TBODY, this);
-
- }
- else if (elementName.equalsIgnoreCase(TD)) {
- edec = new HedTableCell(TD, this);
-
- }
- else if (elementName.equalsIgnoreCase(TEXTAREA)) {
- edec = new HedTEXTAREA(this);
-
- }
- else if (elementName.equalsIgnoreCase(TFOOT)) {
- edec = new HedTableBody(TFOOT, this);
-
- }
- else if (elementName.equalsIgnoreCase(TH)) {
- edec = new HedTableCell(TH, this);
-
- }
- else if (elementName.equalsIgnoreCase(THEAD)) {
- edec = new HedTableBody(THEAD, this);
-
- }
- else if (elementName.equalsIgnoreCase(TITLE)) {
- edec = new HedTITLE(this);
-
- }
- else if (elementName.equalsIgnoreCase(TR)) {
- edec = new HedTR(this);
-
- }
- else if (elementName.equalsIgnoreCase(TT)) {
- edec = new HedFontStyle(TT, this);
-
- }
- else if (elementName.equalsIgnoreCase(U)) {
- edec = new HedFontStyle(U, this);
-
- }
- else if (elementName.equalsIgnoreCase(UL)) {
- edec = new HedUL(this);
-
- }
- else if (elementName.equalsIgnoreCase(VAR)) {
- edec = new HedPhrase(VAR, this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_CONFIG)) {
- edec = new HedSSIConfig(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_ECHO)) {
- edec = new HedSSIEcho(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_EXEC)) {
- edec = new HedSSIExec(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_FSIZE)) {
- edec = new HedSSIFsize(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_FLASTMOD)) {
- edec = new HedSSIFlastmod(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_INCLUDE)) {
- edec = new HedSSIInclude(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_PRINTENV)) {
- edec = new HedSSIPrintenv(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_SET)) {
- edec = new HedSSISet(this);
-
- }
- else if (elementName.equalsIgnoreCase(BGSOUND)) {
- edec = new HedBGSOUND(this);
-
- }
- else if (elementName.equalsIgnoreCase(NOBR)) {
- edec = new HedNOBR(this);
-
- }
- else if (elementName.equalsIgnoreCase(WBR)) {
- edec = new HedWBR(this);
-
- } // unknown
- else {
- // NOTE: We don't define the UNKNOWN element declaration.
- // <code>null</code> for a declaration is a sign of
- // the target element is unknown.
- // -- 3/9/2001
- edec = null;
- }
- return edec;
- }
-
- public AttributeCollection getAttributeCollection() {
- return attributeCollection;
- }
-
- public final Collection getNamesOfBlock() {
- // P, DL, DIV, CENTER, NOSCRIPT, NOFRAMES, BLOCKQUOTE, FORM, ISINDEX, HR,
- // TABLE, FIELDSET, ADDRESS
- String[] blockMisc = {P, DL, DIV, CENTER, NOSCRIPT, NOFRAMES, BLOCKQUOTE, FORM, ISINDEX, HR, TABLE, FIELDSET, ADDRESS};
- Vector names = new Vector(Arrays.asList(blockMisc));
- // %heading;
- names.addAll(Arrays.asList(HEADING));
- // %list;
- names.addAll(Arrays.asList(LIST));
- // %preformatted;
- names.addAll(Arrays.asList(PREFORMATTED));
-
- return names;
- }
-
- /**
- * %block;.
- * %block; is:
- * P | %heading; | %list; | %preformatted; | DL | DIV | CENTER |
- * NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
- * TABLE | FIELDSET | ADDRESS.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getBlock(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, getNamesOfBlock().iterator());
- }
-
- /**
- * Create element declarations and store them
- * into a <code>CMGroupImpl</code> instance.
- * @param group CMGroupImpl Return values.
- */
- public final void getFlow(CMGroupImpl group) {
- if (group == null)
- return;
- getBlock(group);
- getInline(group);
- }
-
- /**
- * Create element declarations and store them into a <code>CMGroupImpl</code>
- * instance.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getFontstyle(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, Arrays.asList(FONTSTYLE).iterator());
- }
-
- /**
- * Create element declarations and store them into a <code>CMGroupImpl</code>
- * instance.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getFormctrl(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, Arrays.asList(FORMCTL).iterator());
- }
-
- /**
- * %heading;.
- * @param group CMGroupImpl Return values.
- */
- public final void getHeading(CMGroupImpl group) {
- if (group == null)
- return;
-
- getDeclarations(group, Arrays.asList(HEADING).iterator());
- }
-
- /**
- * Create element declarations and store them
- * into a <code>CMGroupImpl</code> instance.
- * @param group CMGroupImpl Return values.
- */
- public final void getInline(CMGroupImpl group) {
- if (group == null)
- return;
- getFontstyle(group);
- getPhrase(group);
- getSpecial(group);
- getFormctrl(group);
- }
-
- /**
- * %list;.
- * @param group CMGroupImpl Return values.
- */
- public final void getList(CMGroupImpl group) {
- if (group == null)
- return;
-
- getDeclarations(group, Arrays.asList(LIST).iterator());
- }
-
- /**
- * Create element declarations and store them into a <code>CMGroupImpl</code>
- * instance.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getPhrase(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, Arrays.asList(PHRASE).iterator());
- }
-
- /**
- * %preformatted;
- * @param group CMGroupImpl Return values.
- */
- public final void getPreformatted(CMGroupImpl group) {
- if (group == null)
- return;
-
- getDeclarations(group, Arrays.asList(PREFORMATTED).iterator());
- }
-
- /**
- * Create element declarations and store them into a <code>CMGroupImpl</code>
- * instance.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getSpecial(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, Arrays.asList(SPECIAL).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/EntityCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/EntityCollection.java
deleted file mode 100644
index dda7041fd0..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/EntityCollection.java
+++ /dev/null
@@ -1,837 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.lang.reflect.Field;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Factory for entity declarations.
- */
-final class EntityCollection extends DeclCollection implements org.eclipse.wst.html.core.internal.provisional.HTML40Namespace.EntityName {
-
-
- private static class Ids {
- public static final int ID_AACUTE_L = 0;
- public static final int ID_AACUTE_U = 1;
- public static final int ID_ACIRC_L = 2;
- public static final int ID_ACIRC_U = 3;
- public static final int ID_ACUTE = 4;
- public static final int ID_AELIG_L = 5;
- public static final int ID_AELIG_U = 6;
- public static final int ID_AGRAVE_L = 7;
- public static final int ID_AGRAVE_U = 8;
- public static final int ID_ALEFSYM = 9;
- public static final int ID_ALPHA_L = 10;
- public static final int ID_ALPHA_U = 11;
- public static final int ID_AMP = 12;
- public static final int ID_AND = 13;
- public static final int ID_ANG = 14;
- public static final int ID_ARING_L = 15;
- public static final int ID_ARING_U = 16;
- public static final int ID_ASYMP = 17;
- public static final int ID_ATILDE_L = 18;
- public static final int ID_ATILDE_U = 19;
- public static final int ID_AUML_L = 20;
- public static final int ID_AUML_U = 21;
- public static final int ID_BDQUO = 22;
- public static final int ID_BETA_L = 23;
- public static final int ID_BETA_U = 24;
- public static final int ID_BRVBAR = 25;
- public static final int ID_BULL = 26;
- public static final int ID_CAP = 27;
- public static final int ID_CCEDIL_L = 28;
- public static final int ID_CCEDIL_U = 29;
- public static final int ID_CEDIL = 30;
- public static final int ID_CENT = 31;
- public static final int ID_CHI_L = 32;
- public static final int ID_CHI_U = 33;
- public static final int ID_CIRC = 34;
- public static final int ID_CLUBS = 35;
- public static final int ID_CONG = 36;
- public static final int ID_COPY = 37;
- public static final int ID_CRARR = 38;
- public static final int ID_CUP = 39;
- public static final int ID_CURREN = 40;
- public static final int ID_DAGGER_L = 41;
- public static final int ID_DAGGER_U = 42;
- public static final int ID_DARR_L = 43;
- public static final int ID_DARR_U = 44;
- public static final int ID_DEG = 45;
- public static final int ID_DELTA_L = 46;
- public static final int ID_DELTA_U = 47;
- public static final int ID_DIAMS = 48;
- public static final int ID_DIVIDE = 49;
- public static final int ID_EACUTE_L = 50;
- public static final int ID_EACUTE_U = 51;
- public static final int ID_ECIRC_L = 52;
- public static final int ID_ECIRC_U = 53;
- public static final int ID_EGRAVE_L = 54;
- public static final int ID_EGRAVE_U = 55;
- public static final int ID_EMPTY = 56;
- public static final int ID_EMSP = 57;
- public static final int ID_ENSP = 58;
- public static final int ID_EPSILON_L = 59;
- public static final int ID_EPSILON_U = 60;
- public static final int ID_EQUIV = 61;
- public static final int ID_ETA_L = 62;
- public static final int ID_ETA_U = 63;
- public static final int ID_ETH_L = 64;
- public static final int ID_ETH_U = 65;
- public static final int ID_EUML_L = 66;
- public static final int ID_EUML_U = 67;
- public static final int ID_EURO = 68;
- public static final int ID_EXIST = 69;
- public static final int ID_FNOF = 70;
- public static final int ID_FORALL = 71;
- public static final int ID_FRAC12 = 72;
- public static final int ID_FRAC14 = 73;
- public static final int ID_FRAC34 = 74;
- public static final int ID_FRASL = 75;
- public static final int ID_GAMMA_L = 76;
- public static final int ID_GAMMA_U = 77;
- public static final int ID_GE = 78;
- public static final int ID_GT = 79;
- public static final int ID_HARR_L = 80;
- public static final int ID_HARR_U = 81;
- public static final int ID_HEARTS = 82;
- public static final int ID_HELLIP = 83;
- public static final int ID_IACUTE_L = 84;
- public static final int ID_IACUTE_U = 85;
- public static final int ID_ICIRC_L = 86;
- public static final int ID_ICIRC_U = 87;
- public static final int ID_IEXCL = 88;
- public static final int ID_IGRAVE_L = 89;
- public static final int ID_IGRAVE_U = 90;
- public static final int ID_IMAGE = 91;
- public static final int ID_INFIN = 92;
- public static final int ID_INT = 93;
- public static final int ID_IOTA_L = 94;
- public static final int ID_IOTA_U = 95;
- public static final int ID_IQUEST = 96;
- public static final int ID_ISIN = 97;
- public static final int ID_IUML_L = 98;
- public static final int ID_IUML_U = 99;
- public static final int ID_KAPPA_L = 100;
- public static final int ID_KAPPA_U = 101;
- public static final int ID_LAMBDA_L = 102;
- public static final int ID_LAMBDA_U = 103;
- public static final int ID_LANG = 104;
- public static final int ID_LAQUO = 105;
- public static final int ID_LARR_L = 106;
- public static final int ID_LARR_U = 107;
- public static final int ID_LCEIL = 108;
- public static final int ID_LDQUO = 109;
- public static final int ID_LE = 110;
- public static final int ID_LFLOOR = 111;
- public static final int ID_LOWAST = 112;
- public static final int ID_LOZ = 113;
- public static final int ID_LRM = 114;
- public static final int ID_LSAQUO = 115;
- public static final int ID_LSQUO = 116;
- public static final int ID_LT = 117;
- public static final int ID_MACR = 118;
- public static final int ID_MDASH = 119;
- public static final int ID_MICRO = 120;
- public static final int ID_MIDDOT = 121;
- public static final int ID_MINUS = 122;
- public static final int ID_MU_L = 123;
- public static final int ID_MU_U = 124;
- public static final int ID_NABLA = 125;
- public static final int ID_NBSP = 126;
- public static final int ID_NDASH = 127;
- public static final int ID_NE = 128;
- public static final int ID_NI = 129;
- public static final int ID_NOT = 130;
- public static final int ID_NOTIN = 131;
- public static final int ID_NSUB = 132;
- public static final int ID_NTILDE_L = 133;
- public static final int ID_NTILDE_U = 134;
- public static final int ID_NU_L = 135;
- public static final int ID_NU_U = 136;
- public static final int ID_OACUTE_L = 137;
- public static final int ID_OACUTE_U = 138;
- public static final int ID_OCIRC_L = 139;
- public static final int ID_OCIRC_U = 140;
- public static final int ID_OELIG_L = 141;
- public static final int ID_OELIG_U = 142;
- public static final int ID_OGRAVE_L = 143;
- public static final int ID_OGRAVE_U = 144;
- public static final int ID_OLINE = 145;
- public static final int ID_OMEGA_L = 146;
- public static final int ID_OMEGA_U = 147;
- public static final int ID_OMICRON_L = 148;
- public static final int ID_OMICRON_U = 149;
- public static final int ID_OPLUS = 150;
- public static final int ID_OR = 151;
- public static final int ID_ORDF = 152;
- public static final int ID_ORDM = 153;
- public static final int ID_OSLASH_L = 154;
- public static final int ID_OSLASH_U = 155;
- public static final int ID_OTILDE_L = 156;
- public static final int ID_OTILDE_U = 157;
- public static final int ID_OTIMES = 158;
- public static final int ID_OUML_L = 159;
- public static final int ID_OUML_U = 160;
- public static final int ID_PARA = 161;
- public static final int ID_PART = 162;
- public static final int ID_PERMIL = 163;
- public static final int ID_PERP = 164;
- public static final int ID_PHI_L = 165;
- public static final int ID_PHI_U = 166;
- public static final int ID_PIV = 167;
- public static final int ID_PI_L = 168;
- public static final int ID_PI_U = 169;
- public static final int ID_PLUSMN = 170;
- public static final int ID_POUND = 171;
- public static final int ID_PRIME_L = 172;
- public static final int ID_PRIME_U = 173;
- public static final int ID_PROD = 174;
- public static final int ID_PROP = 175;
- public static final int ID_PSI_L = 176;
- public static final int ID_PSI_U = 177;
- public static final int ID_QUOT = 178;
- public static final int ID_RADIC = 179;
- public static final int ID_RANG = 180;
- public static final int ID_RAQUO = 181;
- public static final int ID_RARR_L = 182;
- public static final int ID_RARR_U = 183;
- public static final int ID_RCEIL = 184;
- public static final int ID_RDQUO = 185;
- public static final int ID_REAL = 186;
- public static final int ID_REG = 187;
- public static final int ID_RFLOOR = 188;
- public static final int ID_RHO_L = 189;
- public static final int ID_RHO_U = 190;
- public static final int ID_RLM = 191;
- public static final int ID_RSAQUO = 192;
- public static final int ID_RSQUO = 193;
- public static final int ID_SBQUO = 194;
- public static final int ID_SCARON_L = 195;
- public static final int ID_SCARON_U = 196;
- public static final int ID_SDOT = 197;
- public static final int ID_SECT = 198;
- public static final int ID_SHY = 199;
- public static final int ID_SIGMAF = 200;
- public static final int ID_SIGMA_L = 201;
- public static final int ID_SIGMA_U = 202;
- public static final int ID_SIM = 203;
- public static final int ID_SPADES = 204;
- public static final int ID_SUB = 205;
- public static final int ID_SUBE = 206;
- public static final int ID_SUM = 207;
- public static final int ID_SUP = 208;
- public static final int ID_SUP1 = 209;
- public static final int ID_SUP2 = 210;
- public static final int ID_SUP3 = 211;
- public static final int ID_SUPE = 212;
- public static final int ID_SZLIG = 213;
- public static final int ID_TAU_L = 214;
- public static final int ID_TAU_U = 215;
- public static final int ID_THERE4 = 216;
- public static final int ID_THETASYM = 217;
- public static final int ID_THETA_L = 218;
- public static final int ID_THETA_U = 219;
- public static final int ID_THINSP = 220;
- public static final int ID_THORN_L = 221;
- public static final int ID_THORN_U = 222;
- public static final int ID_TILDE = 223;
- public static final int ID_TIMES = 224;
- public static final int ID_TRADE = 225;
- public static final int ID_UACUTE_L = 226;
- public static final int ID_UACUTE_U = 227;
- public static final int ID_UARR_L = 228;
- public static final int ID_UARR_U = 229;
- public static final int ID_UCIRC_L = 230;
- public static final int ID_UCIRC_U = 231;
- public static final int ID_UGRAVE_L = 232;
- public static final int ID_UGRAVE_U = 233;
- public static final int ID_UML = 234;
- public static final int ID_UPSIH = 235;
- public static final int ID_UPSILON_L = 236;
- public static final int ID_UPSILON_U = 237;
- public static final int ID_UUML_L = 238;
- public static final int ID_UUML_U = 239;
- public static final int ID_WEIERP = 240;
- public static final int ID_XI_L = 241;
- public static final int ID_XI_U = 242;
- public static final int ID_YACUTE_L = 243;
- public static final int ID_YACUTE_U = 244;
- public static final int ID_YEN = 245;
- public static final int ID_YUML_L = 246;
- public static final int ID_YUML_U = 247;
- public static final int ID_ZETA_L = 248;
- public static final int ID_ZETA_U = 249;
- public static final int ID_ZWJ = 250;
- public static final int ID_ZWNJ = 251;
-
- public static int getNumOfIds() {
- if (numofids != -1)
- return numofids;
-
- // NOTE: If the reflection is too slow, this method should
- // just return the literal value, like 252.
- // -- 5/24/2001
- Class clazz = Ids.class;
- Field[] fields = clazz.getFields();
- numofids = 0;
- for (int i = 0; i < fields.length; i++) {
- String name = fields[i].getName();
- if (name.startsWith("ID_"))//$NON-NLS-1$
- numofids++;
- }
- return numofids;
- }
-
- // chache the result of the reflection.
- private static int numofids = -1;
- }
-
- private static String[] names = null;
-
- static {
- names = new String[Ids.getNumOfIds()];
- names[Ids.ID_AACUTE_L] = AACUTE_L;
- names[Ids.ID_AACUTE_U] = AACUTE_U;
- names[Ids.ID_ACIRC_L] = ACIRC_L;
- names[Ids.ID_ACIRC_U] = ACIRC_U;
- names[Ids.ID_ACUTE] = ACUTE;
- names[Ids.ID_AELIG_L] = AELIG_L;
- names[Ids.ID_AELIG_U] = AELIG_U;
- names[Ids.ID_AGRAVE_L] = AGRAVE_L;
- names[Ids.ID_AGRAVE_U] = AGRAVE_U;
- names[Ids.ID_ALEFSYM] = ALEFSYM;
- names[Ids.ID_ALPHA_L] = ALPHA_L;
- names[Ids.ID_ALPHA_U] = ALPHA_U;
- names[Ids.ID_AMP] = AMP;
- names[Ids.ID_AND] = AND;
- names[Ids.ID_ANG] = ANG;
- names[Ids.ID_ARING_L] = ARING_L;
- names[Ids.ID_ARING_U] = ARING_U;
- names[Ids.ID_ASYMP] = ASYMP;
- names[Ids.ID_ATILDE_L] = ATILDE_L;
- names[Ids.ID_ATILDE_U] = ATILDE_U;
- names[Ids.ID_AUML_L] = AUML_L;
- names[Ids.ID_AUML_U] = AUML_U;
- names[Ids.ID_BDQUO] = BDQUO;
- names[Ids.ID_BETA_L] = BETA_L;
- names[Ids.ID_BETA_U] = BETA_U;
- names[Ids.ID_BRVBAR] = BRVBAR;
- names[Ids.ID_BULL] = BULL;
- names[Ids.ID_CAP] = CAP;
- names[Ids.ID_CCEDIL_L] = CCEDIL_L;
- names[Ids.ID_CCEDIL_U] = CCEDIL_U;
- names[Ids.ID_CEDIL] = CEDIL;
- names[Ids.ID_CENT] = CENT;
- names[Ids.ID_CHI_L] = CHI_L;
- names[Ids.ID_CHI_U] = CHI_U;
- names[Ids.ID_CIRC] = CIRC;
- names[Ids.ID_CLUBS] = CLUBS;
- names[Ids.ID_CONG] = CONG;
- names[Ids.ID_COPY] = COPY;
- names[Ids.ID_CRARR] = CRARR;
- names[Ids.ID_CUP] = CUP;
- names[Ids.ID_CURREN] = CURREN;
- names[Ids.ID_DAGGER_L] = DAGGER_L;
- names[Ids.ID_DAGGER_U] = DAGGER_U;
- names[Ids.ID_DARR_L] = DARR_L;
- names[Ids.ID_DARR_U] = DARR_U;
- names[Ids.ID_DEG] = DEG;
- names[Ids.ID_DELTA_L] = DELTA_L;
- names[Ids.ID_DELTA_U] = DELTA_U;
- names[Ids.ID_DIAMS] = DIAMS;
- names[Ids.ID_DIVIDE] = DIVIDE;
- names[Ids.ID_EACUTE_L] = EACUTE_L;
- names[Ids.ID_EACUTE_U] = EACUTE_U;
- names[Ids.ID_ECIRC_L] = ECIRC_L;
- names[Ids.ID_ECIRC_U] = ECIRC_U;
- names[Ids.ID_EGRAVE_L] = EGRAVE_L;
- names[Ids.ID_EGRAVE_U] = EGRAVE_U;
- names[Ids.ID_EMPTY] = EMPTY;
- names[Ids.ID_EMSP] = EMSP;
- names[Ids.ID_ENSP] = ENSP;
- names[Ids.ID_EPSILON_L] = EPSILON_L;
- names[Ids.ID_EPSILON_U] = EPSILON_U;
- names[Ids.ID_EQUIV] = EQUIV;
- names[Ids.ID_ETA_L] = ETA_L;
- names[Ids.ID_ETA_U] = ETA_U;
- names[Ids.ID_ETH_L] = ETH_L;
- names[Ids.ID_ETH_U] = ETH_U;
- names[Ids.ID_EUML_L] = EUML_L;
- names[Ids.ID_EUML_U] = EUML_U;
- names[Ids.ID_EURO] = EURO;
- names[Ids.ID_EXIST] = EXIST;
- names[Ids.ID_FNOF] = FNOF;
- names[Ids.ID_FORALL] = FORALL;
- names[Ids.ID_FRAC12] = FRAC12;
- names[Ids.ID_FRAC14] = FRAC14;
- names[Ids.ID_FRAC34] = FRAC34;
- names[Ids.ID_FRASL] = FRASL;
- names[Ids.ID_GAMMA_L] = GAMMA_L;
- names[Ids.ID_GAMMA_U] = GAMMA_U;
- names[Ids.ID_GE] = GE;
- names[Ids.ID_GT] = GT;
- names[Ids.ID_HARR_L] = HARR_L;
- names[Ids.ID_HARR_U] = HARR_U;
- names[Ids.ID_HEARTS] = HEARTS;
- names[Ids.ID_HELLIP] = HELLIP;
- names[Ids.ID_IACUTE_L] = IACUTE_L;
- names[Ids.ID_IACUTE_U] = IACUTE_U;
- names[Ids.ID_ICIRC_L] = ICIRC_L;
- names[Ids.ID_ICIRC_U] = ICIRC_U;
- names[Ids.ID_IEXCL] = IEXCL;
- names[Ids.ID_IGRAVE_L] = IGRAVE_L;
- names[Ids.ID_IGRAVE_U] = IGRAVE_U;
- names[Ids.ID_IMAGE] = IMAGE;
- names[Ids.ID_INFIN] = INFIN;
- names[Ids.ID_INT] = INT;
- names[Ids.ID_IOTA_L] = IOTA_L;
- names[Ids.ID_IOTA_U] = IOTA_U;
- names[Ids.ID_IQUEST] = IQUEST;
- names[Ids.ID_ISIN] = ISIN;
- names[Ids.ID_IUML_L] = IUML_L;
- names[Ids.ID_IUML_U] = IUML_U;
- names[Ids.ID_KAPPA_L] = KAPPA_L;
- names[Ids.ID_KAPPA_U] = KAPPA_U;
- names[Ids.ID_LAMBDA_L] = LAMBDA_L;
- names[Ids.ID_LAMBDA_U] = LAMBDA_U;
- names[Ids.ID_LANG] = LANG;
- names[Ids.ID_LAQUO] = LAQUO;
- names[Ids.ID_LARR_L] = LARR_L;
- names[Ids.ID_LARR_U] = LARR_U;
- names[Ids.ID_LCEIL] = LCEIL;
- names[Ids.ID_LDQUO] = LDQUO;
- names[Ids.ID_LE] = LE;
- names[Ids.ID_LFLOOR] = LFLOOR;
- names[Ids.ID_LOWAST] = LOWAST;
- names[Ids.ID_LOZ] = LOZ;
- names[Ids.ID_LRM] = LRM;
- names[Ids.ID_LSAQUO] = LSAQUO;
- names[Ids.ID_LSQUO] = LSQUO;
- names[Ids.ID_LT] = LT;
- names[Ids.ID_MACR] = MACR;
- names[Ids.ID_MDASH] = MDASH;
- names[Ids.ID_MICRO] = MICRO;
- names[Ids.ID_MIDDOT] = MIDDOT;
- names[Ids.ID_MINUS] = MINUS;
- names[Ids.ID_MU_L] = MU_L;
- names[Ids.ID_MU_U] = MU_U;
- names[Ids.ID_NABLA] = NABLA;
- names[Ids.ID_NBSP] = NBSP;
- names[Ids.ID_NDASH] = NDASH;
- names[Ids.ID_NE] = NE;
- names[Ids.ID_NI] = NI;
- names[Ids.ID_NOT] = NOT;
- names[Ids.ID_NOTIN] = NOTIN;
- names[Ids.ID_NSUB] = NSUB;
- names[Ids.ID_NTILDE_L] = NTILDE_L;
- names[Ids.ID_NTILDE_U] = NTILDE_U;
- names[Ids.ID_NU_L] = NU_L;
- names[Ids.ID_NU_U] = NU_U;
- names[Ids.ID_OACUTE_L] = OACUTE_L;
- names[Ids.ID_OACUTE_U] = OACUTE_U;
- names[Ids.ID_OCIRC_L] = OCIRC_L;
- names[Ids.ID_OCIRC_U] = OCIRC_U;
- names[Ids.ID_OELIG_L] = OELIG_L;
- names[Ids.ID_OELIG_U] = OELIG_U;
- names[Ids.ID_OGRAVE_L] = OGRAVE_L;
- names[Ids.ID_OGRAVE_U] = OGRAVE_U;
- names[Ids.ID_OLINE] = OLINE;
- names[Ids.ID_OMEGA_L] = OMEGA_L;
- names[Ids.ID_OMEGA_U] = OMEGA_U;
- names[Ids.ID_OMICRON_L] = OMICRON_L;
- names[Ids.ID_OMICRON_U] = OMICRON_U;
- names[Ids.ID_OPLUS] = OPLUS;
- names[Ids.ID_OR] = OR;
- names[Ids.ID_ORDF] = ORDF;
- names[Ids.ID_ORDM] = ORDM;
- names[Ids.ID_OSLASH_L] = OSLASH_L;
- names[Ids.ID_OSLASH_U] = OSLASH_U;
- names[Ids.ID_OTILDE_L] = OTILDE_L;
- names[Ids.ID_OTILDE_U] = OTILDE_U;
- names[Ids.ID_OTIMES] = OTIMES;
- names[Ids.ID_OUML_L] = OUML_L;
- names[Ids.ID_OUML_U] = OUML_U;
- names[Ids.ID_PARA] = PARA;
- names[Ids.ID_PART] = PART;
- names[Ids.ID_PERMIL] = PERMIL;
- names[Ids.ID_PERP] = PERP;
- names[Ids.ID_PHI_L] = PHI_L;
- names[Ids.ID_PHI_U] = PHI_U;
- names[Ids.ID_PIV] = PIV;
- names[Ids.ID_PI_L] = PI_L;
- names[Ids.ID_PI_U] = PI_U;
- names[Ids.ID_PLUSMN] = PLUSMN;
- names[Ids.ID_POUND] = POUND;
- names[Ids.ID_PRIME_L] = PRIME_L;
- names[Ids.ID_PRIME_U] = PRIME_U;
- names[Ids.ID_PROD] = PROD;
- names[Ids.ID_PROP] = PROP;
- names[Ids.ID_PSI_L] = PSI_L;
- names[Ids.ID_PSI_U] = PSI_U;
- names[Ids.ID_QUOT] = QUOT;
- names[Ids.ID_RADIC] = RADIC;
- names[Ids.ID_RANG] = RANG;
- names[Ids.ID_RAQUO] = RAQUO;
- names[Ids.ID_RARR_L] = RARR_L;
- names[Ids.ID_RARR_U] = RARR_U;
- names[Ids.ID_RCEIL] = RCEIL;
- names[Ids.ID_RDQUO] = RDQUO;
- names[Ids.ID_REAL] = REAL;
- names[Ids.ID_REG] = REG;
- names[Ids.ID_RFLOOR] = RFLOOR;
- names[Ids.ID_RHO_L] = RHO_L;
- names[Ids.ID_RHO_U] = RHO_U;
- names[Ids.ID_RLM] = RLM;
- names[Ids.ID_RSAQUO] = RSAQUO;
- names[Ids.ID_RSQUO] = RSQUO;
- names[Ids.ID_SBQUO] = SBQUO;
- names[Ids.ID_SCARON_L] = SCARON_L;
- names[Ids.ID_SCARON_U] = SCARON_U;
- names[Ids.ID_SDOT] = SDOT;
- names[Ids.ID_SECT] = SECT;
- names[Ids.ID_SHY] = SHY;
- names[Ids.ID_SIGMAF] = SIGMAF;
- names[Ids.ID_SIGMA_L] = SIGMA_L;
- names[Ids.ID_SIGMA_U] = SIGMA_U;
- names[Ids.ID_SIM] = SIM;
- names[Ids.ID_SPADES] = SPADES;
- names[Ids.ID_SUB] = SUB;
- names[Ids.ID_SUBE] = SUBE;
- names[Ids.ID_SUM] = SUM;
- names[Ids.ID_SUP] = SUP;
- names[Ids.ID_SUP1] = SUP1;
- names[Ids.ID_SUP2] = SUP2;
- names[Ids.ID_SUP3] = SUP3;
- names[Ids.ID_SUPE] = SUPE;
- names[Ids.ID_SZLIG] = SZLIG;
- names[Ids.ID_TAU_L] = TAU_L;
- names[Ids.ID_TAU_U] = TAU_U;
- names[Ids.ID_THERE4] = THERE4;
- names[Ids.ID_THETASYM] = THETASYM;
- names[Ids.ID_THETA_L] = THETA_L;
- names[Ids.ID_THETA_U] = THETA_U;
- names[Ids.ID_THINSP] = THINSP;
- names[Ids.ID_THORN_L] = THORN_L;
- names[Ids.ID_THORN_U] = THORN_U;
- names[Ids.ID_TILDE] = TILDE;
- names[Ids.ID_TIMES] = TIMES;
- names[Ids.ID_TRADE] = TRADE;
- names[Ids.ID_UACUTE_L] = UACUTE_L;
- names[Ids.ID_UACUTE_U] = UACUTE_U;
- names[Ids.ID_UARR_L] = UARR_L;
- names[Ids.ID_UARR_U] = UARR_U;
- names[Ids.ID_UCIRC_L] = UCIRC_L;
- names[Ids.ID_UCIRC_U] = UCIRC_U;
- names[Ids.ID_UGRAVE_L] = UGRAVE_L;
- names[Ids.ID_UGRAVE_U] = UGRAVE_U;
- names[Ids.ID_UML] = UML;
- names[Ids.ID_UPSIH] = UPSIH;
- names[Ids.ID_UPSILON_L] = UPSILON_L;
- names[Ids.ID_UPSILON_U] = UPSILON_U;
- names[Ids.ID_UUML_L] = UUML_L;
- names[Ids.ID_UUML_U] = UUML_U;
- names[Ids.ID_WEIERP] = WEIERP;
- names[Ids.ID_XI_L] = XI_L;
- names[Ids.ID_XI_U] = XI_U;
- names[Ids.ID_YACUTE_L] = YACUTE_L;
- names[Ids.ID_YACUTE_U] = YACUTE_U;
- names[Ids.ID_YEN] = YEN;
- names[Ids.ID_YUML_L] = YUML_L;
- names[Ids.ID_YUML_U] = YUML_U;
- names[Ids.ID_ZETA_L] = ZETA_L;
- names[Ids.ID_ZETA_U] = ZETA_U;
- names[Ids.ID_ZWJ] = ZWJ;
- names[Ids.ID_ZWNJ] = ZWNJ;
- }
- private static char[] values = null;
-
- static {
- values = new char[Ids.getNumOfIds()];
- values[Ids.ID_AACUTE_L] = 225;
- values[Ids.ID_AACUTE_U] = 193;
- values[Ids.ID_ACIRC_L] = 226;
- values[Ids.ID_ACIRC_U] = 194;
- values[Ids.ID_ACUTE] = 180;
- values[Ids.ID_AELIG_L] = 230;
- values[Ids.ID_AELIG_U] = 198;
- values[Ids.ID_AGRAVE_L] = 224;
- values[Ids.ID_AGRAVE_U] = 192;
- values[Ids.ID_ALEFSYM] = 8501;
- values[Ids.ID_ALPHA_L] = 945;
- values[Ids.ID_ALPHA_U] = 913;
- values[Ids.ID_AMP] = 38;
- values[Ids.ID_AND] = 8743;
- values[Ids.ID_ANG] = 8736;
- values[Ids.ID_ARING_L] = 229;
- values[Ids.ID_ARING_U] = 197;
- values[Ids.ID_ASYMP] = 8776;
- values[Ids.ID_ATILDE_L] = 227;
- values[Ids.ID_ATILDE_U] = 195;
- values[Ids.ID_AUML_L] = 228;
- values[Ids.ID_AUML_U] = 196;
- values[Ids.ID_BDQUO] = 8222;
- values[Ids.ID_BETA_L] = 946;
- values[Ids.ID_BETA_U] = 914;
- values[Ids.ID_BRVBAR] = 166;
- values[Ids.ID_BULL] = 8226;
- values[Ids.ID_CAP] = 8745;
- values[Ids.ID_CCEDIL_L] = 231;
- values[Ids.ID_CCEDIL_U] = 199;
- values[Ids.ID_CEDIL] = 184;
- values[Ids.ID_CENT] = 162;
- values[Ids.ID_CHI_L] = 967;
- values[Ids.ID_CHI_U] = 935;
- values[Ids.ID_CIRC] = 710;
- values[Ids.ID_CLUBS] = 9827;
- values[Ids.ID_CONG] = 8773;
- values[Ids.ID_COPY] = 169;
- values[Ids.ID_CRARR] = 8629;
- values[Ids.ID_CUP] = 8746;
- values[Ids.ID_CURREN] = 164;
- values[Ids.ID_DAGGER_L] = 8224;
- values[Ids.ID_DAGGER_U] = 8225;
- values[Ids.ID_DARR_L] = 8595;
- values[Ids.ID_DARR_U] = 8659;
- values[Ids.ID_DEG] = 176;
- values[Ids.ID_DELTA_L] = 948;
- values[Ids.ID_DELTA_U] = 916;
- values[Ids.ID_DIAMS] = 9830;
- values[Ids.ID_DIVIDE] = 247;
- values[Ids.ID_EACUTE_L] = 233;
- values[Ids.ID_EACUTE_U] = 201;
- values[Ids.ID_ECIRC_L] = 234;
- values[Ids.ID_ECIRC_U] = 202;
- values[Ids.ID_EGRAVE_L] = 232;
- values[Ids.ID_EGRAVE_U] = 200;
- values[Ids.ID_EMPTY] = 8709;
- values[Ids.ID_EMSP] = 8195;
- values[Ids.ID_ENSP] = 8194;
- values[Ids.ID_EPSILON_L] = 949;
- values[Ids.ID_EPSILON_U] = 917;
- values[Ids.ID_EQUIV] = 8801;
- values[Ids.ID_ETA_L] = 951;
- values[Ids.ID_ETA_U] = 919;
- values[Ids.ID_ETH_L] = 240;
- values[Ids.ID_ETH_U] = 208;
- values[Ids.ID_EUML_L] = 235;
- values[Ids.ID_EUML_U] = 203;
- values[Ids.ID_EURO] = 8364;
- values[Ids.ID_EXIST] = 8707;
- values[Ids.ID_FNOF] = 402;
- values[Ids.ID_FORALL] = 8704;
- values[Ids.ID_FRAC12] = 189;
- values[Ids.ID_FRAC14] = 188;
- values[Ids.ID_FRAC34] = 190;
- values[Ids.ID_FRASL] = 8260;
- values[Ids.ID_GAMMA_L] = 947;
- values[Ids.ID_GAMMA_U] = 915;
- values[Ids.ID_GE] = 8805;
- values[Ids.ID_GT] = 62;
- values[Ids.ID_HARR_L] = 8596;
- values[Ids.ID_HARR_U] = 8660;
- values[Ids.ID_HEARTS] = 9829;
- values[Ids.ID_HELLIP] = 8230;
- values[Ids.ID_IACUTE_L] = 237;
- values[Ids.ID_IACUTE_U] = 205;
- values[Ids.ID_ICIRC_L] = 238;
- values[Ids.ID_ICIRC_U] = 206;
- values[Ids.ID_IEXCL] = 161;
- values[Ids.ID_IGRAVE_L] = 236;
- values[Ids.ID_IGRAVE_U] = 204;
- values[Ids.ID_IMAGE] = 8465;
- values[Ids.ID_INFIN] = 8734;
- values[Ids.ID_INT] = 8747;
- values[Ids.ID_IOTA_L] = 953;
- values[Ids.ID_IOTA_U] = 921;
- values[Ids.ID_IQUEST] = 191;
- values[Ids.ID_ISIN] = 8712;
- values[Ids.ID_IUML_L] = 239;
- values[Ids.ID_IUML_U] = 207;
- values[Ids.ID_KAPPA_L] = 954;
- values[Ids.ID_KAPPA_U] = 922;
- values[Ids.ID_LAMBDA_L] = 955;
- values[Ids.ID_LAMBDA_U] = 923;
- values[Ids.ID_LANG] = 9001;
- values[Ids.ID_LAQUO] = 171;
- values[Ids.ID_LARR_L] = 8592;
- values[Ids.ID_LARR_U] = 8656;
- values[Ids.ID_LCEIL] = 8968;
- values[Ids.ID_LDQUO] = 8220;
- values[Ids.ID_LE] = 8804;
- values[Ids.ID_LFLOOR] = 8970;
- values[Ids.ID_LOWAST] = 8727;
- values[Ids.ID_LOZ] = 9674;
- values[Ids.ID_LRM] = 8206;
- values[Ids.ID_LSAQUO] = 8249;
- values[Ids.ID_LSQUO] = 8216;
- values[Ids.ID_LT] = 60;
- values[Ids.ID_MACR] = 175;
- values[Ids.ID_MDASH] = 8212;
- values[Ids.ID_MICRO] = 181;
- values[Ids.ID_MIDDOT] = 183;
- values[Ids.ID_MINUS] = 8722;
- values[Ids.ID_MU_L] = 956;
- values[Ids.ID_MU_U] = 924;
- values[Ids.ID_NABLA] = 8711;
- values[Ids.ID_NBSP] = 160;
- values[Ids.ID_NDASH] = 8211;
- values[Ids.ID_NE] = 8800;
- values[Ids.ID_NI] = 8715;
- values[Ids.ID_NOT] = 172;
- values[Ids.ID_NOTIN] = 8713;
- values[Ids.ID_NSUB] = 8836;
- values[Ids.ID_NTILDE_L] = 241;
- values[Ids.ID_NTILDE_U] = 209;
- values[Ids.ID_NU_L] = 957;
- values[Ids.ID_NU_U] = 925;
- values[Ids.ID_OACUTE_L] = 243;
- values[Ids.ID_OACUTE_U] = 211;
- values[Ids.ID_OCIRC_L] = 244;
- values[Ids.ID_OCIRC_U] = 212;
- values[Ids.ID_OELIG_L] = 339;
- values[Ids.ID_OELIG_U] = 338;
- values[Ids.ID_OGRAVE_L] = 242;
- values[Ids.ID_OGRAVE_U] = 210;
- values[Ids.ID_OLINE] = 8254;
- values[Ids.ID_OMEGA_L] = 969;
- values[Ids.ID_OMEGA_U] = 937;
- values[Ids.ID_OMICRON_L] = 959;
- values[Ids.ID_OMICRON_U] = 927;
- values[Ids.ID_OPLUS] = 8853;
- values[Ids.ID_OR] = 8744;
- values[Ids.ID_ORDF] = 170;
- values[Ids.ID_ORDM] = 186;
- values[Ids.ID_OSLASH_L] = 248;
- values[Ids.ID_OSLASH_U] = 216;
- values[Ids.ID_OTILDE_L] = 245;
- values[Ids.ID_OTILDE_U] = 213;
- values[Ids.ID_OTIMES] = 8855;
- values[Ids.ID_OUML_L] = 246;
- values[Ids.ID_OUML_U] = 214;
- values[Ids.ID_PARA] = 182;
- values[Ids.ID_PART] = 8706;
- values[Ids.ID_PERMIL] = 8240;
- values[Ids.ID_PERP] = 8869;
- values[Ids.ID_PHI_L] = 966;
- values[Ids.ID_PHI_U] = 934;
- values[Ids.ID_PIV] = 982;
- values[Ids.ID_PI_L] = 960;
- values[Ids.ID_PI_U] = 928;
- values[Ids.ID_PLUSMN] = 177;
- values[Ids.ID_POUND] = 163;
- values[Ids.ID_PRIME_L] = 8242;
- values[Ids.ID_PRIME_U] = 8243;
- values[Ids.ID_PROD] = 8719;
- values[Ids.ID_PROP] = 8733;
- values[Ids.ID_PSI_L] = 968;
- values[Ids.ID_PSI_U] = 936;
- values[Ids.ID_QUOT] = 34;
- values[Ids.ID_RADIC] = 8730;
- values[Ids.ID_RANG] = 9002;
- values[Ids.ID_RAQUO] = 187;
- values[Ids.ID_RARR_L] = 8594;
- values[Ids.ID_RARR_U] = 8658;
- values[Ids.ID_RCEIL] = 8969;
- values[Ids.ID_RDQUO] = 8221;
- values[Ids.ID_REAL] = 8476;
- values[Ids.ID_REG] = 174;
- values[Ids.ID_RFLOOR] = 8971;
- values[Ids.ID_RHO_L] = 961;
- values[Ids.ID_RHO_U] = 929;
- values[Ids.ID_RLM] = 8207;
- values[Ids.ID_RSAQUO] = 8250;
- values[Ids.ID_RSQUO] = 8217;
- values[Ids.ID_SBQUO] = 8218;
- values[Ids.ID_SCARON_L] = 353;
- values[Ids.ID_SCARON_U] = 352;
- values[Ids.ID_SDOT] = 8901;
- values[Ids.ID_SECT] = 167;
- values[Ids.ID_SHY] = 173;
- values[Ids.ID_SIGMAF] = 962;
- values[Ids.ID_SIGMA_L] = 963;
- values[Ids.ID_SIGMA_U] = 931;
- values[Ids.ID_SIM] = 8764;
- values[Ids.ID_SPADES] = 9824;
- values[Ids.ID_SUB] = 8834;
- values[Ids.ID_SUBE] = 8838;
- values[Ids.ID_SUM] = 8721;
- values[Ids.ID_SUP] = 8835;
- values[Ids.ID_SUP1] = 185;
- values[Ids.ID_SUP2] = 178;
- values[Ids.ID_SUP3] = 179;
- values[Ids.ID_SUPE] = 8839;
- values[Ids.ID_SZLIG] = 223;
- values[Ids.ID_TAU_L] = 964;
- values[Ids.ID_TAU_U] = 932;
- values[Ids.ID_THERE4] = 8756;
- values[Ids.ID_THETASYM] = 977;
- values[Ids.ID_THETA_L] = 952;
- values[Ids.ID_THETA_U] = 920;
- values[Ids.ID_THINSP] = 8201;
- values[Ids.ID_THORN_L] = 254;
- values[Ids.ID_THORN_U] = 222;
- values[Ids.ID_TILDE] = 732;
- values[Ids.ID_TIMES] = 215;
- values[Ids.ID_TRADE] = 8482;
- values[Ids.ID_UACUTE_L] = 250;
- values[Ids.ID_UACUTE_U] = 218;
- values[Ids.ID_UARR_L] = 8593;
- values[Ids.ID_UARR_U] = 8657;
- values[Ids.ID_UCIRC_L] = 251;
- values[Ids.ID_UCIRC_U] = 219;
- values[Ids.ID_UGRAVE_L] = 249;
- values[Ids.ID_UGRAVE_U] = 217;
- values[Ids.ID_UML] = 168;
- values[Ids.ID_UPSIH] = 978;
- values[Ids.ID_UPSILON_L] = 965;
- values[Ids.ID_UPSILON_U] = 933;
- values[Ids.ID_UUML_L] = 252;
- values[Ids.ID_UUML_U] = 220;
- values[Ids.ID_WEIERP] = 8472;
- values[Ids.ID_XI_L] = 958;
- values[Ids.ID_XI_U] = 926;
- values[Ids.ID_YACUTE_L] = 253;
- values[Ids.ID_YACUTE_U] = 221;
- values[Ids.ID_YEN] = 165;
- values[Ids.ID_YUML_L] = 255;
- values[Ids.ID_YUML_U] = 376;
- values[Ids.ID_ZETA_L] = 950;
- values[Ids.ID_ZETA_U] = 918;
- values[Ids.ID_ZWJ] = 8205;
- values[Ids.ID_ZWNJ] = 8204;
- }
-
- /**
- */
- public EntityCollection() {
- super(names, STRICT_CASE);
- }
-
- /**
- * Create an entity declaration.
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param attrName java.lang.String
- */
- protected CMNode create(String entityName) {
- int id = getID(entityName);
- if (id == ID_UNKNOWN)
- return null;
-
- String value = String.valueOf(values[id]);
- HTMLEntityDeclImpl dec = new HTMLEntityDeclImpl(entityName, value);
-
- return dec;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HCMDocImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HCMDocImpl.java
deleted file mode 100644
index 0ba233aa50..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HCMDocImpl.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.wst.html.core.internal.contentmodel;
-
-
-
-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;
-
-/**
- * CMDocument implementation for the HTML.
- */
-class HCMDocImpl extends CMNodeImpl implements HTMLCMDocument {
-
- /** Namespace for all names of elements, entities and attributes. */
- private CMNamespaceImpl namespace = null;
- private ElementCollection elements = null;
- private EntityCollection entities = null;
- private AttributeCollection attributes = null;
-
- /**
- */
- public HCMDocImpl(String docTypeName, CMNamespaceImpl targetNamespace) {
- super(docTypeName);
- namespace = targetNamespace;
- attributes = new AttributeCollection();
- elements = new ElementCollection(attributes);
- entities = new EntityCollection();
- }
-
- AttributeCollection getAttributes() {
- return attributes;
- }
-
- public HTMLElementDeclaration getElementDeclaration(String elementName) {
- if (elements == null)
- return null;
- return (HTMLElementDeclaration) elements.getNamedItem(elementName);
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- */
- public CMNamedNodeMap getElements() {
- return elements;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- */
- public CMNamedNodeMap getEntities() {
- return entities;
- }
-
- public HTMLEntityDeclaration getEntityDeclaration(String entityName) {
- if (entities == null)
- return null;
- return (HTMLEntityDeclaration) entities.getNamedItem(entityName);
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- */
- public CMNamespace getNamespace() {
- return namespace;
- }
-
- /**
- * @see CMNode
- */
- public int getNodeType() {
- return CMNode.DOCUMENT;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttrDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttrDeclImpl.java
deleted file mode 100644
index ce938e3467..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttrDeclImpl.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Implementation class of {@link <code>HTMLAttributeDeclaration</code>} interface.<br>
- */
-class HTMLAttrDeclImpl extends CMNodeImpl implements HTMLAttributeDeclaration {
-
- private HTMLCMDataTypeImpl type = null;
- private int usage = 0;
-
- /**
- */
- public HTMLAttrDeclImpl(String attrName, HTMLCMDataTypeImpl valueType, int valueUsage) {
- super(attrName);
- this.type = valueType;
-
- switch (valueUsage) {
- case OPTIONAL :
- case REQUIRED :
- case FIXED :
- case PROHIBITED :
- this.usage = valueUsage;
- break;
- default :
- // should warn...
- this.usage = OPTIONAL; // fall back
- break;
- }
- }
-
- /**
- * getAttrName method
- * @return java.lang.String
- */
- public String getAttrName() {
- return getNodeName();
- }
-
- /**
- * getAttrType method
- * @return CMDataType
- */
- public CMDataType getAttrType() {
- return type;
- }
-
- /**
- * @deprecated by superinterface
- */
- public String getDefaultValue() {
- if (type.getImpliedValueKind() != CMDataType.IMPLIED_VALUE_DEFAULT)
- return null;
- return type.getImpliedValue();
- }
-
- /**
- * @deprecated by superinterface
- */
- public Enumeration getEnumAttr() {
- Vector v = new Vector(Arrays.asList(type.getEnumeratedValues()));
- return v.elements();
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- * ELEMENT_DECLARATION, ATTRIBUTE_DECLARATION, GROUP, ENTITY_DECLARATION.
- */
- public int getNodeType() {
- return CMNode.ATTRIBUTE_DECLARATION;
- }
-
- /**
- * @return int
- */
- public int getUsage() {
- return usage;
- }
-
- /**
- */
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return true;
- else if (propertyName.equals(HTMLCMProperties.IS_SCRIPTABLE))
- return true;
- return super.supports(propertyName);
- }
-
- /**
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return new Boolean(true);
- else if (propertyName.equals(HTMLCMProperties.IS_SCRIPTABLE)) {
- return getAttrType().getDataTypeName() == HTMLCMDataType.SCRIPT ? new Boolean(true) : new Boolean(false);
- }
- return super.getProperty(propertyName);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttributeDeclaration.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttributeDeclaration.java
deleted file mode 100644
index 675dc59adf..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttributeDeclaration.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-
-
-
-/**
- * This interface is intended to be a public interface which has
- * interfaces defined in both of {@link <code>CMAttributeDeclaration</code>}
- * and {@link <code>HTMLCMNode</code>}.<br>
- */
-public interface HTMLAttributeDeclaration extends CMAttributeDeclaration {
-
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataType.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataType.java
deleted file mode 100644
index fba0b86e75..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataType.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * HTML extension for data types.
- */
-public interface HTMLCMDataType extends CMDataType {
-
- /** Boolean; it should be defined in CMDataType. */
- public static final String BOOLEAN = "BOOLEAN"; //$NON-NLS-1$
- public static final String COLOR = "COLOR"; //$NON-NLS-1$
- public static final String EVENT = "EVENT"; //$NON-NLS-1$
- public static final String IDREFS = "IDREFS"; //$NON-NLS-1$
- /** Name; it should be defined in CMDataType. */
- public static final String NAME = "NAME"; //$NON-NLS-1$
- // Following types are just aliases.
- /** %Character; == CDATA */
- public static final String CHARACTER = CMDataType.CDATA;
- /** %Charset; == CDATA */
- public static final String CHARSET = CMDataType.CDATA;
- /** %Charsets; == CDATA */
- public static final String CHARSETS = CMDataType.CDATA;
- /** %ContentType; == CDATA */
- public static final String CONTENT_TYPE = CMDataType.CDATA;
- /** %Coords; == CDATA */
- public static final String COORDS = CMDataType.CDATA;
- /** %Datetime; == CDATA */
- public static final String DATETIME = CMDataType.CDATA;
- /** %FrameTarget; == CDATA */
- public static final String FRAME_TARGET = CMDataType.CDATA;
- /** %LanguageCode; == NAME */
- public static final String LANGUAGE_CODE = NAME;
- /** %Length; == CDATA */
- public static final String LENGTH = CMDataType.CDATA;
- /** %LinkTypes; == CDATA */
- public static final String LINK_TYPES = CMDataType.CDATA;
- /** %LIStyle; == CDATA */
- public static final String LI_STYLE = CMDataType.CDATA;
- /** %MediaDesc; == CDATA */
- public static final String MEDIA_DESC = CMDataType.CDATA;
- /** %MultiLength; == CDATA */
- public static final String MULTI_LENGTH = CMDataType.CDATA;
- /** %OLStyle; == CDATA */
- public static final String OL_STYLE = CMDataType.CDATA;
- /** %Pixles; == CDATA */
- public static final String PIXELS = CMDataType.CDATA;
- /** %Script; == EVENT */
- public static final String SCRIPT = EVENT;
- /** %StyleSheet; == EVENT */
- public static final String STYLE_SHEET = CMDataType.CDATA;
- /** %Text; == CDATA */
- public static final String TEXT = CMDataType.CDATA;
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataTypeImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataTypeImpl.java
deleted file mode 100644
index 6e50c743c3..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataTypeImpl.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.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-
-
-/**
- */
-class HTMLCMDataTypeImpl extends CMNodeImpl implements HTMLCMDataType {
-
- private int impliedValueKind = IMPLIED_VALUE_NONE;
- private String impliedValue = null;
- private final static String[] emptyArray = new String[0];
- private String[] enumValues = emptyArray;
- private String instanceValue = null;
-
- /**
- * HTMLCMDataTypeImpl constructor comment.
- * @param nm java.lang.String
- */
- public HTMLCMDataTypeImpl(String typeName) {
- super(typeName);
- }
-
- /**
- * HTMLCMDataTypeImpl constructor comment.
- * @param nm java.lang.String
- */
- public HTMLCMDataTypeImpl(String typeName, String instanceValue) {
- super(typeName);
- this.instanceValue = instanceValue;
- }
-
- /**
- * 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 instanceValue;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDataType
- */
- public String getDataTypeName() {
- return getNodeName();
- }
-
- /**
- * getTypeName method
- * @return java.lang.String[]
- *
- */
- public String[] getEnumeratedValues() {
- return enumValues;
- }
-
- /**
- * getTypeName method
- * @return java.lang.String
- *
- * Returns the implied value or null if none exists.
- */
- public String getImpliedValue() {
- return impliedValue;
- }
-
- /**
- * getImpliedValueKind method
- * @return int
- *
- * Returns one of :
- * IMPLIED_VALUE_NONE, IMPLIED_VALUE_FIXED, IMPLIED_VALUE_DEFAULT.
- */
- public int getImpliedValueKind() {
- return impliedValueKind;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public int getNodeType() {
- return CMNode.DATA_TYPE;
- }
-
- /**
- */
- void setEnumValues(String[] values) {
- enumValues = new String[values.length];
- for (int i = 0; i < values.length; i++) {
- enumValues[i] = values[i];
- }
- }
-
- /**
- * package scope.
- */
- void setImpliedValue(int kind, String value) {
- switch (kind) {
- case IMPLIED_VALUE_FIXED :
- case IMPLIED_VALUE_DEFAULT :
- impliedValueKind = kind;
- impliedValue = value;
- break;
- case IMPLIED_VALUE_NONE :
- default :
- impliedValueKind = IMPLIED_VALUE_NONE;
- impliedValue = null; // maybe a null string?
- break;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocument.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocument.java
deleted file mode 100644
index af6c7d9838..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocument.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-
-
-
-/**
- * HTML extension for CMDocument.
- * This interface provides some short hand methods to get declarations
- * by a name.
- */
-public interface HTMLCMDocument extends CMDocument {
-
- /**
- * A short hand method to get a element declaration for a HTML element.<br>
- * @param elementName java.lang.String
- */
- HTMLElementDeclaration getElementDeclaration(String elementName);
-
- /**
- * A short hand method to get a entity declaration of HTML documents.<br>
- * @param entityName java.lang.String
- */
- HTMLEntityDeclaration getEntityDeclaration(String entityName);
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocumentFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocumentFactory.java
deleted file mode 100644
index 28316ec94d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocumentFactory.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.List;
-
-import org.eclipse.wst.html.core.internal.contentmodel.chtml.CHCMDocImpl;
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
-
-/**
- * INodeAdapter factory for HTML and JSP documents.
- */
-public final class HTMLCMDocumentFactory {
-
- private static Hashtable cmdocs = new Hashtable();
- private static List supportedCMtypes = Arrays.asList(new Object[]{CMDocType.HTML_DOC_TYPE, CMDocType.CHTML_DOC_TYPE, CMDocType.JSP11_DOC_TYPE, CMDocType.JSP12_DOC_TYPE, CMDocType.JSP20_DOC_TYPE, CMDocType.TAG20_DOC_TYPE});
-
- private static JCMDocImpl jsp11doc = null;
-
- /**
- * HTMLCMAdapterFactory constructor.
- */
- private HTMLCMDocumentFactory() {
- super();
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- * @param cmtype
- * java.lang.String
- */
- public static CMDocument getCMDocument(String cmtype) {
- Object obj = cmdocs.get(cmtype);
- if (obj == null && cmtype != null) {
- if (supportedCMtypes.contains(cmtype)) {
- obj = doCreateCMDocument(cmtype);
- cmdocs.put(cmtype, obj);
- }
- }
-
- return (CMDocument) obj;
- }
-
- private static Object doCreateCMDocument(String cmtype) {
- if (CMDocType.HTML_DOC_TYPE.equals(cmtype)) {
- CMNamespaceImpl h40ns = new CMNamespaceImpl(HTML40Namespace.HTML40_URI, HTML40Namespace.HTML40_TAG_PREFIX);
- HCMDocImpl html40doc = new HCMDocImpl(CMDocType.HTML_DOC_TYPE, h40ns);
- return html40doc;
- }
-
- else if (CMDocType.JSP20_DOC_TYPE.equals(cmtype)) {
- CMNamespaceImpl j20ns = new CMNamespaceImpl(JSP20Namespace.JSP20_URI, JSP11Namespace.JSP_TAG_PREFIX);
- JCM20DocImpl jsp20doc = new JCM20DocImpl(CMDocType.JSP20_DOC_TYPE, j20ns);
- return jsp20doc;
- }
-
- else if (CMDocType.TAG20_DOC_TYPE.equals(cmtype)) {
- CMNamespaceImpl j20ns = new CMNamespaceImpl(JSP20Namespace.JSP20_URI, JSP11Namespace.JSP_TAG_PREFIX);
- TagCMDocImpl tag20doc = new TagCMDocImpl(CMDocType.TAG20_DOC_TYPE, j20ns);
- return tag20doc;
- }
-
- else if (CMDocType.JSP11_DOC_TYPE.equals(cmtype) || CMDocType.JSP12_DOC_TYPE.equals(cmtype)) {
- if (jsp11doc == null) {
- CMNamespaceImpl j11ns = new CMNamespaceImpl(JSP11Namespace.JSP11_URI, JSP11Namespace.JSP_TAG_PREFIX);
- jsp11doc = new JCMDocImpl(CMDocType.JSP11_DOC_TYPE, j11ns);
- }
- return jsp11doc;
- }
-
- else if (CMDocType.CHTML_DOC_TYPE.equals(cmtype)) {
- CMNamespaceImpl cH40ns = new CMNamespaceImpl(HTML40Namespace.HTML40_URI, HTML40Namespace.HTML40_TAG_PREFIX);
- CHCMDocImpl chtmldoc = new CHCMDocImpl(CMDocType.CHTML_DOC_TYPE, cH40ns);
- return chtmldoc;
- }
-
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMNode.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMNode.java
deleted file mode 100644
index a3623ecc1f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMNode.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.wst.html.core.internal.contentmodel;
-
-
-/**
- * In HTML Documents, name and value of an attribute/element/entity
- * should be treated ignoring theirs case. However, in XML documents,
- * they should be distinguished with sensitiveness of their case.
- * CMNode is basically designed to represent DTDs or Schemas for XML
- * documents. So, it doesn't have interfaces to retrieve such information.
- * However, declarations in the HTML CM should provide such information.
- * This intermediate interface is intended to provide whether ignore cases
- * or not.<br>
- */
-interface HTMLCMNode extends org.eclipse.wst.xml.core.internal.contentmodel.CMNode {
-
- /**
- * Returns <code>true</code>, if declaration is for HTML attribute/element/entity.
- * Otherwise, returns <code>false</code>.
- * @return boolean
- */
- boolean shouldIgnoreCase();
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElemDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElemDeclImpl.java
deleted file mode 100644
index f0b1471a07..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElemDeclImpl.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-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.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Base class for all Hed???? classes.
- */
-abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDeclaration, HTMLPropertyDeclaration {
-
- // DTD
- protected CMNamedNodeMapImpl attributes = null;
- protected String typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_EMPTY;
- /** Never access this field directly. Instead, use getComplexTypeDefinition method. */
- private ComplexTypeDefinition typeDefinition = null;
- protected CMGroupImpl inclusion = null;
- protected CMGroupImpl exclusion = null;
- // advanced information
- protected CMNamedNodeMap prohibitedAncestors = null;
- protected int correctionType = CORRECT_NONE;
- protected int formatType = FORMAT_HTML;
- protected int layoutType = LAYOUT_NONE;
- protected int omitType = OMIT_NONE;
- protected boolean keepSpaces = false;
- protected boolean indentChild = false;
- protected ElementCollection elementCollection = null;
- protected AttributeCollection attributeCollection = null;
- protected final static CMNamedNodeMap EMPTY_MAP = new CMNamedNodeMap() {
- public int getLength() {
- return 0;
- }
-
- public CMNode getNamedItem(String name) {
- return null;
- }
-
- public CMNode item(int index) {
- return null;
- }
-
- public Iterator iterator() {
- return new Iterator() {
- public boolean hasNext() {
- return false;
- }
-
- public Object next() {
- return null;
- }
-
- public void remove() {
- }
- };
- }
- };
-
- /**
- * HTMLElemDeclImpl constructor.
- * In the HTML DTD, an element declaration has no specification
- * for its occurrence. Occurrence is specifed in content model, like
- * <code>(LI)+</code>. To avoid confusion (and complexity),
- * occurrence of an element declaration is always 1 (it means, min = 1 and
- * max = 1). Instead, occurrence of CMGroup represents actual occurrence
- * of the content.
- * <br>
- * @param name java.lang.String
- */
- public HTMLElemDeclImpl(String elementName, ElementCollection collection) {
- super(elementName, 1, 1);
- elementCollection = collection;
- attributeCollection = collection.getAttributeCollection();
- }
-
- /**
- */
- protected abstract void createAttributeDeclarations();
-
- private ComplexTypeDefinition createComplexTypeDefinition() {
- if (typeDefinitionName.equals(ComplexTypeDefinitionFactory.CTYPE_CDATA) || typeDefinitionName.equals(ComplexTypeDefinitionFactory.CTYPE_EMPTY) || typeDefinitionName.equals(ComplexTypeDefinitionFactory.CTYPE_PCDATA))
- return null;
-
- ComplexTypeDefinitionFactory factory = ComplexTypeDefinitionFactory.getInstance();
- if (factory == null)
- return null; // fatal error.
-
- ComplexTypeDefinition def = factory.createTypeDefinition(typeDefinitionName, elementCollection);
- return def;
- }
-
- /**
- * Get an attribute declaration.
- */
- public HTMLAttributeDeclaration getAttributeDeclaration(String attrName) {
- if (attributes == null) {
- createAttributeDeclarations();
- if (attributes == null)
- return null; // fail to create
- }
-
- CMNode cmnode = attributes.getNamedItem(attrName);
- if (cmnode == null) {
- return null;
- }
- else {
- return (HTMLAttributeDeclaration) cmnode; // already exists.
- }
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public CMNamedNodeMap getAttributes() {
- if (attributes == null)
- createAttributeDeclarations(); // lazy eval.
- return attributes;
- }
-
- /**
- * Get an instance of complex type definition.
- */
- private ComplexTypeDefinition getComplexTypeDefinition() {
- if (typeDefinition == null)
- typeDefinition = createComplexTypeDefinition();
- return typeDefinition;
- }
-
- /**
- * Content.<br>
- * Element declarations which type is EMPTY or CDATA (maybe PCDATA)
- * <strong>MUST</strong> override this method and always return null.
- * This default implementation always tries to create a complex type definition
- * instance and access to it.
- * <br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public CMContent getContent() {
- ComplexTypeDefinition def = getComplexTypeDefinition(); // lazy eval.
- return (def != null) ? def.getContent() : null;
- }
-
- /**
- * Content type.<br>
- * Element declarations which type is EMPTY or CDATA (maybe PCDATA)
- * <strong>MUST</strong> override this method and return an appropriate type.
- * This default implementation always tries to create a complex type definition
- * instance and access to it.
- * <br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public int getContentType() {
- ComplexTypeDefinition def = getComplexTypeDefinition(); // lazy eval.
- return (def != null) ? def.getContentType() : CMElementDeclaration.CDATA;
- }
-
- /**
- * @see HTMLElementDeclaration#getCorrectionType
- */
- public int getCorrectionType() {
- return correctionType;
- }
-
- /**
- * HTML element doesn't have any data type. So, this method always
- * returns <code>null</code>.<br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public CMDataType getDataType() {
- return null;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public String getElementName() {
- return getNodeName();
- }
-
- /**
- * Exclusion.
- * Almost elements don't have a exclusion.
- * Only classes those have exclusion should override this method.
- */
- public CMContent getExclusion() {
- return null;
- }
-
- /**
- * Default format type is <code>FORMAT_HTML</code>.<br>
- */
- public int getFormatType() {
- return formatType;
- }
-
- /**
- * Inclusion.
- * Almost elements don't have a inclusion.
- * Only classes those have inclusion should override this method.
- */
- public CMContent getInclusion() {
- return null;
- }
-
- /**
- */
- public int getLayoutType() {
- return layoutType;
- }
-
- /**
- * Line break hint is strongly related to layout type.
- * Indeed, in the C++DOM, it is determined from layout type only.
- * So, this implementation, as the default implementation for all declarations,
- * also determines from layout type only.<br>
- * @return int
- */
- public int getLineBreakHint() {
- switch (getLayoutType()) {
- case HTMLElementDeclaration.LAYOUT_BLOCK :
- return HTMLElementDeclaration.BREAK_BEFORE_START_AND_AFTER_END;
- case HTMLElementDeclaration.LAYOUT_BREAK :
- return HTMLElementDeclaration.BREAK_AFTER_START;
- case HTMLElementDeclaration.LAYOUT_HIDDEN :
- return HTMLElementDeclaration.BREAK_BEFORE_START_AND_AFTER_END;
- default :
- return HTMLElementDeclaration.BREAK_NONE;
- }
- }
-
- /**
- * No HTML element has local elements. So, this method always
- * returns an empty map.
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public CMNamedNodeMap getLocalElements() {
- return EMPTY_MAP;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public int getNodeType() {
- return CMNode.ELEMENT_DECLARATION;
- }
-
- /**
- */
- public int getOmitType() {
- return omitType;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- return EMPTY_MAP;
- }
-
- /**
- */
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE)) {
- return true;
- }
- else if (propertyName.equals(HTMLCMProperties.CONTENT_HINT)) {
- ComplexTypeDefinition def = getComplexTypeDefinition();
- return (def != null);
- }
- else {
- PropertyProvider pp = PropertyProviderFactory.getProvider(propertyName);
- if (pp == null)
- return false;
- return pp.supports(this);
- }
-
- }
-
- /**
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE)) {
- return new Boolean(true);
- }
- else if (propertyName.equals(HTMLCMProperties.CONTENT_HINT)) {
- ComplexTypeDefinition def = getComplexTypeDefinition();
- return (def != null) ? def.getPrimaryCandidate() : null;
- }
- else {
- PropertyProvider pp = PropertyProviderFactory.getProvider(propertyName);
- if (pp == null)
- return null;
- return pp.get(this);
- }
- }
-
- /**
- * Return element names which terminates this element.<br>
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return null;
- }
-
- /**
- * return true when the element is a JSP element.
- */
- public boolean isJSP() {
- return false;
- }
-
- /**
- * In some elements, such as APPLET, a source generator should indent child
- * elements that their parents. That is, a source generator should generate
- * source of APPLET and PARAMS like this:
- * <PRE>
- * &lt;APPLET ...&gt;
- * &lt;PARAM ... &gt;
- * &lt;PARAM ... &gt;
- * &lt;/APPLET&gt;
- * <PRE>
- * @return boolean
- */
- public boolean shouldIndentChildSource() {
- return indentChild;
- }
-
- /**
- * Most of elements can compact spaces in their child text nodes.
- * Some special elements should keep them in their source.
- * @return boolean
- */
- public boolean shouldKeepSpaces() {
- return keepSpaces;
- }
-
- /**
- * @return boolean
- */
- public boolean shouldTerminateAt(HTMLElementDeclaration nextElement) {
- Iterator i = getTerminators();
- if (i == null)
- return false;
- String nextName = nextElement.getElementName();
- while (i.hasNext()) {
- if (nextName.equals(i.next()))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElementDeclaration.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElementDeclaration.java
deleted file mode 100644
index 8dbf0c8411..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElementDeclaration.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-
-/**
- * This interface is intended to be a public interface which has
- * interfaces defined in both of {@link <code>CMElementDeclaration</code>}
- * and {@link <code>HTMLCMNode</code>}.<br>
- * In addition to this, some interfaces are added to this interface,
- * those are specially to HTML elements.<br>
- */
-public interface HTMLElementDeclaration extends CMElementDeclaration {
-
- /** Tag ommission; Not ommisible. */
- int OMIT_NONE = 0;
- /** Tag ommission; Both tags are ommisible. */
- int OMIT_BOTH = 1;
- /** Tag ommission; The end tag is ommisible. */
- int OMIT_END = 2;
- /** Tag ommission; The end tag is ommitted when created. */
- int OMIT_END_DEFAULT = 3;
- /** Tag ommission; The end tag must be omitted. */
- int OMIT_END_MUST = 4;
- /** Line Break; No break. */
- int BREAK_NONE = 10;
- /** Line Break; Break after the start tag. */
- int BREAK_AFTER_START = 11;
- /** Line Break; Break both before the start tagn and after the end tag. */
- int BREAK_BEFORE_START_AND_AFTER_END = 12;
- /* Layout */
- /** initial value; the value should never returns to client programs. */
- int LAYOUT_NONE = 100;
- int LAYOUT_BLOCK = 101;
- int LAYOUT_WRAP = 102;
- /** No wrap object; like IMG, APPLET,... */
- int LAYOUT_OBJECT = 103;
- /** BR */
- int LAYOUT_BREAK = 104;
- /** Hidden object; like HTML or HEAD */
- int LAYOUT_HIDDEN = 105;
- /* Correction */
- /** Correct; No correct. */
- int CORRECT_NONE = 1000;
- /** Correct; Meaningless when the content is empty. */
- int CORRECT_EMPTY = 1001;
- /** Correct; Meaningless when no attribut is set. */
- int CORRECT_NEUTRAL = 1002;
- /** Correct; Meaningless when same element is nested. */
- int CORRECT_DUPLICATED = 1003;
- /** Format; HTML */
- int FORMAT_HTML = 10000;
- /** Format; SSI */
- int FORMAT_SSI = 10001;
- /** Format; JSP script */
- int FORMAT_JSP_SCRIPT = 10002;
- /** Format; JSP directive */
- int FORMAT_JSP_DIRECTIVE = 10003;
- /** Format; XML */
- int FORMAT_XML = 10004;
- /** Format; MW */
- int FORMAT_MW = 10005;
-
- /**
- * A short hand method to get an attribute declaration of a HTML element.
- * @param attrName java.lang.String
- */
- HTMLAttributeDeclaration getAttributeDeclaration(String attrName);
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclImpl.java
deleted file mode 100644
index d43db28d45..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-
-
-/**
- */
-class HTMLEntityDeclImpl extends CMNodeImpl implements HTMLEntityDeclaration {
-
- private java.lang.String value = null;
-
- /**
- * CMEntityDeclImpl constructor comment.
- * @param entityName java.lang.String; Entity name.
- * @param entityValue java.lang.String; Value string.
- */
- public HTMLEntityDeclImpl(String entityName, String entityValue) {
- super(entityName);
- value = entityValue;
- }
-
- /**
- * getName method
- * @return java.lang.String
- */
- public String getName() {
- return getNodeName();
- }
-
- /**
- * Get CMNode type.<br>
- * @return int; Always return ENTITY_DECLARATION.
- */
- public int getNodeType() {
- return CMNode.ENTITY_DECLARATION;
- }
-
- /**
- * getValue method
- * @return java.lang.String
- */
- public String getValue() {
- return value;
- }
-
- /**
- */
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return true;
- return super.supports(propertyName);
- }
-
- /**
- * Entities in HTML documents are always treated with ignoring cases.
- * Because no special entities are defined in JSP 1.0, this method
- * can always return <code>true</code>.<br>
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return new Boolean(true);
- return super.getProperty(propertyName);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclaration.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclaration.java
deleted file mode 100644
index 1f7b2d341a..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclaration.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.wst.html.core.internal.contentmodel;
-
-
-
-/**
- * This interface is intended to be a public interface which has
- * interfaces defined in both of {@link <code>CMEntityDeclaration</code>}
- * and {@link <code>HTMLCMNode</code>}.<br>
- */
-public interface HTMLEntityDeclaration extends org.eclipse.wst.xml.core.internal.contentmodel.CMEntityDeclaration {
-
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLPropertyDeclaration.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLPropertyDeclaration.java
deleted file mode 100644
index 448bfb3747..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLPropertyDeclaration.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.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * This interface is commonly used in declaration implementation, and internal use.
- * Use getProperty() method for public use.
- */
-public interface HTMLPropertyDeclaration {
- /**
- * To determin the type, look up the following keywords in C++DOM/DTDParser.cpp:
- * <ul>
- * <li>CORRECT_DUPLICATED - <code>GROUP_NODUP</code></li>
- * <li>CORRECT_EMPTY - <code>GROUP_COMPACT</code></li>
- * <li>CORRECT_NEUTRAL - <code>GROUP_NEUTRAL</code></li>
- * <li>CORRECT_NONE - <code>(N/A)</code></li>
- * </ul>
- * @return int
- */
- int getCorrectionType();
- /**
- * Get the list of declarations those should be excluded from the content.<br>
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- CMContent getExclusion();
- /**
- * To determin the type, see the following files in the C++DOM:
- * ElementType.cpp - ElementType#setGroup().
- * Element.cpp - Element#getStartTag().
- * @return int
- */
- int getFormatType();
- /**
- * Get the list of declarations those should be included into the content.<br>
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- CMContent getInclusion();
- /**
- * To determin the type, look up the following keywords in C++DOM/DTDParser.cpp:
- * <ul>
- * <li>LAYOUT_BLOCK - <code>GROUP_BLOCK</code></li>
- * <li>LAYOUT_BREAK - <code>GROUP_BREAK</code></li>
- * <li>LAYOUT_HIDDEN - <code>GROUP_HIDDEN</code></li>
- * <li>LAYOUT_NONE - <code>(N/A)</code></li>
- * <li>LAYOUT_OBJECT - <code>GROUP_NOWRAP</code></li>
- * <li>LAYOUT_WRAP - <code>(N/A)</code></li>
- * </ul>
- * @return int
- */
- int getLayoutType();
- /**
- * To determine the type, see <code>Element::isBreakingBeforeElement()</code>
- * and <code>Element::isBreakingAfterElement()</code> defined in C++DOM/Element.cpp.<br>
- * @return int
- */
- int getLineBreakHint();
- /**
- * To determine the type, Check the HTML DTD.
- * And look up <code>GROUP_NOEND</code> in C++DOM/DTDParser.cpp.<br>
- * @return int
- */
- int getOmitType();
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap
- */
- CMNamedNodeMap getProhibitedAncestors();
- /**
- * return true when the element is a JSP element.
- */
- boolean isJSP();
- /**
- * @return boolean
- */
- boolean shouldIndentChildSource();
- /**
- * Some elements should keep spaces in its child text nodes.
- * For example, PRE and TEXTAREA. This method returns true,
- * if a target element is one of such elements.
- * @return boolean
- */
- boolean shouldKeepSpaces();
- /**
- * Returns <code>true</code>, if <code>nextElement</code> terminates
- * the current element.
- * Some elements like <code>P</code> terminates other <code>P</code>.
- * That is, when <code>&lt;P&gt;</code> appears at the next to <code>P</code>,
- * which end tags is omitted, it represents not only the beginning of the
- * new <code>P</code> element but also the end of the previous <code>P</code>.
- */
- boolean shouldTerminateAt(HTMLElementDeclaration nextElement);
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedA.java
deleted file mode 100644
index 92eb28e7c2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedA.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-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;
-
-/**
- * A.
- */
-final class HedA extends HedInlineContainer {
-
- /**
- */
- public HedA(ElementCollection collection) {
- super(HTML40Namespace.ElementName.A, collection);
- // CORRECT_EMPTY - GROUP_COMPACT
- correctionType = CORRECT_EMPTY;
- }
-
- /**
- * %attrs;
- * (charset %Charset; #IMPLIED)
- * (type %ContentType; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (href %URI; #IMPLIED)
- * (hreflang %LanguageCode; #IMPLIED)
- * (target %FrameTarget; #IMPLIED)
- * (rel %LinkTypes; #IMPLIED)
- * (rev %LinkTypes; #IMPLIED)
- * (accesskey %Character; #IMPLIED)
- * (directkey %Character; #IMPLIED)
- * (shape %Shape; rect)
- * (coords %Coords; #IMPLIED)
- * (tabindex NUMBER #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_CHARSET, HTML40Namespace.ATTR_NAME_TYPE, HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_HREF, HTML40Namespace.ATTR_NAME_HREFLANG, HTML40Namespace.ATTR_NAME_TARGET, HTML40Namespace.ATTR_NAME_REL, HTML40Namespace.ATTR_NAME_REV, HTML40Namespace.ATTR_NAME_ACCESSKEY, HTML40Namespace.ATTR_NAME_DIRECTKEY, HTML40Namespace.ATTR_NAME_SHAPE, HTML40Namespace.ATTR_NAME_COORDS, HTML40Namespace.ATTR_NAME_TABINDEX, HTML40Namespace.ATTR_NAME_ONFOCUS, HTML40Namespace.ATTR_NAME_ONBLUR};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * Exclusion.
- * <code>A</code> has the exclusion.
- * It is <code>A</code> itself.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null;
-
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- CMNode a = elementCollection.getNamedItem(HTML40Namespace.ElementName.A);
- if (a != null)
- exclusion.appendChild(a);
-
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.A, HTML40Namespace.ElementName.BUTTON};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedADDRESS.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedADDRESS.java
deleted file mode 100644
index b4913f46e9..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedADDRESS.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * ADDRESS.
- */
-final class HedADDRESS extends HTMLElemDeclImpl {
-
- /**
- */
- public HedADDRESS(ElementCollection collection) {
- super(HTML40Namespace.ElementName.ADDRESS, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_ADDRESS;
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAPPLET.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAPPLET.java
deleted file mode 100644
index 9a546f7f88..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAPPLET.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * APPLET.
- */
-final class HedAPPLET extends HTMLElemDeclImpl {
-
- /**
- */
- public HedAPPLET(ElementCollection collection) {
- super(HTML40Namespace.ElementName.APPLET, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_PARAM_CONTAINER;
- layoutType = LAYOUT_OBJECT;
- indentChild = true;
- }
-
- /**
- * %coreattrs;
- * (codebase %URI; #IMPLIED)
- * (archive CDATA #IMPLIED)
- * (code CDATA #IMPLIED)
- * (object CDATA #IMPLIED)
- * (alt %Text; #IMPLIED) ... should be defined locally.
- * (name CDATA #IMPLIED)
- * (width %Length; #REQUIRED)
- * (height %Length; #REQUIRED)
- * (align %IAlign; #IMPLIED)
- * (hspace %Pixels; #IMPLIED)
- * (vspace %Pixels; #IMPLIED)
- * (mayscript (mayscript) #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_CODEBASE, HTML40Namespace.ATTR_NAME_ARCHIVE, HTML40Namespace.ATTR_NAME_CODE, HTML40Namespace.ATTR_NAME_OBJECT, HTML40Namespace.ATTR_NAME_ALT, HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_WIDTH, HTML40Namespace.ATTR_NAME_HEIGHT, HTML40Namespace.ATTR_NAME_HSPACE, HTML40Namespace.ATTR_NAME_VSPACE, HTML40Namespace.ATTR_NAME_MAYSCRIPT};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // %align; ... should be defined locally.
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForImage();
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAREA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAREA.java
deleted file mode 100644
index 3afad0630b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAREA.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * AREA.
- */
-final class HedAREA extends HedEmpty {
-
- /**
- */
- public HedAREA(ElementCollection collection) {
- super(HTML40Namespace.ElementName.AREA, collection);
- // LAYOUT_HIDDEN.
- // Because, AREA is GROUP_HIDDEN in the C++DOM/DTDParser.cpp.
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * AREA.
- * %attrs;
- * (shape %Shape; rect)
- * (coords %Coords; #IMPLIED)
- * (href %URI; #IMPLIED)
- * (target %FrameTarget; #IMPLIED)
- * (nohref (nohref) #IMPLIED)
- * (alt %Text; #REQUIRED)
- * (tabindex NUMBER #IMPLIED)
- * (accesskey %Character; #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_SHAPE, HTML40Namespace.ATTR_NAME_COORDS, HTML40Namespace.ATTR_NAME_HREF, HTML40Namespace.ATTR_NAME_TARGET, HTML40Namespace.ATTR_NAME_NOHREF, HTML40Namespace.ATTR_NAME_ALT, HTML40Namespace.ATTR_NAME_TABINDEX, HTML40Namespace.ATTR_NAME_ACCESSKEY, HTML40Namespace.ATTR_NAME_ONFOCUS, HTML40Namespace.ATTR_NAME_ONBLUR};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASE.java
deleted file mode 100644
index e528814937..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASE.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * BASE.
- */
-final class HedBASE extends HedEmpty {
-
- /**
- */
- public HedBASE(ElementCollection collection) {
- super(HTML40Namespace.ElementName.BASE, collection);
- // LAYOUT_HIDDEN.
- // Because, BASE is GROUP_HIDDEN in the C++DOM/DTDParser.cpp.
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * BASE.
- * (href %URI; #IMPLIED)
- * (target %FrameTarget; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_HREF, HTML40Namespace.ATTR_NAME_TARGET};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASEFONT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASEFONT.java
deleted file mode 100644
index 2c9109b273..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASEFONT.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * BASEFONT.
- */
-final class HedBASEFONT extends HedEmpty {
-
- /**
- */
- public HedBASEFONT(ElementCollection collection) {
- super(HTML40Namespace.ElementName.BASEFONT, collection);
- // LAYOUT_OBJECT - GROUP_NOWRAP.
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * BASEFONT.
- * (id ID #IMPLIED)
- * (size CDATA #REQUIRED) ... should be localy defined.
- * (color %Color; #IMPLIED)
- * (face CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_ID, HTML40Namespace.ATTR_NAME_COLOR, HTML40Namespace.ATTR_NAME_FACE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (size CDATA #REQUIRED) ... should be localy defined.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_SIZE, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_SIZE, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBDO.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBDO.java
deleted file mode 100644
index bcee51fe2d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBDO.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * BDO.
- */
-final class HedBDO extends HedInlineContainer {
-
- /**
- */
- public HedBDO(ElementCollection collection) {
- super(HTML40Namespace.ElementName.BDO, collection);
- // CORRECT_EMPTY - GROUP_COMPACT
- correctionType = CORRECT_EMPTY;
- }
-
- /**
- * %coreattrs;
- * (lang %LanguageCode; #IMPLIED)
- * (dir (ltr|rtl) #REQUIRED) ... should be defined locally.
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_LANG};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (dir (ltr|rtl) #REQUIRED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {HTML40Namespace.ATTR_VALUE_LTR, HTML40Namespace.ATTR_VALUE_RTL};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_DIR, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_DIR, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBGSOUND.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBGSOUND.java
deleted file mode 100644
index 3e731d8006..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBGSOUND.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.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-
-
-final class HedBGSOUND extends HedEmpty {
-
- public HedBGSOUND(ElementCollection collection) {
- super(HTML40Namespace.ElementName.BGSOUND, collection);
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * (src, CDATA, #IMPLIED)
- * (loop, CDATA, #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return;
- if (attributeCollection == null)
- return; // fatal
- attributes = new CMNamedNodeMapImpl();
- // src
- HTMLAttributeDeclaration attr = attributeCollection.getDeclaration(HTML40Namespace.ATTR_NAME_SRC);
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_SRC, attr);
- // loop
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, HTML40Namespace.ATTR_VALUE_INFINITE);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_LOOP, atype, CMAttributeDeclaration.OPTIONAL);
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_LOOP, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBLOCKQUOTE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBLOCKQUOTE.java
deleted file mode 100644
index d1cb608da1..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBLOCKQUOTE.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * BLOCKQUOTE.
- */
-final class HedBLOCKQUOTE extends HedFlowContainer {
-
- /**
- */
- public HedBLOCKQUOTE(ElementCollection collection) {
- super(HTML40Namespace.ElementName.BLOCKQUOTE, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- * (cite %URI; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_CITE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBODY.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBODY.java
deleted file mode 100644
index 3324a9ab6e..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBODY.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-
-/**
- * BODY.
- */
-final class HedBODY extends HedFlowContainer {
-
- private static String[] terminators = {HTML40Namespace.ElementName.HEAD, HTML40Namespace.ElementName.BODY, HTML40Namespace.ElementName.FRAMESET, HTML40Namespace.ElementName.HTML};
-
- /**
- */
- public HedBODY(ElementCollection collection) {
- super(HTML40Namespace.ElementName.BODY, collection);
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_BOTH;
- }
-
- /**
- * %attrs;
- * %bodycolors;
- * (onload %Script; #IMPLIED)
- * (onunload %Script; #IMPLIED)
- * (background %URI; #IMPLIED)
- * (marginwidth %Pixels; #IMPLIED) ... D205514
- * (marginheight %Pixels; #IMPLIED) .. D205514
- * (topmargin, CDATA, #IMPLIED) ...... D205514
- * (bottommargin, CDATA, #IMPLIED) ... D205514
- * (leftmargin, CDATA, #IMPLIED) ..... D205514
- * (rightmargin, CDATA, #IMPLIED) .... D205514
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %bodycolors;
- attributeCollection.getBodycolors(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_ONLOAD, HTML40Namespace.ATTR_NAME_ONUNLOAD, HTML40Namespace.ATTR_NAME_BACKGROUND,
- // <<D205514
- HTML40Namespace.ATTR_NAME_MARGINWIDTH, HTML40Namespace.ATTR_NAME_MARGINHEIGHT, HTML40Namespace.ATTR_NAME_TOPMARGIN, HTML40Namespace.ATTR_NAME_BOTTOMMARGIN, HTML40Namespace.ATTR_NAME_LEFTMARGIN, HTML40Namespace.ATTR_NAME_RIGHTMARGIN
- // D205514
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * Inclusion.
- * "Lazy eval."<br>
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- public CMContent getInclusion() {
- if (inclusion != null)
- return inclusion; // already created.
- if (elementCollection == null)
- return null;
-
- // (INS|DEL)
- inclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- String[] names = {HTML40Namespace.ElementName.INS, HTML40Namespace.ElementName.DEL};
- elementCollection.getDeclarations(inclusion, Arrays.asList(names).iterator());
- return inclusion;
- }
-
- /**
- * BODY has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBR.java
deleted file mode 100644
index 45fa6ce8ca..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBR.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.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-
-/**
- * BR.
- */
-final class HedBR extends HedEmpty {
-
- /**
- */
- public HedBR(ElementCollection collection) {
- super(HTML40Namespace.ElementName.BR, collection);
- // LAYOUT_BREAK.
- // Because, BR is GROUP_BREAK in the C++DOM/DTDParser.cpp.
- layoutType = LAYOUT_BREAK;
- }
-
- /**
- * BR.
- * %coreattrs;
- * (clear (left | all | right | none) none)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
- // clear
- HTMLAttributeDeclaration attr = attributeCollection.getDeclaration(HTML40Namespace.ATTR_NAME_CLEAR);
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_CLEAR, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBUTTON.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBUTTON.java
deleted file mode 100644
index 975498047e..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBUTTON.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * BUTTON.
- */
-final class HedBUTTON extends HedFlowContainer {
-
- /**
- */
- public HedBUTTON(ElementCollection collection) {
- super(HTML40Namespace.ElementName.BUTTON, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- * %reserved; ... empty.
- * (name CDATA #IMPLIED)
- * (value CDATA #IMPLIED)
- * (type (button|submit|reset) submit) ... should be defined locally.
- * (disabled (disabled) #IMPLIED)
- * (tabindex NUMBER #IMPLIED)
- * (accesskey %Character; #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_VALUE, HTML40Namespace.ATTR_NAME_DISABLED, HTML40Namespace.ATTR_NAME_TABINDEX, HTML40Namespace.ATTR_NAME_ACCESSKEY, HTML40Namespace.ATTR_NAME_ONFOCUS, HTML40Namespace.ATTR_NAME_ONBLUR};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (type (button|submit|reset) submit) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {HTML40Namespace.ATTR_VALUE_BUTTON, HTML40Namespace.ATTR_VALUE_SUBMIT, HTML40Namespace.ATTR_VALUE_RESET};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
- }
-
- /**
- * Exclusion.
- * <code>FORM</code> has the exclusion.
- * It is <code>FORM</code> itself.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null; // fatal
-
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- String[] names = {HTML40Namespace.ElementName.A, HTML40Namespace.ElementName.FORM, HTML40Namespace.ElementName.ISINDEX, HTML40Namespace.ElementName.FIELDSET, HTML40Namespace.ElementName.IFRAME};
- elementCollection.getDeclarations(exclusion, Arrays.asList(names).iterator());
- elementCollection.getFormctrl(exclusion);
-
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCAPTION.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCAPTION.java
deleted file mode 100644
index 82b07dcac1..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCAPTION.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-
-/**
- * CAPTION.
- */
-final class HedCAPTION extends HedInlineContainer {
-
- /**
- */
- public HedCAPTION(ElementCollection collection) {
- super(HTML40Namespace.ElementName.CAPTION, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- * (align %CAlign; #IMPLIED) ... should be defined locally.
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForCaption();
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCENTER.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCENTER.java
deleted file mode 100644
index 9d5184f89f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCENTER.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * CENTER.
- */
-final class HedCENTER extends HedFlowContainer {
-
- /**
- */
- public HedCENTER(ElementCollection collection) {
- super(HTML40Namespace.ElementName.CENTER, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOL.java
deleted file mode 100644
index 14f322668a..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOL.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-
-/**
- * COL.
- */
-final class HedCOL extends HedEmpty {
-
- /**
- */
- public HedCOL(ElementCollection collection) {
- super(HTML40Namespace.ElementName.COL, collection);
- // LAYOUT_BLOCK.
- // Because, COL is GROUP_BLOCK in the C++DOM/DTDParser.cpp.
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * COL.
- * %attrs;
- * (span NUMBER 1)
- * (width %MultiLength; #IMPLIED) ... should be defined locally.
- * %cellhalign;
- * %cellvalign;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (span NUMBER 1)
- String[] names = {HTML40Namespace.ATTR_NAME_SPAN};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (width %MultiLength; #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.MULTI_LENGTH);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_WIDTH, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_WIDTH, attr);
-
- // %cellhalign;
- attributeCollection.getCellhalign(attributes);
- // %cellvalign;
- attributeCollection.getCellvalign(attributes);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOLGROUP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOLGROUP.java
deleted file mode 100644
index bd2e74ffa5..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOLGROUP.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-
-/**
- * COLGROUP.
- */
-final class HedCOLGROUP extends HTMLElemDeclImpl {
-
- private static String[] terminators = {HTML40Namespace.ElementName.COLGROUP, HTML40Namespace.ElementName.CAPTION, HTML40Namespace.ElementName.THEAD, HTML40Namespace.ElementName.TBODY, HTML40Namespace.ElementName.TFOOT, HTML40Namespace.ElementName.TR};
-
- public HedCOLGROUP(ElementCollection collection) {
- super(HTML40Namespace.ElementName.COLGROUP, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_COLUMN_GROUP;
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END;
- indentChild = true;
- }
-
- /**
- * %attrs;
- * (span NUMBER 1)
- * (width %MultiLength; #IMPLIED) ... should be defined locally.
- * %cellhalign;
- * %cellvalign;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %cellhalign;
- attributeCollection.getCellhalign(attributes);
- // %cellvalign;
- attributeCollection.getCellvalign(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_SPAN};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (width %MultiLength; #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.MULTI_LENGTH);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_WIDTH, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_WIDTH, attr);
- }
-
- /**
- * LI has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDD.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDD.java
deleted file mode 100644
index 6004f847e3..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDD.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * DD.
- */
-final class HedDD extends HedFlowContainer {
-
- private static String[] terminators = {HTML40Namespace.ElementName.DT, HTML40Namespace.ElementName.DD};
-
- /**
- */
- public HedDD(ElementCollection collection) {
- super(HTML40Namespace.ElementName.DD, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END_DEFAULT;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- * DD has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDIV.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDIV.java
deleted file mode 100644
index b2cd2bcdc8..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDIV.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * DIV.
- */
-final class HedDIV extends HedFlowContainer {
-
- /**
- */
- public HedDIV(ElementCollection collection) {
- super(HTML40Namespace.ElementName.DIV, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- * %align;
- * %reserved;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %align;
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForParagraph();
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
- // %reserved; ... empty
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDL.java
deleted file mode 100644
index a45f2f89bb..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDL.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * DL.
- */
-final class HedDL extends HTMLElemDeclImpl {
-
- /**
- */
- public HedDL(ElementCollection collection) {
- super(HTML40Namespace.ElementName.DL, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_DEFINITION_LIST;
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- indentChild = true;
- }
-
- /**
- * %arrays;
- * (compact (compact) #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_COMPACT};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDT.java
deleted file mode 100644
index c4797fbc92..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDT.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * DT.
- */
-final class HedDT extends HedInlineContainer {
-
- private static String[] terminators = {HTML40Namespace.ElementName.DT, HTML40Namespace.ElementName.DD};
-
- /**
- */
- public HedDT(ElementCollection collection) {
- super(HTML40Namespace.ElementName.DT, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END_DEFAULT;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- * DT has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEMBED.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEMBED.java
deleted file mode 100644
index c1e301d6d5..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEMBED.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * EMBED.
- */
-final class HedEMBED extends HTMLElemDeclImpl {
-
- /**
- */
- public HedEMBED(ElementCollection collection) {
- super(HTML40Namespace.ElementName.EMBED, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_EMBED;
- layoutType = LAYOUT_OBJECT;
- omitType = OMIT_END_DEFAULT;
- }
-
- /**
- * %coreattrs;
- * %events;
- * (src %URI; #REQUIRED) ... should be defined locally.
- * (height %Length; #IMPLIED)
- * (width %Length; #IMPLIED)
- * (align %IAlign; #IMPLIED) ... should be defined locally.
- * (hspace %Pixels; #IMPLIED)
- * (vspace %Pixels; #IMPLIED)
- * (loop CDATA #IMPLIED)
- * (hidden CDATA #IMPLIED)
- * (volume CDATA #IMPLIED)
- * (autostart (true|false) #IMPLIED)
- * (autoplay (true|false) #IMPLIED)
- * (autosize (true|false) #IMPLIED)
- * (controller (true|false) true)
- * (scale CDATA #IMPLIED)
- * (showcontrols (true|false) #IMPLIED)
- * (playcount NUMBER #IMPLIED)
- * (repeat CDATA #IMPLIED)
- * (panel CDATA #IMPLIED)
- * (text CDATA #IMPLIED)
- * (palette CDATA #IMPLIED)
- * (textfocus CDATA #IMPLIED)
- * (type CDATA #IMPLIED) ... should be defined locally.
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
- // %events;
- attributeCollection.getEvents(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_HEIGHT, HTML40Namespace.ATTR_NAME_WIDTH, HTML40Namespace.ATTR_NAME_HSPACE, HTML40Namespace.ATTR_NAME_VSPACE, HTML40Namespace.ATTR_NAME_LOOP, HTML40Namespace.ATTR_NAME_HIDDEN, HTML40Namespace.ATTR_NAME_VOLUME, HTML40Namespace.ATTR_NAME_AUTOSTART, HTML40Namespace.ATTR_NAME_AUTOPLAY, HTML40Namespace.ATTR_NAME_AUTOSIZE, HTML40Namespace.ATTR_NAME_CONTROLLER, HTML40Namespace.ATTR_NAME_SCALE, HTML40Namespace.ATTR_NAME_SHOWCONTROLS, HTML40Namespace.ATTR_NAME_PLAYCOUNT, HTML40Namespace.ATTR_NAME_REPEAT, HTML40Namespace.ATTR_NAME_PANEL, HTML40Namespace.ATTR_NAME_TEXT, HTML40Namespace.ATTR_NAME_PALETTE, HTML40Namespace.ATTR_NAME_TEXTFOCUS};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- HTMLCMDataTypeImpl atype = null;
- HTMLAttrDeclImpl attr = null;
- // (src %URI; #REQUIRED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_SRC, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_SRC, attr);
-
- // (align %IAlign; #IMPLIED) ... should be defined locally.
- attr = AttributeCollection.createAlignForImage();
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
-
- // (type CDATA #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEmpty.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEmpty.java
deleted file mode 100644
index 4a24b8061b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEmpty.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-
-/**
- * Base class for EMPTY type element declarations.
- */
-abstract class HedEmpty extends HTMLElemDeclImpl {
-
- /**
- */
- public HedEmpty(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_EMPTY;
- // EMPTY type has no end tag.
- omitType = OMIT_END_MUST;
- }
-
- /**
- * Content.<br>
- * EMPTY type always returns <code>null</code>.
- * <br>
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- public CMContent getContent() {
- return null;
- }
-
- /**
- * Content type.<br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public int getContentType() {
- return CMElementDeclaration.EMPTY;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFIELDSET.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFIELDSET.java
deleted file mode 100644
index f47fbcb0ab..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFIELDSET.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * FIELDSET.
- */
-final class HedFIELDSET extends HTMLElemDeclImpl {
-
- /**
- */
- public HedFIELDSET(ElementCollection collection) {
- super(HTML40Namespace.ElementName.FIELDSET, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_FIELDSET;
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON, HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFONT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFONT.java
deleted file mode 100644
index 61dd455408..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFONT.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * FONT.
- */
-final class HedFONT extends HedInlineContainer {
-
- /**
- */
- public HedFONT(ElementCollection collection) {
- super(HTML40Namespace.ElementName.FONT, collection);
- // CORRECT_EMPTY - GROUP_COMPACT
- correctionType = CORRECT_EMPTY;
- }
-
- /**
- * %coreattrs;
- * %i18n;
- * (size CDATA #IMPLIED) ... should be defined locally.
- * (color %Color; #IMPLIED)
- * (face CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
- // %i18n;
- attributeCollection.getI18n(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_COLOR, HTML40Namespace.ATTR_NAME_FACE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (size CDATA #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_SIZE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_SIZE, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFORM.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFORM.java
deleted file mode 100644
index 9986faa0a2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFORM.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-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;
-
-/**
- * FORM.
- */
-final class HedFORM extends HedFlowContainer {
-
- /**
- */
- public HedFORM(ElementCollection collection) {
- super(HTML40Namespace.ElementName.FORM, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- * (action %URI; #REQUIRED)
- * (method (GET|POST) GET)
- * (enctype %ContentType; "application/x-www-form-urlencoded")
- * (accept %ContentTypes; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (onsubmit %Script; #IMPLIED)
- * (onreset %Script; #IMPLIED)
- * (target %FrameTarget; #IMPLIED)
- * (accept-charset %Charsets; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_ACTION, HTML40Namespace.ATTR_NAME_METHOD, HTML40Namespace.ATTR_NAME_ENCTYPE, HTML40Namespace.ATTR_NAME_ACCEPT, HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_ONSUBMIT, HTML40Namespace.ATTR_NAME_ONRESET, HTML40Namespace.ATTR_NAME_TARGET, HTML40Namespace.ATTR_NAME_ACCEPT_CHARSET};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * Exclusion.
- * <code>FORM</code> has the exclusion.
- * It is <code>FORM</code> itself.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null; // fatal
-
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- CMNode form = elementCollection.getNamedItem(HTML40Namespace.ElementName.FORM);
- if (form != null)
- exclusion.appendChild(form);
-
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON, HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.FORM, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAME.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAME.java
deleted file mode 100644
index 768fe2466f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAME.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * FRAME.
- */
-final class HedFRAME extends HedEmpty {
-
- /**
- */
- public HedFRAME(ElementCollection collection) {
- super(HTML40Namespace.ElementName.FRAME, collection);
- // LAYOUT_HIDDEN.
- // Because, FRAME is GROUP_HIDDEN in the C++DOM/DTDParser.cpp.
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * FRAME.
- * %coreattrs;
- * (longdesc %URI; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (src %URI; #IMPLIED)
- * (frameborder (1|0) 1)
- * (marginwidth %Pixels; #IMPLIED)
- * (marginheight %Pixels; #IMPLIED)
- * (noresize (noresize) #IMPLIED)
- * (scrolling (yes|no|auto) auto)
- * (bordercolor %Color #IMPLIED) ... D205514
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_LONGDESC, HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_SRC, HTML40Namespace.ATTR_NAME_FRAMEBORDER, HTML40Namespace.ATTR_NAME_MARGINWIDTH, HTML40Namespace.ATTR_NAME_MARGINHEIGHT, HTML40Namespace.ATTR_NAME_NORESIZE, HTML40Namespace.ATTR_NAME_SCROLLING, HTML40Namespace.ATTR_NAME_BORDERCOLOR // D20554
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAMESET.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAMESET.java
deleted file mode 100644
index 66000dcdbd..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAMESET.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * FRAMESET.
- */
-final class HedFRAMESET extends HTMLElemDeclImpl {
-
- /**
- */
- public HedFRAMESET(ElementCollection collection) {
- super(HTML40Namespace.ElementName.FRAMESET, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_FRAMESET;
- layoutType = LAYOUT_HIDDEN;
- indentChild = true;
- }
-
- /**
- * %coreattrs;
- * (rows %MultiLengths; #IMPLIED) ... should be defined locally.
- * (cols %MultiLengths; #IMPLIED) ... should be defined locally.
- * (onload %Script; #IMPLIED)
- * (onunload %Script; #IMPLIED)
- * (frameborder (yes|no) #IMPLIED) ... should be defined locally.
- * (border %Pixels; #IMPLIED)
- * (bordercolor %Color #IMPLIED) ... D205514
- * (framespacing CDATA #IMPLIED) ... D215684
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getCore(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_ONLOAD, HTML40Namespace.ATTR_NAME_ONUNLOAD, HTML40Namespace.ATTR_NAME_BORDER, HTML40Namespace.ATTR_NAME_BORDERCOLOR, // D205514
- HTML40Namespace.ATTR_NAME_FRAMESPACING // D215684
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- HTMLCMDataTypeImpl atype = null;
- HTMLAttrDeclImpl attr = null;
- // (rows %MultiLengths; #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.MULTI_LENGTH);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_ROWS, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ROWS, attr);
-
- // (cols %MultiLengths; #IMPLIED) ... should be defined locally.
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_COLS, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_COLS, attr);
-
- // (frameborder (yes|no) #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {HTML40Namespace.ATTR_VALUE_YES, HTML40Namespace.ATTR_VALUE_NO};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_FRAMEBORDER, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_FRAMEBORDER, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFlowContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFlowContainer.java
deleted file mode 100644
index bf211b2fad..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFlowContainer.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.wst.html.core.internal.contentmodel;
-
-
-
-/**
- * Base class for (%flow;)* containers.
- */
-abstract class HedFlowContainer extends HTMLElemDeclImpl {
-
- /**
- */
- public HedFlowContainer(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_FLOW_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFontStyle.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFontStyle.java
deleted file mode 100644
index d86b1424fd..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFontStyle.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * %fontstyle;
- */
-final class HedFontStyle extends HedInlineContainer {
-
- /**
- */
- public HedFontStyle(String elementName, ElementCollection collection) {
- super(elementName, collection);
- if (elementName.equalsIgnoreCase(HTML40Namespace.ElementName.BIG) || elementName.equalsIgnoreCase(HTML40Namespace.ElementName.SMALL)) {
- correctionType = CORRECT_EMPTY;
- }
- else { // B, I, U, ...
- correctionType = CORRECT_DUPLICATED;
- }
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- String myName = getElementName();
- if (!myName.equalsIgnoreCase(HTML40Namespace.ElementName.BIG) && !myName.equalsIgnoreCase(HTML40Namespace.ElementName.SMALL))
- return EMPTY_MAP;
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.PRE};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHEAD.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHEAD.java
deleted file mode 100644
index 691a061621..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHEAD.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * HTML.
- */
-final class HedHEAD extends HTMLElemDeclImpl {
-
- private static String[] terminators = {HTML40Namespace.ElementName.HEAD, HTML40Namespace.ElementName.BODY, HTML40Namespace.ElementName.FRAMESET, HTML40Namespace.ElementName.HTML};
-
- /**
- */
- public HedHEAD(ElementCollection collection) {
- super(HTML40Namespace.ElementName.HEAD, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_HEAD;
- layoutType = LAYOUT_HIDDEN;
- omitType = OMIT_BOTH;
- }
-
- /**
- * Create all attribute declarations.
- * This method is called once in the constructor of the super class.
- * The <code>HEAD</code> element may have the following attributes:
- * <table>
- * <tbody>
- * <tr>
- * <th>NAME</th><th>TYPE</th><th>USAGE</th><th>DEFAULT (INITIAL) VALUE</th><th>MEMO</th>
- * </tr>
- * <tr>
- * <td>%i18n;</td><td>-</td><td>-</td><td>-</td><td>-</td>
- * </tr>
- * <tr>
- * <td>profile</td><td>URI</td><td>#IMPLIED</td><td>N/A</td><td>-</td>
- * </tr>
- * </tbody>
- * </table>
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %i18n;
- attributeCollection.getI18n(attributes);
- // profile
- HTMLAttributeDeclaration adec = attributeCollection.getDeclaration(HTML40Namespace.ATTR_NAME_PROFILE);
- if (adec != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_PROFILE, adec);
- }
-
- /**
- * HEAD has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHR.java
deleted file mode 100644
index 868b5c729a..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHR.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * HR.
- */
-final class HedHR extends HedEmpty {
-
- /**
- */
- public HedHR(ElementCollection collection) {
- super(HTML40Namespace.ElementName.HR, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs
- * (align (left|center|right) #IMPLIED) ... should be defined locally.
- * (noshade (noshade) #IMPLIED)
- * (size %Pixels; #IMPLIED)
- * (width %Length; #IMPLIED)
- * (color %Color; #IMPLIED) ... D205514
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (align (left|center|right) #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {HTML40Namespace.ATTR_VALUE_LEFT, HTML40Namespace.ATTR_VALUE_CENTER, HTML40Namespace.ATTR_VALUE_RIGHT};
- atype.setEnumValues(values);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
-
- // the rest.
- String[] names = {HTML40Namespace.ATTR_NAME_NOSHADE, HTML40Namespace.ATTR_NAME_SIZE, HTML40Namespace.ATTR_NAME_WIDTH, HTML40Namespace.ATTR_NAME_COLOR // D205514
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHTML.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHTML.java
deleted file mode 100644
index 99b63321d2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHTML.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * HTML.
- */
-final class HedHTML extends HTMLElemDeclImpl {
-
- private static String[] terminators = {HTML40Namespace.ElementName.HTML};
-
- /**
- */
- public HedHTML(ElementCollection collection) {
- super(HTML40Namespace.ElementName.HTML, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_HTML;
- layoutType = LAYOUT_HIDDEN;
- omitType = OMIT_BOTH;
- }
-
- /**
- * Create all attribute declarations.
- * This method is called once in the constructor of the super class.
- * The <code>HTML</code> element may have the following attributes:
- * <table>
- * <tbody>
- * <tr>
- * <th>NAME</th><th>TYPE</th><th>USAGE</th><th>DEFAULT (INITIAL) VALUE</th><th>MEMO</th>
- * </tr>
- * <tr>
- * <td><code>%i18n;</code></td><td>-</td><td>-</td><td>-</td>
- * <td>{@link PDCMDocImpl#getAttrDeclarationsI18n}</td>
- * </tr>
- * <tr>
- * <td>version</td><td>CDATA</td><td>#FIXED</td>
- * <td>{@link HTML_VERSION_TRANSITIONAL}</td><td>deplecated in HTML4.01</td>
- * </tr>
- * </tbody>
- * </table>
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %i18n;
- attributeCollection.getI18n(attributes);
- // version
- HTMLAttributeDeclaration adec = attributeCollection.getDeclaration(HTML40Namespace.ATTR_NAME_VERSION);
- if (adec != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_VERSION, adec);
- }
-
- /**
- * HTML has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHeading.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHeading.java
deleted file mode 100644
index 6a17c164ad..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHeading.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * H[1-6].
- */
-final class HedHeading extends HedInlineContainer {
-
- /**
- */
- public HedHeading(String elementName, ElementCollection collection) {
- super(elementName, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * Create all attribute declarations.
- * This method is called once in the constructor of the super class.
- * The <code>H1</code> element may have the following attributes:
- * <table>
- * <tbody>
- * <tr>
- * <th>NAME</th><th>TYPE</th><th>USAGE</th><th>DEFAULT (INITIAL) VALUE</th><th>MEMO</th>
- * </tr>
- * <tr>
- * <td>%attrs;</td><td>-</td><td>-</td><td>-</td><td>-</td>
- * </tr>
- * <tr>
- * <td>%align;</td><td>-</td><td>-</td><td>-</td><td>-</td>
- * </tr>
- * </tbody>
- * </table>
- * <p><b>%align;</b> means <code>align (left|center|right|justify) #IMPLIED</code>.
- * Unfortunately, this <code>align</code> is different from one in
- * <code>IMG</code> or <code>TABLE</code>. So, the attribute declaration
- * of <code>align</code> should be localy created and it shouldn't be registered
- * in a <code>HCMDocImpl</code> instance.</p>
- * <p>However, %align is used in sevaral times. I wouldn't write same code
- * in many times. So, I add a new utility method into <code>CMUtil</code>
- * to create the attribute declaration.</p>
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // align
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForParagraph();
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIFRAME.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIFRAME.java
deleted file mode 100644
index 191615ec24..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIFRAME.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * IFRAME.
- */
-final class HedIFRAME extends HedFlowContainer {
-
- /**
- */
- public HedIFRAME(ElementCollection collection) {
- super(HTML40Namespace.ElementName.IFRAME, collection);
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * %coreattrs;
- * (longdesc %URI; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (src %URI; #IMPLIED)
- * (frameborder (1|0) 1)
- * (marginwidth %Pixels; #IMPLIED)
- * (marginheight %Pixels; #IMPLIED)
- * (scrolling (yes|no|auto) auto)
- * (align %IAlign; #IMPLIED) ... should be defined locally.
- * (height %Length; #IMPLIED)
- * (width %Length; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_LONGDESC, HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_SRC, HTML40Namespace.ATTR_NAME_FRAMEBORDER, HTML40Namespace.ATTR_NAME_MARGINWIDTH, HTML40Namespace.ATTR_NAME_MARGINHEIGHT, HTML40Namespace.ATTR_NAME_SCROLLING, HTML40Namespace.ATTR_NAME_HEIGHT, HTML40Namespace.ATTR_NAME_WIDTH};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // align
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForImage();
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIMG.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIMG.java
deleted file mode 100644
index 1e1805e58a..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIMG.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * IMG.
- */
-final class HedIMG extends HedEmpty {
-
- /**
- */
- public HedIMG(ElementCollection collection) {
- super(HTML40Namespace.ElementName.IMG, collection);
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * IMG.
- * %attrs;
- * (src %URI; #REQUIRED): should be defined locally.
- * (alt %Text; #REQUIRED)
- * (longdesc %URI; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (height %Length; #IMPLIED)
- * (width %Length; #IMPLIED)
- * (usemap %URI; #IMPLIED)
- * (ismap (ismap) #IMPLIED)
- * (align %IAlign; #IMPLIED): should be defined locally.
- * (border %Pixels; #IMPLIED)
- * (hspace %Pixels; #IMPLIED)
- * (vspace %Pixels; #IMPLIED)
- * (mapfile %URI; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (src %URI; #REQUIRED): should be defined locally.
- HTMLCMDataTypeImpl atype = null;
- HTMLAttrDeclImpl attr = null;
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_SRC, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_SRC, attr);
-
- String[] names = {HTML40Namespace.ATTR_NAME_ALT, HTML40Namespace.ATTR_NAME_LONGDESC, HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_HEIGHT, HTML40Namespace.ATTR_NAME_WIDTH, HTML40Namespace.ATTR_NAME_USEMAP, HTML40Namespace.ATTR_NAME_ISMAP, HTML40Namespace.ATTR_NAME_BORDER, HTML40Namespace.ATTR_NAME_HSPACE, HTML40Namespace.ATTR_NAME_VSPACE, HTML40Namespace.ATTR_NAME_MAPFILE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // align (local); should be defined locally.
- attr = AttributeCollection.createAlignForImage();
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.PRE};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedINPUT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedINPUT.java
deleted file mode 100644
index 60b3049406..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedINPUT.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * INPUT.
- */
-final class HedINPUT extends HedEmpty {
-
- /**
- */
- public HedINPUT(ElementCollection collection) {
- super(HTML40Namespace.ElementName.INPUT, collection);
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * INPUT.
- * %attrs;
- * (type %InputType; TEXT) ... should be defined locally.
- * (name CDATA #IMPLIED)
- * (value CDATA #IMPLIED)
- * (checked (checked) #IMPLIED)
- * (disabled (disabled) #IMPLIED)
- * (readonly (readonly) #IMPLIED)
- * (size CDATA #IMPLIED) ... should be defined locally.
- * (maxlength NUMBER #IMPLIED)
- * (src %URI; #IMPLIED)
- * (alt CDATA #IMPLIED) ... should be defined locally.
- * (usemap %URI; #IMPLIED)
- * (ismap (ismap) #IMPLIED)
- * (tabindex NUMBER #IMPLIED)
- * (accesskey %Character; #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- * (onselect %Script; #IMPLIED)
- * (onchange %Script; #IMPLIED)
- * (accept %ContentTypes; #IMPLIED)
- * (align %IAlign; #IMPLIED) ... should be defined locally.
- * (istyle CDATA #IMPLIED)
- * <<D215684
- * (width CDATA; #IMPLIED)
- * (height CDATA; #IMPLIED)
- * (border CDATA; #IMPLIED)
- * D215684
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- HTMLCMDataTypeImpl atype = null;
- HTMLAttrDeclImpl attr = null;
- // (type %InputType; TEXT) ... should be defined locally.
- // NOTE: %InputType is ENUM;
- // (text | password | checkbox | radio | submit | reset |
- // file | hidden | image | button)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {HTML40Namespace.ATTR_VALUE_TEXT, HTML40Namespace.ATTR_VALUE_PASSWORD, HTML40Namespace.ATTR_VALUE_CHECKBOX, HTML40Namespace.ATTR_VALUE_RADIO, HTML40Namespace.ATTR_VALUE_SUBMIT, HTML40Namespace.ATTR_VALUE_RESET, HTML40Namespace.ATTR_VALUE_FILE, HTML40Namespace.ATTR_VALUE_HIDDEN, HTML40Namespace.ATTR_VALUE_IMAGE, HTML40Namespace.ATTR_VALUE_BUTTON};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, HTML40Namespace.ATTR_VALUE_TEXT);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
-
- // (size CDATA #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_SIZE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_SIZE, attr);
-
- // (alt CDATA #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_ALT, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALT, attr);
-
- // (align %IAlign; #IMPLIED) ... should be defined locally.
- attr = AttributeCollection.createAlignForImage();
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
-
- // the rest.
- String[] names = {HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_VALUE, HTML40Namespace.ATTR_NAME_CHECKED, HTML40Namespace.ATTR_NAME_DISABLED, HTML40Namespace.ATTR_NAME_READONLY, HTML40Namespace.ATTR_NAME_SIZE, HTML40Namespace.ATTR_NAME_MAXLENGTH, HTML40Namespace.ATTR_NAME_SRC, HTML40Namespace.ATTR_NAME_ALT, HTML40Namespace.ATTR_NAME_USEMAP, HTML40Namespace.ATTR_NAME_ISMAP, HTML40Namespace.ATTR_NAME_TABINDEX, HTML40Namespace.ATTR_NAME_ACCESSKEY, HTML40Namespace.ATTR_NAME_ONFOCUS, HTML40Namespace.ATTR_NAME_ONBLUR, HTML40Namespace.ATTR_NAME_ONSELECT, HTML40Namespace.ATTR_NAME_ONCHANGE, HTML40Namespace.ATTR_NAME_ACCEPT, HTML40Namespace.ATTR_NAME_ALIGN, HTML40Namespace.ATTR_NAME_ISTYLE,
- //<<D215684
- HTML40Namespace.ATTR_NAME_WIDTH, HTML40Namespace.ATTR_NAME_HEIGHT, HTML40Namespace.ATTR_NAME_BORDER
- //<D215684
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedISINDEX.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedISINDEX.java
deleted file mode 100644
index 8c744d6a8b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedISINDEX.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * ISINDEX.
- */
-final class HedISINDEX extends HedEmpty {
-
- /**
- */
- public HedISINDEX(ElementCollection collection) {
- super(HTML40Namespace.ElementName.ISINDEX, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * ISINDEX.
- * %coreattrs;
- * %i18n;
- * (prompt %Text; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
- // %i18n;
- attributeCollection.getI18n(attributes);
-
- HTMLAttributeDeclaration attr = attributeCollection.getDeclaration(HTML40Namespace.ATTR_NAME_PROMPT);
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_PROMPT, attr);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON, HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedInlineContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedInlineContainer.java
deleted file mode 100644
index dd08221a2e..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedInlineContainer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-/**
- * Base class for (%inline;)* containers.
- */
-abstract class HedInlineContainer extends HTMLElemDeclImpl {
-
- /**
- * HedInlineContainer.
- * @param elementName java.lang.String
- * @param collection ElementCollection
- */
- public HedInlineContainer(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_INLINE_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLABEL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLABEL.java
deleted file mode 100644
index e0010323d2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLABEL.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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.CMDataType;
-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;
-
-/**
- * LABEL.
- */
-final class HedLABEL extends HedInlineContainer {
-
- /**
- */
- public HedLABEL(ElementCollection collection) {
- super(HTML40Namespace.ElementName.LABEL, collection);
- }
-
- /**
- * %attrs;
- * (for IDREF #IMPLIED) ... should be defined locally.
- * (accesskey %Character; #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (for IDREF #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.IDREF);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_FOR, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_FOR, attr);
-
- String[] names = {HTML40Namespace.ATTR_NAME_ACCESSKEY, HTML40Namespace.ATTR_NAME_ONFOCUS, HTML40Namespace.ATTR_NAME_ONBLUR};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * Exclusion.
- * <code>LABEL</code> has the exclusion.
- * It is <code>LABEL</code> itself.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null;
-
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- CMNode label = elementCollection.getNamedItem(HTML40Namespace.ElementName.LABEL);
- if (label != null)
- exclusion.appendChild(label);
-
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON, HTML40Namespace.ElementName.LABEL};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLEGEND.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLEGEND.java
deleted file mode 100644
index 5e3928b6b4..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLEGEND.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * LEGEND.
- */
-final class HedLEGEND extends HedInlineContainer {
-
- /**
- */
- public HedLEGEND(ElementCollection collection) {
- super(HTML40Namespace.ElementName.LEGEND, collection);
- }
-
- /**
- * (accesskey %Character; #IMPLIED)
- * (align %LAlign; #IMPLIED) ... shuld be defined locally.
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_ACCESSKEY};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // align
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForLegend();
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLI.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLI.java
deleted file mode 100644
index f43785eaf7..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLI.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * LI.
- */
-final class HedLI extends HedFlowContainer {
-
- private static String[] terminators = {HTML40Namespace.ElementName.LI};
-
- /**
- */
- public HedLI(ElementCollection collection) {
- super(HTML40Namespace.ElementName.LI, collection);
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END_DEFAULT;
- }
-
- /**
- * %attrs;
- * (type %LIStyle; #IMPLIED) ... should be defined locally.
- * (value NUMBER #IMPLIED) ... should be defined locally.
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (type %LIStyle; #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LI_STYLE);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
-
- // (value NUMBER #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_VALUE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_VALUE, attr);
- }
-
- /**
- * LI has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLINK.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLINK.java
deleted file mode 100644
index bfe132c099..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLINK.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-
-/**
- * LINK.
- */
-final class HedLINK extends HedEmpty {
-
- /**
- */
- public HedLINK(ElementCollection collection) {
- super(HTML40Namespace.ElementName.LINK, collection);
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * LINK.
- * %attrs;
- * (charset %Charset; #IMPLIED)
- * (href %URI; #IMPLIED)
- * (hreflang %LanguageCode; #IMPLIED)
- * (type %ContentType; #IMPLIED): should be defined locally.
- * (rel %LinkTypes; #IMPLIED)
- * (rev %LinkTypes; #IMPLIED)
- * (media %MediaDesc; #IMPLIED)
- * (target %FrameTarget; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_CHARSET, HTML40Namespace.ATTR_NAME_HREF, HTML40Namespace.ATTR_NAME_HREFLANG, HTML40Namespace.ATTR_NAME_REL, HTML40Namespace.ATTR_NAME_REV, HTML40Namespace.ATTR_NAME_MEDIA, HTML40Namespace.ATTR_NAME_TARGET};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (type %ContentType; #IMPLIED)
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedListItemContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedListItemContainer.java
deleted file mode 100644
index a7ccf63be3..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedListItemContainer.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.wst.html.core.internal.contentmodel;
-
-
-
-/**
- * Base class for list item container declarations.
- * - OL, UL, MENU, DIR.
- */
-abstract class HedListItemContainer extends HTMLElemDeclImpl {
-
- /**
- */
- public HedListItemContainer(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_LI_CONTAINER;
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- indentChild = true;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMAP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMAP.java
deleted file mode 100644
index 2a3c2a7356..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMAP.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-
-
-/**
- * MAP.
- */
-final class HedMAP extends HTMLElemDeclImpl {
-
- /**
- */
- public HedMAP(ElementCollection collection) {
- super(HTML40Namespace.ElementName.MAP, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_MAP;
- layoutType = LAYOUT_OBJECT;
- indentChild = true;
- }
-
- /**
- * %attrs;
- * (name CDATA #REQUIRED) ... should be defined locally
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (name CDATA #REQUIRED) ... should be defined locally
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_NAME, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_NAME, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMARQUEE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMARQUEE.java
deleted file mode 100644
index f8653e27c4..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMARQUEE.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * MARQUEE.
- */
-final class HedMARQUEE extends HedFlowContainer {
-
- /**
- */
- public HedMARQUEE(ElementCollection collection) {
- super(HTML40Namespace.ElementName.MARQUEE, collection);
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * %attrs;
- * (behavior (scroll|slide|alternate) scroll)
- * (bgcolor %Color; #IMPLIED)
- * (direction (left|right|up|down) left)
- * (height CDATA #IMPLIED) ... should be defined locally.
- * (hspace NUMBER #IMPLIED) ... should be defined locally.
- * (loop CDATA #IMPLIED)
- * (scrollamount NUMBER #IMPLIED)
- * (scrolldelay NUMBER #IMPLIED)
- * (vspace NUMBER #IMPLIED) ... should be defined locally.
- * (width CDATA #IMPLIED) ... should be defined locally.
- * (truespeed (truespeed) #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_BEHAVIOR, HTML40Namespace.ATTR_NAME_BGCOLOR, HTML40Namespace.ATTR_NAME_DIRECTION, HTML40Namespace.ATTR_NAME_LOOP, HTML40Namespace.ATTR_NAME_SCROLLAMOUNT, HTML40Namespace.ATTR_NAME_SCROLLDELAY, HTML40Namespace.ATTR_NAME_TRUESPEED};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- HTMLCMDataTypeImpl atype = null;
- HTMLAttrDeclImpl attr = null;
- // (height CDATA #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_HEIGHT, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_HEIGHT, attr);
-
- // (width CDATA #IMPLIED) ... should be defined locally.
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_WIDTH, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_WIDTH, attr);
-
- // (hspace NUMBER #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_HSPACE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_HSPACE, attr);
-
- // (vspace NUMBER #IMPLIED) ... should be defined locally.
- attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_VSPACE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_VSPACE, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMENU.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMENU.java
deleted file mode 100644
index 0142558fc0..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMENU.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * MENU/DIR.
- */
-final class HedMENU extends HedListItemContainer {
-
- /**
- */
- public HedMENU(String elementName, ElementCollection collection) {
- super(elementName, collection);
- }
-
- /**
- * MENU/DIR.
- * (compact (compact) #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_COMPACT};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * Exclusion.
- * <code>MENU/DIR</code> has the exclusion.
- * It is <code>%block;</code>.
- * %block; is:
- * P | %heading; | %list; | %preformatted; | DL | DIV | CENTER |
- * NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
- * TABLE | FIELDSET | ADDRESS.
- * %heading; is: H1 | H2 | H3 | H4 | H5 | H6.
- * %list; is : UL | OL | DIR | MENU.
- * %preformatted; is PRE.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null;
-
- // %block;
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- String[] names = {HTML40Namespace.ElementName.P, HTML40Namespace.ElementName.H1, HTML40Namespace.ElementName.H2, HTML40Namespace.ElementName.H3, HTML40Namespace.ElementName.H4, HTML40Namespace.ElementName.H5, HTML40Namespace.ElementName.H6, HTML40Namespace.ElementName.UL, HTML40Namespace.ElementName.OL, HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU, HTML40Namespace.ElementName.PRE, HTML40Namespace.ElementName.DL, HTML40Namespace.ElementName.DIV, HTML40Namespace.ElementName.CENTER, HTML40Namespace.ElementName.NOSCRIPT, HTML40Namespace.ElementName.NOFRAMES, HTML40Namespace.ElementName.BLOCKQUOTE, HTML40Namespace.ElementName.FORM, HTML40Namespace.ElementName.ISINDEX, HTML40Namespace.ElementName.HR, HTML40Namespace.ElementName.TABLE, HTML40Namespace.ElementName.FIELDSET, HTML40Namespace.ElementName.ADDRESS};
- elementCollection.getDeclarations(exclusion, Arrays.asList(names).iterator());
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMETA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMETA.java
deleted file mode 100644
index d5b232c13c..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMETA.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-
-/**
- * META.
- */
-final class HedMETA extends HedEmpty {
-
- /**
- */
- public HedMETA(ElementCollection collection) {
- super(HTML40Namespace.ElementName.META, collection);
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * META.
- * %i18n;
- * (http-equiv NAME #IMPLIED)
- * (name NAME #IMPLIED) ... should be defined locally.
- * (content CDATA #REQUIRED)
- * (scheme CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %i18n;
- attributeCollection.getI18n(attributes);
-
- // (name NAME #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.NAME);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_NAME, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_NAME, attr);
-
- String[] names = {HTML40Namespace.ATTR_NAME_HTTP_EQUIV, HTML40Namespace.ATTR_NAME_CONTENT, HTML40Namespace.ATTR_NAME_SCHEME};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMarkChanges.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMarkChanges.java
deleted file mode 100644
index 92c3d0ce3c..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMarkChanges.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * (INS|DEL)
- */
-final class HedMarkChanges extends HedFlowContainer {
-
- /**
- */
- public HedMarkChanges(String elementName, ElementCollection collection) {
- super(elementName, collection);
- }
-
- /**
- * %attrs;
- * (cite %URI; #IMPLIED)
- * (datetime %Datetime; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_CITE, HTML40Namespace.ATTR_NAME_DATETIME};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOBR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOBR.java
deleted file mode 100644
index 42adbd14f0..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOBR.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.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * NOBR -- not standard tag but it is commonly used.
- */
-final class HedNOBR extends HedInlineContainer {
-
-
- public HedNOBR(ElementCollection collection) {
- super(HTML40Namespace.ElementName.NOBR, collection);
- correctionType = HTMLElementDeclaration.CORRECT_DUPLICATED;
- }
-
- protected void createAttributeDeclarations() {
- // No attributes is defined.
- if (attributes != null)
- return;
- attributes = new CMNamedNodeMapImpl();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOEMBED.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOEMBED.java
deleted file mode 100644
index ed71166d4b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOEMBED.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-
-/**
- * NOEMBED.
- */
-final class HedNOEMBED extends HedFlowContainer {
-
- /**
- */
- public HedNOEMBED(ElementCollection collection) {
- super(HTML40Namespace.ElementName.NOEMBED, collection);
- }
-
- /**
- * %coreattrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOFRAMES.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOFRAMES.java
deleted file mode 100644
index 2ad931b052..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOFRAMES.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-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;
-
-/**
- * NOFRAMES.
- */
-final class HedNOFRAMES extends HTMLElemDeclImpl {
-
- /**
- */
- public HedNOFRAMES(ElementCollection collection) {
- super(HTML40Namespace.ElementName.NOFRAMES, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_NOFRAMES_CONTENT;
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- * Exclusion.
- * <code>NOFRAMES</code> has the exclusion.
- * It is <code>NOFRAMES</code> itself.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null;
-
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- CMNode label = elementCollection.getNamedItem(HTML40Namespace.ElementName.NOFRAMES);
- if (label != null)
- exclusion.appendChild(label);
-
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU, HTML40Namespace.ElementName.NOFRAMES};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOSCRIPT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOSCRIPT.java
deleted file mode 100644
index 2747c2348d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOSCRIPT.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * NOSCRIPT.
- */
-final class HedNOSCRIPT extends HedFlowContainer {
-
- /**
- */
- public HedNOSCRIPT(ElementCollection collection) {
- super(HTML40Namespace.ElementName.NOSCRIPT, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOBJECT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOBJECT.java
deleted file mode 100644
index ad48e2f190..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOBJECT.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * OBJECT.
- */
-final class HedOBJECT extends HTMLElemDeclImpl {
-
- /**
- */
- public HedOBJECT(ElementCollection collection) {
- super(HTML40Namespace.ElementName.OBJECT, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_PARAM_CONTAINER;
- layoutType = LAYOUT_OBJECT;
- indentChild = true;
- }
-
- /**
- * %attrs;
- * %reserved; ... empty.
- * (declare (declare) #IMPLIED)
- * (classid %URI; #IMPLIED)
- * (codebase %URI; #IMPLIED)
- * (data %URI; #IMPLIED)
- * (type %ContentType; #IMPLIED)
- * (codetype %ContentType; #IMPLIED)
- * (archive CDATA #IMPLIED)
- * (standby %Text; #IMPLIED)
- * (height %Length; #IMPLIED)
- * (width %Length; #IMPLIED)
- * (usemap %URI; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (tabindex NUMBER #IMPLIED)
- * (align %IAlign; #IMPLIED) ... should be defined locally.
- * (border %Pixels; #IMPLIED)
- * (hspace %Pixels; #IMPLIED)
- * (vspace %Pixels; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %reserved; ... empty.
-
- String[] names = {HTML40Namespace.ATTR_NAME_DECLARE, HTML40Namespace.ATTR_NAME_CLASSID, HTML40Namespace.ATTR_NAME_CODEBASE, HTML40Namespace.ATTR_NAME_DATA, HTML40Namespace.ATTR_NAME_TYPE, HTML40Namespace.ATTR_NAME_CODETYPE, HTML40Namespace.ATTR_NAME_ARCHIVE, HTML40Namespace.ATTR_NAME_STANDBY, HTML40Namespace.ATTR_NAME_HEIGHT, HTML40Namespace.ATTR_NAME_WIDTH, HTML40Namespace.ATTR_NAME_USEMAP, HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_TABINDEX, HTML40Namespace.ATTR_NAME_BORDER, HTML40Namespace.ATTR_NAME_HSPACE, HTML40Namespace.ATTR_NAME_VSPACE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- // %align; ... should be defined locally.
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForImage();
- if (attr != null)
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, attr);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.PRE};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOL.java
deleted file mode 100644
index 6668b903c1..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOL.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * OL.
- */
-final class HedOL extends HedListItemContainer {
-
- /**
- */
- public HedOL(ElementCollection collection) {
- super(HTML40Namespace.ElementName.OL, collection);
- }
-
- /**
- * OL.
- * (type %OLStyle; #IMPLIED) ... should be defined locally.
- * (compact (compact) #IMPLIED)
- * (start NUMBER #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (type %OLStyle; #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.OL_STYLE);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
-
- // the rest.
- String[] names = {HTML40Namespace.ATTR_NAME_COMPACT, HTML40Namespace.ATTR_NAME_START};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTGROUP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTGROUP.java
deleted file mode 100644
index 87a3fc3591..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTGROUP.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-
-/**
- * OPTGROUP.
- */
-final class HedOPTGROUP extends HTMLElemDeclImpl {
-
- /**
- */
- public HedOPTGROUP(ElementCollection collection) {
- super(HTML40Namespace.ElementName.OPTGROUP, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_OPTION_CONTAINER;
- layoutType = LAYOUT_HIDDEN;
- indentChild = true;
- }
-
- /**
- * %attrs;
- * (disabled (disabled) #IMPLIED)
- * (label %Text; #REQUIRED) ... should be defined locally.
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // (disabled (disabled) #IMPLIED)
- String[] names = {HTML40Namespace.ATTR_NAME_DISABLED};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (label %Text; #REQUIRED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_LABEL, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_LABEL, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTION.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTION.java
deleted file mode 100644
index b225ee8c92..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTION.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * OPTION.
- */
-final class HedOPTION extends HedPcdata {
-
- private static String[] terminators = {HTML40Namespace.ElementName.OPTION};
-
- /**
- */
- public HedOPTION(ElementCollection collection) {
- super(HTML40Namespace.ElementName.OPTION, collection);
- layoutType = LAYOUT_HIDDEN;
- omitType = OMIT_END;
- }
-
- /**
- * OPTION.
- * %attrs;
- * (selected (selected) #IMPLIED)
- * (disabled (disabled) #IMPLIED)
- * (label %Text; #IMPLIED)
- * (value CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_SELECTED, HTML40Namespace.ATTR_NAME_DISABLED, HTML40Namespace.ATTR_NAME_LABEL, HTML40Namespace.ATTR_NAME_VALUE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * OPTION has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedP.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedP.java
deleted file mode 100644
index 70feed7b9b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedP.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * P.
- */
-final class HedP extends HedInlineContainer {
-
- private static Collection terminators = null;
-
- /**
- */
- public HedP(ElementCollection collection) {
- super(HTML40Namespace.ElementName.P, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END;
- }
-
- /**
- * Create all attribute declarations.
- * This method is called once in the constructor of the super class.
- * The <code>P</code> element may have the following attributes:
- * <table>
- * <tbody>
- * <tr>
- * <th>NAME</th><th>TYPE</th><th>USAGE</th><th>DEFAULT (INITIAL) VALUE</th><th>MEMO</th>
- * </tr>
- * <tr>
- * <td>%attrs;</td><td>-</td><td>-</td><td>-</td><td>-</td>
- * </tr>
- * <tr>
- * <td>%align;</td><td>-</td><td>-</td><td>-</td><td>-</td>
- * </tr>
- * </tbody>
- * </table>
- * <p><b>%align;</b> means <code>align (left|center|right|justify) #IMPLIED</code>.
- * Unfortunately, this <code>align</code> is different from one in
- * <code>IMG</code> or <code>TABLE</code>. So, the attribute declaration
- * of <code>align</code> should be localy created and it shouldn't be registered
- * in a <code>HCMDocImpl</code> instance.</p>
- * <p>However, %align is used in sevaral times. I wouldn't write same code
- * in many times. So, I add a new utility method into <code>CMUtil</code>
- * to create the attribute declaration.</p>
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
- attributes = new CMNamedNodeMapImpl();
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // align
- HTMLAttrDeclImpl adec = AttributeCollection.createAlignForParagraph();
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, adec);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
- return prohibitedAncestors;
- }
-
- /**
- * Return names of terminators.
- * <code>P</code> has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- if (terminators != null)
- return terminators.iterator();
- //<<D217982
- terminators = new Vector();
- terminators.addAll(elementCollection.getNamesOfBlock());
- terminators.add(HTML40Namespace.ElementName.LI);
- terminators.add(HTML40Namespace.ElementName.DT);
- terminators.add(HTML40Namespace.ElementName.DD);
- //D217982
- return terminators.iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPARAM.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPARAM.java
deleted file mode 100644
index 5541a1f43d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPARAM.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * PARAM.
- */
-final class HedPARAM extends HedEmpty {
-
- /**
- */
- public HedPARAM(ElementCollection collection) {
- super(HTML40Namespace.ElementName.PARAM, collection);
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * PARAM.
- * (id ID #IMPLIED)
- * (name CDATA #REQUIRED) ... should be defined locally.
- * (value CDATA #IMPLIED)
- * (valuetype (DATA|REF|OBJECT) DATA)
- * (type %ContentType; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_ID, HTML40Namespace.ATTR_NAME_VALUE, HTML40Namespace.ATTR_NAME_VALUETYPE, HTML40Namespace.ATTR_NAME_TYPE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (name CDATA #REQUIRED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_NAME, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_NAME, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPRE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPRE.java
deleted file mode 100644
index 2ba3479759..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPRE.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * PRE.
- */
-final class HedPRE extends HedInlineContainer {
-
- /**
- * PRE element should keep spaces in its source.
- */
- public HedPRE(ElementCollection collection) {
- super(HTML40Namespace.ElementName.PRE, collection);
- // CORRECT_EMPTY - GROUP_COMPACT
- correctionType = CORRECT_EMPTY;
-
- keepSpaces = true;
- }
-
- /**
- * %attrs;
- * (width NUMBER #IMPLIED) ... should be defined locally.
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // (width NUMBER #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_WIDTH, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_WIDTH, attr);
- }
-
- /**
- * Exclusion.
- * <code>PRE</code> has the exclusion.
- * It is <code>%pre.exclusion;</code>.
- * %pre.exclusion is:
- * IMG | OBJECT | APPLET | BIG | SMALL | SUB | SUP | FONT | BASEFONT
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null;
-
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- String[] names = {HTML40Namespace.ElementName.IMG, HTML40Namespace.ElementName.OBJECT, HTML40Namespace.ElementName.APPLET, HTML40Namespace.ElementName.BIG, HTML40Namespace.ElementName.SMALL, HTML40Namespace.ElementName.SUB, HTML40Namespace.ElementName.SUP, HTML40Namespace.ElementName.FONT, HTML40Namespace.ElementName.BASEFONT};
- elementCollection.getDeclarations(exclusion, Arrays.asList(names).iterator());
-
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPcdata.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPcdata.java
deleted file mode 100644
index 556149530c..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPcdata.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-
-/**
- * Base class for PCDATA type element declarations.<br>
- */
-abstract class HedPcdata extends HTMLElemDeclImpl {
-
- /**
- */
- public HedPcdata(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_PCDATA;
- }
-
- /**
- * Content.<br>
- * PCDATA type always returns <code>null</code>.
- * <br>
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- public CMContent getContent() {
- return null;
- }
-
- /**
- * Content type.<br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public int getContentType() {
- return CMElementDeclaration.PCDATA;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPhrase.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPhrase.java
deleted file mode 100644
index 0e680d5dee..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPhrase.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.wst.html.core.internal.contentmodel;
-
-
-
-/**
- * %phrase;
- */
-final class HedPhrase extends HedInlineContainer {
-
- /**
- */
- public HedPhrase(String elementName, ElementCollection collection) {
- super(elementName, collection);
- correctionType = HTMLElementDeclaration.CORRECT_DUPLICATED;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedQ.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedQ.java
deleted file mode 100644
index 185b757f9d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedQ.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * Q.
- */
-final class HedQ extends HedInlineContainer {
-
- /**
- */
- public HedQ(ElementCollection collection) {
- super(HTML40Namespace.ElementName.Q, collection);
- correctionType = CORRECT_DUPLICATED;
- }
-
- /**
- * %attrs;
- * (cite %URI; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_CITE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSCRIPT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSCRIPT.java
deleted file mode 100644
index ae910b78f1..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSCRIPT.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-
-/**
- * SCRIPT.
- */
-final class HedSCRIPT extends HTMLElemDeclImpl {
-
- /**
- */
- public HedSCRIPT(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SCRIPT, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_CDATA;
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * SCRIPT.
- * (charset %Charset; #IMPLIED)
- * (type %ContentType; #REQUIRED) ... should be defined locally.
- * (language CDATA #IMPLIED)
- * (src %URI; #IMPLIED)
- * (defer (defer) #IMPLIED)
- * (event CDATA #IMPLIED)
- * (for %URI; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_CHARSET, HTML40Namespace.ATTR_NAME_LANGUAGE, HTML40Namespace.ATTR_NAME_SRC, HTML40Namespace.ATTR_NAME_DEFER, HTML40Namespace.ATTR_NAME_EVENT, HTML40Namespace.ATTR_NAME_FOR};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // (type %ContentType; #REQUIRED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, "text/javascript"); //$NON-NLS-1$
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
- }
-
- /**
- * <code>SCRIPT</code> is CDATA type.
- * So, the method always returns <code>null</code>.
- * <br>
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- public CMContent getContent() {
- return null;
- }
-
- /**
- * CDATA content.<br>
- * @return int
- */
- public int getContentType() {
- return CMElementDeclaration.CDATA;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSELECT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSELECT.java
deleted file mode 100644
index 78c3a08703..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSELECT.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * SELECT.
- */
-final class HedSELECT extends HTMLElemDeclImpl {
-
- /**
- */
- public HedSELECT(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SELECT, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_SELECT;
- layoutType = LAYOUT_OBJECT;
- indentChild = true;
- }
-
- /**
- * %attrs;
- * %reserved;
- * (name CDATA #IMPLIED)
- * (size NUMBER #IMPLIED) ... should be defined locally.
- * (multiple (multiple) #IMPLIED)
- * (disabled (disabled) #IMPLIED)
- * (tabindex NUMBER #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- * (onchange %Script; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (size NUMBER #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_SIZE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_SIZE, attr);
-
- String[] names = {HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_MULTIPLE, HTML40Namespace.ATTR_NAME_DISABLED, HTML40Namespace.ATTR_NAME_TABINDEX, HTML40Namespace.ATTR_NAME_ONFOCUS, HTML40Namespace.ATTR_NAME_ONBLUR, HTML40Namespace.ATTR_NAME_ONCHANGE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSPAN.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSPAN.java
deleted file mode 100644
index 42932f6d1d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSPAN.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-
-/**
- * SPAN.
- */
-final class HedSPAN extends HedInlineContainer {
-
- /**
- * SPAN.
- */
- public HedSPAN(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SPAN, collection);
- }
-
- /**
- * %attrs;
- * %reserved; ... empty.
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIBase.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIBase.java
deleted file mode 100644
index 46c7a80f1a..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIBase.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-
-
-
-/**
- * Base class for SSI declarations.
- */
-abstract class HedSSIBase extends HedEmpty {
-
- /**
- */
- public HedSSIBase(String elementName, ElementCollection collection) {
- super(elementName, collection);
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- */
- public int getFormatType() {
- return HTMLElementDeclaration.FORMAT_SSI;
- }
-
- /**
- */
- public boolean supports(String propName) {
- if (propName.equals(HTMLCMProperties.IS_SSI))
- return true;
- return super.supports(propName);
- }
-
- /*
- */
- public Object getProperty(String propName) {
- if (propName.equals(HTMLCMProperties.IS_SSI))
- return new Boolean(true);
- return super.getProperty(propName);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIConfig.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIConfig.java
deleted file mode 100644
index b8406a95f5..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIConfig.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * SSI:CONFIG.
- */
-final class HedSSIConfig extends HedSSIBase {
-
- /**
- */
- public HedSSIConfig(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SSI_CONFIG, collection);
- }
-
- /**
- * SSI:CONFIG.
- * (errmsg CDATA #IMPLIED)
- * (sizefmt CDATA #IMPLIED)
- * (timefmt CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_ERRMSG, HTML40Namespace.ATTR_NAME_SIZEFMT, HTML40Namespace.ATTR_NAME_TIMEFMT};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIEcho.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIEcho.java
deleted file mode 100644
index 47388122c5..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIEcho.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * SSI:ECHO.
- */
-final class HedSSIEcho extends HedSSIBase {
-
- /**
- */
- public HedSSIEcho(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SSI_ECHO, collection);
- }
-
- /**
- * SSI:ECHO
- * (var CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_VAR};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIExec.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIExec.java
deleted file mode 100644
index 2824d576da..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIExec.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * SSI:EXEC.
- */
-final class HedSSIExec extends HedSSIBase {
-
- /**
- */
- public HedSSIExec(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SSI_EXEC, collection);
- }
-
- /**
- * SSI:EXEC
- * (cgi %URI; #IMPLIED)
- * (cmd CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_CGI, HTML40Namespace.ATTR_NAME_CMD};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFlastmod.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFlastmod.java
deleted file mode 100644
index 50ebdf966e..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFlastmod.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * SSI:FLASTMOD.
- */
-final class HedSSIFlastmod extends HedSSIBase {
-
- /**
- */
- public HedSSIFlastmod(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SSI_FLASTMOD, collection);
- }
-
- /**
- * SSI:FLASTMOD
- * (file %URI; #IMPLIED)
- * (virtual %URI #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_FILE, HTML40Namespace.ATTR_NAME_VIRTUAL};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFsize.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFsize.java
deleted file mode 100644
index f2bdbf0361..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFsize.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * SSI:FSIZE.
- */
-final class HedSSIFsize extends HedSSIBase {
-
- /**
- */
- public HedSSIFsize(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SSI_FSIZE, collection);
- }
-
- /**
- * SSI:FSIZE
- * (file %URI; #IMPLIED)
- * (virtual %URI #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_FILE, HTML40Namespace.ATTR_NAME_VIRTUAL};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIInclude.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIInclude.java
deleted file mode 100644
index 63224d8d67..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIInclude.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * SSI:INCLUDE.
- */
-final class HedSSIInclude extends HedSSIBase {
-
- /**
- */
- public HedSSIInclude(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SSI_INCLUDE, collection);
- }
-
- /**
- * SSI:INCLUDE
- * (file %URI; #IMPLIED)
- * (virtual %URI #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_FILE, HTML40Namespace.ATTR_NAME_VIRTUAL};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIPrintenv.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIPrintenv.java
deleted file mode 100644
index bc10b56e49..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIPrintenv.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * SSI:PRINTENV.
- */
-final class HedSSIPrintenv extends HedSSIBase {
-
- /**
- */
- public HedSSIPrintenv(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SSI_PRINTENV, collection);
- }
-
- /**
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
- }
-
- /**
- * SSI:PRINTENV has no attributes. So, this method should
- * always return <code>null</code>.
- * Note: Since somebody doesn't expect null is returned, return the empty attribute
- * like a custom tag which doesn't have attributes
- */
- public CMNamedNodeMap getAttributes() {
- return super.getAttributes();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSISet.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSISet.java
deleted file mode 100644
index 182b85ca2d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSISet.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * SSI:SET.
- */
-final class HedSSISet extends HedSSIBase {
-
- /**
- */
- public HedSSISet(ElementCollection collection) {
- super(HTML40Namespace.ElementName.SSI_SET, collection);
- }
-
- /**
- * SSI:SET
- * (var CDATA #IMPLIED)
- * (value CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {HTML40Namespace.ATTR_NAME_VAR, HTML40Namespace.ATTR_NAME_VALUE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSTYLE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSTYLE.java
deleted file mode 100644
index 985b7faa87..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSTYLE.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-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.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-
-/**
- * STYLE.
- */
-final class HedSTYLE extends HTMLElemDeclImpl {
-
- /**
- */
- public HedSTYLE(ElementCollection collection) {
- super(HTML40Namespace.ElementName.STYLE, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_CDATA;
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * STYLE
- * %i18n;
- * (type %ContentType; #REQUIRED) ... should be defined locally.
- * (media %MediaDesc; #IMPLIED)
- * (title %Text; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %i18n;
- attributeCollection.getI18n(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_MEDIA, HTML40Namespace.ATTR_NAME_TITLE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- // (type %ContentType; #REQUIRED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, "text/css"); //$NON-NLS-1$
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
- }
-
- /**
- * Content.<br>
- * <code>STYLE</code> is CDATA content type. So, it always returns <code>null</code>.
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- public CMContent getContent() {
- return null;
- }
-
- /**
- * CDATA content.<br>
- * @return int
- */
- public int getContentType() {
- return CMElementDeclaration.CDATA;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedScripts.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedScripts.java
deleted file mode 100644
index 76bf70e6cf..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedScripts.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.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * SUB and SUP.
- */
-final class HedScripts extends HedInlineContainer {
-
- /**
- */
- public HedScripts(String elementName, ElementCollection collection) {
- super(elementName, collection);
- correctionType = CORRECT_EMPTY;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.PRE};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTABLE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTABLE.java
deleted file mode 100644
index bed267c3c2..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTABLE.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * TABLE.
- */
-final class HedTABLE extends HTMLElemDeclImpl {
-
- /**
- */
- public HedTABLE(ElementCollection collection) {
- super(HTML40Namespace.ElementName.TABLE, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_TABLE;
- layoutType = LAYOUT_BLOCK;
- indentChild = true;
- }
-
- /**
- * TABLE.
- * %attrs;
- * %reserved;
- * (summary %Text; #IMPLIED)
- * (width %Length; #IMPLIED)
- * (border %Pixels; #IMPLIED)
- * (frame %TFrame; #IMPLIED)
- * (rules %TRules; #IMPLIED)
- * (cellspacing %Length; #IMPLIED)
- * (cellpadding %Length; #IMPLIED)
- * (align %TAlign; #IMPLIED)
- * (bgcolor %Color; #IMPLIED)
- * (datapagesize CDATA #IMPLIED)
- * (height %Pixels; #IMPLIED)
- * (background %URI; #IMPLIED)
- * (bordercolor %Color #IMPLIED) ... D205514
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %reserved;
- // ... %reserved; is empty in the current DTD.
-
- String[] names = {HTML40Namespace.ATTR_NAME_SUMMARY, HTML40Namespace.ATTR_NAME_WIDTH, HTML40Namespace.ATTR_NAME_BORDER, HTML40Namespace.ATTR_NAME_FRAME, HTML40Namespace.ATTR_NAME_RULES, HTML40Namespace.ATTR_NAME_CELLSPACING, HTML40Namespace.ATTR_NAME_CELLPADDING, HTML40Namespace.ATTR_NAME_BGCOLOR, HTML40Namespace.ATTR_NAME_DATAPAGESIZE, HTML40Namespace.ATTR_NAME_HEIGHT, HTML40Namespace.ATTR_NAME_BACKGROUND, HTML40Namespace.ATTR_NAME_BORDERCOLOR // D205514
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // align (local)
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] alignValues = {HTML40Namespace.ATTR_VALUE_LEFT, HTML40Namespace.ATTR_VALUE_CENTER, HTML40Namespace.ATTR_VALUE_RIGHT};
- atype.setEnumValues(alignValues);
- HTMLAttrDeclImpl adec = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_ALIGN, adec);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTEXTAREA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTEXTAREA.java
deleted file mode 100644
index f8a61c6f05..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTEXTAREA.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * TEXTAREA.
- */
-final class HedTEXTAREA extends HedPcdata {
-
- /**
- * TEXTAREA should keep spaces in its source.
- */
- public HedTEXTAREA(ElementCollection collection) {
- super(HTML40Namespace.ElementName.TEXTAREA, collection);
- layoutType = LAYOUT_OBJECT;
-
- keepSpaces = true;
- }
-
- /**
- * TEXTAREA.
- * %attrs;
- * %reserved; ... empty
- * (name CDATA #IMPLIED)
- * (rows NUMBER #REQUIRED)
- * (cols NUMBER #REQUIRED)
- * (disabled (disabled) #IMPLIED)
- * (readonly (readonly) #IMPLIED)
- * (tabindex NUMBER #IMPLIED)
- * (accesskey %Character; #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- * (onselect %Script; #IMPLIED)
- * (onchange %Script; #IMPLIED)
- * (istyle CDATA #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_NAME, HTML40Namespace.ATTR_NAME_ROWS, HTML40Namespace.ATTR_NAME_COLS, HTML40Namespace.ATTR_NAME_DISABLED, HTML40Namespace.ATTR_NAME_READONLY, HTML40Namespace.ATTR_NAME_TABINDEX, HTML40Namespace.ATTR_NAME_ACCESSKEY, HTML40Namespace.ATTR_NAME_ONFOCUS, HTML40Namespace.ATTR_NAME_ONBLUR, HTML40Namespace.ATTR_NAME_ONSELECT, HTML40Namespace.ATTR_NAME_ONCHANGE, HTML40Namespace.ATTR_NAME_ISTYLE};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.BUTTON};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTITLE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTITLE.java
deleted file mode 100644
index 6919004101..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTITLE.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-
-/**
- * TITLE.
- */
-final class HedTITLE extends HedPcdata {
-
- /**
- */
- public HedTITLE(ElementCollection collection) {
- super(HTML40Namespace.ElementName.TITLE, collection);
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * TITLE.
- * %i18n;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %i18n;
- attributeCollection.getI18n(attributes);
- }
-
- /**
- * Exclusion.
- * <code>TITLE</code> has the exclusion.
- * It is <code>%head.misc;</code>.
- * %head.misc; is <code>SCRIPT|STYLE|META|LINK|OBJECT</code>.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null;
-
- // (SCRIPT|STYLE|META|LINK|OBJECT)
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
-
- String[] names = {HTML40Namespace.ElementName.SCRIPT, HTML40Namespace.ElementName.STYLE, HTML40Namespace.ElementName.META, HTML40Namespace.ElementName.LINK, HTML40Namespace.ElementName.OBJECT};
- elementCollection.getDeclarations(exclusion, Arrays.asList(names).iterator());
- return exclusion;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTR.java
deleted file mode 100644
index d68a54ac5c..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTR.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * TR.
- */
-final class HedTR extends HTMLElemDeclImpl {
-
- private static String[] terminators = {HTML40Namespace.ElementName.TR};
-
- /**
- */
- public HedTR(ElementCollection collection) {
- super(HTML40Namespace.ElementName.TR, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_TCELL_CONTAINER;
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END;
- indentChild = true;
- }
-
- /**
- * %attrs;
- * %cellhalign;
- * %cellvalign;
- * (bgcolor %Color; #IMPLIED)
- * (background %URI; #IMPLIED)
- * (bordercolor %Color #IMPLIED) ... D205514
- * (height %Length #IMPLIED) bug2246
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %cellhalign;
- attributeCollection.getCellhalign(attributes);
- // %cellvalign;
- attributeCollection.getCellvalign(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_BGCOLOR, HTML40Namespace.ATTR_NAME_BACKGROUND, HTML40Namespace.ATTR_NAME_BORDERCOLOR, HTML40Namespace.ATTR_NAME_HEIGHT // D205514
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * TR has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableBody.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableBody.java
deleted file mode 100644
index f66eeefaf0..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableBody.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * THEAD/TFOOT/TBODY
- */
-final class HedTableBody extends HTMLElemDeclImpl {
-
- private static String[] terminators = {HTML40Namespace.ElementName.CAPTION, HTML40Namespace.ElementName.COL, HTML40Namespace.ElementName.COLGROUP, HTML40Namespace.ElementName.THEAD, HTML40Namespace.ElementName.TBODY, HTML40Namespace.ElementName.TFOOT};
-
- /**
- */
- public HedTableBody(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_TR_CONTAINER;
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- if (elementName == HTML40Namespace.ElementName.TBODY) {
- omitType = OMIT_BOTH;
- }
- else {
- omitType = OMIT_END;
- }
- indentChild = true;
- }
-
- /**
- * TBODY/TFOOT/THEAD
- * %attrs;
- * %cellhalign;
- * %cellvalign;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %cellhalign;
- attributeCollection.getCellhalign(attributes);
- // %cellvalign;
- attributeCollection.getCellvalign(attributes);
- }
-
- /**
- * THEAD, TFOOT and TBODY have terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableCell.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableCell.java
deleted file mode 100644
index 14fcb490cc..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableCell.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-/**
- * (TH | TD).
- */
-final class HedTableCell extends HedFlowContainer {
-
- private static String[] terminators = {HTML40Namespace.ElementName.TR, HTML40Namespace.ElementName.TH, HTML40Namespace.ElementName.TD};
-
- /**
- */
- public HedTableCell(String elementName, ElementCollection collection) {
- super(elementName, collection);
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END;
- }
-
- /**
- * %attrs;
- * (abbr %Text; #IMPLIED)
- * (axis CDATA #IMPLIED)
- * (headers IDREFS #IMPLIED)
- * (scope %Scope; #IMPLIED)
- * (rowspan NUMBER 1)
- * (colspan NUMBER 1)
- * %cellhalign;
- * %cellvalign;
- * (nowrap (nowrap) #IMPLIED)
- * (bgcolor %Color; #IMPLIED)
- * (width %Length; #IMPLIED)
- * (height %Length; #IMPLIED)
- * (background %URI; #IMPLIED)
- * (bordercolor %Color #IMPLIED) ... D205514
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %cellhalign;
- attributeCollection.getCellhalign(attributes);
- // %cellvalign;
- attributeCollection.getCellvalign(attributes);
-
- String[] names = {HTML40Namespace.ATTR_NAME_ABBR, HTML40Namespace.ATTR_NAME_AXIS, HTML40Namespace.ATTR_NAME_HEADERS, HTML40Namespace.ATTR_NAME_SCOPE, HTML40Namespace.ATTR_NAME_ROWSPAN, HTML40Namespace.ATTR_NAME_COLSPAN, HTML40Namespace.ATTR_NAME_NOWRAP, HTML40Namespace.ATTR_NAME_BGCOLOR, HTML40Namespace.ATTR_NAME_WIDTH, HTML40Namespace.ATTR_NAME_HEIGHT, HTML40Namespace.ATTR_NAME_BACKGROUND, HTML40Namespace.ATTR_NAME_BORDERCOLOR // D205514
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * TH and TD have terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedUL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedUL.java
deleted file mode 100644
index 041c5a56a5..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedUL.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.wst.html.core.internal.contentmodel;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * UL.
- */
-final class HedUL extends HedListItemContainer {
-
- /**
- */
- public HedUL(ElementCollection collection) {
- super(HTML40Namespace.ElementName.UL, collection);
- }
-
- /**
- * UL.
- * (type %ULStyle; #IMPLIED) ... should be defined locally.
- * (compact (compact) #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (type %ULStyle; #IMPLIED) ... should be defined locally.
- // %ULStyle; is (disc|square|circle).
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {HTML40Namespace.ATTR_VALUE_DISC, HTML40Namespace.ATTR_VALUE_SQUARE, HTML40Namespace.ATTR_VALUE_CIRCLE};
- atype.setEnumValues(values);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(HTML40Namespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(HTML40Namespace.ATTR_NAME_TYPE, attr);
-
- // the rest.
- String[] names = {HTML40Namespace.ATTR_NAME_COMPACT};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {HTML40Namespace.ElementName.DIR, HTML40Namespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedWBR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedWBR.java
deleted file mode 100644
index f958fe7ed4..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedWBR.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.wst.html.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-
-final class HedWBR extends HedEmpty {
-
- public HedWBR(ElementCollection collection) {
- super(HTML40Namespace.ElementName.WBR, collection);
- // LAYOUT_BREAK.
- // same as BR.
- layoutType = LAYOUT_BREAK;
- }
-
- protected void createAttributeDeclarations() {
- // No attributes is defined.
- if (attributes != null)
- return;
- attributes = new CMNamedNodeMapImpl();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCM20DocImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCM20DocImpl.java
deleted file mode 100644
index 767b594cb8..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCM20DocImpl.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.wst.html.core.internal.contentmodel;
-
-
-
-
-/**
- * Implementation of CMDocument for JSP 2.0.
- */
-class JCM20DocImpl extends JCMDocImpl {
- /**
- * JCM20DocImpl constructor comment.
- */
- public JCM20DocImpl(String docTypeName, CMNamespaceImpl targetNamespace) {
- super(docTypeName, targetNamespace, new JSP20ElementCollection());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCMDocImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCMDocImpl.java
deleted file mode 100644
index b5fe4da5f3..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCMDocImpl.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Implementation of CMDocument for JSP 1.1 and JSP 1.2.
- */
-class JCMDocImpl extends CMNodeImpl implements JSPCMDocument {
-
- /** Namespace for all names of elements, entities and attributes. */
- private CMNamespaceImpl namespace = null;
- private JSPElementCollection elements = null;
-
- /**
- * HCMDocImpl constructor comment.
- */
- public JCMDocImpl(String docTypeName, CMNamespaceImpl targetNamespace) {
- this(docTypeName, targetNamespace, new JSPElementCollection());
- }
-
- JCMDocImpl(String docTypeName, CMNamespaceImpl targetNamespace, JSPElementCollection collection) {
- super(docTypeName);
- namespace = targetNamespace;
- elements = collection;
- }
-
- public HTMLElementDeclaration getElementDeclaration(String elementName) {
- if (elements == null)
- return null;
- return (HTMLElementDeclaration) elements.getNamedItem(elementName);
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- */
- public CMNamedNodeMap getElements() {
- return elements;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- */
- public CMNamedNodeMap getEntities() {
- return null;
- }
-
- public HTMLEntityDeclaration getEntityDeclaration(String entityName) {
- return null;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- */
- public org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace getNamespace() {
- return namespace;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public int getNodeType() {
- return CMNode.DOCUMENT;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP11Namespace.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP11Namespace.java
deleted file mode 100644
index 4d1a9b8b8b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP11Namespace.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.wst.html.core.internal.contentmodel;
-
-
-/**
- * JSP 1.1 Namespace. Note, this interface was
- * copied form JSP core packages. One implication
- * is that extra care is needed in using '==' instead
- * of '.equals'.
- */
-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.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP20ElementCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP20ElementCollection.java
deleted file mode 100644
index d2e1be8b22..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP20ElementCollection.java
+++ /dev/null
@@ -1,291 +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.wst.html.core.internal.contentmodel;
-
-
-
-import java.lang.reflect.Field;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-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.CMNode;
-
-/**
- * Factory for element declarations of JSP 1.1 and JSP 1.2.
- */
-final class JSP20ElementCollection extends JSPElementCollection implements JSP20Namespace.ElementName {
-
- // element IDs
- private static class Ids20 extends Ids {
- public static final int ID_BODY = 17;
- public static final int ID_ATTRIBUTE = 18;
- public static final int ID_ELEMENT = 19;
- public static final int ID_OUTPUT = 20;
-
- public static int getNumOfIds() {
- if (numofids != -1)
- return numofids;
-
- // NOTE: If the reflection is too slow, this method should
- // just return the literal value, like 105.
- // -- 5/25/2001
- Class clazz = Ids20.class;
- Field[] fields = clazz.getFields();
- numofids = 0;
- for (int i = 0; i < fields.length; i++) {
- String name = fields[i].getName();
- if (name.startsWith("ID_"))//$NON-NLS-1$
- numofids++;
- }
- return numofids;
- }
-
- // chache the result of the reflection.
- private static int numofids = -1;
- }
-
- // attribute creater
- private class JACreater20 extends JACreater {
- public JACreater20() {
- super();
- }
-
- public CMNamedNodeMapImpl getDeclarations(int eid) {
- switch (eid) {
- case Ids20.ID_ATTRIBUTE :
- createForAttribute();
- break;
- case Ids20.ID_ELEMENT :
- createForElement();
- break;
- case Ids20.ID_BODY :
- createForBody();
- break;
- case Ids20.ID_OUTPUT :
- createForOutput();
- break;
- case Ids.ID_DIRECTIVE_TAGLIB :
- createForDirTaglib();
- break;
- default :
- super.getDeclarations(eid);
- }
- return declarations;
- }
-
- private void createForBody() {
- }
-
- private void createForOutput() {
- AttrDecl adec = new AttrDecl(JSP20Namespace.ElementName.OUTPUT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE, JSP20Namespace.ATTR_VALUE_YES, JSP20Namespace.ATTR_VALUE_NO};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, JSP20Namespace.ATTR_VALUE_NO);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ElementName.OUTPUT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DOCTYPE_ROOT_ELEMENT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DOCTYPE_ROOT_ELEMENT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DOCTYPE_SYSTEM);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DOCTYPE_SYSTEM, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DOCTYPE_PUBLIC);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DOCTYPE_PUBLIC, adec);
- }
-
- /**
- * Changed in 2.0
- */
- void createForDirTaglib() {
- // ("uri" URI OPTIONAL)
- AttrDecl adec = new AttrDecl(ATTR_NAME_URI);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(ATTR_NAME_URI, adec);
-
- // ("tagdir" URI OPTIONAL)
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_TAGDIR);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_TAGDIR, adec);
-
- // ("prefix" CDATA REQUIRED)
- adec = new AttrDecl(ATTR_NAME_PREFIX);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_PREFIX, adec);
- }
-
- private void createForElement() {
- AttrDecl adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
- }
-
- private void createForAttribute() {
- AttrDecl adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_TRIM);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_FALSE);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_TRIM, adec);
- }
- }
-
- private static String[] names = null;
-
- static {
- names = new String[Ids20.getNumOfIds()];
- names[Ids.ID_SCRIPTLET] = SCRIPTLET;
- names[Ids.ID_EXPRESSION] = EXPRESSION;
- names[Ids.ID_DECLARATION] = DECLARATION;
- names[Ids.ID_DIRECTIVE_PAGE] = DIRECTIVE_PAGE;
- names[Ids.ID_DIRECTIVE_INCLUDE] = DIRECTIVE_INCLUDE;
- names[Ids.ID_DIRECTIVE_TAGLIB] = DIRECTIVE_TAGLIB;
- names[Ids.ID_USEBEAN] = USEBEAN;
- names[Ids.ID_SETPROPERTY] = SETPROPERTY;
- names[Ids.ID_GETPROPERTY] = GETPROPERTY;
- names[Ids.ID_INCLUDE] = INCLUDE;
- names[Ids.ID_FORWARD] = FORWARD;
- names[Ids.ID_PLUGIN] = PLUGIN;
- names[Ids.ID_PARAMS] = PARAMS;
- names[Ids.ID_FALLBACK] = FALLBACK;
- names[Ids.ID_PARAM] = PARAM;
- names[Ids.ID_ROOT] = ROOT;
- names[Ids.ID_TEXT] = TEXT;
- names[Ids20.ID_BODY] = JSP20Namespace.ElementName.BODY;
- names[Ids20.ID_ATTRIBUTE] = JSP20Namespace.ElementName.ATTRIBUTE;
- names[Ids20.ID_ELEMENT] = JSP20Namespace.ElementName.ELEMENT;
- names[Ids20.ID_OUTPUT] = JSP20Namespace.ElementName.OUTPUT;
- }
-
- /**
- */
- public JSP20ElementCollection() {
- super(JSP20ElementCollection.names, TOLERANT_CASE);
- }
-
- /**
- * @param eid
- * int
- */
- CMGroupImpl createContent(int eid) {
- if (eid == ID_UNKNOWN)
- return null;
-
- CMGroupImpl content = null;
- CMNode child = null;
-
- switch (eid) {
- case Ids.ID_ROOT :
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- int validChildren[] = {
- // %Directives;
- Ids.ID_TEXT, Ids.ID_DIRECTIVE_PAGE, Ids.ID_DIRECTIVE_INCLUDE, Ids20.ID_BODY, Ids20.ID_ATTRIBUTE,
- // %Scripts;
- Ids.ID_SCRIPTLET, Ids.ID_DECLARATION, Ids.ID_EXPRESSION,
- // %Actions;
- Ids.ID_USEBEAN, Ids.ID_SETPROPERTY, Ids.ID_GETPROPERTY, Ids.ID_INCLUDE, Ids.ID_FORWARD, Ids.ID_PLUGIN};
- for (int i = 0; i < validChildren.length; i++) {
- child = item(validChildren[i]);
- if (child != null)
- content.appendChild(child);
- }
- break;
- default :
- content = super.createContent(eid);
- break;
- }
-
- return content;
- }
-
- /**
- * @param eid
- * int
- */
- HTMLElementDeclaration createElemDecl(int eid) {
- if (eid == ID_UNKNOWN)
- return null;
-
- TypePacket packet = new TypePacket();
- switch (eid) {
- case Ids20.ID_BODY :
- // declaration
- packet.name = JSP20Namespace.ElementName.BODY;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case Ids20.ID_ELEMENT :
- // declaration
- packet.name = JSP20Namespace.ElementName.ELEMENT;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case Ids20.ID_ATTRIBUTE :
- // declaration
- packet.name = JSP20Namespace.ElementName.ATTRIBUTE;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case Ids20.ID_OUTPUT :
- // declaration
- packet.name = JSP20Namespace.ElementName.OUTPUT;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case Ids.ID_DIRECTIVE_TAGLIB :
- // directive.taglib
- packet.name = DIRECTIVE_TAGLIB;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_DIRECTIVE;
- break;
- default :
- return super.createElemDecl(eid);
- }
- ElemDecl decl = new ElemDecl(packet);
-
- CMGroupImpl content = createContent(eid);
- if (content != null)
- decl.setContent(content);
-
- JACreater20 creater = new JACreater20();
- decl.setAttributes(creater.getDeclarations(eid));
-
- return decl;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP20Namespace.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP20Namespace.java
deleted file mode 100644
index 5a0dc9a81f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP20Namespace.java
+++ /dev/null
@@ -1,81 +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.wst.html.core.internal.contentmodel;
-
-/**
- * New names for JSP 2.0 spec.
- *
- * @deprecated - use
- * org.eclipse.jst.jsp.core.internal.provisional.JSP20Namespace
- */
-
-public interface JSP20Namespace extends JSP11Namespace {
- public static String JSP20_URI = "";//$NON-NLS-1$
-
- /**
- * New elements for JSP 2.0 spec.
- */
- public static interface ElementName extends JSP11Namespace.ElementName {
- String DIRECTIVE_TAG = "jsp:directive.tag"; //$NON-NLS-1$
- String DIRECTIVE_ATTRIBUTE = "jsp:directive.attribute"; //$NON-NLS-1$
- String DIRECTIVE_VARIABLE = "jsp:directive.variable"; //$NON-NLS-1$
- String BODY = "jsp:body"; //$NON-NLS-1$
- String ATTRIBUTE = "jsp:attribute"; //$NON-NLS-1$
- String ELEMENT = "jsp:element"; //$NON-NLS-1$
- String DOBODY = "jsp:doBody";
- String INVOKE = "jsp:invoke";
- String OUTPUT = "jsp:output";
- }
-
- String ATTR_NAME_TAGDIR = "tagdir"; //$NON-NLS-1$
-
- String ATTR_NAME_DISPLAY_NAME = "display-name"; //$NON-NLS-1$
- String ATTR_NAME_BODY_CONTENT = "body-content"; //$NON-NLS-1$
- String ATTR_NAME_SMALL_ICON = "small-icon"; //$NON-NLS-1$
- String ATTR_NAME_LARGE_ICON = "large-icon"; //$NON-NLS-1$
- String ATTR_NAME_DESCRIPTION = "description"; //$NON-NLS-1$
- String ATTR_NAME_EXAMPLE = "example"; //$NON-NLS-1$
- String ATTR_NAME_LANGUAGE = "language"; //$NON-NLS-1$
- String ATTR_NAME_IMPORT = "import"; //$NON-NLS-1$
- String ATTR_NAME_PAGEENCODING = "pageEncoding"; //$NON-NLS-1$
- String ATTR_NAME_ISELIGNORED = "isELIgnored"; //$NON-NLS-1$
-
- String ATTR_NAME_REQUIRED = "required"; //$NON-NLS-1$
- String ATTR_NAME_FRAGMENT = "fragment"; //$NON-NLS-1$
- String ATTR_NAME_RTEXPRVALUE = "rtexprvalue"; //$NON-NLS-1$
- String ATTR_NAME_TYPE = "type"; //$NON-NLS-1$
-
- String ATTR_NAME_NAME_GIVEN = "name-given"; //$NON-NLS-1$
- String ATTR_NAME_NAME_FROM_ATTRIBUTE = "name-from-attribute"; //$NON-NLS-1$
- String ATTR_NAME_ALIAS = "alias"; //$NON-NLS-1$
- String ATTR_NAME_VARIABLE_CLASS = "variable-class"; //$NON-NLS-1$
- String ATTR_NAME_DECLARE = "declare"; //$NON-NLS-1$
-
- String ATTR_VALUE_SCRIPTLESS = "scriptless"; //$NON-NLS-1$
- String ATTR_VALUE_TAGDEPENDENT = "tagdependent"; //$NON-NLS-1$
- String ATTR_VALUE_EMPTY = "empty"; //$NON-NLS-1$
-
- String ATTR_NAME_TRIM = "trim"; //$NON-NLS-1$
-
- String ATTR_NAME_VAR = "var"; //$NON-NLS-1$
- String ATTR_NAME_VARREADER = "varReader"; //$NON-NLS-1$
-
- String ATTR_NAME_DOCTYPE_ROOT_ELEMENT = "doctype-root-element"; //$NON-NLS-1$
- String ATTR_NAME_DOCTYPE_SYSTEM = "doctype-system"; //$NON-NLS-1$
- String ATTR_NAME_DOCTYPE_PUBLIC = "doctype-public"; //$NON-NLS-1$
-
- String ATTR_VALUE_NO = "no";
- String ATTR_VALUE_YES = "yes";
-
- String ATTR_VALUE_SCOPE_AT_END = "AT_END";
- String ATTR_VALUE_SCOPE_AT_BEGIN = "AT_BEGIN";
- String ATTR_VALUE_SCOPE_NESTED = "NESTED";
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSPCMDocument.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSPCMDocument.java
deleted file mode 100644
index 802bfb2994..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSPCMDocument.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-/**
- * JSP extension for CMDocument.
- * This interface provides some short hand methods to get declarations
- * by a name.
- */
-public interface JSPCMDocument extends org.eclipse.wst.xml.core.internal.contentmodel.CMDocument {
-
- /**
- * A short hand method to get a element declaration for a JSP element.
- * JSP declaration class implements HTMLElementDeclaration interface.
- * @param elementName java.lang.String
- */
- HTMLElementDeclaration getElementDeclaration(String elementName);
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSPElementCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSPElementCollection.java
deleted file mode 100644
index 67832d974d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSPElementCollection.java
+++ /dev/null
@@ -1,900 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-
-
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-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.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;
-
-/**
- * Factory for element declarations of the JSP 1.1 and 1.2.
- */
-class JSPElementCollection extends DeclCollection implements JSP11Namespace.ElementName {
-
-
- class TypePacket {
- public String name = null;
- public int content = CMElementDeclaration.EMPTY;
- public int omit = HTMLElementDeclaration.OMIT_NONE;
- public int lineBreak = HTMLElementDeclaration.BREAK_NONE;
- public int layout = HTMLElementDeclaration.LAYOUT_NONE;
- public int correct = HTMLElementDeclaration.CORRECT_NONE;
- public int format = HTMLElementDeclaration.FORMAT_XML;
- public boolean indentChild = false;
-
- public TypePacket() {
- }
- }
-
- /** JSP element declaration. */
- class ElemDecl extends CMContentImpl implements HTMLElementDeclaration, HTMLPropertyDeclaration {
- private TypePacket type = null;
- private CMGroupImpl content = null;
- private CMNamedNodeMapImpl attributes = null;
-
- public ElemDecl(TypePacket t) {
- super(t.name, 1, 1);
- type = t;
- }
-
- public void setContent(CMGroupImpl group) {
- content = group;
- }
-
- public void setAttributes(CMNamedNodeMapImpl attrs) {
- attributes = attrs;
- }
-
- // implements CMNode
- public int getNodeType() {
- return CMNode.ELEMENT_DECLARATION;
- }
-
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE)) {
- return true;
- }
- else if (propertyName.equals(HTMLCMProperties.CONTENT_HINT)) {
- return true;
- }
- else {
- PropertyProvider pp = PropertyProviderFactory.getProvider(propertyName);
- if (pp == null)
- return false;
- return pp.supports(this);
- }
- }
-
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE)) {
- return Boolean.FALSE; //D208839
- }
- else if (propertyName.equals(HTMLCMProperties.CONTENT_HINT)) {
- String myName = getElementName();
- if (myName == JSP11Namespace.ElementName.PLUGIN) {
- return getNamedItem(JSP11Namespace.ElementName.PARAMS); // outer class method.
- }
- else if (myName == JSP11Namespace.ElementName.PARAMS) {
- return getNamedItem(JSP11Namespace.ElementName.PARAM); // outer class method.
- }
- else {
- return null;
- }
- }
- else {
- PropertyProvider pp = PropertyProviderFactory.getProvider(propertyName);
- if (pp == null)
- return null;
- return pp.get(this);
- }
- }
-
- // implementes CMElementDeclaration
- public CMNamedNodeMap getAttributes() {
- return attributes;
- }
-
- public CMContent getContent() {
- return content;
- }
-
- public int getContentType() {
- return type.content;
- }
-
- public CMDataType getDataType() {
- return null;
- }
-
- public String getElementName() {
- return getNodeName();
- }
-
- public CMNamedNodeMap getLocalElements() {
- return null;
- }
-
- // implementes HTMLElementDeclaration
- public HTMLAttributeDeclaration getAttributeDeclaration(String attrName) {
- if (attributes == null)
- return null;
- return (HTMLAttributeDeclaration) attributes.getNamedItem(attrName);
- }
-
- public int getCorrectionType() {
- return type.correct;
- }
-
- public CMContent getExclusion() {
- return null;
- }
-
- public CMContent getInclusion() {
- return null;
- }
-
- public CMNamedNodeMap getProhibitedAncestors() {
- return EMPTY_MAP;
- }
-
- public int getFormatType() {
- return type.format;
- }
-
- public int getLayoutType() {
- return type.layout;
- }
-
- public int getLineBreakHint() {
- return type.lineBreak;
- }
-
- public int getOmitType() {
- return type.omit;
- }
-
- public boolean shouldTerminateAt(HTMLElementDeclaration dec) {
- return false;
- }
-
- public boolean shouldKeepSpaces() {
- return false;
- }
-
- public boolean shouldIndentChildSource() {
- return type.indentChild;
- }
-
- public boolean isJSP() {
- return true;
- }
- }
-
- // element IDs
- static class Ids {
- public static final int ID_SCRIPTLET = 0;
- public static final int ID_EXPRESSION = 1;
- public static final int ID_DECLARATION = 2;
- public static final int ID_DIRECTIVE_PAGE = 3;
- public static final int ID_DIRECTIVE_INCLUDE = 4;
- public static final int ID_DIRECTIVE_TAGLIB = 5;
- public static final int ID_USEBEAN = 6;
- public static final int ID_SETPROPERTY = 7;
- public static final int ID_GETPROPERTY = 8;
- public static final int ID_INCLUDE = 9;
- public static final int ID_FORWARD = 10;
- public static final int ID_PLUGIN = 11;
- public static final int ID_PARAMS = 12;
- public static final int ID_FALLBACK = 13;
- public static final int ID_PARAM = 14;
- public static final int ID_ROOT = 15;
- public static final int ID_TEXT = 16;
-
- public static int getNumOfIds() {
- if (numofids != -1)
- return numofids;
-
- // NOTE: If the reflection is too slow, this method should
- // just return the literal value, like 105.
- // -- 5/25/2001
- Class clazz = Ids.class;
- Field[] fields = clazz.getFields();
- numofids = 0;
- for (int i = 0; i < fields.length; i++) {
- String name = fields[i].getName();
- if (name.startsWith("ID_"))//$NON-NLS-1$
- numofids++;
- }
- return numofids;
- }
-
- // chache the result of the reflection.
- private static int numofids = -1;
- }
-
- // attribute creater
- class JACreater implements JSP11Namespace {
- // attribute declaration
- class AttrDecl extends CMNodeImpl implements HTMLAttributeDeclaration {
- HTMLCMDataTypeImpl type = null;
- int usage = CMAttributeDeclaration.OPTIONAL;
-
- // methods
- public AttrDecl(String attrName) {
- super(attrName);
- }
-
- public String getAttrName() {
- return getNodeName();
- }
-
- public CMDataType getAttrType() {
- return type;
- }
-
- /** @deprecated by superclass */
- public String getDefaultValue() {
- if (type.getImpliedValueKind() != CMDataType.IMPLIED_VALUE_DEFAULT)
- return null;
- return type.getImpliedValue();
- }
-
- /** @deprecated by superclass */
- public Enumeration getEnumAttr() {
- Vector v = new Vector(Arrays.asList(type.getEnumeratedValues()));
- return v.elements();
- }
-
- public int getNodeType() {
- return CMNode.ATTRIBUTE_DECLARATION;
- }
-
- public int getUsage() {
- return usage;
- }
-
- public boolean shouldIgnoreCase() {
- return false;
- }
- }
-
- CMNamedNodeMapImpl declarations = null;
-
- public JACreater() {
- declarations = new CMNamedNodeMapImpl();
- }
-
- public CMNamedNodeMapImpl getDeclarations(int eid) {
- switch (eid) {
- case Ids.ID_DIRECTIVE_PAGE :
- createForDirPage();
- break;
- case Ids.ID_DIRECTIVE_INCLUDE :
- createForDirInclude();
- break;
- case Ids.ID_DIRECTIVE_TAGLIB :
- createForDirTaglib();
- break;
- case Ids.ID_USEBEAN :
- createForUseBean();
- break;
- case Ids.ID_SETPROPERTY :
- createForSetProperty();
- break;
- case Ids.ID_GETPROPERTY :
- createForGetProperty();
- break;
- case Ids.ID_INCLUDE :
- createForInclude();
- break;
- case Ids.ID_FORWARD :
- createForForward();
- break;
- case Ids.ID_PLUGIN :
- createForPlugin();
- break;
- case Ids.ID_PARAM :
- createForParam();
- break;
- case Ids.ID_ROOT :
- createForRoot();
- break;
- default :
- // should warn.
- break;
- }
- return declarations;
- }
-
- private AttrDecl createBoolType(String name, String defValue) {
- AttrDecl adec = new AttrDecl(name);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, defValue);
- return adec;
- }
-
- private void createForDirPage() {
- AttrDecl adec = null;
- // ("language" CDATA DECLARED "java")
- adec = new AttrDecl(ATTR_NAME_LANGUAGE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_JAVA);
- declarations.putNamedItem(ATTR_NAME_LANGUAGE, adec);
-
- // ("extends" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_EXTENDS);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_EXTENDS, adec);
-
- // ("contentType" CDATA DECLARED "text/html; ISO-8859-1")
- adec = new AttrDecl(ATTR_NAME_CONTENT_TYPE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_CT_DEFAULT);
- declarations.putNamedItem(ATTR_NAME_CONTENT_TYPE, adec);
-
- // ("import" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_IMPORT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_IMPORT, adec);
-
- // ("session" ENUM DECLARED (true|false) "true")
- adec = createBoolType(ATTR_NAME_SESSION, ATTR_VALUE_TRUE);
- if (adec != null)
- declarations.putNamedItem(ATTR_NAME_SESSION, adec);
-
- // ("buffer" CDATA DECLARED "8kb")
- adec = new AttrDecl(ATTR_NAME_BUFFER);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_BUFSIZ_DEFAULT);
- declarations.putNamedItem(ATTR_NAME_BUFFER, adec);
-
- // ("autoFlush" ENUM DECLARED (true|false) "true")
- adec = createBoolType(ATTR_NAME_AUTOFLUSH, ATTR_VALUE_TRUE);
- if (adec != null)
- declarations.putNamedItem(ATTR_NAME_AUTOFLUSH, adec);
-
- // ("isThreadSafe" ENUM DECLARED (true|false) "true")
- adec = createBoolType(ATTR_NAME_IS_THREAD_SAFE, ATTR_VALUE_TRUE);
- if (adec != null)
- declarations.putNamedItem(ATTR_NAME_IS_THREAD_SAFE, adec);
-
- // ("info" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_INFO);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_INFO, adec);
-
- // ("errorPage" URI IMPLIED)
- adec = new AttrDecl(ATTR_NAME_ERROR_PAGE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- declarations.putNamedItem(ATTR_NAME_ERROR_PAGE, adec);
-
- // ("isErrorPage" ENUM DECLARED (true|false) "false")
- adec = createBoolType(ATTR_NAME_IS_ERROR_PAGE, ATTR_VALUE_FALSE);
- if (adec != null)
- declarations.putNamedItem(ATTR_NAME_IS_ERROR_PAGE, adec);
-
- // ("pageEncoding" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_PAGE_ENCODING);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_PAGE_ENCODING, adec);
-
- }
-
- private void createForDirInclude() {
- // ("file" URI REQUIRED); Defect TORO:185241
- AttrDecl adec = new AttrDecl(ATTR_NAME_FILE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_FILE, adec);
- }
-
- void createForDirTaglib() {
- // ("uri" URI REQUIRED)
- AttrDecl adec = new AttrDecl(ATTR_NAME_URI);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_URI, adec);
-
- // ("prefix" CDATA REQUIRED)
- adec = new AttrDecl(ATTR_NAME_PREFIX);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_PREFIX, adec);
- }
-
- private void createForUseBean() {
- // ("id" ID REQUIRED)
- AttrDecl adec = new AttrDecl(ATTR_NAME_ID);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ID);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_ID, adec);
-
- // ("scope" ENUM DECLARED (page|session|request|application) "page")
- adec = new AttrDecl(ATTR_NAME_SCOPE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_PAGE, ATTR_VALUE_SESSION, ATTR_VALUE_REQUEST, ATTR_VALUE_APPLICATION};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_PAGE);
- declarations.putNamedItem(ATTR_NAME_SCOPE, adec);
-
- // ("class" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_CLASS);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_CLASS, adec);
-
- // ("beanName" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_BEAN_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_BEAN_NAME, adec);
-
- // ("type" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_TYPE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_TYPE, adec);
- }
-
- private void createForSetProperty() {
- // ("name" IDREF REQUIRED)
- AttrDecl adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.IDREF);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
-
- // ("property" CDATA REQUIRED)
- adec = new AttrDecl(ATTR_NAME_PROPERTY);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_PROPERTY, adec);
-
- // ("value" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_VALUE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_VALUE, adec);
-
- // ("param" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_PARAM);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_PARAM, adec);
-
- }
-
- private void createForGetProperty() {
- // ("name" IDREF REQUIRED)
- AttrDecl adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.IDREF);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
-
- // ("property" CDATA REQUIRED)
- adec = new AttrDecl(ATTR_NAME_PROPERTY);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_PROPERTY, adec);
-
- }
-
- private void createForInclude() {
- AttrDecl adec = null;
- // ("page" URI REQUIRED)
- adec = new AttrDecl(ATTR_NAME_PAGE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_PAGE, adec);
-
- // ("flush" ENUM OPTIONAL (true|false)); Defect TORO:185241
- adec = new AttrDecl(ATTR_NAME_FLUSH);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_FALSE);
- declarations.putNamedItem(ATTR_NAME_FLUSH, adec);
- }
-
- private void createForForward() {
- // ("page" URI REQUIRED)
- AttrDecl adec = new AttrDecl(ATTR_NAME_PAGE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_PAGE, adec);
- }
-
- private void createForPlugin() {
- // ("type" ENUM REQUIRED (bean|applet))
- AttrDecl adec = new AttrDecl(ATTR_NAME_TYPE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- String[] values = {ATTR_VALUE_BEAN, ATTR_VALUE_APPLET};
- adec.type.setEnumValues(values);
- declarations.putNamedItem(ATTR_NAME_TYPE, adec);
-
- // ("code" CDATA REQUIRED)
- adec = new AttrDecl(ATTR_NAME_CODE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_CODE, adec);
-
- // ("codebase" URI REQUIRED)
- adec = new AttrDecl(ATTR_NAME_CODEBASE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_CODEBASE, adec);
-
- // ("align" ENUM IMPLIED (top|middle|bottom|left|right))
- adec = new AttrDecl(ATTR_NAME_ALIGN);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] aligns = {ATTR_VALUE_TOP, ATTR_VALUE_MIDDLE, ATTR_VALUE_BOTTOM, ATTR_VALUE_LEFT, ATTR_VALUE_RIGHT};
- adec.type.setEnumValues(aligns);
- declarations.putNamedItem(ATTR_NAME_ALIGN, adec);
-
- // ("archive" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_ARCHIVE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_ARCHIVE, adec);
-
- // ("height" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_HEIGHT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_HEIGHT, adec);
-
- // ("hspace" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_HSPACE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_HSPACE, adec);
-
- // ("jreversion" CDATA DECLARED "1.1")
- adec = new AttrDecl(ATTR_NAME_JREVERSION);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_JVER11);
- declarations.putNamedItem(ATTR_NAME_JREVERSION, adec);
-
- // ("name" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
-
- // ("vspace" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_VSPACE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_VSPACE, adec);
-
- // ("width" CDATA IMPLIED)
- adec = new AttrDecl(ATTR_NAME_WIDTH);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- declarations.putNamedItem(ATTR_NAME_WIDTH, adec);
-
- // ("nspluginurl" URI IMPLIED)
- adec = new AttrDecl(ATTR_NAME_NSPLUGINURL);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- declarations.putNamedItem(ATTR_NAME_NSPLUGINURL, adec);
-
- // ("iepluginurl" URI IMPLIED)
- adec = new AttrDecl(ATTR_NAME_IEPLUGINURL);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- declarations.putNamedItem(ATTR_NAME_IEPLUGINURL, adec);
- }
-
- private void createForParam() {
- // ("name" CDATA REQUIRED)
- AttrDecl adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
-
- // ("value" CDATA REQUIRED); Defect TORO:185241
- adec = new AttrDecl(ATTR_NAME_VALUE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_VALUE, adec);
-
- }
-
- private void createForRoot() {
- // ("xmlns:jsp" CDATA "http://jva.sun.com/JSP/Page")
- AttrDecl adec = new AttrDecl(ATTR_NAME_XMLNS_JSP);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_XMLNS_JSP);
- declarations.putNamedItem(ATTR_NAME_XMLNS_JSP, adec);
- // ("version" CDATA REQUIRED)
- adec = new AttrDecl(ATTR_NAME_VERSION);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_VERSION, adec);
- }
- }
-
- private final static CMNamedNodeMap EMPTY_MAP = new CMNamedNodeMap() {
- public int getLength() {
- return 0;
- }
-
- public CMNode getNamedItem(String name) {
- return null;
- }
-
- public CMNode item(int index) {
- return null;
- }
-
- public Iterator iterator() {
- return new Iterator() {
- public boolean hasNext() {
- return false;
- }
-
- public Object next() {
- return null;
- }
-
- public void remove() {
- }
- };
- }
- };
- private static String[] names = null;
-
- static {
- names = new String[Ids.getNumOfIds()];
- names[Ids.ID_SCRIPTLET] = SCRIPTLET;
- names[Ids.ID_EXPRESSION] = EXPRESSION;
- names[Ids.ID_DECLARATION] = DECLARATION;
- names[Ids.ID_DIRECTIVE_PAGE] = DIRECTIVE_PAGE;
- names[Ids.ID_DIRECTIVE_INCLUDE] = DIRECTIVE_INCLUDE;
- names[Ids.ID_DIRECTIVE_TAGLIB] = DIRECTIVE_TAGLIB;
- names[Ids.ID_USEBEAN] = USEBEAN;
- names[Ids.ID_SETPROPERTY] = SETPROPERTY;
- names[Ids.ID_GETPROPERTY] = GETPROPERTY;
- names[Ids.ID_INCLUDE] = INCLUDE;
- names[Ids.ID_FORWARD] = FORWARD;
- names[Ids.ID_PLUGIN] = PLUGIN;
- names[Ids.ID_PARAMS] = PARAMS;
- names[Ids.ID_FALLBACK] = FALLBACK;
- names[Ids.ID_PARAM] = PARAM;
- names[Ids.ID_ROOT] = ROOT;
- names[Ids.ID_TEXT] = TEXT;
- }
-
- JSPElementCollection(String[] names, boolean tolerant) {
- super(names, tolerant);
- }
-
- /**
- */
- public JSPElementCollection() {
- super(names, TOLERANT_CASE);
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param elementName java.lang.String
- */
- protected CMNode create(String elementName) {
- return createElemDecl(getID(elementName));
- }
-
- /**
- * @param eid int
- */
- CMGroupImpl createContent(int eid) {
- if (eid == ID_UNKNOWN)
- return null;
-
- CMGroupImpl content = null;
- CMNode child = null;
-
- switch (eid) {
- case Ids.ID_INCLUDE :
- case Ids.ID_FORWARD :
- // (jsp:param)*
- content = new CMGroupImpl(CMGroup.SEQUENCE, 0, CMContentImpl.UNBOUNDED);
- child = item(Ids.ID_PARAM);
- if (child != null)
- content.appendChild(child);
- break;
- case Ids.ID_PLUGIN :
- // (jsp:params | jsp:fallback)?
- content = new CMGroupImpl(CMGroup.CHOICE, 0, 1);
- // jsp:params
- child = item(Ids.ID_PARAMS);
- if (child != null)
- content.appendChild(child);
- // jsp:fallback
- child = item(Ids.ID_FALLBACK);
- if (child != null)
- content.appendChild(child);
- break;
- case Ids.ID_PARAMS :
- // (jsp:param)+
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
- child = item(Ids.ID_PARAM);
- if (child != null)
- content.appendChild(child);
- break;
- case Ids.ID_ROOT :
- // %Body;
- // --> (jsp:text|%Directives;|%Scripts;|%Actions;)*
- // %Directives --> jsp:directive.page|jsp:directive.include
- // %Scripts; --> jsp:scriptlet|jsp:declaration|jsp:expression
- // %Actions --> jsp:useBean|jsp.setProperty|jsp:getProperty
- // |jsp:include|jsp:forward|jsp:plugin
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- int validChildren[] = {Ids.ID_TEXT,
- // %Directves;
- Ids.ID_DIRECTIVE_PAGE, Ids.ID_DIRECTIVE_INCLUDE,
- // %Scripts;
- Ids.ID_SCRIPTLET, Ids.ID_DECLARATION, Ids.ID_EXPRESSION,
- // %Actions;
- Ids.ID_USEBEAN, Ids.ID_SETPROPERTY, Ids.ID_GETPROPERTY, Ids.ID_INCLUDE, Ids.ID_FORWARD, Ids.ID_PLUGIN};
- for (int i = 0; i < validChildren.length; i++) {
- child = item(validChildren[i]);
- if (child != null)
- content.appendChild(child);
- }
- break;
- }
-
- return content;
- }
-
- /**
- * @param eid int
- */
- HTMLElementDeclaration createElemDecl(int eid) {
- if (eid == ID_UNKNOWN)
- return null;
-
- TypePacket packet = new TypePacket();
- switch (eid) {
- case Ids.ID_SCRIPTLET :
- // content, omit, lineBreak, layout, correct, format
- // scriptlet
- packet.name = SCRIPTLET;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case Ids.ID_EXPRESSION :
- // expression
- packet.name = EXPRESSION;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case Ids.ID_DECLARATION :
- // declaration
- packet.name = DECLARATION;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case Ids.ID_DIRECTIVE_PAGE :
- // directive.page
- packet.name = DIRECTIVE_PAGE;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_DIRECTIVE;
- break;
- case Ids.ID_DIRECTIVE_INCLUDE :
- // directive.inlcude
- packet.name = DIRECTIVE_INCLUDE;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_DIRECTIVE;
- break;
- case Ids.ID_DIRECTIVE_TAGLIB :
- // directive.taglib
- packet.name = DIRECTIVE_TAGLIB;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_DIRECTIVE;
- break;
- case Ids.ID_USEBEAN :
- // useBean
- packet.name = USEBEAN;
- packet.content = CMElementDeclaration.ANY;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.indentChild = true;
- break;
- case Ids.ID_SETPROPERTY :
- // setProperty
- packet.name = SETPROPERTY;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- break;
- case Ids.ID_GETPROPERTY :
- // getProperty
- packet.name = GETPROPERTY;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- break;
- case Ids.ID_INCLUDE :
- // include
- packet.name = INCLUDE;
- packet.content = CMElementDeclaration.ELEMENT;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- break;
- case Ids.ID_FORWARD :
- // forward
- packet.name = FORWARD;
- packet.content = CMElementDeclaration.ELEMENT;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- break;
- case Ids.ID_PLUGIN :
- // plugin
- packet.name = PLUGIN;
- packet.content = CMElementDeclaration.ELEMENT;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- break;
- case Ids.ID_PARAMS :
- // params
- packet.name = PARAMS;
- packet.content = CMElementDeclaration.ELEMENT;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.indentChild = true;
- break;
- case Ids.ID_FALLBACK :
- // fallback
- packet.name = FALLBACK;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- break;
- case Ids.ID_PARAM :
- // param
- packet.name = PARAM;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- break;
- case Ids.ID_ROOT :
- packet.name = ROOT;
- packet.content = CMElementDeclaration.ELEMENT;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN; // same as HTML
- break;
- case Ids.ID_TEXT :
- packet.name = TEXT;
- packet.content = CMElementDeclaration.PCDATA;
- break;
- default :
- // unknown ID
- return null;
- }
-
- ElemDecl dec = new ElemDecl(packet);
-
- CMGroupImpl content = createContent(eid);
- if (content != null)
- dec.setContent(content);
-
- JACreater creater = new JACreater();
- dec.setAttributes(creater.getDeclarations(eid));
-
- return dec;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/PropertyProvider.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/PropertyProvider.java
deleted file mode 100644
index f3972ecd36..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/PropertyProvider.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.wst.html.core.internal.contentmodel;
-
-
-/**
- * PropertyProvider class.
- * This class is intended to be used in HTMLElementDeclaration instances.
- */
-interface PropertyProvider {
-
- boolean supports(HTMLElementDeclaration edecl);
-
- Object get(HTMLElementDeclaration edecl);
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/PropertyProviderFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/PropertyProviderFactory.java
deleted file mode 100644
index 5eb1abe27e..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/PropertyProviderFactory.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel;
-
-import java.util.Hashtable;
-
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-import org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap;
-
-/**
- * The factory object of PropertyProvider.
- */
-final class PropertyProviderFactory {
-
-
- /**
- * DefaultProvider is intended to be used for unknown properties.
- * It always returns null value for any properties.
- */
- class DefaultProvider implements PropertyProvider {
- public DefaultProvider() {
- super();
- }
-
- public boolean supports(HTMLElementDeclaration edecl) {
- return false;
- }
-
- public Object get(HTMLElementDeclaration edecl) {
- return null;
- }
- }
-
- abstract class AbstractElementPropertyProvider implements PropertyProvider {
- protected AbstractElementPropertyProvider() {
- super();
- }
-
- public boolean supports(HTMLElementDeclaration edecl) {
- return (edecl != null);
- }
-
- public Object get(HTMLElementDeclaration edecl) {
- if (!(edecl instanceof HTMLPropertyDeclaration))
- return null;
- return getElementProperty((HTMLPropertyDeclaration)edecl);
- }
-
- abstract protected Object getElementProperty(HTMLPropertyDeclaration decl);
- }
-
- /*
- * "tagInfo"
- * gets documentation for the element
- */
- class PPTagInfo extends AbstractElementPropertyProvider {
- private final static String htmlAnnotationLoc = "data/htmref.xml"; //$NON-NLS-1$
- protected AnnotationMap fAnnotationMap = null;
-
- public PPTagInfo() {
- super();
- }
-
- /**
- * Gets the annotationMap.
- * @return Returns a AnnotationMap
- */
- protected AnnotationMap getAnnotationMap() {
- if (fAnnotationMap == null) {
- fAnnotationMap = new AnnotationMap();
- try {
- fAnnotationMap.load(htmlAnnotationLoc, HTMLCorePlugin.getDefault().getBundle().getSymbolicName());
- }
- catch (Exception e) {
- // no annotation available
- }
- }
- return fAnnotationMap;
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- if (decl instanceof HTMLElementDeclaration) {
- return getAnnotationMap().getProperty(((HTMLElementDeclaration)decl).getElementName(), "tagInfo"); //$NON-NLS-1$
- } else {
- return null;
- }
- }
- }
-
- /*
- * "shouldKeepSpace"
- */
- class PPShouldKeepSpace extends AbstractElementPropertyProvider {
- public PPShouldKeepSpace() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- return new Boolean(decl.shouldKeepSpaces());
- }
- }
-
- /*
- * "shouldIndentChildSource"
- */
- class PPShouldIndentChildSource extends AbstractElementPropertyProvider {
- public PPShouldIndentChildSource() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- return new Boolean(decl.shouldIndentChildSource());
- }
- }
-
- /*
- * "terminators"
- */
- class PPTerminators extends AbstractElementPropertyProvider {
- public PPTerminators() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- if (! (decl instanceof HTMLElemDeclImpl)) return null;
- return ((HTMLElemDeclImpl)decl).getTerminators();
- }
- }
-
- /*
- * "prohibitedAncestors"
- */
- class PPProhibitedAncestors extends AbstractElementPropertyProvider {
- public PPProhibitedAncestors() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- return decl.getProhibitedAncestors();
- }
- }
-
- /*
- * "isJSP"
- */
- class PPIsJSP extends AbstractElementPropertyProvider {
- public PPIsJSP() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- return new Boolean(decl.isJSP());
- }
- }
-
- /*
- * "isXHTML"
- * HTMLElementDeclaration itself never represent any XHTML element declaration.
- * So, this property must be always false.
- */
- class PPIsXHTML extends AbstractElementPropertyProvider {
- public PPIsXHTML() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- return new Boolean(false);
- }
- }
-
- /*
- * "isSSI"
- * Each declaration class for SSI elements must provide this property itself,
- * and then return true. Other declaration must always return false.
- */
- class PPIsSSI extends AbstractElementPropertyProvider {
- public PPIsSSI() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- return new Boolean(false);
- }
- }
-
- /*
- * "lineBreakHint"
- */
- class PPLineBreakHint extends AbstractElementPropertyProvider {
- public PPLineBreakHint() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- String hint = HTMLCMProperties.Values.BREAK_NONE;
- switch (decl.getLineBreakHint()) {
- case HTMLElementDeclaration.BREAK_AFTER_START :
- hint = HTMLCMProperties.Values.BREAK_AFTER_START;
- break;
- case HTMLElementDeclaration.BREAK_BEFORE_START_AND_AFTER_END :
- hint = HTMLCMProperties.Values.BREAK_BEFORE_START_AND_AFTER_END;
- break;
- case HTMLElementDeclaration.BREAK_NONE :
- // nothing to do
- default :
- break;
- }
- return hint;
- }
- }
-
- /*
- * "layoutType"
- */
- class PPLayoutType extends AbstractElementPropertyProvider {
- public PPLayoutType() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- String type = HTMLCMProperties.Values.LAYOUT_NONE;
- switch (decl.getLayoutType()) {
- case HTMLElementDeclaration.LAYOUT_BLOCK :
- type = HTMLCMProperties.Values.LAYOUT_BLOCK;
- break;
- case HTMLElementDeclaration.LAYOUT_BREAK :
- type = HTMLCMProperties.Values.LAYOUT_BREAK;
- break;
- case HTMLElementDeclaration.LAYOUT_HIDDEN :
- type = HTMLCMProperties.Values.LAYOUT_HIDDEN;
- break;
- case HTMLElementDeclaration.LAYOUT_OBJECT :
- type = HTMLCMProperties.Values.LAYOUT_OBJECT;
- break;
- case HTMLElementDeclaration.LAYOUT_WRAP :
- type = HTMLCMProperties.Values.LAYOUT_WRAP;
- break;
- case HTMLElementDeclaration.LAYOUT_NONE :
- // nothing to do.
- default :
- break;
- }
- return type;
- }
- }
-
- /*
- * "omitType"
- */
- class PPOmitType extends AbstractElementPropertyProvider {
- public PPOmitType() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- String type = HTMLCMProperties.Values.OMIT_NONE;
- switch (decl.getOmitType()) {
- case HTMLElementDeclaration.OMIT_BOTH :
- type = HTMLCMProperties.Values.OMIT_BOTH;
- break;
- case HTMLElementDeclaration.OMIT_END :
- type = HTMLCMProperties.Values.OMIT_END;
- break;
- case HTMLElementDeclaration.OMIT_END_DEFAULT :
- type = HTMLCMProperties.Values.OMIT_END_DEFAULT;
- break;
- case HTMLElementDeclaration.OMIT_END_MUST :
- type = HTMLCMProperties.Values.OMIT_END_MUST;
- break;
- case HTMLElementDeclaration.OMIT_NONE :
- // nothing to do.
- default :
- break;
- }
- return type;
- }
- }
-
- /*
- * "inclusion"
- */
- class PPInclusion extends AbstractElementPropertyProvider {
- public PPInclusion() {
- super();
- }
-
- protected Object getElementProperty(HTMLPropertyDeclaration decl) {
- return decl.getInclusion();
- }
- }
-
- public static PropertyProvider getProvider(String propName) {
- PropertyProviderFactory factory = getInstance();
- PropertyProvider pp = (PropertyProvider) factory.registry.get(propName);
- if (pp != null)
- return pp;
-
- pp = factory.create(propName);
- if (pp == null)
- return factory.defaultProvider;
-
- factory.registry.put(propName, pp);
- return pp;
- }
-
- private static PropertyProviderFactory instance = null;
-
- private synchronized static PropertyProviderFactory getInstance() {
- if (instance != null)
- return instance;
- instance = new PropertyProviderFactory();
- return instance;
- }
-
- private Hashtable registry = new Hashtable();
- private PropertyProvider defaultProvider = new DefaultProvider();
-
- private PropertyProviderFactory() {
- super();
- }
-
- private PropertyProvider create(String propName) {
- PropertyProvider pp = null;
- if (propName.equals(HTMLCMProperties.IS_JSP))
- pp = new PPIsJSP();
- else if (propName.equals(HTMLCMProperties.IS_XHTML))
- pp = new PPIsXHTML();
- else if (propName.equals(HTMLCMProperties.IS_SSI))
- pp = new PPIsSSI();
- else if (propName.equals(HTMLCMProperties.LAYOUT_TYPE))
- pp = new PPLayoutType();
- else if (propName.equals(HTMLCMProperties.LINE_BREAK_HINT))
- pp = new PPLineBreakHint();
- else if (propName.equals(HTMLCMProperties.PROHIBITED_ANCESTORS))
- pp = new PPProhibitedAncestors();
- else if (propName.equals(HTMLCMProperties.SHOULD_KEEP_SPACE))
- pp = new PPShouldKeepSpace();
- else if (propName.equals(HTMLCMProperties.SHOULD_INDENT_CHILD_SOURCE))
- pp = new PPShouldIndentChildSource();
- else if (propName.equals(HTMLCMProperties.TERMINATORS))
- pp = new PPTerminators();
- else if (propName.equals(HTMLCMProperties.TAGINFO))
- pp = new PPTagInfo();
- else if (propName.equals(HTMLCMProperties.OMIT_TYPE))
- pp = new PPOmitType();
- else if (propName.equals(HTMLCMProperties.INCLUSION))
- pp = new PPInclusion();
-
- return pp;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/Tag20ElementCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/Tag20ElementCollection.java
deleted file mode 100644
index c8fb4ba270..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/Tag20ElementCollection.java
+++ /dev/null
@@ -1,570 +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.wst.html.core.internal.contentmodel;
-
-
-
-import java.lang.reflect.Field;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-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.CMNode;
-
-/**
- * Factory for element declarations of JSP 2.0 Tag files.
- */
-final class Tag20ElementCollection extends JSPElementCollection implements JSP20Namespace.ElementName {
- // element IDs
- private static class TagIds20 {
- public static final int ID_SCRIPTLET = 0;
- public static final int ID_EXPRESSION = 1;
- public static final int ID_DECLARATION = 2;
- public static final int ID_DIRECTIVE_TAG = 3;
- public static final int ID_DIRECTIVE_INCLUDE = 4;
- public static final int ID_DIRECTIVE_TAGLIB = 5;
- public static final int ID_USEBEAN = 6;
- public static final int ID_SETPROPERTY = 7;
- public static final int ID_GETPROPERTY = 8;
- public static final int ID_INCLUDE = 9;
- public static final int ID_FORWARD = 10;
- public static final int ID_PLUGIN = 11;
- public static final int ID_PARAMS = 12;
- public static final int ID_FALLBACK = 13;
- public static final int ID_PARAM = 14;
- public static final int ID_ROOT = 15;
- public static final int ID_TEXT = 16;
- public static final int ID_DIRECTIVE_VARIABLE = 17;
- public static final int ID_DIRECTIVE_ATTRIBUTE = 18;
- public static final int ID_BODY = 19;
- public static final int ID_ATTRIBUTE = 20;
- public static final int ID_ELEMENT = 21;
- public static final int ID_DOBODY = 22;
- public static final int ID_INVOKE = 23;
- public static final int ID_OUTPUT = 24;
-
- // chache the result of the reflection.
- private static int numofids = -1;
-
- public static int getNumOfIds() {
- if (numofids != -1)
- return numofids;
-
- // NOTE: If the reflection is too slow, this method should
- // just return the literal value, like 105.
- // -- 5/25/2001
- Class clazz = TagIds20.class;
- Field[] fields = clazz.getFields();
- numofids = 0;
- for (int i = 0; i < fields.length; i++) {
- String name = fields[i].getName();
- if (name.startsWith("ID_"))//$NON-NLS-1$
- numofids++;
- }
- return numofids;
- }
- }
-
- // attribute creater
- private class TACreater20 extends JACreater {
-
- public TACreater20() {
- super();
- }
-
- private void createForAttribute() {
- AttrDecl adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_TRIM);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_FALSE);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_TRIM, adec);
- }
-
- private void createForBody() {
- }
-
- private void createForDirAttribute() {
- AttrDecl adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_REQUIRED);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = new String[]{ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_REQUIRED, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_FRAGMENT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- values = new String[]{ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_FRAGMENT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_RTEXPRVALUE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- values = new String[]{ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_RTEXPRVALUE, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_TYPE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_TYPE, adec);
-
- adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DESCRIPTION);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DESCRIPTION, adec);
- }
-
- private void createForDirTag() {
- // ("import" URI optional)
- AttrDecl adec = new AttrDecl(ATTR_NAME_IMPORT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(ATTR_NAME_IMPORT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DISPLAY_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ID);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DISPLAY_NAME, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_BODY_CONTENT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {JSP20Namespace.ATTR_VALUE_EMPTY, JSP20Namespace.ATTR_VALUE_TAGDEPENDENT, JSP20Namespace.ATTR_VALUE_SCRIPTLESS};
- adec.type.setEnumValues(values);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_BODY_CONTENT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_SMALL_ICON);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_SMALL_ICON, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_LARGE_ICON);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_LARGE_ICON, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DESCRIPTION);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DESCRIPTION, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_EXAMPLE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_EXAMPLE, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_LANGUAGE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_LANGUAGE, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_IMPORT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_IMPORT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_PAGEENCODING);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_PAGEENCODING, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_ISELIGNORED);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- values = new String[]{ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_ISELIGNORED, adec);
- }
-
- /**
- * Changed in 2.0 (tagdir added)
- */
- void createForDirTaglib() {
- // ("uri" URI OPTIONAL)
- AttrDecl adec = new AttrDecl(ATTR_NAME_URI);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(ATTR_NAME_URI, adec);
-
- // ("tagdir" URI OPTIONAL)
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_TAGDIR);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_TAGDIR, adec);
-
- // ("prefix" CDATA REQUIRED)
- adec = new AttrDecl(ATTR_NAME_PREFIX);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_PREFIX, adec);
- }
-
- private void createForDirVariable() {
- AttrDecl adec = new AttrDecl(JSP20Namespace.ATTR_NAME_NAME_GIVEN);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_NAME_GIVEN, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_NAME_FROM_ATTRIBUTE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_NAME_FROM_ATTRIBUTE, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_ALIAS);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_ALIAS, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_VARIABLE_CLASS);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_VARIABLE_CLASS, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DECLARE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = new String[]{ATTR_VALUE_TRUE, ATTR_VALUE_FALSE};
- adec.type.setEnumValues(values);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DECLARE, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DESCRIPTION);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DESCRIPTION, adec);
-
- adec = new AttrDecl(JSP11Namespace.ATTR_NAME_SCOPE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- values = new String[]{JSP20Namespace.ATTR_VALUE_SCOPE_NESTED, JSP20Namespace.ATTR_VALUE_SCOPE_AT_BEGIN, JSP20Namespace.ATTR_VALUE_SCOPE_AT_END};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, JSP20Namespace.ATTR_VALUE_SCOPE_NESTED);
- declarations.putNamedItem(JSP11Namespace.ATTR_NAME_SCOPE, adec);
- }
-
- private void createForDoBody() {
- AttrDecl adec = new AttrDecl(JSP20Namespace.ATTR_NAME_VAR);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_VAR, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_VARREADER);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_VARREADER, adec);
-
- adec = new AttrDecl(JSP11Namespace.ATTR_NAME_SCOPE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_PAGE, ATTR_VALUE_REQUEST, ATTR_VALUE_SESSION, ATTR_VALUE_APPLICATION};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_FALSE);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP11Namespace.ATTR_NAME_SCOPE, adec);
- }
-
- private void createForElement() {
- AttrDecl adec = new AttrDecl(ATTR_NAME_NAME);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(ATTR_NAME_NAME, adec);
- }
-
- private void createForInvoke() {
- AttrDecl adec = new AttrDecl(JSP20Namespace.ATTR_NAME_FRAGMENT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.URI);
- adec.usage = CMAttributeDeclaration.REQUIRED;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_FRAGMENT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_VAR);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_VAR, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_VARREADER);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_VARREADER, adec);
-
- adec = new AttrDecl(JSP11Namespace.ATTR_NAME_SCOPE);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_PAGE, ATTR_VALUE_REQUEST, ATTR_VALUE_SESSION, ATTR_VALUE_APPLICATION};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_FALSE);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP11Namespace.ATTR_NAME_SCOPE, adec);
- }
-
- private void createForOutput() {
- AttrDecl adec = new AttrDecl(JSP20Namespace.ElementName.OUTPUT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_TRUE, ATTR_VALUE_FALSE, JSP20Namespace.ATTR_VALUE_YES, JSP20Namespace.ATTR_VALUE_NO};
- adec.type.setEnumValues(values);
- adec.type.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, JSP20Namespace.ATTR_VALUE_NO);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ElementName.OUTPUT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DOCTYPE_ROOT_ELEMENT);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DOCTYPE_ROOT_ELEMENT, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DOCTYPE_SYSTEM);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DOCTYPE_SYSTEM, adec);
-
- adec = new AttrDecl(JSP20Namespace.ATTR_NAME_DOCTYPE_PUBLIC);
- adec.type = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- adec.usage = CMAttributeDeclaration.OPTIONAL;
- declarations.putNamedItem(JSP20Namespace.ATTR_NAME_DOCTYPE_PUBLIC, adec);
- }
-
- public CMNamedNodeMapImpl getDeclarations(int eid) {
- switch (eid) {
- case TagIds20.ID_DIRECTIVE_TAG :
- createForDirTag();
- break;
- case TagIds20.ID_DIRECTIVE_VARIABLE :
- createForDirVariable();
- break;
- case TagIds20.ID_DIRECTIVE_ATTRIBUTE :
- createForDirAttribute();
- break;
- case TagIds20.ID_DIRECTIVE_TAGLIB :
- createForDirTaglib();
- break;
- case TagIds20.ID_ATTRIBUTE :
- createForAttribute();
- break;
- case TagIds20.ID_ELEMENT :
- createForElement();
- break;
- case TagIds20.ID_BODY :
- createForBody();
- break;
- case TagIds20.ID_DOBODY :
- createForDoBody();
- break;
- case TagIds20.ID_INVOKE :
- createForInvoke();
- break;
- case TagIds20.ID_OUTPUT :
- createForOutput();
- break;
- default :
- super.getDeclarations(eid);
- break;
- }
- return declarations;
- }
- }
-
- private static String[] names = null;
-
- static {
- names = new String[TagIds20.getNumOfIds()];
- names[Ids.ID_SCRIPTLET] = JSP11Namespace.ElementName.SCRIPTLET;
- names[Ids.ID_EXPRESSION] = JSP11Namespace.ElementName.EXPRESSION;
- names[Ids.ID_DECLARATION] = JSP11Namespace.ElementName.DECLARATION;
- names[TagIds20.ID_DIRECTIVE_TAG] = JSP20Namespace.ElementName.DIRECTIVE_TAG;
- names[Ids.ID_DIRECTIVE_INCLUDE] = JSP11Namespace.ElementName.DIRECTIVE_INCLUDE;
- names[Ids.ID_DIRECTIVE_TAGLIB] = JSP11Namespace.ElementName.DIRECTIVE_TAGLIB;
- names[Ids.ID_USEBEAN] = JSP11Namespace.ElementName.USEBEAN;
- names[Ids.ID_SETPROPERTY] = JSP11Namespace.ElementName.SETPROPERTY;
- names[Ids.ID_GETPROPERTY] = JSP11Namespace.ElementName.GETPROPERTY;
- names[Ids.ID_INCLUDE] = JSP11Namespace.ElementName.INCLUDE;
- names[Ids.ID_FORWARD] = JSP11Namespace.ElementName.FORWARD;
- names[Ids.ID_PLUGIN] = JSP11Namespace.ElementName.PLUGIN;
- names[Ids.ID_PARAMS] = JSP11Namespace.ElementName.PARAMS;
- names[Ids.ID_FALLBACK] = JSP11Namespace.ElementName.FALLBACK;
- names[Ids.ID_PARAM] = JSP11Namespace.ElementName.PARAM;
- names[Ids.ID_ROOT] = JSP11Namespace.ElementName.ROOT;
- names[Ids.ID_TEXT] = JSP11Namespace.ElementName.TEXT;
- names[TagIds20.ID_DIRECTIVE_VARIABLE] = JSP20Namespace.ElementName.DIRECTIVE_VARIABLE;
- names[TagIds20.ID_DIRECTIVE_ATTRIBUTE] = JSP20Namespace.ElementName.DIRECTIVE_ATTRIBUTE;
- names[TagIds20.ID_BODY] = JSP20Namespace.ElementName.BODY;
- names[TagIds20.ID_ATTRIBUTE] = JSP20Namespace.ElementName.ATTRIBUTE;
- names[TagIds20.ID_ELEMENT] = JSP20Namespace.ElementName.ELEMENT;
- names[TagIds20.ID_DOBODY] = JSP20Namespace.ElementName.DOBODY;
- names[TagIds20.ID_INVOKE] = JSP20Namespace.ElementName.INVOKE;
- names[TagIds20.ID_OUTPUT] = JSP20Namespace.ElementName.OUTPUT;
- }
-
- /**
- */
- public Tag20ElementCollection() {
- super(Tag20ElementCollection.names, TOLERANT_CASE);
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param elementName
- * java.lang.String
- */
- protected CMNode create(String elementName) {
- return createElemDecl(getID(elementName));
- }
-
- /**
- * @param eid
- * int
- */
- CMGroupImpl createContent(int eid) {
- if (eid == ID_UNKNOWN)
- return null;
-
- CMGroupImpl content = null;
- CMNode child = null;
-
- switch (eid) {
- case Ids.ID_ROOT :
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- int validChildren[] = {
- // %Directives;
- Ids.ID_TEXT, Ids.ID_DIRECTIVE_PAGE, Ids.ID_DIRECTIVE_INCLUDE, TagIds20.ID_DIRECTIVE_TAG, TagIds20.ID_DIRECTIVE_VARIABLE, TagIds20.ID_DIRECTIVE_ATTRIBUTE, TagIds20.ID_BODY, TagIds20.ID_ATTRIBUTE,
- // %Scripts;
- Ids.ID_SCRIPTLET, Ids.ID_DECLARATION, Ids.ID_EXPRESSION,
- // %Actions;
- Ids.ID_USEBEAN, Ids.ID_SETPROPERTY, Ids.ID_GETPROPERTY, Ids.ID_INCLUDE, Ids.ID_FORWARD, Ids.ID_PLUGIN};
- for (int i = 0; i < validChildren.length; i++) {
- child = item(validChildren[i]);
- if (child != null)
- content.appendChild(child);
- }
- break;
- default :
- content = super.createContent(eid);
- break;
- }
-
- return content;
- }
-
- /**
- * @param eid
- * int
- */
- HTMLElementDeclaration createElemDecl(int eid) {
- if (eid == ID_UNKNOWN)
- return null;
-
- TypePacket packet = new TypePacket();
- switch (eid) {
- case TagIds20.ID_DIRECTIVE_TAG :
- // directive.taglib
- packet.name = DIRECTIVE_TAG;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_DIRECTIVE;
- break;
- case TagIds20.ID_DIRECTIVE_VARIABLE :
- // directive.taglib
- packet.name = DIRECTIVE_VARIABLE;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_DIRECTIVE;
- break;
- case TagIds20.ID_DIRECTIVE_ATTRIBUTE :
- // directive.taglib
- packet.name = DIRECTIVE_ATTRIBUTE;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_DIRECTIVE;
- break;
- case TagIds20.ID_DIRECTIVE_TAGLIB :
- // directive.taglib
- packet.name = DIRECTIVE_TAGLIB;
- packet.omit = HTMLElementDeclaration.OMIT_END;
- packet.layout = HTMLElementDeclaration.LAYOUT_HIDDEN;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_DIRECTIVE;
- break;
- case TagIds20.ID_BODY :
- // declaration
- packet.name = BODY;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case TagIds20.ID_ELEMENT :
- // declaration
- packet.name = JSP20Namespace.ElementName.ELEMENT;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case TagIds20.ID_ATTRIBUTE :
- // declaration
- packet.name = JSP20Namespace.ElementName.ATTRIBUTE;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case TagIds20.ID_DOBODY :
- // declaration
- packet.name = JSP20Namespace.ElementName.DOBODY;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case TagIds20.ID_INVOKE :
- // declaration
- packet.name = JSP20Namespace.ElementName.INVOKE;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- case TagIds20.ID_OUTPUT :
- // declaration
- packet.name = JSP20Namespace.ElementName.OUTPUT;
- packet.content = CMElementDeclaration.CDATA;
- packet.layout = HTMLElementDeclaration.LAYOUT_OBJECT;
- packet.indentChild = true;
- packet.format = HTMLElementDeclaration.FORMAT_JSP_SCRIPT;
- break;
- default :
- return super.createElemDecl(eid);
- }
- ElemDecl decl = new ElemDecl(packet);
-
- CMGroupImpl content = createContent(eid);
- if (content != null)
- decl.setContent(content);
-
- TACreater20 creater = new TACreater20();
- decl.setAttributes(creater.getDeclarations(eid));
-
- return decl;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/TagCMDocImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/TagCMDocImpl.java
deleted file mode 100644
index b2298f22b7..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/TagCMDocImpl.java
+++ /dev/null
@@ -1,23 +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.wst.html.core.internal.contentmodel;
-
-/**
- * Implementation of CMDocument for the JSP 2.0 tag files.
- */
-class TagCMDocImpl extends JCMDocImpl {
- /**
- * HCMDocImpl constructor comment.
- */
- public TagCMDocImpl(String docTypeName, CMNamespaceImpl targetNamespace) {
- super(docTypeName, targetNamespace, new Tag20ElementCollection());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/AttributeCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/AttributeCollection.java
deleted file mode 100644
index e563228f3c..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/AttributeCollection.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLAttributeDeclaration;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Factory for attribute declarations.
- */
-final class AttributeCollection extends CMNamedNodeMapImpl implements CHTMLNamespace {
- /**
- * constructor.
- */
- public AttributeCollection() {
- super();
- }
-
- /**
- * Create an attribute declaration.
- * @param attrName java.lang.String
- */
- private HTMLAttrDeclImpl create(String attrName) {
- HTMLAttrDeclImpl attr = null;
- HTMLCMDataTypeImpl atype = null;
-
- if (attrName.equalsIgnoreCase(ATTR_NAME_ACTION)) {
- // (action %URI #REQUIRED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ACTION, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ALT)) {
- // (alt %Text; #REQUIRED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.TEXT);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ALT, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_BORDER)) {
- // (border %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_BORDER, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CHECKED)) {
- // (checked (checked) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_CHECKED};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CHECKED, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_CLEAR)) {
- // (clear (left | all | right | none) none)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_LEFT, ATTR_VALUE_ALL, ATTR_VALUE_RIGHT, ATTR_VALUE_NONE};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_NONE);
-
- attr = new HTMLAttrDeclImpl(ATTR_NAME_CLEAR, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_COLS)) {
- // (cols NUMBER #REQUIRED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_COLS, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ENCTYPE)) {
- // (enctype %ContentType; "application/x-www-form-urlencoded")
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_WWW_FORM_URLENCODED);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ENCTYPE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HEIGHT)) {
- // (height %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HEIGHT, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HREF)) {
- // (href %URI; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HREF, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HSPACE)) {
- // (hspace %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HSPACE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_HTTP_EQUIV)) {
- // (http-equiv NAME #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.NAME);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_HTTP_EQUIV, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MAXLENGTH)) {
- // (maxlength NUMBER #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MAXLENGTH, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_METHOD)) {
- // (method (GET|POST) GET)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_VALUE_GET, ATTR_VALUE_POST};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, ATTR_VALUE_GET);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_METHOD, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_MULTIPLE)) {
- // (multiple (multiple) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_MULTIPLE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_MULTIPLE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_NAME)) {
- // (name CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_NAME, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_NOSHADE)) {
- // (noshade (noshade) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_NOSHADE};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_NOSHADE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_ROWS)) {
- // (rows NUMBER #REQUIRED)
- atype = new HTMLCMDataTypeImpl(CMDataType.NUMBER);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_ROWS, atype, CMAttributeDeclaration.REQUIRED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SELECTED)) {
- // (selected (selected) #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {ATTR_NAME_SELECTED};
- atype.setEnumValues(values);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SELECTED, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SIZE)) {
- // (size %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SIZE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_SRC)) {
- // (src %URI; #IMPLIED)
- // NOTE: "src" attributes are defined in several elements.
- // The definition of IMG is different from others.
- // So, it should be locally defined.
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_SRC, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_TYPE)) {
- // (type %CotentType; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.CONTENT_TYPE);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VALUE)) {
- // (value CDATA #IMPLIED)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VALUE, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VERSION)) {
- // (version CDATA #FIXED '%HTML.Version;)
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_FIXED, ATTR_VALUE_VERSION_TRANSITIONAL);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VERSION, atype, CMAttributeDeclaration.FIXED);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_WIDTH)) {
- // (width %Length; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.LENGTH);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_WIDTH, atype, CMAttributeDeclaration.OPTIONAL);
-
- }
- else if (attrName.equalsIgnoreCase(ATTR_NAME_VSPACE)) {
- // (vspace %Pixels; #IMPLIED)
- atype = new HTMLCMDataTypeImpl(HTMLCMDataType.PIXELS);
- attr = new HTMLAttrDeclImpl(ATTR_NAME_VSPACE, atype, CMAttributeDeclaration.OPTIONAL);
-
- // <<D205514
- }
- else {
- // unknown attribute; maybe error.
- // should warn.
- attr = null;
- }
-
- return attr;
- }
-
- /**
- * Get %bodycolors; declarations.
- */
- public void getBodycolors(CMNamedNodeMapImpl declarations) {
- }
-
- /**
- * Get align attribute which has %IAlign; as values..
- */
- public static final HTMLAttrDeclImpl createAlignForImage() {
- // align (local)
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- // set enum values
- String[] values = {ATTR_VALUE_TOP, ATTR_VALUE_MIDDLE, ATTR_VALUE_BOTTOM, ATTR_VALUE_LEFT, ATTR_VALUE_RIGHT};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- return attr;
- }
-
- /**
- * Create an attribute declaration for <code>align</code>
- * in several elements, like <code>P</code>, <code>DIV</code>.
- * The values are different from attributes those have the same name
- * in other elements (<code>IMG</code> and <code>TABLE</code>).
- * So, it can't treat as global attributes.
- * <strong>NOTE: These attribute declaration has
- * no owner CMDocument instance.</strong>
- */
- public static final HTMLAttrDeclImpl createAlignForParagraph() {
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- // set enum values: left|center|right|justify
- String[] values = {ATTR_VALUE_LEFT, ATTR_VALUE_CENTER, ATTR_VALUE_RIGHT,};
- atype.setEnumValues(values);
-
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- return attr;
- }
-
- /**
- * Get %attrs; declarations.
- * %attrs; consists of %coreattrs;, %i18n, and %events;.
- */
- public void getAttrs(CMNamedNodeMapImpl declarations) {
- }
-
- /**
- * Get %coreattrs; declarations.
- */
- public void getCore(CMNamedNodeMapImpl declarations) {
- }
-
- /**
- * Get a global attribute declaration.
- * @param attrName java.lang.String
- */
- public HTMLAttributeDeclaration getDeclaration(String attrName) {
- CMNode cmnode = getNamedItem(attrName);
- if (cmnode != null)
- return (HTMLAttributeDeclaration) cmnode; // already exists.
-
- HTMLAttrDeclImpl dec = create(attrName);
- if (dec != null)
- putNamedItem(attrName, dec);
-
- return dec;
- }
-
- /**
- * Get declarations which are specified by names.
- * @param names java.util.Iterator
- */
- public void getDeclarations(CMNamedNodeMapImpl declarations, Iterator names) {
- while (names.hasNext()) {
- String attrName = (String) names.next();
- HTMLAttributeDeclaration dec = getDeclaration(attrName);
- if (dec != null)
- declarations.putNamedItem(attrName, dec);
- }
- }
-
- /**
- * Get %events; declarations.
- */
- public void getEvents(CMNamedNodeMapImpl declarations) {
- }
-
- /**
- * Get %i18n; declarations.
- */
- public void getI18n(CMNamedNodeMapImpl declarations) {
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CHCMDocImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CHCMDocImpl.java
deleted file mode 100644
index 00b35285ac..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CHCMDocImpl.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocument;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLElementDeclaration;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLEntityDeclaration;
-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;
-
-/**
- * CMDocument implementation for the HTML.
- */
-public class CHCMDocImpl extends CMNodeImpl implements HTMLCMDocument {
-
- /** Namespace for all names of elements, entities and attributes. */
- private CMNamespace namespace = null;
- private ElementCollection elements = null;
- private EntityCollection entities = null;
- private AttributeCollection attributes = null;
-
- /**
- */
- public CHCMDocImpl(String docTypeName, CMNamespace targetNamespace) {
- super(docTypeName);
- namespace = targetNamespace;
- attributes = new AttributeCollection();
- elements = new ElementCollection(attributes);
- entities = new EntityCollection();
- }
-
- AttributeCollection getAttributes() {
- return attributes;
- }
-
- public HTMLElementDeclaration getElementDeclaration(String elementName) {
- if (elements == null)
- return null;
- return (HTMLElementDeclaration) elements.getNamedItem(elementName);
- }
-
- public CMNamedNodeMap getElements() {
- return elements;
- }
-
- public CMNamedNodeMap getEntities() {
- return entities;
- }
-
- public HTMLEntityDeclaration getEntityDeclaration(String entityName) {
- if (entities == null)
- return null;
- return (HTMLEntityDeclaration) entities.getNamedItem(entityName);
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- */
- public org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace getNamespace() {
- return namespace;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public int getNodeType() {
- return CMNode.DOCUMENT;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CHTMLNamespace.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CHTMLNamespace.java
deleted file mode 100644
index 456503c123..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CHTMLNamespace.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
-
-
-
-/**
- * Provide all names defined in the HTML 4.0? specification.
- */
-public interface CHTMLNamespace {
-
- // Element names
- public static interface ElementName {
- public static final String A = HTML40Namespace.ElementName.A;
- public static final String ADDRESS = HTML40Namespace.ElementName.ADDRESS;
- public static final String BASE = HTML40Namespace.ElementName.BASE;
- public static final String BLOCKQUOTE = HTML40Namespace.ElementName.BLOCKQUOTE;
- public static final String BODY = HTML40Namespace.ElementName.BODY;
- public static final String BR = HTML40Namespace.ElementName.BR;
- public static final String CENTER = HTML40Namespace.ElementName.CENTER;
- public static final String DD = HTML40Namespace.ElementName.DD;
- public static final String DIR = HTML40Namespace.ElementName.DIR;
- public static final String DIV = HTML40Namespace.ElementName.DIV;
- public static final String DL = HTML40Namespace.ElementName.DL;
- public static final String DT = HTML40Namespace.ElementName.DT;
- public static final String FORM = HTML40Namespace.ElementName.FORM;
- public static final String H1 = HTML40Namespace.ElementName.H1;
- public static final String H2 = HTML40Namespace.ElementName.H2;
- public static final String H3 = HTML40Namespace.ElementName.H3;
- public static final String H4 = HTML40Namespace.ElementName.H4;
- public static final String H5 = HTML40Namespace.ElementName.H5;
- public static final String H6 = HTML40Namespace.ElementName.H6;
- public static final String HEAD = HTML40Namespace.ElementName.HEAD;
- public static final String HR = HTML40Namespace.ElementName.HR;
- public static final String HTML = HTML40Namespace.ElementName.HTML;
- public static final String IMG = HTML40Namespace.ElementName.IMG;
- public static final String INPUT = HTML40Namespace.ElementName.INPUT;
- public static final String LI = HTML40Namespace.ElementName.LI;
- public static final String MENU = HTML40Namespace.ElementName.MENU;
- public static final String META = HTML40Namespace.ElementName.META;
- public static final String OL = HTML40Namespace.ElementName.OL;
- public static final String OPTION = HTML40Namespace.ElementName.OPTION;
- public static final String P = HTML40Namespace.ElementName.P;
- public static final String PRE = HTML40Namespace.ElementName.PRE;
- public static final String SELECT = HTML40Namespace.ElementName.SELECT;
- public static final String TEXTAREA = HTML40Namespace.ElementName.TEXTAREA;
- public static final String TITLE = HTML40Namespace.ElementName.TITLE;
- public static final String UL = HTML40Namespace.ElementName.UL;
- public static final String SSI_CONFIG = HTML40Namespace.ElementName.SSI_CONFIG;
- public static final String SSI_ECHO = HTML40Namespace.ElementName.SSI_ECHO;
- public static final String SSI_EXEC = HTML40Namespace.ElementName.SSI_EXEC;
- public static final String SSI_FSIZE = HTML40Namespace.ElementName.SSI_FSIZE;
- public static final String SSI_FLASTMOD = HTML40Namespace.ElementName.SSI_FLASTMOD;
- public static final String SSI_INCLUDE = HTML40Namespace.ElementName.SSI_INCLUDE;
- public static final String SSI_PRINTENV = HTML40Namespace.ElementName.SSI_PRINTENV;
- public static final String SSI_SET = HTML40Namespace.ElementName.SSI_SET;
- }
-
- // Character Entities
- public static interface EntityName {
- }
-
- // global attribute names
- public static final String ATTR_NAME_VERSION = HTML40Namespace.ATTR_NAME_VERSION;
- public static final String ATTR_NAME_SRC = HTML40Namespace.ATTR_NAME_SRC;
- public static final String ATTR_NAME_ALT = HTML40Namespace.ATTR_NAME_ALT;
- public static final String ATTR_NAME_HEIGHT = HTML40Namespace.ATTR_NAME_HEIGHT;
- public static final String ATTR_NAME_WIDTH = HTML40Namespace.ATTR_NAME_WIDTH;
- public static final String ATTR_NAME_ALIGN = HTML40Namespace.ATTR_NAME_ALIGN;
- public static final String ATTR_NAME_BORDER = HTML40Namespace.ATTR_NAME_BORDER;
- public static final String ATTR_NAME_HSPACE = HTML40Namespace.ATTR_NAME_HSPACE;
- public static final String ATTR_NAME_VSPACE = HTML40Namespace.ATTR_NAME_VSPACE;
- public static final String ATTR_NAME_NAME = HTML40Namespace.ATTR_NAME_NAME;
- public static final String ATTR_NAME_CLEAR = HTML40Namespace.ATTR_NAME_CLEAR;
- public static final String ATTR_NAME_NOSHADE = HTML40Namespace.ATTR_NAME_NOSHADE;
- public static final String ATTR_NAME_CHECKED = HTML40Namespace.ATTR_NAME_CHECKED;
- public static final String ATTR_NAME_MAXLENGTH = HTML40Namespace.ATTR_NAME_MAXLENGTH;
- public static final String ATTR_NAME_ISTYLE = HTML40Namespace.ATTR_NAME_ISTYLE;
- public static final String ATTR_NAME_HTTP_EQUIV = HTML40Namespace.ATTR_NAME_HTTP_EQUIV;
- public static final String ATTR_NAME_CONTENT = HTML40Namespace.ATTR_NAME_CONTENT;
-
- public static final String ATTR_NAME_HREF = HTML40Namespace.ATTR_NAME_HREF;
- public static final String ATTR_NAME_MULTIPLE = HTML40Namespace.ATTR_NAME_MULTIPLE;
- public static final String ATTR_NAME_SELECTED = HTML40Namespace.ATTR_NAME_SELECTED;
- public static final String ATTR_NAME_ROWS = HTML40Namespace.ATTR_NAME_ROWS;
- public static final String ATTR_NAME_COLS = HTML40Namespace.ATTR_NAME_COLS;
- public static final String ATTR_NAME_ACTION = HTML40Namespace.ATTR_NAME_ACTION;
- public static final String ATTR_NAME_METHOD = HTML40Namespace.ATTR_NAME_METHOD;
- public static final String ATTR_NAME_ENCTYPE = HTML40Namespace.ATTR_NAME_ENCTYPE;
- public static final String ATTR_NAME_SIZE = HTML40Namespace.ATTR_NAME_SIZE;
- public static final String ATTR_NAME_TYPE = HTML40Namespace.ATTR_NAME_TYPE;
- public static final String ATTR_NAME_VALUE = HTML40Namespace.ATTR_NAME_VALUE;
-
-
-
- public static final String ATTR_NAME_ERRMSG = HTML40Namespace.ATTR_NAME_ERRMSG;
- public static final String ATTR_NAME_SIZEFMT = HTML40Namespace.ATTR_NAME_SIZEFMT;
- public static final String ATTR_NAME_TIMEFMT = HTML40Namespace.ATTR_NAME_TIMEFMT;
- public static final String ATTR_NAME_VAR = HTML40Namespace.ATTR_NAME_VAR;
- public static final String ATTR_NAME_CGI = HTML40Namespace.ATTR_NAME_CGI;
- public static final String ATTR_NAME_CMD = HTML40Namespace.ATTR_NAME_CMD;
- public static final String ATTR_NAME_FILE = HTML40Namespace.ATTR_NAME_FILE;
- public static final String ATTR_NAME_VIRTUAL = HTML40Namespace.ATTR_NAME_VIRTUAL;
-
- // global attribute values; mainly used in enumeration.
- public static final String ATTR_VALUE_VERSION_TRANSITIONAL = "-//W3C//DTD Compact HTML 1.0 Draft//EN"; //$NON-NLS-1$
- // for align (top|middle|bottom|left|right)
- public static final String ATTR_VALUE_TOP = HTML40Namespace.ATTR_VALUE_TOP;
- public static final String ATTR_VALUE_MIDDLE = HTML40Namespace.ATTR_VALUE_MIDDLE;
- public static final String ATTR_VALUE_BOTTOM = HTML40Namespace.ATTR_VALUE_BOTTOM;
- public static final String ATTR_VALUE_LEFT = HTML40Namespace.ATTR_VALUE_LEFT;
- public static final String ATTR_VALUE_CENTER = HTML40Namespace.ATTR_VALUE_CENTER;
- public static final String ATTR_VALUE_RIGHT = HTML40Namespace.ATTR_VALUE_RIGHT;
- // for clear (left|all|right|none): left and right are already defined above.
- public static final String ATTR_VALUE_ALL = HTML40Namespace.ATTR_VALUE_ALL;
- public static final String ATTR_VALUE_NONE = HTML40Namespace.ATTR_VALUE_NONE;
- // for type of INPUT
- // (text | password | checkbox | radio | submit | reset |
- // file | hidden | image | button)
- public static final String ATTR_VALUE_TEXT = HTML40Namespace.ATTR_VALUE_TEXT;
- public static final String ATTR_VALUE_PASSWORD = HTML40Namespace.ATTR_VALUE_PASSWORD;
- public static final String ATTR_VALUE_CHECKBOX = HTML40Namespace.ATTR_VALUE_CHECKBOX;
- public static final String ATTR_VALUE_RADIO = HTML40Namespace.ATTR_VALUE_RADIO;
- public static final String ATTR_VALUE_SUBMIT = HTML40Namespace.ATTR_VALUE_SUBMIT;
- public static final String ATTR_VALUE_RESET = HTML40Namespace.ATTR_VALUE_RESET;
- public static final String ATTR_VALUE_HIDDEN = HTML40Namespace.ATTR_VALUE_HIDDEN;
- // for span, colspan, rowspan
- public static final String ATTR_VALUE_1 = HTML40Namespace.ATTR_VALUE_1;
- // for frameborder
- public static final String ATTR_VALUE_0 = HTML40Namespace.ATTR_VALUE_0;
- // for method of FORM
- public static final String ATTR_VALUE_GET = HTML40Namespace.ATTR_VALUE_GET;
- public static final String ATTR_VALUE_POST = HTML40Namespace.ATTR_VALUE_POST;
- public static final String ATTR_VALUE_WWW_FORM_URLENCODED = HTML40Namespace.ATTR_VALUE_WWW_FORM_URLENCODED;
- // for behaviro of MARQUEE
- public static final String ATTR_VALUE_SCROLL = HTML40Namespace.ATTR_VALUE_SCROLL;
- public static final String ATTR_VALUE_SLIDE = HTML40Namespace.ATTR_VALUE_SLIDE;
- public static final String ATTR_VALUE_ALTERNATE = HTML40Namespace.ATTR_VALUE_ALTERNATE;
- // for direction of MARQUEE
- public static final String ATTR_VALUE_UP = HTML40Namespace.ATTR_VALUE_UP;
- public static final String ATTR_VALUE_DOWN = HTML40Namespace.ATTR_VALUE_DOWN;
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMContentImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMContentImpl.java
deleted file mode 100644
index 5633cf535a..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMContentImpl.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-/**
- * Implementation of CMContent for HTML CM.
- */
-abstract class CMContentImpl extends CMNodeImpl implements org.eclipse.wst.xml.core.internal.contentmodel.CMContent {
-
- public static final int UNBOUNDED = -1;
- /** -1: it's UNBOUNDED. */
- private int maxOccur = UNBOUNDED;
- /** 0: it's OPTIONAL, 1, it's REQUIRED. */
- private int minOccur = 0;
-
- /**
- * The primary consturctor.
- * Use this one for usual cases.<br>
- */
- public CMContentImpl(String name, int min, int max) {
- super(name);
- minOccur = min;
- maxOccur = max;
- }
-
- /**
- * 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;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMGroupImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMGroupImpl.java
deleted file mode 100644
index 2c546f5d6b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMGroupImpl.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-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;
-
-/**
- */
-class CMGroupImpl extends CMContentImpl implements CMGroup {
-
- private int operator = CMGroup.SEQUENCE;
- private CMNodeListImpl children = null;
-
- /**
- * CMGroupImpl constructor comment.
- */
- public CMGroupImpl(int op, int minOccur, int maxOccur) {
- super(null, minOccur, maxOccur);
- switch (op) {
- case CMGroup.ALL :
- case CMGroup.CHOICE :
- case CMGroup.SEQUENCE :
- operator = op;
- break;
- default :
- // should warn.
- break;
- }
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- protected CMNode appendChild(CMNode child) {
- if (child == null)
- return null;
- if (children == null)
- children = new CMNodeListImpl();
- return children.appendNode(child);
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList
- */
- public CMNodeList getChildNodes() {
- return children;
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- * ELEMENT_DECLARATION, ATTRIBUTE_DECLARATION, GROUP, ENTITY_DECLARATION.
- */
- public int getNodeType() {
- return CMNode.GROUP;
- }
-
- /**
- * getOperation method
- * @return int
- *
- * Returns one of :
- * ALONE (a), SEQUENCE (a,b), CHOICE (a|b), ALL (a&b).
- */
- public int getOperator() {
- return operator;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNamedNodeMapImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNamedNodeMapImpl.java
deleted file mode 100644
index d1bae1ef76..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNamedNodeMapImpl.java
+++ /dev/null
@@ -1,112 +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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Iterator;
-import java.util.Locale;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * An implementation of the CMNamedNodeMap interface. This class is intented
- * to be used as a container of attribute declarations. If someone wants to
- * use this class for other purpose, he must pay attention to the fact that
- * this class is tolerant of the key name case. That is, this class does not
- * distinguish "name", "NAME", and "Name" as a key name.
- */
-class CMNamedNodeMapImpl implements org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap {
-
- private java.util.Hashtable items = null;
-
- /**
- */
- public CMNamedNodeMapImpl() {
- super();
- items = new java.util.Hashtable();
- }
-
- /**
- * getLength method
- *
- * @return int
- */
- public int getLength() {
- return items.size();
- }
-
- /**
- * getNamedItem method
- *
- * @return CMNode <code>null</code> for unknown keys.
- * @param name
- * java.lang.String
- */
- public CMNode getNamedItem(String name) {
- String cookedName = makeCanonicalForm(name);
- if (!items.containsKey(cookedName))
- return null;
- return (CMNode) items.get(cookedName);
- }
-
- /**
- * item method
- *
- * @return CMNode
- * @param index
- * int
- */
- public CMNode item(int index) {
- Iterator iter = iterator();
- while (iter.hasNext()) {
- CMNode node = (CMNode) iter.next();
- if (--index < 0)
- return node;
- }
- return null;
- }
-
- /**
- * @return java.util.Iterator
- */
- public Iterator iterator() {
- return items.values().iterator();
- }
-
- /**
- * @return java.lang.String
- * @param rawForm
- * java.lang.String
- */
- private String makeCanonicalForm(String raw) {
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=100152
- // we are able to "cheat" here a little and use US Locale
- // to get a good cononical form, since we are using this only
- // for HTML and JSP standard tags.
- // Long term, for similar needs with XML 1.1 (for example)
- // we should use a class such as com.ibm.icu.text.Normalizer
- return raw.toUpperCase(Locale.US);
- }
-
- /**
- * @param key
- * java.lang.String
- * @param item
- * java.lang.String
- */
- void putNamedItem(String name, CMNode item) {
- String cookedName = makeCanonicalForm(name);
- if (items.containsKey(cookedName))
- return; // already registered.
- items.put(cookedName, item);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNodeImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNodeImpl.java
deleted file mode 100644
index 62f7a01d45..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNodeImpl.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-
-
-
-/**
- */
-abstract class CMNodeImpl implements org.eclipse.wst.xml.core.internal.contentmodel.CMNode {
-
- private java.lang.String name = null;
-
- /**
- * CMNodeImpl constructor comment.
- */
- public CMNodeImpl(String nm) {
- super();
- name = nm;
- }
-
- /**
- * getNodeName method
- * @return java.lang.String
- */
- public String getNodeName() {
- return name;
- }
-
- /**
- * getProperty method
- * @return java.lang.Object
- *
- * Returns the object property desciped by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.IS_XHTML))
- return new Boolean(false);
- return null;
- }
-
- /**
- * supports method
- * @return boolean
- *
- * Returns true if the CMNode supports a specified property
- *
- */
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.IS_XHTML))
- return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNodeListImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNodeListImpl.java
deleted file mode 100644
index c1b1cdac40..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNodeListImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Analog of dom.NodeList for CM.
- */
-class CMNodeListImpl implements org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList {
-
- private java.util.Vector nodes = null;
-
- /**
- * CMNodeListImpl constructor comment.
- */
- public CMNodeListImpl() {
- super();
- nodes = new java.util.Vector();
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param node org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- protected CMNode appendNode(CMNode node) {
- nodes.addElement(node);
- return 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.elementAt(index);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ComplexTypeDefinition.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ComplexTypeDefinition.java
deleted file mode 100644
index fd47c7e63d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ComplexTypeDefinition.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-
-/**
- * This class is intended to represent a complex type definition
- * in XML Schema.<br>
- */
-abstract class ComplexTypeDefinition {
-
- protected CMGroupImpl content = null;
- protected ElementCollection collection = null;
- protected String primaryCandidateName = null;
-
- /**
- * ComplexTypeDefinition constructor comment.
- */
- public ComplexTypeDefinition(ElementCollection elementCollection) {
- super();
- collection = elementCollection;
- createContent();
- }
-
- /**
- * Create an actual content model.
- * This method should be called once and only once in the constructor.<br>
- */
- protected abstract void createContent();
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMGroup
- */
- public CMGroup getContent() {
- return content;
- }
-
- /**
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- /* NOTE: Do we need LOGICAL type?
- * -- 3/7/2001
- */
- public abstract int getContentType();
-
- /**
- * Get content hint.
- */
- public HTMLElementDeclaration getPrimaryCandidate() {
- if (primaryCandidateName == null)
- return null;
- return (HTMLElementDeclaration) collection.getNamedItem(primaryCandidateName);
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public abstract String getTypeName();
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ComplexTypeDefinitionFactory.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ComplexTypeDefinitionFactory.java
deleted file mode 100644
index 2a682f9706..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ComplexTypeDefinitionFactory.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-/**
- * Factory of ComplexTypeDefinition.
- */
-final class ComplexTypeDefinitionFactory {
-
- private static ComplexTypeDefinitionFactory instance = null;
- private java.util.Hashtable definitions = null;
- // constants for complex type name
- /** for ADDRESS. */
- public final static String CTYPE_ADDRESS = "CTYPE_ADDRESS";//$NON-NLS-1$
- /** CDATA content. No ComplexTypeDefinition instance shuld be created. */
- public final static String CTYPE_CDATA = "CTYPE_CDATA";//$NON-NLS-1$
- /** col group content. COL* */
- public final static String CTYPE_COLUMN_GROUP = "CTYPE_COLUMN_GROUP";//$NON-NLS-1$
- /** for DL. */
- public final static String CTYPE_DEFINITION_LIST = "CTYPE_DEFINITION_LIST";//$NON-NLS-1$
- /** for EMBED. */
- public final static String CTYPE_EMBED = "CTYPE_EMBED";//$NON-NLS-1$
- /** empty content. No ComplexTypeDefinition instance should be created. */
- public final static String CTYPE_EMPTY = "CTYPE_EMPTY";//$NON-NLS-1$
- /** for FIELDSET. */
- public final static String CTYPE_FIELDSET = "CTYPE_FIELDSET";//$NON-NLS-1$
- /** for FRAMESET. */
- public final static String CTYPE_FRAMESET = "CTYPE_FRAMESET";//$NON-NLS-1$
- /** flow content. (%flow;)* */
- public final static String CTYPE_FLOW_CONTAINER = "CTYPE_FLOW_CONTAINER";//$NON-NLS-1$
- /** html content. HEAD, (FRAMESET|BODY) */
- public final static String CTYPE_HTML = "CTYPE_HTML";//$NON-NLS-1$
- /** head content. TITLE & ISINDEX? & BASE? */
- public final static String CTYPE_HEAD = "CTYPE_HEAD";//$NON-NLS-1$
- /** inline content. (%inline;)* */
- public final static String CTYPE_INLINE_CONTAINER = "CTYPE_INLINE_CONTAINER";//$NON-NLS-1$
- /** list item container. (LI)+ */
- public final static String CTYPE_LI_CONTAINER = "CTYPE_LI_CONTAINER";//$NON-NLS-1$
- /** for MAP. */
- public final static String CTYPE_MAP = "CTYPE_MAP";//$NON-NLS-1$
- /** noframes content. */
- public final static String CTYPE_NOFRAMES_CONTENT = "CTYPE_NOFRAMES_CONTENT";//$NON-NLS-1$
- /** for OPTGROUP. */
- public final static String CTYPE_OPTION_CONTAINER = "CTYPE_OPTION_CONTAINER";//$NON-NLS-1$
- /** param container. For OBJECT/APPLET. */
- public final static String CTYPE_PARAM_CONTAINER = "CTYPE_PARAM_CONTAINER";//$NON-NLS-1$
- /** PCDATA content. No ComplexTypeDefinition instance shuld be created. */
- public final static String CTYPE_PCDATA = "CTYPE_PCDATA";//$NON-NLS-1$
- /** for SELECT. */
- public final static String CTYPE_SELECT = "CTYPE_SELECT";//$NON-NLS-1$
- /** table content. CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+ */
- public final static String CTYPE_TABLE = "CTYPE_TABLE";//$NON-NLS-1$
- /** table cell contaier. (TH|TD)+ */
- public final static String CTYPE_TCELL_CONTAINER = "CTYPE_TCELL_CONTAINER";//$NON-NLS-1$
- /** table record container. (TR)+ */
- public final static String CTYPE_TR_CONTAINER = "CTYPE_TR_CONTAINER";//$NON-NLS-1$
-
- /**
- * ComplexTypeDefinitionFactory constructor comment.
- */
- private ComplexTypeDefinitionFactory() {
- super();
- definitions = new java.util.Hashtable();
- }
-
- /**
- * Factory method for ComplexTypeDefinition.
- * Each instance created in this method must be registered into
- * the map with its name.
- * @param definitionName java.lang.String
- * @param elementCollection ElementCollection
- */
- public ComplexTypeDefinition createTypeDefinition(String definitionName, ElementCollection elementCollection) {
- if (definitions.containsKey(definitionName)) {
- return (ComplexTypeDefinition) definitions.get(definitionName);
- }
-
- ComplexTypeDefinition def = null;
- if (definitionName == CTYPE_ADDRESS) {
- def = new CtdAddress(elementCollection);
-
- }
- else if (definitionName == CTYPE_DEFINITION_LIST) {
- def = new CtdDl(elementCollection);
-
- }
- else if (definitionName == CTYPE_FLOW_CONTAINER) {
- def = new CtdFlowContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_HEAD) {
- def = new CtdHead(elementCollection);
-
- }
- else if (definitionName == CTYPE_HTML) {
- def = new CtdHtml(elementCollection);
-
- }
- else if (definitionName == CTYPE_INLINE_CONTAINER) {
- def = new CtdInlineContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_LI_CONTAINER) {
- def = new CtdLiContainer(elementCollection);
-
-
- }
- else if (definitionName == CTYPE_OPTION_CONTAINER) {
- def = new CtdOptionContainer(elementCollection);
-
- }
- else if (definitionName == CTYPE_SELECT) {
- def = new CtdSelect(elementCollection);
-
- }
- else {
- def = null;
- }
- if (def == null)
- return null; // fail to create.
- definitions.put(definitionName, def);
- return def;
- }
-
- /**
- * For singleton.<br>
- */
- public synchronized static ComplexTypeDefinitionFactory getInstance() {
- if (instance != null)
- return instance;
- instance = new ComplexTypeDefinitionFactory();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdAddress.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdAddress.java
deleted file mode 100644
index 4ad13c025b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdAddress.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-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;
-
-/**
- * for ADDRESS.
- */
-final class CtdAddress extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdAddress(ElementCollection elementCollection) {
- super(elementCollection);
- }
-
- /**
- * ((%inline) | P)*.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( | )*
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- // (%inline)
- CMGroupImpl inlines = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- if (inlines == null)
- return;
- collection.getInline(inlines);
- content.appendChild(inlines);
- // P
- CMNode p = collection.getNamedItem(CHTMLNamespace.ElementName.P);
- if (p != null)
- content.appendChild(p);
- }
-
- /**
- * ((%inline) | P)*.
- * Because %inline; contains #PCDATA, the type is MIXED.
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.MIXED;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_ADDRESS;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdDl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdDl.java
deleted file mode 100644
index c0abf8afb4..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdDl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-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;
-
-/**
- * for DL.
- */
-final class CtdDl extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdDl(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = CHTMLNamespace.ElementName.DT;
- }
-
- /**
- * (DT | DD)+
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( | )+
- content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
- // DT
- CMNode dec = collection.getNamedItem(CHTMLNamespace.ElementName.DT);
- if (dec != null)
- content.appendChild(dec);
- // DD
- dec = collection.getNamedItem(CHTMLNamespace.ElementName.DD);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (DT | DD)+.
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_DEFINITION_LIST;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdFlowContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdFlowContainer.java
deleted file mode 100644
index a198d74ec4..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdFlowContainer.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-
-/**
- * Complex type definition for containers of <code>%flow;</code>.
- */
-final class CtdFlowContainer extends ComplexTypeDefinition {
-
- /**
- */
- public CtdFlowContainer(ElementCollection elementCollection) {
- super(elementCollection);
- }
-
- /**
- * (%flow;)*
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- collection.getFlow(content);
- }
-
- public int getContentType() {
- return CMElementDeclaration.MIXED;
- }
-
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_FLOW_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdHead.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdHead.java
deleted file mode 100644
index 9af78c671d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdHead.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-
-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;
-
-/**
- * Complex type definition for the head content.
- * Content Model: (TITLE & ISINDEX? & BASE?)
- */
-final class CtdHead extends ComplexTypeDefinition {
-
- /**
- */
- public CtdHead(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = CHTMLNamespace.ElementName.TITLE;
- }
-
- /**
- * for HEAD.
- * To avoid using inclusion, the content model comes from the XHTML 1.0.
- *
- * (%head.misc;, ((title, %head.misc;, (base, %head.misc;)?) | (base, %head.misc;, (title, %head.misc;))))
- * And %head.misc; is:
- * (script|style|meta|link|object|isindex)*
- *
- * 0: (%head.misc, A)
- * A: (B | C)
- * B: (title, %head.misc;, D)
- * C: (base, %head.misc;, E)
- * D: (base, %head.misc;)?
- * E: (title, %head.misc;)
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // At 1st, create %head.misc; content.
- // %head.misc;
- // ( | )*
- CMGroupImpl misc = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- if (misc == null)
- return;
- String[] names = {CHTMLNamespace.ElementName.META,};
- collection.getDeclarations(misc, Arrays.asList(names).iterator());
- // 2nd, get a title
- CMNode title = collection.getNamedItem(CHTMLNamespace.ElementName.TITLE);
- // 3rd, get a base
- CMNode base = collection.getNamedItem(CHTMLNamespace.ElementName.BASE);
- if (title == null || base == null)
- return;
-
- // Top level content is a sequence of %head.misc; and A.
- // 0: (%head.misc;, A)
- // create a sequence
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (content == null)
- return;
- // append %head.misc;
- content.appendChild(misc);
- // create A and append it to the top level.
- {
- // A is a choice of B and C.
- // A: (B | C)
- // create a choice
- CMGroupImpl gA = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- if (gA == null)
- return;
- // append A to the top level.
- content.appendChild(gA);
-
- // create B and append it to A
- {
- // B is a sequence of title, %head.misc;, and D.
- // B: (title, %head.misc;, D)
- // create a sequence
- CMGroupImpl gB = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (gB == null)
- return;
- // append B to A.
- gA.appendChild(gB);
-
- // append title to B
- gB.appendChild(title);
- // append %head.misc; to B
- gB.appendChild(misc);
- // create D and append it to B.
- {
- // D is a sequence of base, %head.misc;.
- // D: (base, %head.misc;)?
- // create a sequence
- CMGroupImpl gD = new CMGroupImpl(CMGroup.SEQUENCE, 0, 1);
- if (gD == null)
- return;
- // append D to B.
- gB.appendChild(gD);
-
- // append base to D
- gD.appendChild(base);
- // append %head.misc; to D.
- gD.appendChild(misc);
- }
- }
- // create C and append it to A
- {
- // C is a sequence of base, %head.misc;, and E
- // C: (base, %head.misc;, E)
- // create a sequence
- CMGroupImpl gC = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (gC == null)
- return;
- // append C to A.
- gA.appendChild(gC);
-
- // append base to C
- gC.appendChild(base);
- // append %head.misc; to C
- gC.appendChild(misc);
-
- // create E and append it to C.
- {
- // E is a sequence of title and %head.misc;.
- // E: (title, %head.misc;)
- // create a sequence
- CMGroupImpl gE = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (gE == null)
- return;
- // append E to C.
- gC.appendChild(gE);
-
- // append title to E
- gE.appendChild(title);
- // append %head.misc; to E.
- gE.appendChild(misc);
- }
- }
- }
- }
-
- /**
- * Element content.<br>
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_HEAD;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdHtml.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdHtml.java
deleted file mode 100644
index cf4fe4ae30..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdHtml.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-
-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;
-
-/**
- * Complex type definition for <code>HTML</code>.<br>
- * Content Model:
- * HEAD, (FRAMESET|BODY)<br>
- */
-final class CtdHtml extends ComplexTypeDefinition {
-
- /**
- */
- public CtdHtml(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = CHTMLNamespace.ElementName.HEAD;
- }
-
- /**
- * (%html.content;).
- * %html.content; is HEAD, (FRAMESET | BODY).
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( )
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
- if (content == null)
- return;
-
- // HEAD
- CMNode edec = collection.getNamedItem(CHTMLNamespace.ElementName.HEAD);
- if (edec != null)
- content.appendChild(edec);
-
- // ( | )
- CMGroupImpl group = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- content.appendChild(group);
-
- // FRAMESET, BODY
- String[] names = {CHTMLNamespace.ElementName.BODY};
- collection.getDeclarations(group, Arrays.asList(names).iterator());
- }
-
- /**
- * Element content.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_HTML;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdInlineContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdInlineContainer.java
deleted file mode 100644
index ed234aadae..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdInlineContainer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-
-/**
- * Complex type definition for (%inline;)*.
- */
-final class CtdInlineContainer extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdInlineContainer(ElementCollection elementCollection) {
- super(elementCollection);
- }
-
- /**
- * (%inline)*.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- content = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
- collection.getInline(content);
- }
-
- public int getContentType() {
- return CMElementDeclaration.MIXED;
- }
-
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_INLINE_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdLiContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdLiContainer.java
deleted file mode 100644
index b28956ef73..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdLiContainer.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-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;
-
-/**
- * List item container.
- * (LI)+
- */
-final class CtdLiContainer extends ComplexTypeDefinition {
-
- /**
- * @param elemenCollection ElementCollection
- */
- public CtdLiContainer(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = CHTMLNamespace.ElementName.LI;
- }
-
- /**
- * (LI)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // (LI)+
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
- CMNode li = collection.getNamedItem(CHTMLNamespace.ElementName.LI);
- if (li != null)
- content.appendChild(li);
- }
-
- /**
- * ELEMENT content.<br>
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_LI_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdOptionContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdOptionContainer.java
deleted file mode 100644
index c2ec6c535f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdOptionContainer.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-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;
-
-/**
- * OPTION container.
- * (OPTION)+
- */
-final class CtdOptionContainer extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdOptionContainer(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = CHTMLNamespace.ElementName.OPTION;
- }
-
- /**
- * (OPTION)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( )+
- content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
- // OPTION
- CMNode dec = collection.getNamedItem(CHTMLNamespace.ElementName.OPTION);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (OPTION)+
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * Name of complex type definition.
- * Each singleton must know its own name.
- * All names should be defined in
- * {@link <code>ComplexTypeDefinitionFactory</code>} as constants.<br>
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_OPTION_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdSelect.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdSelect.java
deleted file mode 100644
index 7f0c96c0c8..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdSelect.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-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;
-
-/**
- * for SELECT.
- */
-final class CtdSelect extends ComplexTypeDefinition {
-
- /**
- * @param elementCollection ElementCollection
- */
- public CtdSelect(ElementCollection elementCollection) {
- super(elementCollection);
- primaryCandidateName = CHTMLNamespace.ElementName.OPTION;
- }
-
- /**
- * (OPTGROUP | OPTION)+.
- */
- protected void createContent() {
- if (content != null)
- return; // already created.
- if (collection == null)
- return;
-
- // ( | )+
- content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
- // OPTION
- CMNode dec = collection.getNamedItem(CHTMLNamespace.ElementName.OPTION);
- if (dec != null)
- content.appendChild(dec);
- }
-
- /**
- * (OPTGROUP | OPTION)+.
- * @return int; Should be one of ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA,
- * those are defined in CMElementDeclaration.
- */
- public int getContentType() {
- return CMElementDeclaration.ELEMENT;
- }
-
- /**
- * @return java.lang.String
- */
- public String getTypeName() {
- return ComplexTypeDefinitionFactory.CTYPE_SELECT;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/DeclCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/DeclCollection.java
deleted file mode 100644
index af90b74336..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/DeclCollection.java
+++ /dev/null
@@ -1,251 +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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Locale;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- */
-abstract class DeclCollection implements CMNamedNodeMap {
-
-
- protected class DualMap {
- public DualMap() {
- super();
- }
-
- public DualMap(Object[] objects) {
- super();
- initialize(objects);
- }
-
- public int size() {
- return table.length;
- }
-
- public Object getValue(int key) {
- if (!isValidIndex(key))
- return null;
- return table[key];
- }
-
- public int getKey(Object value) {
- Integer keyObj = (Integer) map.get(value);
- if (keyObj == null)
- return ID_UNKNOWN;
- return keyObj.intValue();
- }
-
- protected void initialize(Object[] objects) {
- if (objects == null)
- return;
- table = objects;
- map = new HashMap();
- for (int key = 0; key < objects.length; key++) {
- Object value = table[key];
- map.put(value, new Integer(key));
- }
- }
-
- private Object[] table = null;
- private HashMap map = null;
-
- private boolean isValidIndex(int index) {
- return index >= 0 && index < table.length;
- }
- }
-
- protected class TolerantStringDualMap extends DualMap {
- public TolerantStringDualMap(String[] names) {
- super();
- Object[] objects = new Object[names.length];
- for (int i = 0; i < names.length; i++) {
- objects[i] = makeCanonicalForm(names[i]);
- }
- initialize(objects);
- }
-
- public int getKey(Object value) {
- try {
- String name = (String) value;
- return super.getKey(makeCanonicalForm(name));
- }
- catch (ClassCastException e) {
- return ID_UNKNOWN;
- }
- }
-
- private String makeCanonicalForm(String raw) {
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=100152
- // we are able to "cheat" here a little and use US Locale
- // to get a good cononical form, since we are using this only
- // for HTML and JSP standard tags.
- // Long term, for similar needs with XML 1.1 (for example)
- // we should use a class such as com.ibm.icu.text.Normalizer
- return raw.toUpperCase(Locale.US);
- }
- }
-
- private class DeclIterator implements Iterator {
- public DeclIterator() {
- maxid = fDecls.length - 1;
- }
-
- public boolean hasNext() {
- return id < maxid;
- }
-
- public Object next() {
- if (!hasNext())
- return null;
- return item(++id);
- }
-
- public void remove() { /* nothing should be done. */
- }
-
- private int id = -1;
- private int maxid = -1;
- }
-
- CMNode[] fDecls = null;
- protected final static boolean STRICT_CASE = false;
- protected final static boolean TOLERANT_CASE = true;
- protected final static int ID_UNKNOWN = -1;
- private DualMap fMap = null;
-
- /**
- */
- public DeclCollection(String[] names, boolean tolerant) {
- super();
- fDecls = new CMNode[names.length];
- if (tolerant) {
- fMap = new TolerantStringDualMap(names);
- }
- else {
- fMap = new DualMap(names);
- }
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param id
- * int
- */
- protected abstract CMNode create(String name);
-
- /**
- */
- public CMNamedNodeMap getDeclarations(String[] names) {
- CMNamedNodeMapImpl map = new CMNamedNodeMapImpl();
- for (int i = 0; i < names.length; i++) {
- String name = names[i];
- CMNode node = getNamedItem(name);
- if (node == null)
- continue;
- map.putNamedItem(name, node);
- }
- return map;
- }
-
- public void getDeclarations(CMGroupImpl group, Iterator names) {
- while (names.hasNext()) {
- String entityName = (String) names.next();
- CMNode dec = getNamedItem(entityName);
- if (dec != null)
- group.appendChild(dec);
- }
- }
-
- /**
- * Map name to id.
- *
- * @return int
- * @param name
- * java.lang.String
- */
- protected int getID(String name) {
- return fMap.getKey(name);
- }
-
- /**
- * getLength method
- *
- * @return int
- */
- public int getLength() {
- return fDecls.length;
- }
-
- /**
- * @return java.lang.String
- * @param id
- * int
- */
- protected String getName(int id) {
- return (String) fMap.getValue(id);
- }
-
- /**
- * getNamedItem method
- *
- * @return CMNode
- * @param name
- * java.lang.String
- */
- public CMNode getNamedItem(String name) {
- int id = getID(name);
- if (!isValidID(id))
- return null;
- return item(id);
- }
-
- /**
- * @return boolean
- * @param id
- * int
- */
- private boolean isValidID(int id) {
- return id >= 0 && id < fDecls.length;
- }
-
- /**
- * item method
- *
- * @return CMNode
- * @param index
- * int
- */
- public CMNode item(int index) {
- if (!isValidID(index))
- return null;
- CMNode decl = fDecls[index];
- if (decl != null)
- return decl; // already exist.
-
- decl = create(getName(index));
- fDecls[index] = decl;
- return decl;
- }
-
- /**
- */
- public Iterator iterator() {
- return new DeclIterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ElementCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ElementCollection.java
deleted file mode 100644
index 8a80135eb5..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ElementCollection.java
+++ /dev/null
@@ -1,492 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Vector;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Factory for element declarations.
- */
-final class ElementCollection extends DeclCollection implements org.eclipse.wst.html.core.internal.provisional.HTML40Namespace.ElementName {
-
-
- // Element IDs
- private static class Ids {
- public static final int ID_A = 0;
- public static final int ID_ADDRESS = 1;
- public static final int ID_BASE = 2;
- public static final int ID_BLOCKQUOTE = 3;
- public static final int ID_BODY = 4;
- public static final int ID_BR = 5;
- public static final int ID_CENTER = 6;
- public static final int ID_DD = 7;
- public static final int ID_DIR = 8;
- public static final int ID_DIV = 9;
- public static final int ID_DL = 10;
- public static final int ID_DT = 11;
- public static final int ID_FORM = 12;
- public static final int ID_H1 = 13;
- public static final int ID_H2 = 14;
- public static final int ID_H3 = 15;
- public static final int ID_H4 = 16;
- public static final int ID_H5 = 17;
- public static final int ID_H6 = 18;
- public static final int ID_HEAD = 19;
- public static final int ID_HR = 20;
- public static final int ID_HTML = 21;
- public static final int ID_IMG = 22;
- public static final int ID_INPUT = 23;
- public static final int ID_LI = 24;
- public static final int ID_MENU = 25;
- public static final int ID_META = 26;
- public static final int ID_OL = 27;
- public static final int ID_OPTION = 28;
- public static final int ID_P = 29;
- public static final int ID_PRE = 30;
- public static final int ID_SELECT = 31;
- public static final int ID_TEXTAREA = 32;
- public static final int ID_TITLE = 33;
- public static final int ID_UL = 34;
- public static final int ID_SSI_CONFIG = 35;
- public static final int ID_SSI_ECHO = 36;
- public static final int ID_SSI_EXEC = 37;
- public static final int ID_SSI_FSIZE = 38;
- public static final int ID_SSI_FLASTMOD = 39;
- public static final int ID_SSI_INCLUDE = 40;
- public static final int ID_SSI_PRINTENV = 41;
- public static final int ID_SSI_SET = 42;
-
- public static int getNumOfIds() {
- if (numofids != -1)
- return numofids;
-
- // NOTE: If the reflection is too slow, this method should
- // just return the literal value, like 105.
- // -- 5/25/2001
- Class clazz = Ids.class;
- Field[] fields = clazz.getFields();
- numofids = 0;
- for (int i = 0; i < fields.length; i++) {
- String name = fields[i].getName();
- if (name.startsWith("ID_"))//$NON-NLS-1$
- numofids++;
- }
- return numofids;
- }
-
- // chache the result of the reflection.
- private static int numofids = -1;
- }
-
- /** %formctl;. INPUT | SELECT | TEXTAREA */
- private static final String[] FORMCTL = {INPUT, SELECT, TEXTAREA};
- /** %phrase;.
- * DFN
- */
- private static final String[] PHRASE = {DFN};
- /** %special;.
- * A | IMG | BR
- */
- private static final String[] SPECIAL = {A, IMG, BR};
- /** %heading;. H[1-6] */
- private static final String[] HEADING = {H1, H2, H3, H4, H5, H6};
- /** %list;. UL | OL | DIR | MENU */
- private static final String[] LIST = {UL, OL, DIR, MENU};
- /** %preformatted;. PRE */
- private static final String[] PREFORMATTED = {PRE};
- private AttributeCollection attributeCollection = null;
- private static String[] names = null;
-
- static {
- names = new String[Ids.getNumOfIds()];
- names[Ids.ID_A] = A;
- names[Ids.ID_ADDRESS] = ADDRESS;
- names[Ids.ID_BASE] = BASE;
- names[Ids.ID_BLOCKQUOTE] = BLOCKQUOTE;
- names[Ids.ID_BODY] = BODY;
- names[Ids.ID_BR] = BR;
- names[Ids.ID_CENTER] = CENTER;
- names[Ids.ID_DD] = DD;
- names[Ids.ID_DIR] = DIR;
- names[Ids.ID_DIV] = DIV;
- names[Ids.ID_DL] = DL;
- names[Ids.ID_DT] = DT;
- names[Ids.ID_FORM] = FORM;
- names[Ids.ID_H1] = H1;
- names[Ids.ID_H2] = H2;
- names[Ids.ID_H3] = H3;
- names[Ids.ID_H4] = H4;
- names[Ids.ID_H5] = H5;
- names[Ids.ID_H6] = H6;
- names[Ids.ID_HEAD] = HEAD;
- names[Ids.ID_HR] = HR;
- names[Ids.ID_HTML] = HTML;
- names[Ids.ID_IMG] = IMG;
- names[Ids.ID_INPUT] = INPUT;
- names[Ids.ID_LI] = LI;
- names[Ids.ID_MENU] = MENU;
- names[Ids.ID_META] = META;
- names[Ids.ID_OL] = OL;
- names[Ids.ID_OPTION] = OPTION;
- names[Ids.ID_P] = P;
- names[Ids.ID_PRE] = PRE;
- names[Ids.ID_SELECT] = SELECT;
- names[Ids.ID_TEXTAREA] = TEXTAREA;
- names[Ids.ID_TITLE] = TITLE;
- names[Ids.ID_UL] = UL;
- names[Ids.ID_SSI_CONFIG] = SSI_CONFIG;
- names[Ids.ID_SSI_ECHO] = SSI_ECHO;
- names[Ids.ID_SSI_EXEC] = SSI_EXEC;
- names[Ids.ID_SSI_FSIZE] = SSI_FSIZE;
- names[Ids.ID_SSI_FLASTMOD] = SSI_FLASTMOD;
- names[Ids.ID_SSI_INCLUDE] = SSI_INCLUDE;
- names[Ids.ID_SSI_PRINTENV] = SSI_PRINTENV;
- names[Ids.ID_SSI_SET] = SSI_SET;
- }
-
- /**
- */
- public ElementCollection(AttributeCollection collection) {
- super(names, TOLERANT_CASE);
- attributeCollection = collection;
- }
-
- /**
- * Actually creates HTMLElementDeclaration instance.
- * @return HTMLElementDeclaration
- */
- protected CMNode create(String elementName) {
- HTMLElemDeclImpl edec = null;
-
- if (elementName.equalsIgnoreCase(A)) {
- edec = new HedA(this);
-
- }
- else if (elementName.equalsIgnoreCase(ADDRESS)) {
- edec = new HedADDRESS(this);
-
- }
- else if (elementName.equalsIgnoreCase(BASE)) {
- edec = new HedBASE(this);
-
- }
- else if (elementName.equalsIgnoreCase(BLOCKQUOTE)) {
- edec = new HedBLOCKQUOTE(this);
-
- }
- else if (elementName.equalsIgnoreCase(BODY)) {
- edec = new HedBODY(this);
-
- }
- else if (elementName.equalsIgnoreCase(BR)) {
- edec = new HedBR(this);
-
- }
- else if (elementName.equalsIgnoreCase(CENTER)) {
- edec = new HedCENTER(this);
-
- }
- else if (elementName.equalsIgnoreCase(DD)) {
- edec = new HedDD(this);
-
- }
- else if (elementName.equalsIgnoreCase(DIR)) {
- edec = new HedMENU(DIR, this);
-
- }
- else if (elementName.equalsIgnoreCase(DIV)) {
- edec = new HedDIV(this);
-
- }
- else if (elementName.equalsIgnoreCase(DL)) {
- edec = new HedDL(this);
-
- }
- else if (elementName.equalsIgnoreCase(DT)) {
- edec = new HedDT(this);
-
- }
- else if (elementName.equalsIgnoreCase(FORM)) {
- edec = new HedFORM(this);
-
- }
- else if (elementName.equalsIgnoreCase(H1)) {
- edec = new HedHeading(H1, this);
-
- }
- else if (elementName.equalsIgnoreCase(H2)) {
- edec = new HedHeading(H2, this);
-
- }
- else if (elementName.equalsIgnoreCase(H3)) {
- edec = new HedHeading(H3, this);
-
- }
- else if (elementName.equalsIgnoreCase(H4)) {
- edec = new HedHeading(H4, this);
-
- }
- else if (elementName.equalsIgnoreCase(H5)) {
- edec = new HedHeading(H5, this);
-
- }
- else if (elementName.equalsIgnoreCase(H6)) {
- edec = new HedHeading(H6, this);
-
- }
- else if (elementName.equalsIgnoreCase(HEAD)) {
- edec = new HedHEAD(this);
-
- }
- else if (elementName.equalsIgnoreCase(HR)) {
- edec = new HedHR(this);
-
- }
- else if (elementName.equalsIgnoreCase(HTML)) {
- edec = new HedHTML(this);
-
- }
- else if (elementName.equalsIgnoreCase(IMG)) {
- edec = new HedIMG(this);
-
- }
- else if (elementName.equalsIgnoreCase(INPUT)) {
- edec = new HedINPUT(this);
-
- }
- else if (elementName.equalsIgnoreCase(LI)) {
- edec = new HedLI(this);
-
- }
- else if (elementName.equalsIgnoreCase(MENU)) {
- edec = new HedMENU(MENU, this);
-
- }
- else if (elementName.equalsIgnoreCase(META)) {
- edec = new HedMETA(this);
-
- }
- else if (elementName.equalsIgnoreCase(OL)) {
- edec = new HedOL(this);
-
- }
- else if (elementName.equalsIgnoreCase(OPTION)) {
- edec = new HedOPTION(this);
-
- }
- else if (elementName.equalsIgnoreCase(P)) {
- edec = new HedP(this);
-
- }
- else if (elementName.equalsIgnoreCase(PRE)) {
- edec = new HedPRE(this);
-
- }
- else if (elementName.equalsIgnoreCase(SELECT)) {
- edec = new HedSELECT(this);
-
- }
- else if (elementName.equalsIgnoreCase(TEXTAREA)) {
- edec = new HedTEXTAREA(this);
-
- }
- else if (elementName.equalsIgnoreCase(TITLE)) {
- edec = new HedTITLE(this);
-
- }
- else if (elementName.equalsIgnoreCase(UL)) {
- edec = new HedUL(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_CONFIG)) {
- edec = new HedSSIConfig(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_ECHO)) {
- edec = new HedSSIEcho(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_EXEC)) {
- edec = new HedSSIExec(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_FSIZE)) {
- edec = new HedSSIFsize(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_FLASTMOD)) {
- edec = new HedSSIFlastmod(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_INCLUDE)) {
- edec = new HedSSIInclude(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_PRINTENV)) {
- edec = new HedSSIPrintenv(this);
-
- }
- else if (elementName.equalsIgnoreCase(SSI_SET)) {
- edec = new HedSSISet(this);
-
- } // unknown
- else {
- // NOTE: We don't define the UNKNOWN element declaration.
- // <code>null</code> for a declaration is a sign of
- // the target element is unknown.
- // -- 3/9/2001
- edec = null;
- }
- return edec;
- }
-
- public AttributeCollection getAttributeCollection() {
- return attributeCollection;
- }
-
- /**
- */
- public final Collection getNamesOfBlock() {
- // P | %list | %preformatted | DL | DIV | CENTER | BLOCKQUOTE | FORM | HR
- String[] blockMisc = {P, DL, DIV, CENTER, BLOCKQUOTE, FORM, HR,};
- Vector blockNames = new Vector(Arrays.asList(blockMisc));
- // %heading;
- blockNames.addAll(Arrays.asList(HEADING));
- // %list;
- blockNames.addAll(Arrays.asList(LIST));
- // %preformatted;
- blockNames.addAll(Arrays.asList(PREFORMATTED));
-
- return blockNames;
- }
-
- /**
- * %block;.
- * %block; is:
- * P | %heading; | %list; | %preformatted; | DL | DIV | CENTER |
- * NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
- * TABLE | FIELDSET | ADDRESS.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getBlock(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, getNamesOfBlock().iterator());
- }
-
- /**
- * Create element declarations and store them
- * into a <code>CMGroupImpl</code> instance.
- * @param group CMGroupImpl Return values.
- */
- public final void getFlow(CMGroupImpl group) {
- if (group == null)
- return;
- getBlock(group);
- getInline(group);
- }
-
- /**
- * Create element declarations and store them into a <code>CMGroupImpl</code>
- * instance.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getFontstyle(CMGroupImpl group) {
- return;
- }
-
- /**
- * Create element declarations and store them into a <code>CMGroupImpl</code>
- * instance.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getFormctrl(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, Arrays.asList(FORMCTL).iterator());
- }
-
- /**
- * %heading;.
- * @param group CMGroupImpl Return values.
- */
- public final void getHeading(CMGroupImpl group) {
- if (group == null)
- return;
-
- getDeclarations(group, Arrays.asList(HEADING).iterator());
- }
-
- /**
- * Create element declarations and store them
- * into a <code>CMGroupImpl</code> instance.
- * @param group CMGroupImpl Return values.
- */
- public final void getInline(CMGroupImpl group) {
- if (group == null)
- return;
- getFontstyle(group);
- getPhrase(group);
- getSpecial(group);
- getFormctrl(group);
- }
-
- /**
- * %list;.
- * @param group CMGroupImpl Return values.
- */
- public final void getList(CMGroupImpl group) {
- if (group == null)
- return;
-
- getDeclarations(group, Arrays.asList(LIST).iterator());
- }
-
- /**
- * Create element declarations and store them into a <code>CMGroupImpl</code>
- * instance.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getPhrase(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, Arrays.asList(PHRASE).iterator());
- }
-
- /**
- * %preformatted;
- * @param group CMGroupImpl Return values.
- */
- public final void getPreformatted(CMGroupImpl group) {
- if (group == null)
- return;
-
- getDeclarations(group, Arrays.asList(PREFORMATTED).iterator());
- }
-
- /**
- * Create element declarations and store them into a <code>CMGroupImpl</code>
- * instance.<br>
- * @param group CMGroupImpl Return values.
- */
- public final void getSpecial(CMGroupImpl group) {
- if (group == null)
- return;
- getDeclarations(group, Arrays.asList(SPECIAL).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/EntityCollection.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/EntityCollection.java
deleted file mode 100644
index 4f371fc77d..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/EntityCollection.java
+++ /dev/null
@@ -1,837 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.lang.reflect.Field;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Factory for entity declarations.
- */
-final class EntityCollection extends DeclCollection implements org.eclipse.wst.html.core.internal.provisional.HTML40Namespace.EntityName {
-
-
- private static class Ids {
- public static final int ID_AACUTE_L = 0;
- public static final int ID_AACUTE_U = 1;
- public static final int ID_ACIRC_L = 2;
- public static final int ID_ACIRC_U = 3;
- public static final int ID_ACUTE = 4;
- public static final int ID_AELIG_L = 5;
- public static final int ID_AELIG_U = 6;
- public static final int ID_AGRAVE_L = 7;
- public static final int ID_AGRAVE_U = 8;
- public static final int ID_ALEFSYM = 9;
- public static final int ID_ALPHA_L = 10;
- public static final int ID_ALPHA_U = 11;
- public static final int ID_AMP = 12;
- public static final int ID_AND = 13;
- public static final int ID_ANG = 14;
- public static final int ID_ARING_L = 15;
- public static final int ID_ARING_U = 16;
- public static final int ID_ASYMP = 17;
- public static final int ID_ATILDE_L = 18;
- public static final int ID_ATILDE_U = 19;
- public static final int ID_AUML_L = 20;
- public static final int ID_AUML_U = 21;
- public static final int ID_BDQUO = 22;
- public static final int ID_BETA_L = 23;
- public static final int ID_BETA_U = 24;
- public static final int ID_BRVBAR = 25;
- public static final int ID_BULL = 26;
- public static final int ID_CAP = 27;
- public static final int ID_CCEDIL_L = 28;
- public static final int ID_CCEDIL_U = 29;
- public static final int ID_CEDIL = 30;
- public static final int ID_CENT = 31;
- public static final int ID_CHI_L = 32;
- public static final int ID_CHI_U = 33;
- public static final int ID_CIRC = 34;
- public static final int ID_CLUBS = 35;
- public static final int ID_CONG = 36;
- public static final int ID_COPY = 37;
- public static final int ID_CRARR = 38;
- public static final int ID_CUP = 39;
- public static final int ID_CURREN = 40;
- public static final int ID_DAGGER_L = 41;
- public static final int ID_DAGGER_U = 42;
- public static final int ID_DARR_L = 43;
- public static final int ID_DARR_U = 44;
- public static final int ID_DEG = 45;
- public static final int ID_DELTA_L = 46;
- public static final int ID_DELTA_U = 47;
- public static final int ID_DIAMS = 48;
- public static final int ID_DIVIDE = 49;
- public static final int ID_EACUTE_L = 50;
- public static final int ID_EACUTE_U = 51;
- public static final int ID_ECIRC_L = 52;
- public static final int ID_ECIRC_U = 53;
- public static final int ID_EGRAVE_L = 54;
- public static final int ID_EGRAVE_U = 55;
- public static final int ID_EMPTY = 56;
- public static final int ID_EMSP = 57;
- public static final int ID_ENSP = 58;
- public static final int ID_EPSILON_L = 59;
- public static final int ID_EPSILON_U = 60;
- public static final int ID_EQUIV = 61;
- public static final int ID_ETA_L = 62;
- public static final int ID_ETA_U = 63;
- public static final int ID_ETH_L = 64;
- public static final int ID_ETH_U = 65;
- public static final int ID_EUML_L = 66;
- public static final int ID_EUML_U = 67;
- public static final int ID_EURO = 68;
- public static final int ID_EXIST = 69;
- public static final int ID_FNOF = 70;
- public static final int ID_FORALL = 71;
- public static final int ID_FRAC12 = 72;
- public static final int ID_FRAC14 = 73;
- public static final int ID_FRAC34 = 74;
- public static final int ID_FRASL = 75;
- public static final int ID_GAMMA_L = 76;
- public static final int ID_GAMMA_U = 77;
- public static final int ID_GE = 78;
- public static final int ID_GT = 79;
- public static final int ID_HARR_L = 80;
- public static final int ID_HARR_U = 81;
- public static final int ID_HEARTS = 82;
- public static final int ID_HELLIP = 83;
- public static final int ID_IACUTE_L = 84;
- public static final int ID_IACUTE_U = 85;
- public static final int ID_ICIRC_L = 86;
- public static final int ID_ICIRC_U = 87;
- public static final int ID_IEXCL = 88;
- public static final int ID_IGRAVE_L = 89;
- public static final int ID_IGRAVE_U = 90;
- public static final int ID_IMAGE = 91;
- public static final int ID_INFIN = 92;
- public static final int ID_INT = 93;
- public static final int ID_IOTA_L = 94;
- public static final int ID_IOTA_U = 95;
- public static final int ID_IQUEST = 96;
- public static final int ID_ISIN = 97;
- public static final int ID_IUML_L = 98;
- public static final int ID_IUML_U = 99;
- public static final int ID_KAPPA_L = 100;
- public static final int ID_KAPPA_U = 101;
- public static final int ID_LAMBDA_L = 102;
- public static final int ID_LAMBDA_U = 103;
- public static final int ID_LANG = 104;
- public static final int ID_LAQUO = 105;
- public static final int ID_LARR_L = 106;
- public static final int ID_LARR_U = 107;
- public static final int ID_LCEIL = 108;
- public static final int ID_LDQUO = 109;
- public static final int ID_LE = 110;
- public static final int ID_LFLOOR = 111;
- public static final int ID_LOWAST = 112;
- public static final int ID_LOZ = 113;
- public static final int ID_LRM = 114;
- public static final int ID_LSAQUO = 115;
- public static final int ID_LSQUO = 116;
- public static final int ID_LT = 117;
- public static final int ID_MACR = 118;
- public static final int ID_MDASH = 119;
- public static final int ID_MICRO = 120;
- public static final int ID_MIDDOT = 121;
- public static final int ID_MINUS = 122;
- public static final int ID_MU_L = 123;
- public static final int ID_MU_U = 124;
- public static final int ID_NABLA = 125;
- public static final int ID_NBSP = 126;
- public static final int ID_NDASH = 127;
- public static final int ID_NE = 128;
- public static final int ID_NI = 129;
- public static final int ID_NOT = 130;
- public static final int ID_NOTIN = 131;
- public static final int ID_NSUB = 132;
- public static final int ID_NTILDE_L = 133;
- public static final int ID_NTILDE_U = 134;
- public static final int ID_NU_L = 135;
- public static final int ID_NU_U = 136;
- public static final int ID_OACUTE_L = 137;
- public static final int ID_OACUTE_U = 138;
- public static final int ID_OCIRC_L = 139;
- public static final int ID_OCIRC_U = 140;
- public static final int ID_OELIG_L = 141;
- public static final int ID_OELIG_U = 142;
- public static final int ID_OGRAVE_L = 143;
- public static final int ID_OGRAVE_U = 144;
- public static final int ID_OLINE = 145;
- public static final int ID_OMEGA_L = 146;
- public static final int ID_OMEGA_U = 147;
- public static final int ID_OMICRON_L = 148;
- public static final int ID_OMICRON_U = 149;
- public static final int ID_OPLUS = 150;
- public static final int ID_OR = 151;
- public static final int ID_ORDF = 152;
- public static final int ID_ORDM = 153;
- public static final int ID_OSLASH_L = 154;
- public static final int ID_OSLASH_U = 155;
- public static final int ID_OTILDE_L = 156;
- public static final int ID_OTILDE_U = 157;
- public static final int ID_OTIMES = 158;
- public static final int ID_OUML_L = 159;
- public static final int ID_OUML_U = 160;
- public static final int ID_PARA = 161;
- public static final int ID_PART = 162;
- public static final int ID_PERMIL = 163;
- public static final int ID_PERP = 164;
- public static final int ID_PHI_L = 165;
- public static final int ID_PHI_U = 166;
- public static final int ID_PIV = 167;
- public static final int ID_PI_L = 168;
- public static final int ID_PI_U = 169;
- public static final int ID_PLUSMN = 170;
- public static final int ID_POUND = 171;
- public static final int ID_PRIME_L = 172;
- public static final int ID_PRIME_U = 173;
- public static final int ID_PROD = 174;
- public static final int ID_PROP = 175;
- public static final int ID_PSI_L = 176;
- public static final int ID_PSI_U = 177;
- public static final int ID_QUOT = 178;
- public static final int ID_RADIC = 179;
- public static final int ID_RANG = 180;
- public static final int ID_RAQUO = 181;
- public static final int ID_RARR_L = 182;
- public static final int ID_RARR_U = 183;
- public static final int ID_RCEIL = 184;
- public static final int ID_RDQUO = 185;
- public static final int ID_REAL = 186;
- public static final int ID_REG = 187;
- public static final int ID_RFLOOR = 188;
- public static final int ID_RHO_L = 189;
- public static final int ID_RHO_U = 190;
- public static final int ID_RLM = 191;
- public static final int ID_RSAQUO = 192;
- public static final int ID_RSQUO = 193;
- public static final int ID_SBQUO = 194;
- public static final int ID_SCARON_L = 195;
- public static final int ID_SCARON_U = 196;
- public static final int ID_SDOT = 197;
- public static final int ID_SECT = 198;
- public static final int ID_SHY = 199;
- public static final int ID_SIGMAF = 200;
- public static final int ID_SIGMA_L = 201;
- public static final int ID_SIGMA_U = 202;
- public static final int ID_SIM = 203;
- public static final int ID_SPADES = 204;
- public static final int ID_SUB = 205;
- public static final int ID_SUBE = 206;
- public static final int ID_SUM = 207;
- public static final int ID_SUP = 208;
- public static final int ID_SUP1 = 209;
- public static final int ID_SUP2 = 210;
- public static final int ID_SUP3 = 211;
- public static final int ID_SUPE = 212;
- public static final int ID_SZLIG = 213;
- public static final int ID_TAU_L = 214;
- public static final int ID_TAU_U = 215;
- public static final int ID_THERE4 = 216;
- public static final int ID_THETASYM = 217;
- public static final int ID_THETA_L = 218;
- public static final int ID_THETA_U = 219;
- public static final int ID_THINSP = 220;
- public static final int ID_THORN_L = 221;
- public static final int ID_THORN_U = 222;
- public static final int ID_TILDE = 223;
- public static final int ID_TIMES = 224;
- public static final int ID_TRADE = 225;
- public static final int ID_UACUTE_L = 226;
- public static final int ID_UACUTE_U = 227;
- public static final int ID_UARR_L = 228;
- public static final int ID_UARR_U = 229;
- public static final int ID_UCIRC_L = 230;
- public static final int ID_UCIRC_U = 231;
- public static final int ID_UGRAVE_L = 232;
- public static final int ID_UGRAVE_U = 233;
- public static final int ID_UML = 234;
- public static final int ID_UPSIH = 235;
- public static final int ID_UPSILON_L = 236;
- public static final int ID_UPSILON_U = 237;
- public static final int ID_UUML_L = 238;
- public static final int ID_UUML_U = 239;
- public static final int ID_WEIERP = 240;
- public static final int ID_XI_L = 241;
- public static final int ID_XI_U = 242;
- public static final int ID_YACUTE_L = 243;
- public static final int ID_YACUTE_U = 244;
- public static final int ID_YEN = 245;
- public static final int ID_YUML_L = 246;
- public static final int ID_YUML_U = 247;
- public static final int ID_ZETA_L = 248;
- public static final int ID_ZETA_U = 249;
- public static final int ID_ZWJ = 250;
- public static final int ID_ZWNJ = 251;
-
- public static int getNumOfIds() {
- if (numofids != -1)
- return numofids;
-
- // NOTE: If the reflection is too slow, this method should
- // just return the literal value, like 252.
- // -- 5/24/2001
- Class clazz = Ids.class;
- Field[] fields = clazz.getFields();
- numofids = 0;
- for (int i = 0; i < fields.length; i++) {
- String name = fields[i].getName();
- if (name.startsWith("ID_"))//$NON-NLS-1$
- numofids++;
- }
- return numofids;
- }
-
- // chache the result of the reflection.
- private static int numofids = -1;
- }
-
- private static String[] names = null;
-
- static {
- names = new String[Ids.getNumOfIds()];
- names[Ids.ID_AACUTE_L] = AACUTE_L;
- names[Ids.ID_AACUTE_U] = AACUTE_U;
- names[Ids.ID_ACIRC_L] = ACIRC_L;
- names[Ids.ID_ACIRC_U] = ACIRC_U;
- names[Ids.ID_ACUTE] = ACUTE;
- names[Ids.ID_AELIG_L] = AELIG_L;
- names[Ids.ID_AELIG_U] = AELIG_U;
- names[Ids.ID_AGRAVE_L] = AGRAVE_L;
- names[Ids.ID_AGRAVE_U] = AGRAVE_U;
- names[Ids.ID_ALEFSYM] = ALEFSYM;
- names[Ids.ID_ALPHA_L] = ALPHA_L;
- names[Ids.ID_ALPHA_U] = ALPHA_U;
- names[Ids.ID_AMP] = AMP;
- names[Ids.ID_AND] = AND;
- names[Ids.ID_ANG] = ANG;
- names[Ids.ID_ARING_L] = ARING_L;
- names[Ids.ID_ARING_U] = ARING_U;
- names[Ids.ID_ASYMP] = ASYMP;
- names[Ids.ID_ATILDE_L] = ATILDE_L;
- names[Ids.ID_ATILDE_U] = ATILDE_U;
- names[Ids.ID_AUML_L] = AUML_L;
- names[Ids.ID_AUML_U] = AUML_U;
- names[Ids.ID_BDQUO] = BDQUO;
- names[Ids.ID_BETA_L] = BETA_L;
- names[Ids.ID_BETA_U] = BETA_U;
- names[Ids.ID_BRVBAR] = BRVBAR;
- names[Ids.ID_BULL] = BULL;
- names[Ids.ID_CAP] = CAP;
- names[Ids.ID_CCEDIL_L] = CCEDIL_L;
- names[Ids.ID_CCEDIL_U] = CCEDIL_U;
- names[Ids.ID_CEDIL] = CEDIL;
- names[Ids.ID_CENT] = CENT;
- names[Ids.ID_CHI_L] = CHI_L;
- names[Ids.ID_CHI_U] = CHI_U;
- names[Ids.ID_CIRC] = CIRC;
- names[Ids.ID_CLUBS] = CLUBS;
- names[Ids.ID_CONG] = CONG;
- names[Ids.ID_COPY] = COPY;
- names[Ids.ID_CRARR] = CRARR;
- names[Ids.ID_CUP] = CUP;
- names[Ids.ID_CURREN] = CURREN;
- names[Ids.ID_DAGGER_L] = DAGGER_L;
- names[Ids.ID_DAGGER_U] = DAGGER_U;
- names[Ids.ID_DARR_L] = DARR_L;
- names[Ids.ID_DARR_U] = DARR_U;
- names[Ids.ID_DEG] = DEG;
- names[Ids.ID_DELTA_L] = DELTA_L;
- names[Ids.ID_DELTA_U] = DELTA_U;
- names[Ids.ID_DIAMS] = DIAMS;
- names[Ids.ID_DIVIDE] = DIVIDE;
- names[Ids.ID_EACUTE_L] = EACUTE_L;
- names[Ids.ID_EACUTE_U] = EACUTE_U;
- names[Ids.ID_ECIRC_L] = ECIRC_L;
- names[Ids.ID_ECIRC_U] = ECIRC_U;
- names[Ids.ID_EGRAVE_L] = EGRAVE_L;
- names[Ids.ID_EGRAVE_U] = EGRAVE_U;
- names[Ids.ID_EMPTY] = EMPTY;
- names[Ids.ID_EMSP] = EMSP;
- names[Ids.ID_ENSP] = ENSP;
- names[Ids.ID_EPSILON_L] = EPSILON_L;
- names[Ids.ID_EPSILON_U] = EPSILON_U;
- names[Ids.ID_EQUIV] = EQUIV;
- names[Ids.ID_ETA_L] = ETA_L;
- names[Ids.ID_ETA_U] = ETA_U;
- names[Ids.ID_ETH_L] = ETH_L;
- names[Ids.ID_ETH_U] = ETH_U;
- names[Ids.ID_EUML_L] = EUML_L;
- names[Ids.ID_EUML_U] = EUML_U;
- names[Ids.ID_EURO] = EURO;
- names[Ids.ID_EXIST] = EXIST;
- names[Ids.ID_FNOF] = FNOF;
- names[Ids.ID_FORALL] = FORALL;
- names[Ids.ID_FRAC12] = FRAC12;
- names[Ids.ID_FRAC14] = FRAC14;
- names[Ids.ID_FRAC34] = FRAC34;
- names[Ids.ID_FRASL] = FRASL;
- names[Ids.ID_GAMMA_L] = GAMMA_L;
- names[Ids.ID_GAMMA_U] = GAMMA_U;
- names[Ids.ID_GE] = GE;
- names[Ids.ID_GT] = GT;
- names[Ids.ID_HARR_L] = HARR_L;
- names[Ids.ID_HARR_U] = HARR_U;
- names[Ids.ID_HEARTS] = HEARTS;
- names[Ids.ID_HELLIP] = HELLIP;
- names[Ids.ID_IACUTE_L] = IACUTE_L;
- names[Ids.ID_IACUTE_U] = IACUTE_U;
- names[Ids.ID_ICIRC_L] = ICIRC_L;
- names[Ids.ID_ICIRC_U] = ICIRC_U;
- names[Ids.ID_IEXCL] = IEXCL;
- names[Ids.ID_IGRAVE_L] = IGRAVE_L;
- names[Ids.ID_IGRAVE_U] = IGRAVE_U;
- names[Ids.ID_IMAGE] = IMAGE;
- names[Ids.ID_INFIN] = INFIN;
- names[Ids.ID_INT] = INT;
- names[Ids.ID_IOTA_L] = IOTA_L;
- names[Ids.ID_IOTA_U] = IOTA_U;
- names[Ids.ID_IQUEST] = IQUEST;
- names[Ids.ID_ISIN] = ISIN;
- names[Ids.ID_IUML_L] = IUML_L;
- names[Ids.ID_IUML_U] = IUML_U;
- names[Ids.ID_KAPPA_L] = KAPPA_L;
- names[Ids.ID_KAPPA_U] = KAPPA_U;
- names[Ids.ID_LAMBDA_L] = LAMBDA_L;
- names[Ids.ID_LAMBDA_U] = LAMBDA_U;
- names[Ids.ID_LANG] = LANG;
- names[Ids.ID_LAQUO] = LAQUO;
- names[Ids.ID_LARR_L] = LARR_L;
- names[Ids.ID_LARR_U] = LARR_U;
- names[Ids.ID_LCEIL] = LCEIL;
- names[Ids.ID_LDQUO] = LDQUO;
- names[Ids.ID_LE] = LE;
- names[Ids.ID_LFLOOR] = LFLOOR;
- names[Ids.ID_LOWAST] = LOWAST;
- names[Ids.ID_LOZ] = LOZ;
- names[Ids.ID_LRM] = LRM;
- names[Ids.ID_LSAQUO] = LSAQUO;
- names[Ids.ID_LSQUO] = LSQUO;
- names[Ids.ID_LT] = LT;
- names[Ids.ID_MACR] = MACR;
- names[Ids.ID_MDASH] = MDASH;
- names[Ids.ID_MICRO] = MICRO;
- names[Ids.ID_MIDDOT] = MIDDOT;
- names[Ids.ID_MINUS] = MINUS;
- names[Ids.ID_MU_L] = MU_L;
- names[Ids.ID_MU_U] = MU_U;
- names[Ids.ID_NABLA] = NABLA;
- names[Ids.ID_NBSP] = NBSP;
- names[Ids.ID_NDASH] = NDASH;
- names[Ids.ID_NE] = NE;
- names[Ids.ID_NI] = NI;
- names[Ids.ID_NOT] = NOT;
- names[Ids.ID_NOTIN] = NOTIN;
- names[Ids.ID_NSUB] = NSUB;
- names[Ids.ID_NTILDE_L] = NTILDE_L;
- names[Ids.ID_NTILDE_U] = NTILDE_U;
- names[Ids.ID_NU_L] = NU_L;
- names[Ids.ID_NU_U] = NU_U;
- names[Ids.ID_OACUTE_L] = OACUTE_L;
- names[Ids.ID_OACUTE_U] = OACUTE_U;
- names[Ids.ID_OCIRC_L] = OCIRC_L;
- names[Ids.ID_OCIRC_U] = OCIRC_U;
- names[Ids.ID_OELIG_L] = OELIG_L;
- names[Ids.ID_OELIG_U] = OELIG_U;
- names[Ids.ID_OGRAVE_L] = OGRAVE_L;
- names[Ids.ID_OGRAVE_U] = OGRAVE_U;
- names[Ids.ID_OLINE] = OLINE;
- names[Ids.ID_OMEGA_L] = OMEGA_L;
- names[Ids.ID_OMEGA_U] = OMEGA_U;
- names[Ids.ID_OMICRON_L] = OMICRON_L;
- names[Ids.ID_OMICRON_U] = OMICRON_U;
- names[Ids.ID_OPLUS] = OPLUS;
- names[Ids.ID_OR] = OR;
- names[Ids.ID_ORDF] = ORDF;
- names[Ids.ID_ORDM] = ORDM;
- names[Ids.ID_OSLASH_L] = OSLASH_L;
- names[Ids.ID_OSLASH_U] = OSLASH_U;
- names[Ids.ID_OTILDE_L] = OTILDE_L;
- names[Ids.ID_OTILDE_U] = OTILDE_U;
- names[Ids.ID_OTIMES] = OTIMES;
- names[Ids.ID_OUML_L] = OUML_L;
- names[Ids.ID_OUML_U] = OUML_U;
- names[Ids.ID_PARA] = PARA;
- names[Ids.ID_PART] = PART;
- names[Ids.ID_PERMIL] = PERMIL;
- names[Ids.ID_PERP] = PERP;
- names[Ids.ID_PHI_L] = PHI_L;
- names[Ids.ID_PHI_U] = PHI_U;
- names[Ids.ID_PIV] = PIV;
- names[Ids.ID_PI_L] = PI_L;
- names[Ids.ID_PI_U] = PI_U;
- names[Ids.ID_PLUSMN] = PLUSMN;
- names[Ids.ID_POUND] = POUND;
- names[Ids.ID_PRIME_L] = PRIME_L;
- names[Ids.ID_PRIME_U] = PRIME_U;
- names[Ids.ID_PROD] = PROD;
- names[Ids.ID_PROP] = PROP;
- names[Ids.ID_PSI_L] = PSI_L;
- names[Ids.ID_PSI_U] = PSI_U;
- names[Ids.ID_QUOT] = QUOT;
- names[Ids.ID_RADIC] = RADIC;
- names[Ids.ID_RANG] = RANG;
- names[Ids.ID_RAQUO] = RAQUO;
- names[Ids.ID_RARR_L] = RARR_L;
- names[Ids.ID_RARR_U] = RARR_U;
- names[Ids.ID_RCEIL] = RCEIL;
- names[Ids.ID_RDQUO] = RDQUO;
- names[Ids.ID_REAL] = REAL;
- names[Ids.ID_REG] = REG;
- names[Ids.ID_RFLOOR] = RFLOOR;
- names[Ids.ID_RHO_L] = RHO_L;
- names[Ids.ID_RHO_U] = RHO_U;
- names[Ids.ID_RLM] = RLM;
- names[Ids.ID_RSAQUO] = RSAQUO;
- names[Ids.ID_RSQUO] = RSQUO;
- names[Ids.ID_SBQUO] = SBQUO;
- names[Ids.ID_SCARON_L] = SCARON_L;
- names[Ids.ID_SCARON_U] = SCARON_U;
- names[Ids.ID_SDOT] = SDOT;
- names[Ids.ID_SECT] = SECT;
- names[Ids.ID_SHY] = SHY;
- names[Ids.ID_SIGMAF] = SIGMAF;
- names[Ids.ID_SIGMA_L] = SIGMA_L;
- names[Ids.ID_SIGMA_U] = SIGMA_U;
- names[Ids.ID_SIM] = SIM;
- names[Ids.ID_SPADES] = SPADES;
- names[Ids.ID_SUB] = SUB;
- names[Ids.ID_SUBE] = SUBE;
- names[Ids.ID_SUM] = SUM;
- names[Ids.ID_SUP] = SUP;
- names[Ids.ID_SUP1] = SUP1;
- names[Ids.ID_SUP2] = SUP2;
- names[Ids.ID_SUP3] = SUP3;
- names[Ids.ID_SUPE] = SUPE;
- names[Ids.ID_SZLIG] = SZLIG;
- names[Ids.ID_TAU_L] = TAU_L;
- names[Ids.ID_TAU_U] = TAU_U;
- names[Ids.ID_THERE4] = THERE4;
- names[Ids.ID_THETASYM] = THETASYM;
- names[Ids.ID_THETA_L] = THETA_L;
- names[Ids.ID_THETA_U] = THETA_U;
- names[Ids.ID_THINSP] = THINSP;
- names[Ids.ID_THORN_L] = THORN_L;
- names[Ids.ID_THORN_U] = THORN_U;
- names[Ids.ID_TILDE] = TILDE;
- names[Ids.ID_TIMES] = TIMES;
- names[Ids.ID_TRADE] = TRADE;
- names[Ids.ID_UACUTE_L] = UACUTE_L;
- names[Ids.ID_UACUTE_U] = UACUTE_U;
- names[Ids.ID_UARR_L] = UARR_L;
- names[Ids.ID_UARR_U] = UARR_U;
- names[Ids.ID_UCIRC_L] = UCIRC_L;
- names[Ids.ID_UCIRC_U] = UCIRC_U;
- names[Ids.ID_UGRAVE_L] = UGRAVE_L;
- names[Ids.ID_UGRAVE_U] = UGRAVE_U;
- names[Ids.ID_UML] = UML;
- names[Ids.ID_UPSIH] = UPSIH;
- names[Ids.ID_UPSILON_L] = UPSILON_L;
- names[Ids.ID_UPSILON_U] = UPSILON_U;
- names[Ids.ID_UUML_L] = UUML_L;
- names[Ids.ID_UUML_U] = UUML_U;
- names[Ids.ID_WEIERP] = WEIERP;
- names[Ids.ID_XI_L] = XI_L;
- names[Ids.ID_XI_U] = XI_U;
- names[Ids.ID_YACUTE_L] = YACUTE_L;
- names[Ids.ID_YACUTE_U] = YACUTE_U;
- names[Ids.ID_YEN] = YEN;
- names[Ids.ID_YUML_L] = YUML_L;
- names[Ids.ID_YUML_U] = YUML_U;
- names[Ids.ID_ZETA_L] = ZETA_L;
- names[Ids.ID_ZETA_U] = ZETA_U;
- names[Ids.ID_ZWJ] = ZWJ;
- names[Ids.ID_ZWNJ] = ZWNJ;
- }
- private static char[] values = null;
-
- static {
- values = new char[Ids.getNumOfIds()];
- values[Ids.ID_AACUTE_L] = 225;
- values[Ids.ID_AACUTE_U] = 193;
- values[Ids.ID_ACIRC_L] = 226;
- values[Ids.ID_ACIRC_U] = 194;
- values[Ids.ID_ACUTE] = 180;
- values[Ids.ID_AELIG_L] = 230;
- values[Ids.ID_AELIG_U] = 198;
- values[Ids.ID_AGRAVE_L] = 224;
- values[Ids.ID_AGRAVE_U] = 192;
- values[Ids.ID_ALEFSYM] = 8501;
- values[Ids.ID_ALPHA_L] = 945;
- values[Ids.ID_ALPHA_U] = 913;
- values[Ids.ID_AMP] = 38;
- values[Ids.ID_AND] = 8743;
- values[Ids.ID_ANG] = 8736;
- values[Ids.ID_ARING_L] = 229;
- values[Ids.ID_ARING_U] = 197;
- values[Ids.ID_ASYMP] = 8776;
- values[Ids.ID_ATILDE_L] = 227;
- values[Ids.ID_ATILDE_U] = 195;
- values[Ids.ID_AUML_L] = 228;
- values[Ids.ID_AUML_U] = 196;
- values[Ids.ID_BDQUO] = 8222;
- values[Ids.ID_BETA_L] = 946;
- values[Ids.ID_BETA_U] = 914;
- values[Ids.ID_BRVBAR] = 166;
- values[Ids.ID_BULL] = 8226;
- values[Ids.ID_CAP] = 8745;
- values[Ids.ID_CCEDIL_L] = 231;
- values[Ids.ID_CCEDIL_U] = 199;
- values[Ids.ID_CEDIL] = 184;
- values[Ids.ID_CENT] = 162;
- values[Ids.ID_CHI_L] = 967;
- values[Ids.ID_CHI_U] = 935;
- values[Ids.ID_CIRC] = 710;
- values[Ids.ID_CLUBS] = 9827;
- values[Ids.ID_CONG] = 8773;
- values[Ids.ID_COPY] = 169;
- values[Ids.ID_CRARR] = 8629;
- values[Ids.ID_CUP] = 8746;
- values[Ids.ID_CURREN] = 164;
- values[Ids.ID_DAGGER_L] = 8224;
- values[Ids.ID_DAGGER_U] = 8225;
- values[Ids.ID_DARR_L] = 8595;
- values[Ids.ID_DARR_U] = 8659;
- values[Ids.ID_DEG] = 176;
- values[Ids.ID_DELTA_L] = 948;
- values[Ids.ID_DELTA_U] = 916;
- values[Ids.ID_DIAMS] = 9830;
- values[Ids.ID_DIVIDE] = 247;
- values[Ids.ID_EACUTE_L] = 233;
- values[Ids.ID_EACUTE_U] = 201;
- values[Ids.ID_ECIRC_L] = 234;
- values[Ids.ID_ECIRC_U] = 202;
- values[Ids.ID_EGRAVE_L] = 232;
- values[Ids.ID_EGRAVE_U] = 200;
- values[Ids.ID_EMPTY] = 8709;
- values[Ids.ID_EMSP] = 8195;
- values[Ids.ID_ENSP] = 8194;
- values[Ids.ID_EPSILON_L] = 949;
- values[Ids.ID_EPSILON_U] = 917;
- values[Ids.ID_EQUIV] = 8801;
- values[Ids.ID_ETA_L] = 951;
- values[Ids.ID_ETA_U] = 919;
- values[Ids.ID_ETH_L] = 240;
- values[Ids.ID_ETH_U] = 208;
- values[Ids.ID_EUML_L] = 235;
- values[Ids.ID_EUML_U] = 203;
- values[Ids.ID_EURO] = 8364;
- values[Ids.ID_EXIST] = 8707;
- values[Ids.ID_FNOF] = 402;
- values[Ids.ID_FORALL] = 8704;
- values[Ids.ID_FRAC12] = 189;
- values[Ids.ID_FRAC14] = 188;
- values[Ids.ID_FRAC34] = 190;
- values[Ids.ID_FRASL] = 8260;
- values[Ids.ID_GAMMA_L] = 947;
- values[Ids.ID_GAMMA_U] = 915;
- values[Ids.ID_GE] = 8805;
- values[Ids.ID_GT] = 62;
- values[Ids.ID_HARR_L] = 8596;
- values[Ids.ID_HARR_U] = 8660;
- values[Ids.ID_HEARTS] = 9829;
- values[Ids.ID_HELLIP] = 8230;
- values[Ids.ID_IACUTE_L] = 237;
- values[Ids.ID_IACUTE_U] = 205;
- values[Ids.ID_ICIRC_L] = 238;
- values[Ids.ID_ICIRC_U] = 206;
- values[Ids.ID_IEXCL] = 161;
- values[Ids.ID_IGRAVE_L] = 236;
- values[Ids.ID_IGRAVE_U] = 204;
- values[Ids.ID_IMAGE] = 8465;
- values[Ids.ID_INFIN] = 8734;
- values[Ids.ID_INT] = 8747;
- values[Ids.ID_IOTA_L] = 953;
- values[Ids.ID_IOTA_U] = 921;
- values[Ids.ID_IQUEST] = 191;
- values[Ids.ID_ISIN] = 8712;
- values[Ids.ID_IUML_L] = 239;
- values[Ids.ID_IUML_U] = 207;
- values[Ids.ID_KAPPA_L] = 954;
- values[Ids.ID_KAPPA_U] = 922;
- values[Ids.ID_LAMBDA_L] = 955;
- values[Ids.ID_LAMBDA_U] = 923;
- values[Ids.ID_LANG] = 9001;
- values[Ids.ID_LAQUO] = 171;
- values[Ids.ID_LARR_L] = 8592;
- values[Ids.ID_LARR_U] = 8656;
- values[Ids.ID_LCEIL] = 8968;
- values[Ids.ID_LDQUO] = 8220;
- values[Ids.ID_LE] = 8804;
- values[Ids.ID_LFLOOR] = 8970;
- values[Ids.ID_LOWAST] = 8727;
- values[Ids.ID_LOZ] = 9674;
- values[Ids.ID_LRM] = 8206;
- values[Ids.ID_LSAQUO] = 8249;
- values[Ids.ID_LSQUO] = 8216;
- values[Ids.ID_LT] = 60;
- values[Ids.ID_MACR] = 175;
- values[Ids.ID_MDASH] = 8212;
- values[Ids.ID_MICRO] = 181;
- values[Ids.ID_MIDDOT] = 183;
- values[Ids.ID_MINUS] = 8722;
- values[Ids.ID_MU_L] = 956;
- values[Ids.ID_MU_U] = 924;
- values[Ids.ID_NABLA] = 8711;
- values[Ids.ID_NBSP] = 160;
- values[Ids.ID_NDASH] = 8211;
- values[Ids.ID_NE] = 8800;
- values[Ids.ID_NI] = 8715;
- values[Ids.ID_NOT] = 172;
- values[Ids.ID_NOTIN] = 8713;
- values[Ids.ID_NSUB] = 8836;
- values[Ids.ID_NTILDE_L] = 241;
- values[Ids.ID_NTILDE_U] = 209;
- values[Ids.ID_NU_L] = 957;
- values[Ids.ID_NU_U] = 925;
- values[Ids.ID_OACUTE_L] = 243;
- values[Ids.ID_OACUTE_U] = 211;
- values[Ids.ID_OCIRC_L] = 244;
- values[Ids.ID_OCIRC_U] = 212;
- values[Ids.ID_OELIG_L] = 339;
- values[Ids.ID_OELIG_U] = 338;
- values[Ids.ID_OGRAVE_L] = 242;
- values[Ids.ID_OGRAVE_U] = 210;
- values[Ids.ID_OLINE] = 8254;
- values[Ids.ID_OMEGA_L] = 969;
- values[Ids.ID_OMEGA_U] = 937;
- values[Ids.ID_OMICRON_L] = 959;
- values[Ids.ID_OMICRON_U] = 927;
- values[Ids.ID_OPLUS] = 8853;
- values[Ids.ID_OR] = 8744;
- values[Ids.ID_ORDF] = 170;
- values[Ids.ID_ORDM] = 186;
- values[Ids.ID_OSLASH_L] = 248;
- values[Ids.ID_OSLASH_U] = 216;
- values[Ids.ID_OTILDE_L] = 245;
- values[Ids.ID_OTILDE_U] = 213;
- values[Ids.ID_OTIMES] = 8855;
- values[Ids.ID_OUML_L] = 246;
- values[Ids.ID_OUML_U] = 214;
- values[Ids.ID_PARA] = 182;
- values[Ids.ID_PART] = 8706;
- values[Ids.ID_PERMIL] = 8240;
- values[Ids.ID_PERP] = 8869;
- values[Ids.ID_PHI_L] = 966;
- values[Ids.ID_PHI_U] = 934;
- values[Ids.ID_PIV] = 982;
- values[Ids.ID_PI_L] = 960;
- values[Ids.ID_PI_U] = 928;
- values[Ids.ID_PLUSMN] = 177;
- values[Ids.ID_POUND] = 163;
- values[Ids.ID_PRIME_L] = 8242;
- values[Ids.ID_PRIME_U] = 8243;
- values[Ids.ID_PROD] = 8719;
- values[Ids.ID_PROP] = 8733;
- values[Ids.ID_PSI_L] = 968;
- values[Ids.ID_PSI_U] = 936;
- values[Ids.ID_QUOT] = 34;
- values[Ids.ID_RADIC] = 8730;
- values[Ids.ID_RANG] = 9002;
- values[Ids.ID_RAQUO] = 187;
- values[Ids.ID_RARR_L] = 8594;
- values[Ids.ID_RARR_U] = 8658;
- values[Ids.ID_RCEIL] = 8969;
- values[Ids.ID_RDQUO] = 8221;
- values[Ids.ID_REAL] = 8476;
- values[Ids.ID_REG] = 174;
- values[Ids.ID_RFLOOR] = 8971;
- values[Ids.ID_RHO_L] = 961;
- values[Ids.ID_RHO_U] = 929;
- values[Ids.ID_RLM] = 8207;
- values[Ids.ID_RSAQUO] = 8250;
- values[Ids.ID_RSQUO] = 8217;
- values[Ids.ID_SBQUO] = 8218;
- values[Ids.ID_SCARON_L] = 353;
- values[Ids.ID_SCARON_U] = 352;
- values[Ids.ID_SDOT] = 8901;
- values[Ids.ID_SECT] = 167;
- values[Ids.ID_SHY] = 173;
- values[Ids.ID_SIGMAF] = 962;
- values[Ids.ID_SIGMA_L] = 963;
- values[Ids.ID_SIGMA_U] = 931;
- values[Ids.ID_SIM] = 8764;
- values[Ids.ID_SPADES] = 9824;
- values[Ids.ID_SUB] = 8834;
- values[Ids.ID_SUBE] = 8838;
- values[Ids.ID_SUM] = 8721;
- values[Ids.ID_SUP] = 8835;
- values[Ids.ID_SUP1] = 185;
- values[Ids.ID_SUP2] = 178;
- values[Ids.ID_SUP3] = 179;
- values[Ids.ID_SUPE] = 8839;
- values[Ids.ID_SZLIG] = 223;
- values[Ids.ID_TAU_L] = 964;
- values[Ids.ID_TAU_U] = 932;
- values[Ids.ID_THERE4] = 8756;
- values[Ids.ID_THETASYM] = 977;
- values[Ids.ID_THETA_L] = 952;
- values[Ids.ID_THETA_U] = 920;
- values[Ids.ID_THINSP] = 8201;
- values[Ids.ID_THORN_L] = 254;
- values[Ids.ID_THORN_U] = 222;
- values[Ids.ID_TILDE] = 732;
- values[Ids.ID_TIMES] = 215;
- values[Ids.ID_TRADE] = 8482;
- values[Ids.ID_UACUTE_L] = 250;
- values[Ids.ID_UACUTE_U] = 218;
- values[Ids.ID_UARR_L] = 8593;
- values[Ids.ID_UARR_U] = 8657;
- values[Ids.ID_UCIRC_L] = 251;
- values[Ids.ID_UCIRC_U] = 219;
- values[Ids.ID_UGRAVE_L] = 249;
- values[Ids.ID_UGRAVE_U] = 217;
- values[Ids.ID_UML] = 168;
- values[Ids.ID_UPSIH] = 978;
- values[Ids.ID_UPSILON_L] = 965;
- values[Ids.ID_UPSILON_U] = 933;
- values[Ids.ID_UUML_L] = 252;
- values[Ids.ID_UUML_U] = 220;
- values[Ids.ID_WEIERP] = 8472;
- values[Ids.ID_XI_L] = 958;
- values[Ids.ID_XI_U] = 926;
- values[Ids.ID_YACUTE_L] = 253;
- values[Ids.ID_YACUTE_U] = 221;
- values[Ids.ID_YEN] = 165;
- values[Ids.ID_YUML_L] = 255;
- values[Ids.ID_YUML_U] = 376;
- values[Ids.ID_ZETA_L] = 950;
- values[Ids.ID_ZETA_U] = 918;
- values[Ids.ID_ZWJ] = 8205;
- values[Ids.ID_ZWNJ] = 8204;
- }
-
- /**
- */
- public EntityCollection() {
- super(names, STRICT_CASE);
- }
-
- /**
- * Create an entity declaration.
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param attrName java.lang.String
- */
- protected CMNode create(String entityName) {
- int id = getID(entityName);
- if (id == ID_UNKNOWN)
- return null;
-
- String value = String.valueOf(values[id]);
- HTMLEntityDeclImpl dec = new HTMLEntityDeclImpl(entityName, value);
-
- return dec;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLAttrDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLAttrDeclImpl.java
deleted file mode 100644
index 98ab2d9ad8..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLAttrDeclImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLAttributeDeclaration;
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Implementation class of {@link <code>HTMLAttributeDeclaration</code>} interface.<br>
- */
-class HTMLAttrDeclImpl extends CMNodeImpl implements HTMLAttributeDeclaration {
-
- private HTMLCMDataTypeImpl type = null;
- private int usage = 0;
-
- /**
- */
- public HTMLAttrDeclImpl(String attrName, HTMLCMDataTypeImpl valueType, int valueUsage) {
- super(attrName);
- this.type = valueType;
-
- switch (valueUsage) {
- case OPTIONAL :
- case REQUIRED :
- case FIXED :
- case PROHIBITED :
- this.usage = valueUsage;
- break;
- default :
- // should warn...
- this.usage = OPTIONAL; // fall back
- break;
- }
- }
-
- /**
- * getAttrName method
- * @return java.lang.String
- */
- public String getAttrName() {
- return getNodeName();
- }
-
- /**
- * getAttrType method
- * @return CMDataType
- */
- public CMDataType getAttrType() {
- return type;
- }
-
- /**
- * @deprecated in superclass
- */
- public String getDefaultValue() {
- if (type.getImpliedValueKind() != CMDataType.IMPLIED_VALUE_DEFAULT)
- return null;
- return type.getImpliedValue();
- }
-
- /**
- * @deprecated in superclass
- */
- public Enumeration getEnumAttr() {
- Vector v = new Vector(Arrays.asList(type.getEnumeratedValues()));
- return v.elements();
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- * ELEMENT_DECLARATION, ATTRIBUTE_DECLARATION, GROUP, ENTITY_DECLARATION.
- */
- public int getNodeType() {
- return CMNode.ATTRIBUTE_DECLARATION;
- }
-
- /**
- * @return int
- */
- public int getUsage() {
- return usage;
- }
-
- /**
- */
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return true;
- return super.supports(propertyName);
- }
-
- /**
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return new Boolean(true);
- return super.getProperty(propertyName);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLCMDataTypeImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLCMDataTypeImpl.java
deleted file mode 100644
index 63366fd3f9..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLCMDataTypeImpl.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-
-
-/**
- */
-class HTMLCMDataTypeImpl extends CMNodeImpl implements HTMLCMDataType {
-
- private int impliedValueKind = IMPLIED_VALUE_NONE;
- private String impliedValue = null;
- private final static String[] emptyArray = new String[0];
- private String[] enumValues = emptyArray;
- private String instanceValue = null;
-
- /**
- * HTMLCMDataTypeImpl constructor comment.
- * @param nm java.lang.String
- */
- public HTMLCMDataTypeImpl(String typeName) {
- super(typeName);
- }
-
- /**
- * HTMLCMDataTypeImpl constructor comment.
- * @param nm java.lang.String
- */
- public HTMLCMDataTypeImpl(String typeName, String instanceValue) {
- super(typeName);
- this.instanceValue = instanceValue;
- }
-
- /**
- * 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 instanceValue;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMDataType
- */
- public String getDataTypeName() {
- return getNodeName();
- }
-
- /**
- * getTypeName method
- * @return java.lang.String[]
- *
- */
- public String[] getEnumeratedValues() {
- return enumValues;
- }
-
- /**
- * getTypeName method
- * @return java.lang.String
- *
- * Returns the implied value or null if none exists.
- */
- public String getImpliedValue() {
- return impliedValue;
- }
-
- /**
- * getImpliedValueKind method
- * @return int
- *
- * Returns one of :
- * IMPLIED_VALUE_NONE, IMPLIED_VALUE_FIXED, IMPLIED_VALUE_DEFAULT.
- */
- public int getImpliedValueKind() {
- return impliedValueKind;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public int getNodeType() {
- return CMNode.DATA_TYPE;
- }
-
- /**
- */
- void setEnumValues(String[] values) {
- enumValues = new String[values.length];
- for (int i = 0; i < values.length; i++) {
- enumValues[i] = values[i];
- }
- }
-
- /**
- * package scope.
- */
- void setImpliedValue(int kind, String value) {
- switch (kind) {
- case IMPLIED_VALUE_FIXED :
- case IMPLIED_VALUE_DEFAULT :
- impliedValueKind = kind;
- impliedValue = value;
- break;
- case IMPLIED_VALUE_NONE :
- default :
- impliedValueKind = IMPLIED_VALUE_NONE;
- impliedValue = null; // maybe a null string?
- break;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLCMNode.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLCMNode.java
deleted file mode 100644
index b294b27576..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLCMNode.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.wst.html.core.internal.contentmodel.chtml;
-
-
-/**
- * In HTML Documents, name and value of an attribute/element/entity
- * should be treated ignoring theirs case. However, in XML documents,
- * they should be distinguished with sensitiveness of their case.
- * CMNode is basically designed to represent DTDs or Schemas for XML
- * documents. So, it doesn't have interfaces to retrieve such information.
- * However, declarations in the HTML CM should provide such information.
- * This intermediate interface is intended to provide whether ignore cases
- * or not.<br>
- */
-interface HTMLCMNode extends org.eclipse.wst.xml.core.internal.contentmodel.CMNode {
-
- /**
- * Returns <code>true</code>, if declaration is for HTML attribute/element/entity.
- * Otherwise, returns <code>false</code>.
- * @return boolean
- */
- boolean shouldIgnoreCase();
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLElemDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLElemDeclImpl.java
deleted file mode 100644
index c003526d22..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLElemDeclImpl.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLAttributeDeclaration;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLElementDeclaration;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLPropertyDeclaration;
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-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.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Base class for all Hed???? classes.
- */
-abstract class HTMLElemDeclImpl extends CMContentImpl implements HTMLElementDeclaration, HTMLPropertyDeclaration {
-
- // DTD
- protected CMNamedNodeMapImpl attributes = null;
- protected String typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_EMPTY;
- /** Never access this field directly. Instead, use getComplexTypeDefinition method. */
- private ComplexTypeDefinition typeDefinition = null;
- protected CMGroupImpl inclusion = null;
- protected CMGroupImpl exclusion = null;
- // advanced information
- protected CMNamedNodeMap prohibitedAncestors = null;
- protected int correctionType = CORRECT_NONE;
- protected int formatType = FORMAT_HTML;
- protected int layoutType = LAYOUT_NONE;
- protected int omitType = OMIT_NONE;
- protected boolean keepSpaces = false;
- protected boolean indentChild = false;
- protected ElementCollection elementCollection = null;
- protected AttributeCollection attributeCollection = null;
- protected final static CMNamedNodeMap EMPTY_MAP = new CMNamedNodeMap() {
- public int getLength() {
- return 0;
- }
-
- public CMNode getNamedItem(String name) {
- return null;
- }
-
- public CMNode item(int index) {
- return null;
- }
-
- public Iterator iterator() {
- return new Iterator() {
- public boolean hasNext() {
- return false;
- }
-
- public Object next() {
- return null;
- }
-
- public void remove() {
- }
- };
- }
- };
-
- /**
- * HTMLElemDeclImpl constructor.
- * In the HTML DTD, an element declaration has no specification
- * for its occurrence. Occurrence is specifed in content model, like
- * <code>(LI)+</code>. To avoid confusion (and complexity),
- * occurrence of an element declaration is always 1 (it means, min = 1 and
- * max = 1). Instead, occurrence of CMGroup represents actual occurrence
- * of the content.
- * <br>
- * @param name java.lang.String
- */
- public HTMLElemDeclImpl(String elementName, ElementCollection collection) {
- super(elementName, 1, 1);
- elementCollection = collection;
- attributeCollection = collection.getAttributeCollection();
- }
-
- /**
- */
- protected abstract void createAttributeDeclarations();
-
- private ComplexTypeDefinition createComplexTypeDefinition() {
- if (typeDefinitionName.equals(ComplexTypeDefinitionFactory.CTYPE_CDATA) || typeDefinitionName.equals(ComplexTypeDefinitionFactory.CTYPE_EMPTY) || typeDefinitionName.equals(ComplexTypeDefinitionFactory.CTYPE_PCDATA))
- return null;
-
- ComplexTypeDefinitionFactory factory = ComplexTypeDefinitionFactory.getInstance();
- if (factory == null)
- return null; // fatal error.
-
- ComplexTypeDefinition def = factory.createTypeDefinition(typeDefinitionName, elementCollection);
- return def;
- }
-
- /**
- * Get an attribute declaration.
- */
- public HTMLAttributeDeclaration getAttributeDeclaration(String attrName) {
- if (attributes == null) {
- createAttributeDeclarations();
- if (attributes == null)
- return null; // fail to create
- }
-
- CMNode cmnode = attributes.getNamedItem(attrName);
- if (cmnode == null) {
- return null;
- }
- else {
- return (HTMLAttributeDeclaration) cmnode; // already exists.
- }
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public CMNamedNodeMap getAttributes() {
- if (attributes == null)
- createAttributeDeclarations(); // lazy eval.
- return attributes;
- }
-
- /**
- * Get an instance of complex type definition.
- */
- private ComplexTypeDefinition getComplexTypeDefinition() {
- if (typeDefinition == null)
- typeDefinition = createComplexTypeDefinition();
- return typeDefinition;
- }
-
- /**
- * Content.<br>
- * Element declarations which type is EMPTY or CDATA (maybe PCDATA)
- * <strong>MUST</strong> override this method and always return null.
- * This default implementation always tries to create a complex type definition
- * instance and access to it.
- * <br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public CMContent getContent() {
- ComplexTypeDefinition def = getComplexTypeDefinition(); // lazy eval.
- return (def != null) ? def.getContent() : null;
- }
-
- /**
- * Content type.<br>
- * Element declarations which type is EMPTY or CDATA (maybe PCDATA)
- * <strong>MUST</strong> override this method and return an appropriate type.
- * This default implementation always tries to create a complex type definition
- * instance and access to it.
- * <br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public int getContentType() {
- ComplexTypeDefinition def = getComplexTypeDefinition(); // lazy eval.
- return (def != null) ? def.getContentType() : CMElementDeclaration.CDATA;
- }
-
- /**
- * @see HTMLElementDeclaration#getCorrectionType
- */
- public int getCorrectionType() {
- return correctionType;
- }
-
- /**
- * HTML element doesn't have any data type. So, this method always
- * returns <code>null</code>.<br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public CMDataType getDataType() {
- return null;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public String getElementName() {
- return getNodeName();
- }
-
- /**
- * Exclusion.
- * Almost elements don't have a exclusion.
- * Only classes those have exclusion should override this method.
- */
- public CMContent getExclusion() {
- return null;
- }
-
- /**
- * Default format type is <code>FORMAT_HTML</code>.<br>
- */
- public int getFormatType() {
- return formatType;
- }
-
- /**
- * Inclusion.
- * Almost elements don't have a inclusion.
- * Only classes those have inclusion should override this method.
- */
- public CMContent getInclusion() {
- return null;
- }
-
- /**
- */
- public int getLayoutType() {
- return layoutType;
- }
-
- /**
- * Line break hint is strongly related to layout type.
- * Indeed, in the C++DOM, it is determined from layout type only.
- * So, this implementation, as the default implementation for all declarations,
- * also determines from layout type only.<br>
- * @return int
- */
- public int getLineBreakHint() {
- switch (getLayoutType()) {
- case HTMLElementDeclaration.LAYOUT_BLOCK :
- return HTMLElementDeclaration.BREAK_BEFORE_START_AND_AFTER_END;
- case HTMLElementDeclaration.LAYOUT_BREAK :
- return HTMLElementDeclaration.BREAK_AFTER_START;
- case HTMLElementDeclaration.LAYOUT_HIDDEN :
- return HTMLElementDeclaration.BREAK_BEFORE_START_AND_AFTER_END;
- default :
- return HTMLElementDeclaration.BREAK_NONE;
- }
- }
-
- /**
- * No HTML element has local elements. So, this method always
- * returns an empty map.
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public CMNamedNodeMap getLocalElements() {
- return EMPTY_MAP;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public int getNodeType() {
- return CMNode.ELEMENT_DECLARATION;
- }
-
- /**
- */
- public int getOmitType() {
- return omitType;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- return EMPTY_MAP;
- }
-
- /**
- */
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE)) {
- return true;
- }
- else if (propertyName.equals(HTMLCMProperties.CONTENT_HINT)) {
- ComplexTypeDefinition def = getComplexTypeDefinition();
- return (def != null);
- }
- else {
- PropertyProvider pp = PropertyProviderFactory.getProvider(propertyName);
- if (pp == null)
- return false;
- return pp.supports(this);
- }
-
- }
-
- /**
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE)) {
- return new Boolean(true);
- }
- else if (propertyName.equals(HTMLCMProperties.CONTENT_HINT)) {
- ComplexTypeDefinition def = getComplexTypeDefinition();
- return (def != null) ? def.getPrimaryCandidate() : null;
- }
- else {
- PropertyProvider pp = PropertyProviderFactory.getProvider(propertyName);
- if (pp == null)
- return null;
- return pp.get(this);
- }
- }
-
- /**
- * Return element names which terminates this element.<br>
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return null;
- }
-
- /**
- * return true when the element is a JSP element.
- */
- public boolean isJSP() {
- return false;
- }
-
- /**
- * In some elements, such as APPLET, a source generator should indent child
- * elements that their parents. That is, a source generator should generate
- * source of APPLET and PARAMS like this:
- * <PRE>
- * &lt;APPLET ...&gt;
- * &lt;PARAM ... &gt;
- * &lt;PARAM ... &gt;
- * &lt;/APPLET&gt;
- * <PRE>
- * @return boolean
- */
- public boolean shouldIndentChildSource() {
- return indentChild;
- }
-
- /**
- * Most of elements can compact spaces in their child text nodes.
- * Some special elements should keep them in their source.
- * @return boolean
- */
- public boolean shouldKeepSpaces() {
- return keepSpaces;
- }
-
- /**
- * @return boolean
- */
- public boolean shouldTerminateAt(HTMLElementDeclaration nextElement) {
- Iterator i = getTerminators();
- if (i == null)
- return false;
- String nextName = nextElement.getElementName();
- while (i.hasNext()) {
- if (nextName.equals(i.next()))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLEntityDeclImpl.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLEntityDeclImpl.java
deleted file mode 100644
index 1a47b01dfb..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLEntityDeclImpl.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLEntityDeclaration;
-import org.eclipse.wst.html.core.internal.provisional.HTMLCMProperties;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-
-
-/**
- */
-class HTMLEntityDeclImpl extends CMNodeImpl implements HTMLEntityDeclaration {
-
- private java.lang.String value = null;
-
- /**
- * CMEntityDeclImpl constructor comment.
- * @param entityName java.lang.String; Entity name.
- * @param entityValue java.lang.String; Value string.
- */
- public HTMLEntityDeclImpl(String entityName, String entityValue) {
- super(entityName);
- value = entityValue;
- }
-
- /**
- * getName method
- * @return java.lang.String
- */
- public String getName() {
- return getNodeName();
- }
-
- /**
- * Get CMNode type.<br>
- * @return int; Always return ENTITY_DECLARATION.
- */
- public int getNodeType() {
- return CMNode.ENTITY_DECLARATION;
- }
-
- /**
- * getValue method
- * @return java.lang.String
- */
- public String getValue() {
- return value;
- }
-
- /**
- */
- public boolean supports(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return true;
- return super.supports(propertyName);
- }
-
- /**
- * Entities in HTML documents are always treated with ignoring cases.
- * Because no special entities are defined in JSP 1.0, this method
- * can always return <code>true</code>.<br>
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return new Boolean(true);
- return super.getProperty(propertyName);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedA.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedA.java
deleted file mode 100644
index f603c37b79..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedA.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-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;
-
-/**
- * A.
- */
-final class HedA extends HedInlineContainer {
-
- /**
- */
- public HedA(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.A, collection);
- // CORRECT_EMPTY - GROUP_COMPACT
- correctionType = CORRECT_EMPTY;
- }
-
- /**
- * %attrs;
- * (charset %Charset; #IMPLIED)
- * (type %ContentType; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (href %URI; #IMPLIED)
- * (hreflang %LanguageCode; #IMPLIED)
- * (target %FrameTarget; #IMPLIED)
- * (rel %LinkTypes; #IMPLIED)
- * (rev %LinkTypes; #IMPLIED)
- * (accesskey %Character; #IMPLIED)
- * (directkey %Character; #IMPLIED)
- * (shape %Shape; rect)
- * (coords %Coords; #IMPLIED)
- * (tabindex NUMBER #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {CHTMLNamespace.ATTR_NAME_NAME, CHTMLNamespace.ATTR_NAME_HREF,};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * Exclusion.
- * <code>A</code> has the exclusion.
- * It is <code>A</code> itself.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null;
-
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- CMNode a = elementCollection.getNamedItem(CHTMLNamespace.ElementName.A);
- if (a != null)
- exclusion.appendChild(a);
-
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.A,};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedADDRESS.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedADDRESS.java
deleted file mode 100644
index 36a72f2f0f..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedADDRESS.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * ADDRESS.
- */
-final class HedADDRESS extends HTMLElemDeclImpl {
-
- /**
- */
- public HedADDRESS(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.ADDRESS, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_ADDRESS;
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.DIR, CHTMLNamespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBASE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBASE.java
deleted file mode 100644
index f33abe0813..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBASE.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-
-/**
- * BASE.
- */
-final class HedBASE extends HedEmpty {
-
- /**
- */
- public HedBASE(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.BASE, collection);
- // LAYOUT_HIDDEN.
- // Because, BASE is GROUP_HIDDEN in the C++DOM/DTDParser.cpp.
- layoutType = LAYOUT_HIDDEN;
- }
-
- /**
- * BASE.
- * (href %URI; #IMPLIED)
- * (target %FrameTarget; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- String[] names = {CHTMLNamespace.ATTR_NAME_HREF,};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBLOCKQUOTE.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBLOCKQUOTE.java
deleted file mode 100644
index 5aef97b8a6..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBLOCKQUOTE.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * BLOCKQUOTE.
- */
-final class HedBLOCKQUOTE extends HedFlowContainer {
-
- /**
- */
- public HedBLOCKQUOTE(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.BLOCKQUOTE, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- * (cite %URI; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.DIR, CHTMLNamespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBODY.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBODY.java
deleted file mode 100644
index 7483c58911..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBODY.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-/**
- * BODY.
- */
-final class HedBODY extends HedFlowContainer {
-
- private static String[] terminators = {CHTMLNamespace.ElementName.HEAD, CHTMLNamespace.ElementName.BODY, CHTMLNamespace.ElementName.HTML};
-
- /**
- */
- public HedBODY(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.BODY, collection);
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_BOTH;
- }
-
- /**
- * %attrs;
- * %bodycolors;
- * (onload %Script; #IMPLIED)
- * (onunload %Script; #IMPLIED)
- * (background %URI; #IMPLIED)
- * (marginwidth %Pixels; #IMPLIED) ... D205514
- * (marginheight %Pixels; #IMPLIED) .. D205514
- * (topmargin, CDATA, #IMPLIED) ...... D205514
- * (bottommargin, CDATA, #IMPLIED) ... D205514
- * (leftmargin, CDATA, #IMPLIED) ..... D205514
- * (rightmargin, CDATA, #IMPLIED) .... D205514
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %bodycolors;
- attributeCollection.getBodycolors(attributes);
-
- }
-
- /**
- * BODY has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBR.java
deleted file mode 100644
index 3ec16f585b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBR.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.wst.html.core.internal.contentmodel.chtml;
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLAttributeDeclaration;
-
-
-
-/**
- * BR.
- */
-final class HedBR extends HedEmpty {
-
- /**
- */
- public HedBR(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.BR, collection);
- // LAYOUT_BREAK.
- // Because, BR is GROUP_BREAK in the C++DOM/DTDParser.cpp.
- layoutType = LAYOUT_BREAK;
- }
-
- /**
- * BR.
- * %coreattrs;
- * (clear (left | all | right | none) none)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %coreattrs;
- attributeCollection.getCore(attributes);
- // clear
- HTMLAttributeDeclaration attr = attributeCollection.getDeclaration(CHTMLNamespace.ATTR_NAME_CLEAR);
- if (attr != null)
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_CLEAR, attr);
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedCENTER.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedCENTER.java
deleted file mode 100644
index 769393380e..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedCENTER.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * CENTER.
- */
-final class HedCENTER extends HedFlowContainer {
-
- /**
- */
- public HedCENTER(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.CENTER, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.DIR, CHTMLNamespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDD.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDD.java
deleted file mode 100644
index dd70e26781..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDD.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-/**
- * DD.
- */
-final class HedDD extends HedFlowContainer {
-
- private static String[] terminators = {CHTMLNamespace.ElementName.DT, CHTMLNamespace.ElementName.DD};
-
- /**
- */
- public HedDD(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.DD, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END_DEFAULT;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- * DD has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDIV.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDIV.java
deleted file mode 100644
index 8e2d794f13..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDIV.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * DIV.
- */
-final class HedDIV extends HedFlowContainer {
-
- /**
- */
- public HedDIV(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.DIV, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- * %align;
- * %reserved;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // %align;
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForParagraph();
- if (attr != null)
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_ALIGN, attr);
- // %reserved; ... empty
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.DIR, CHTMLNamespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDL.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDL.java
deleted file mode 100644
index 1746bb23ed..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDL.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * DL.
- */
-final class HedDL extends HTMLElemDeclImpl {
-
- /**
- */
- public HedDL(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.DL, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_DEFINITION_LIST;
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- indentChild = true;
- }
-
- /**
- * %arrays;
- * (compact (compact) #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.DIR, CHTMLNamespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDT.java
deleted file mode 100644
index 933d877c13..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDT.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-/**
- * DT.
- */
-final class HedDT extends HedInlineContainer {
-
- private static String[] terminators = {CHTMLNamespace.ElementName.DT, CHTMLNamespace.ElementName.DD};
-
- /**
- */
- public HedDT(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.DT, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- omitType = OMIT_END_DEFAULT;
- }
-
- /**
- * %attrs;
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- }
-
- /**
- * DT has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedEmpty.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedEmpty.java
deleted file mode 100644
index c6de6e0bc4..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedEmpty.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
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-
-/**
- * Base class for EMPTY type element declarations.
- */
-abstract class HedEmpty extends HTMLElemDeclImpl {
-
- /**
- */
- public HedEmpty(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_EMPTY;
- // EMPTY type has no end tag.
- omitType = OMIT_END_MUST;
- }
-
- /**
- * Content.<br>
- * EMPTY type always returns <code>null</code>.
- * <br>
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- public CMContent getContent() {
- return null;
- }
-
- /**
- * Content type.<br>
- * @see org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration
- */
- public int getContentType() {
- return CMElementDeclaration.EMPTY;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedFORM.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedFORM.java
deleted file mode 100644
index 090d61aacc..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedFORM.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-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;
-
-/**
- * FORM.
- */
-final class HedFORM extends HedFlowContainer {
-
- /**
- */
- public HedFORM(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.FORM, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs;
- * (action %URI; #REQUIRED)
- * (method (GET|POST) GET)
- * (enctype %ContentType; "application/x-www-form-urlencoded")
- * (accept %ContentTypes; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (onsubmit %Script; #IMPLIED)
- * (onreset %Script; #IMPLIED)
- * (target %FrameTarget; #IMPLIED)
- * (accept-charset %Charsets; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- String[] names = {CHTMLNamespace.ATTR_NAME_ACTION, CHTMLNamespace.ATTR_NAME_METHOD, CHTMLNamespace.ATTR_NAME_ENCTYPE, CHTMLNamespace.ATTR_NAME_NAME,};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- * Exclusion.
- * <code>FORM</code> has the exclusion.
- * It is <code>FORM</code> itself.
- */
- public CMContent getExclusion() {
- if (exclusion != null)
- return exclusion; // already created.
- if (elementCollection == null)
- return null; // fatal
-
- exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
- CMNode form = elementCollection.getNamedItem(CHTMLNamespace.ElementName.FORM);
- if (form != null)
- exclusion.appendChild(form);
-
- return exclusion;
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.DIR, CHTMLNamespace.ElementName.FORM, CHTMLNamespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedFlowContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedFlowContainer.java
deleted file mode 100644
index 8c484160f5..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedFlowContainer.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-/**
- * Base class for (%flow;)* containers.
- */
-abstract class HedFlowContainer extends HTMLElemDeclImpl {
-
- /**
- */
- public HedFlowContainer(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_FLOW_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHEAD.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHEAD.java
deleted file mode 100644
index e8ef6f9640..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHEAD.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-/**
- * HTML.
- */
-final class HedHEAD extends HTMLElemDeclImpl {
-
- private static String[] terminators = {CHTMLNamespace.ElementName.HEAD, CHTMLNamespace.ElementName.BODY, CHTMLNamespace.ElementName.HTML};
-
- /**
- */
- public HedHEAD(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.HEAD, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_HEAD;
- layoutType = LAYOUT_HIDDEN;
- omitType = OMIT_BOTH;
- }
-
- /**
- * Create all attribute declarations.
- * This method is called once in the constructor of the super class.
- * The <code>HEAD</code> element may have the following attributes:
- * <table>
- * <tbody>
- * <tr>
- * <th>NAME</th><th>TYPE</th><th>USAGE</th><th>DEFAULT (INITIAL) VALUE</th><th>MEMO</th>
- * </tr>
- * <tr>
- * <td>%i18n;</td><td>-</td><td>-</td><td>-</td><td>-</td>
- * </tr>
- * <tr>
- * <td>profile</td><td>URI</td><td>#IMPLIED</td><td>N/A</td><td>-</td>
- * </tr>
- * </tbody>
- * </table>
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %i18n;
- attributeCollection.getI18n(attributes);
- }
-
- /**
- * HEAD has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHR.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHR.java
deleted file mode 100644
index 732d09528a..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHR.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * HR.
- */
-final class HedHR extends HedEmpty {
-
- /**
- */
- public HedHR(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.HR, collection);
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * %attrs
- * (align (left|center|right) #IMPLIED) ... should be defined locally.
- * (noshade (noshade) #IMPLIED)
- * (size %Pixels; #IMPLIED)
- * (width %Length; #IMPLIED)
- * (color %Color; #IMPLIED) ... D205514
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (align (left|center|right) #IMPLIED) ... should be defined locally.
- HTMLCMDataTypeImpl atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {CHTMLNamespace.ATTR_VALUE_LEFT, CHTMLNamespace.ATTR_VALUE_CENTER, CHTMLNamespace.ATTR_VALUE_RIGHT};
- atype.setEnumValues(values);
- HTMLAttrDeclImpl attr = new HTMLAttrDeclImpl(CHTMLNamespace.ATTR_NAME_ALIGN, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_ALIGN, attr);
-
- // the rest.
- String[] names = {CHTMLNamespace.ATTR_NAME_NOSHADE, CHTMLNamespace.ATTR_NAME_SIZE, CHTMLNamespace.ATTR_NAME_WIDTH,};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.DIR, CHTMLNamespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHTML.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHTML.java
deleted file mode 100644
index 36c2e4adee..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHTML.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLAttributeDeclaration;
-
-
-/**
- * HTML.
- */
-final class HedHTML extends HTMLElemDeclImpl {
-
- private static String[] terminators = {CHTMLNamespace.ElementName.HTML};
-
- /**
- */
- public HedHTML(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.HTML, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_HTML;
- layoutType = LAYOUT_HIDDEN;
- omitType = OMIT_BOTH;
- }
-
- /**
- * Create all attribute declarations.
- * This method is called once in the constructor of the super class.
- * The <code>HTML</code> element may have the following attributes:
- * <table>
- * <tbody>
- * <tr>
- * <th>NAME</th><th>TYPE</th><th>USAGE</th><th>DEFAULT (INITIAL) VALUE</th><th>MEMO</th>
- * </tr>
- * <tr>
- * <td><code>%i18n;</code></td><td>-</td><td>-</td><td>-</td>
- * <td>{@link PDCMDocImpl#getAttrDeclarationsI18n}</td>
- * </tr>
- * <tr>
- * <td>version</td><td>CDATA</td><td>#FIXED</td>
- * <td>{@link HTML_VERSION_TRANSITIONAL}</td><td>deplecated in HTML4.01</td>
- * </tr>
- * </tbody>
- * </table><br>
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %i18n;
- attributeCollection.getI18n(attributes);
- // version
- HTMLAttributeDeclaration adec = attributeCollection.getDeclaration(CHTMLNamespace.ATTR_NAME_VERSION);
- if (adec != null)
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_VERSION, adec);
- }
-
- /**
- * HTML has terminators.
- * @return java.util.Iterator
- */
- protected Iterator getTerminators() {
- return Arrays.asList(terminators).iterator();
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHeading.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHeading.java
deleted file mode 100644
index af3be378f6..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHeading.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * H[1-6].
- */
-final class HedHeading extends HedInlineContainer {
-
- /**
- */
- public HedHeading(String elementName, ElementCollection collection) {
- super(elementName, collection);
- correctionType = CORRECT_EMPTY;
- layoutType = LAYOUT_BLOCK;
- }
-
- /**
- * Create all attribute declarations.
- * This method is called once in the constructor of the super class.
- * The <code>H1</code> element may have the following attributes:
- * <table>
- * <tbody>
- * <tr>
- * <th>NAME</th><th>TYPE</th><th>USAGE</th><th>DEFAULT (INITIAL) VALUE</th><th>MEMO</th>
- * </tr>
- * <tr>
- * <td>%attrs;</td><td>-</td><td>-</td><td>-</td><td>-</td>
- * </tr>
- * <tr>
- * <td>%align;</td><td>-</td><td>-</td><td>-</td><td>-</td>
- * </tr>
- * </tbody>
- * </table>
- * <p><b>%align;</b> means <code>align (left|center|right|justify) #IMPLIED</code>.
- * Unfortunately, this <code>align</code> is different from one in
- * <code>IMG</code> or <code>TABLE</code>. So, the attribute declaration
- * of <code>align</code> should be localy created and it shouldn't be registered
- * in a <code>HCMDocImpl</code> instance.</p>
- * <p>However, %align is used in sevaral times. I wouldn't write same code
- * in many times. So, I add a new utility method into <code>CMUtil</code>
- * to create the attribute declaration.</p>
- * <br>
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
- // align
- HTMLAttrDeclImpl attr = AttributeCollection.createAlignForParagraph();
- if (attr != null)
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_ALIGN, attr);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.DIR, CHTMLNamespace.ElementName.MENU};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedIMG.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedIMG.java
deleted file mode 100644
index e8454e2774..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedIMG.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * IMG.
- */
-final class HedIMG extends HedEmpty {
-
- /**
- */
- public HedIMG(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.IMG, collection);
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * IMG.
- * %attrs;
- * (src %URI; #REQUIRED): should be defined locally.
- * (alt %Text; #REQUIRED)
- * (longdesc %URI; #IMPLIED)
- * (name CDATA #IMPLIED)
- * (height %Length; #IMPLIED)
- * (width %Length; #IMPLIED)
- * (usemap %URI; #IMPLIED)
- * (ismap (ismap) #IMPLIED)
- * (align %IAlign; #IMPLIED): should be defined locally.
- * (border %Pixels; #IMPLIED)
- * (hspace %Pixels; #IMPLIED)
- * (vspace %Pixels; #IMPLIED)
- * (mapfile %URI; #IMPLIED)
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- // (src %URI; #REQUIRED): should be defined locally.
- HTMLCMDataTypeImpl atype = null;
- HTMLAttrDeclImpl attr = null;
- atype = new HTMLCMDataTypeImpl(CMDataType.URI);
- attr = new HTMLAttrDeclImpl(CHTMLNamespace.ATTR_NAME_SRC, atype, CMAttributeDeclaration.REQUIRED);
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_SRC, attr);
-
- String[] names = {CHTMLNamespace.ATTR_NAME_ALT, CHTMLNamespace.ATTR_NAME_NAME, CHTMLNamespace.ATTR_NAME_HEIGHT, CHTMLNamespace.ATTR_NAME_WIDTH, CHTMLNamespace.ATTR_NAME_BORDER, CHTMLNamespace.ATTR_NAME_HSPACE, CHTMLNamespace.ATTR_NAME_VSPACE,};
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
-
- // align (local); should be defined locally.
- attr = AttributeCollection.createAlignForImage();
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_ALIGN, attr);
- }
-
- /**
- */
- public CMNamedNodeMap getProhibitedAncestors() {
- if (prohibitedAncestors != null)
- return prohibitedAncestors;
-
- String[] names = {CHTMLNamespace.ElementName.PRE};
- prohibitedAncestors = elementCollection.getDeclarations(names);
-
- return prohibitedAncestors;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedINPUT.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedINPUT.java
deleted file mode 100644
index 29acb3aa73..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedINPUT.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-
-/**
- * INPUT.
- */
-final class HedINPUT extends HedEmpty {
-
- /**
- */
- public HedINPUT(ElementCollection collection) {
- super(CHTMLNamespace.ElementName.INPUT, collection);
- layoutType = LAYOUT_OBJECT;
- }
-
- /**
- * INPUT.
- * %attrs;
- * (type %InputType; TEXT) ... should be defined locally.
- * (name CDATA #IMPLIED)
- * (value CDATA #IMPLIED)
- * (checked (checked) #IMPLIED)
- * (disabled (disabled) #IMPLIED)
- * (readonly (readonly) #IMPLIED)
- * (size CDATA #IMPLIED) ... should be defined locally.
- * (maxlength NUMBER #IMPLIED)
- * (src %URI; #IMPLIED)
- * (alt CDATA #IMPLIED) ... should be defined locally.
- * (usemap %URI; #IMPLIED)
- * (ismap (ismap) #IMPLIED)
- * (tabindex NUMBER #IMPLIED)
- * (accesskey %Character; #IMPLIED)
- * (onfocus %Script; #IMPLIED)
- * (onblur %Script; #IMPLIED)
- * (onselect %Script; #IMPLIED)
- * (onchange %Script; #IMPLIED)
- * (accept %ContentTypes; #IMPLIED)
- * (align %IAlign; #IMPLIED) ... should be defined locally.
- * (istyle CDATA #IMPLIED)
- * <<D215684
- * (width CDATA; #IMPLIED)
- * (height CDATA; #IMPLIED)
- * (border CDATA; #IMPLIED)
- * D215684
- */
- protected void createAttributeDeclarations() {
- if (attributes != null)
- return; // already created.
- if (attributeCollection == null)
- return; // fatal
-
- attributes = new CMNamedNodeMapImpl();
-
- // %attrs;
- attributeCollection.getAttrs(attributes);
-
- HTMLCMDataTypeImpl atype = null;
- HTMLAttrDeclImpl attr = null;
- // (type %InputType; TEXT) ... should be defined locally.
- // NOTE: %InputType is ENUM;
- // (text | password | checkbox | radio | submit | reset |
- // file | hidden | image | button)
- atype = new HTMLCMDataTypeImpl(CMDataType.ENUM);
- String[] values = {CHTMLNamespace.ATTR_VALUE_TEXT, CHTMLNamespace.ATTR_VALUE_PASSWORD, CHTMLNamespace.ATTR_VALUE_CHECKBOX, CHTMLNamespace.ATTR_VALUE_RADIO, CHTMLNamespace.ATTR_VALUE_SUBMIT, CHTMLNamespace.ATTR_VALUE_RESET, CHTMLNamespace.ATTR_VALUE_HIDDEN,};
- atype.setEnumValues(values);
- atype.setImpliedValue(CMDataType.IMPLIED_VALUE_DEFAULT, CHTMLNamespace.ATTR_VALUE_TEXT);
- attr = new HTMLAttrDeclImpl(CHTMLNamespace.ATTR_NAME_TYPE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_TYPE, attr);
-
- // (size CDATA #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(CHTMLNamespace.ATTR_NAME_SIZE, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_SIZE, attr);
-
- // (alt CDATA #IMPLIED) ... should be defined locally.
- atype = new HTMLCMDataTypeImpl(CMDataType.CDATA);
- attr = new HTMLAttrDeclImpl(CHTMLNamespace.ATTR_NAME_ALT, atype, CMAttributeDeclaration.OPTIONAL);
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_ALT, attr);
-
- // (align %IAlign; #IMPLIED) ... should be defined locally.
- attr = AttributeCollection.createAlignForImage();
- attributes.putNamedItem(CHTMLNamespace.ATTR_NAME_ALIGN, attr);
-
- // the rest.
- String[] names = {CHTMLNamespace.ATTR_NAME_NAME, CHTMLNamespace.ATTR_NAME_VALUE, CHTMLNamespace.ATTR_NAME_CHECKED, CHTMLNamespace.ATTR_NAME_SIZE, CHTMLNamespace.ATTR_NAME_MAXLENGTH, CHTMLNamespace.ATTR_NAME_SRC, CHTMLNamespace.ATTR_NAME_ALT, CHTMLNamespace.ATTR_NAME_ALIGN, CHTMLNamespace.ATTR_NAME_ISTYLE,
- //<<D215684
- CHTMLNamespace.ATTR_NAME_WIDTH, CHTMLNamespace.ATTR_NAME_HEIGHT, CHTMLNamespace.ATTR_NAME_BORDER
- //<D215684
- };
- attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedInlineContainer.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedInlineContainer.java
deleted file mode 100644
index dbd4bc94b4..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedInlineContainer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.contentmodel.chtml;
-
-
-
-/**
- * Base class for (%inline;)* containers.
- */
-abstract class HedInlineContainer extends HTMLElemDeclImpl {
-
- /**
- * HedInlineContainer.
- * @param elementName java.lang.String
- * @param collection ElementCollection
- */
- public HedInlineContainer(String elementName, ElementCollection collection) {
- super(elementName, collection);
- typeDefinitionName = ComplexTypeDefinitionFactory.CTYPE_INLINE_CONTAINER;
- }
-}
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedLI.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedLI.java
deleted file mode 100644
index ea1f4a63a9..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedLI.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.wst.html.core.internal.contentmodel.chtml;
-
-
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-/**
- * LI.
- */
-final class HedLI extends HedFlowContainer {
-
- private static String[] terminators = {CHTMLNamespace.ElementName.LI};
-
- /**